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/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/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/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/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/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/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/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/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/site.go b/src/internal/connector/graph/betaSDK/models/site.go new file mode 100644 index 000000000..45d045f84 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site.go @@ -0,0 +1,636 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Site +type Site struct { + BaseItem + // Analytics about the view activities that took place in this site. + analytics ItemAnalyticsable + // The collection of column definitions reusable across lists under this site. + columns []ColumnDefinitionable + // The collection of content types defined for this site. + contentTypes []ContentTypeable + // The deleted property + deleted Deletedable + // The full title for the site. Read-only. + displayName *string + // The default drive (document library) for this site. + drive Driveable + // The collection of drives (document libraries) under this site. + drives []Driveable + // The collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site. + externalColumns []ColumnDefinitionable + // The informationProtection property + informationProtection InformationProtectionable + // Used to address any item contained in this site. This collection cannot be enumerated. + items []BaseItemable + // The collection of lists under this site. + lists []Listable + // The onenote property + onenote Onenoteable + // The collection of long running operations for the site. + operations []RichLongRunningOperationable + // The collection of pages in the SitePages list in this site. + pages []SitePageable + // The permissions associated with the site. Nullable. + permissions []Permissionable + // If present, indicates that this is the root site in the site collection. Read-only. + root Rootable + // The settings on this site. Read-only. + settings SiteSettingsable + // Returns identifiers useful for SharePoint REST compatibility. Read-only. + sharepointIds SharepointIdsable + // Provides details about the site's site collection. Available only on the root site. Read-only. + siteCollection SiteCollectionable + // The collection of the sub-sites under this site. + sites []Siteable +} +// NewSite instantiates a new Site and sets the default values. +func NewSite()(*Site) { + m := &Site{ + BaseItem: *NewBaseItem(), + } + odataTypeValue := "#microsoft.graph.site"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSiteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSiteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSite(), nil +} +// GetAnalytics gets the analytics property value. Analytics about the view activities that took place in this site. +func (m *Site) GetAnalytics()(ItemAnalyticsable) { + return m.analytics +} +// GetColumns gets the columns property value. The collection of column definitions reusable across lists under this site. +func (m *Site) GetColumns()([]ColumnDefinitionable) { + return m.columns +} +// GetContentTypes gets the contentTypes property value. The collection of content types defined for this site. +func (m *Site) GetContentTypes()([]ContentTypeable) { + return m.contentTypes +} +// GetDeleted gets the deleted property value. The deleted property +func (m *Site) GetDeleted()(Deletedable) { + return m.deleted +} +// GetDisplayName gets the displayName property value. The full title for the site. Read-only. +func (m *Site) GetDisplayName()(*string) { + return m.displayName +} +// GetDrive gets the drive property value. The default drive (document library) for this site. +func (m *Site) GetDrive()(Driveable) { + return m.drive +} +// GetDrives gets the drives property value. The collection of drives (document libraries) under this site. +func (m *Site) GetDrives()([]Driveable) { + return m.drives +} +// GetExternalColumns gets the externalColumns property value. The collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site. +func (m *Site) GetExternalColumns()([]ColumnDefinitionable) { + return m.externalColumns +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Site) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseItem.GetFieldDeserializers() + 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["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["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["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["externalColumns"] = 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.SetExternalColumns(res) + } + return nil + } + 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 + } + res["items"] = 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.SetItems(res) + } + return nil + } + res["lists"] = 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.SetLists(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["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["pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSitePageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SitePageable, len(val)) + for i, v := range val { + res[i] = v.(SitePageable) + } + m.SetPages(res) + } + 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["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["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSiteSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(SiteSettingsable)) + } + 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["siteCollection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSiteCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSiteCollection(val.(SiteCollectionable)) + } + 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 + } + return res +} +// GetInformationProtection gets the informationProtection property value. The informationProtection property +func (m *Site) GetInformationProtection()(InformationProtectionable) { + return m.informationProtection +} +// GetItems gets the items property value. Used to address any item contained in this site. This collection cannot be enumerated. +func (m *Site) GetItems()([]BaseItemable) { + return m.items +} +// GetLists gets the lists property value. The collection of lists under this site. +func (m *Site) GetLists()([]Listable) { + return m.lists +} +// GetOnenote gets the onenote property value. The onenote property +func (m *Site) GetOnenote()(Onenoteable) { + return m.onenote +} +// GetOperations gets the operations property value. The collection of long running operations for the site. +func (m *Site) GetOperations()([]RichLongRunningOperationable) { + return m.operations +} +// GetPages gets the pages property value. The collection of pages in the SitePages list in this site. +func (m *Site) GetPages()([]SitePageable) { + return m.pages +} +// GetPermissions gets the permissions property value. The permissions associated with the site. Nullable. +func (m *Site) GetPermissions()([]Permissionable) { + return m.permissions +} +// GetRoot gets the root property value. If present, indicates that this is the root site in the site collection. Read-only. +func (m *Site) GetRoot()(Rootable) { + return m.root +} +// GetSettings gets the settings property value. The settings on this site. Read-only. +func (m *Site) GetSettings()(SiteSettingsable) { + return m.settings +} +// GetSharepointIds gets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. +func (m *Site) GetSharepointIds()(SharepointIdsable) { + return m.sharepointIds +} +// GetSiteCollection gets the siteCollection property value. Provides details about the site's site collection. Available only on the root site. Read-only. +func (m *Site) GetSiteCollection()(SiteCollectionable) { + return m.siteCollection +} +// GetSites gets the sites property value. The collection of the sub-sites under this site. +func (m *Site) GetSites()([]Siteable) { + return m.sites +} +// Serialize serializes information the current object +func (m *Site) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("analytics", m.GetAnalytics()) + 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.WriteObjectValue("deleted", m.GetDeleted()) + 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.GetExternalColumns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExternalColumns())) + for i, v := range m.GetExternalColumns() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("externalColumns", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("informationProtection", m.GetInformationProtection()) + 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.GetLists() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLists())) + for i, v := range m.GetLists() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("lists", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("onenote", m.GetOnenote()) + 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.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("root", m.GetRoot()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sharepointIds", m.GetSharepointIds()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("siteCollection", m.GetSiteCollection()) + 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 + } + } + return nil +} +// SetAnalytics sets the analytics property value. Analytics about the view activities that took place in this site. +func (m *Site) SetAnalytics(value ItemAnalyticsable)() { + m.analytics = value +} +// SetColumns sets the columns property value. The collection of column definitions reusable across lists under this site. +func (m *Site) SetColumns(value []ColumnDefinitionable)() { + m.columns = value +} +// SetContentTypes sets the contentTypes property value. The collection of content types defined for this site. +func (m *Site) SetContentTypes(value []ContentTypeable)() { + m.contentTypes = value +} +// SetDeleted sets the deleted property value. The deleted property +func (m *Site) SetDeleted(value Deletedable)() { + m.deleted = value +} +// SetDisplayName sets the displayName property value. The full title for the site. Read-only. +func (m *Site) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDrive sets the drive property value. The default drive (document library) for this site. +func (m *Site) SetDrive(value Driveable)() { + m.drive = value +} +// SetDrives sets the drives property value. The collection of drives (document libraries) under this site. +func (m *Site) SetDrives(value []Driveable)() { + m.drives = value +} +// SetExternalColumns sets the externalColumns property value. The collection of column definitions available in the site that are referenced from the sites in the parent hierarchy of the current site. +func (m *Site) SetExternalColumns(value []ColumnDefinitionable)() { + m.externalColumns = value +} +// SetInformationProtection sets the informationProtection property value. The informationProtection property +func (m *Site) SetInformationProtection(value InformationProtectionable)() { + m.informationProtection = value +} +// SetItems sets the items property value. Used to address any item contained in this site. This collection cannot be enumerated. +func (m *Site) SetItems(value []BaseItemable)() { + m.items = value +} +// SetLists sets the lists property value. The collection of lists under this site. +func (m *Site) SetLists(value []Listable)() { + m.lists = value +} +// SetOnenote sets the onenote property value. The onenote property +func (m *Site) SetOnenote(value Onenoteable)() { + m.onenote = value +} +// SetOperations sets the operations property value. The collection of long running operations for the site. +func (m *Site) SetOperations(value []RichLongRunningOperationable)() { + m.operations = value +} +// SetPages sets the pages property value. The collection of pages in the SitePages list in this site. +func (m *Site) SetPages(value []SitePageable)() { + m.pages = value +} +// SetPermissions sets the permissions property value. The permissions associated with the site. Nullable. +func (m *Site) SetPermissions(value []Permissionable)() { + m.permissions = value +} +// SetRoot sets the root property value. If present, indicates that this is the root site in the site collection. Read-only. +func (m *Site) SetRoot(value Rootable)() { + m.root = value +} +// SetSettings sets the settings property value. The settings on this site. Read-only. +func (m *Site) SetSettings(value SiteSettingsable)() { + m.settings = value +} +// SetSharepointIds sets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. +func (m *Site) SetSharepointIds(value SharepointIdsable)() { + m.sharepointIds = value +} +// SetSiteCollection sets the siteCollection property value. Provides details about the site's site collection. Available only on the root site. Read-only. +func (m *Site) SetSiteCollection(value SiteCollectionable)() { + m.siteCollection = value +} +// SetSites sets the sites property value. The collection of the sub-sites under this site. +func (m *Site) SetSites(value []Siteable)() { + m.sites = value +} diff --git a/src/internal/connector/graph/betaSDK/models/site_access_type.go b/src/internal/connector/graph/betaSDK/models/site_access_type.go new file mode 100644 index 000000000..41c343153 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_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 SiteAccessType int + +const ( + BLOCK_SITEACCESSTYPE SiteAccessType = iota + FULL_SITEACCESSTYPE + LIMITED_SITEACCESSTYPE +) + +func (i SiteAccessType) String() string { + return []string{"block", "full", "limited"}[i] +} +func ParseSiteAccessType(v string) (interface{}, error) { + result := BLOCK_SITEACCESSTYPE + switch v { + case "block": + result = BLOCK_SITEACCESSTYPE + case "full": + result = FULL_SITEACCESSTYPE + case "limited": + result = LIMITED_SITEACCESSTYPE + default: + return 0, errors.New("Unknown SiteAccessType value: " + v) + } + return &result, nil +} +func SerializeSiteAccessType(values []SiteAccessType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/site_collection.go b/src/internal/connector/graph/betaSDK/models/site_collection.go new file mode 100644 index 000000000..1b85b0fe5 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_collection.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SiteCollection +type SiteCollection struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The geographic region code for where this site collection resides. Read-only. + dataLocationCode *string + // The hostname for the site collection. Read-only. + hostname *string + // The OdataType property + odataType *string + // If present, indicates that this is a root site collection in SharePoint. Read-only. + root Rootable +} +// NewSiteCollection instantiates a new siteCollection and sets the default values. +func NewSiteCollection()(*SiteCollection) { + m := &SiteCollection{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSiteCollectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSiteCollectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSiteCollection(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SiteCollection) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDataLocationCode gets the dataLocationCode property value. The geographic region code for where this site collection resides. Read-only. +func (m *SiteCollection) GetDataLocationCode()(*string) { + return m.dataLocationCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SiteCollection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dataLocationCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDataLocationCode(val) + } + 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["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + 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 + } + return res +} +// GetHostname gets the hostname property value. The hostname for the site collection. Read-only. +func (m *SiteCollection) GetHostname()(*string) { + return m.hostname +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SiteCollection) GetOdataType()(*string) { + return m.odataType +} +// GetRoot gets the root property value. If present, indicates that this is a root site collection in SharePoint. Read-only. +func (m *SiteCollection) GetRoot()(Rootable) { + return m.root +} +// Serialize serializes information the current object +func (m *SiteCollection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("dataLocationCode", m.GetDataLocationCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hostname", m.GetHostname()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("root", m.GetRoot()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SiteCollection) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDataLocationCode sets the dataLocationCode property value. The geographic region code for where this site collection resides. Read-only. +func (m *SiteCollection) SetDataLocationCode(value *string)() { + m.dataLocationCode = value +} +// SetHostname sets the hostname property value. The hostname for the site collection. Read-only. +func (m *SiteCollection) SetHostname(value *string)() { + m.hostname = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SiteCollection) SetOdataType(value *string)() { + m.odataType = value +} +// SetRoot sets the root property value. If present, indicates that this is a root site collection in SharePoint. Read-only. +func (m *SiteCollection) SetRoot(value Rootable)() { + m.root = value +} diff --git a/src/internal/connector/graph/betaSDK/models/site_collection_response.go b/src/internal/connector/graph/betaSDK/models/site_collection_response.go new file mode 100644 index 000000000..649a3e653 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SiteCollectionResponse +type SiteCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Siteable +} +// NewSiteCollectionResponse instantiates a new SiteCollectionResponse and sets the default values. +func NewSiteCollectionResponse()(*SiteCollectionResponse) { + m := &SiteCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSiteCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSiteCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSiteCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SiteCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = 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.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SiteCollectionResponse) GetValue()([]Siteable) { + return m.value +} +// Serialize serializes information the current object +func (m *SiteCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SiteCollectionResponse) SetValue(value []Siteable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/site_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/site_collection_responseable.go new file mode 100644 index 000000000..e8b306a85 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SiteCollectionResponseable +type SiteCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Siteable) + SetValue(value []Siteable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/site_collectionable.go b/src/internal/connector/graph/betaSDK/models/site_collectionable.go new file mode 100644 index 000000000..8027beeb0 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_collectionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SiteCollectionable +type SiteCollectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDataLocationCode()(*string) + GetHostname()(*string) + GetOdataType()(*string) + GetRoot()(Rootable) + SetDataLocationCode(value *string)() + SetHostname(value *string)() + SetOdataType(value *string)() + SetRoot(value Rootable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/site_page.go b/src/internal/connector/graph/betaSDK/models/site_page.go new file mode 100644 index 000000000..c5387f2cb --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_page.go @@ -0,0 +1,358 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SitePage provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SitePage struct { + BaseItem + // Indicates the layout of the content in a given SharePoint page, including horizontal sections and vertical section + canvasLayout CanvasLayoutable + // Inherited from baseItem. + contentType ContentTypeInfoable + // The name of the page layout of the page. The possible values are: microsoftReserved, article, home, unknownFutureValue. + pageLayout *PageLayoutType + // Indicates the promotion kind of the sitePage. The possible values are: microsoftReserved, page, newsPost, unknownFutureValue. + promotionKind *PagePromotionType + // The publishing status and the MM.mm version of the page. + publishingState PublicationFacetable + // Reactions information for the page. + reactions ReactionsFacetable + // Determines whether or not to show comments at the bottom of the page. + showComments *bool + // Determines whether or not to show recommended pages at the bottom of the page. + showRecommendedPages *bool + // Url of the sitePage's thumbnail image + thumbnailWebUrl *string + // Title of the sitePage. + title *string + // Title area on the SharePoint page. + titleArea TitleAreaable + // Collection of webparts on the SharePoint page + webParts []WebPartable +} +// NewSitePage instantiates a new sitePage and sets the default values. +func NewSitePage()(*SitePage) { + m := &SitePage{ + BaseItem: *NewBaseItem(), + } + odataTypeValue := "#microsoft.graph.sitePage"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSitePageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSitePageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSitePage(), nil +} +// GetCanvasLayout gets the canvasLayout property value. Indicates the layout of the content in a given SharePoint page, including horizontal sections and vertical section +func (m *SitePage) GetCanvasLayout()(CanvasLayoutable) { + return m.canvasLayout +} +// GetContentType gets the contentType property value. Inherited from baseItem. +func (m *SitePage) GetContentType()(ContentTypeInfoable) { + return m.contentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SitePage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseItem.GetFieldDeserializers() + res["canvasLayout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCanvasLayoutFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCanvasLayout(val.(CanvasLayoutable)) + } + 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["pageLayout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePageLayoutType) + if err != nil { + return err + } + if val != nil { + m.SetPageLayout(val.(*PageLayoutType)) + } + return nil + } + res["promotionKind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePagePromotionType) + if err != nil { + return err + } + if val != nil { + m.SetPromotionKind(val.(*PagePromotionType)) + } + return nil + } + res["publishingState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePublicationFacetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublishingState(val.(PublicationFacetable)) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReactionsFacetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReactions(val.(ReactionsFacetable)) + } + return nil + } + res["showComments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowComments(val) + } + return nil + } + res["showRecommendedPages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowRecommendedPages(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 + } + res["titleArea"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTitleAreaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTitleArea(val.(TitleAreaable)) + } + return nil + } + 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 + } + return res +} +// GetPageLayout gets the pageLayout property value. The name of the page layout of the page. The possible values are: microsoftReserved, article, home, unknownFutureValue. +func (m *SitePage) GetPageLayout()(*PageLayoutType) { + return m.pageLayout +} +// GetPromotionKind gets the promotionKind property value. Indicates the promotion kind of the sitePage. The possible values are: microsoftReserved, page, newsPost, unknownFutureValue. +func (m *SitePage) GetPromotionKind()(*PagePromotionType) { + return m.promotionKind +} +// GetPublishingState gets the publishingState property value. The publishing status and the MM.mm version of the page. +func (m *SitePage) GetPublishingState()(PublicationFacetable) { + return m.publishingState +} +// GetReactions gets the reactions property value. Reactions information for the page. +func (m *SitePage) GetReactions()(ReactionsFacetable) { + return m.reactions +} +// GetShowComments gets the showComments property value. Determines whether or not to show comments at the bottom of the page. +func (m *SitePage) GetShowComments()(*bool) { + return m.showComments +} +// GetShowRecommendedPages gets the showRecommendedPages property value. Determines whether or not to show recommended pages at the bottom of the page. +func (m *SitePage) GetShowRecommendedPages()(*bool) { + return m.showRecommendedPages +} +// GetThumbnailWebUrl gets the thumbnailWebUrl property value. Url of the sitePage's thumbnail image +func (m *SitePage) GetThumbnailWebUrl()(*string) { + return m.thumbnailWebUrl +} +// GetTitle gets the title property value. Title of the sitePage. +func (m *SitePage) GetTitle()(*string) { + return m.title +} +// GetTitleArea gets the titleArea property value. Title area on the SharePoint page. +func (m *SitePage) GetTitleArea()(TitleAreaable) { + return m.titleArea +} +// GetWebParts gets the webParts property value. Collection of webparts on the SharePoint page +func (m *SitePage) GetWebParts()([]WebPartable) { + return m.webParts +} +// Serialize serializes information the current object +func (m *SitePage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("canvasLayout", m.GetCanvasLayout()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + if m.GetPageLayout() != nil { + cast := (*m.GetPageLayout()).String() + err = writer.WriteStringValue("pageLayout", &cast) + if err != nil { + return err + } + } + if m.GetPromotionKind() != nil { + cast := (*m.GetPromotionKind()).String() + err = writer.WriteStringValue("promotionKind", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("publishingState", m.GetPublishingState()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reactions", m.GetReactions()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("showComments", m.GetShowComments()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("showRecommendedPages", m.GetShowRecommendedPages()) + 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 + } + } + { + err = writer.WriteObjectValue("titleArea", m.GetTitleArea()) + 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 + } + } + return nil +} +// SetCanvasLayout sets the canvasLayout property value. Indicates the layout of the content in a given SharePoint page, including horizontal sections and vertical section +func (m *SitePage) SetCanvasLayout(value CanvasLayoutable)() { + m.canvasLayout = value +} +// SetContentType sets the contentType property value. Inherited from baseItem. +func (m *SitePage) SetContentType(value ContentTypeInfoable)() { + m.contentType = value +} +// SetPageLayout sets the pageLayout property value. The name of the page layout of the page. The possible values are: microsoftReserved, article, home, unknownFutureValue. +func (m *SitePage) SetPageLayout(value *PageLayoutType)() { + m.pageLayout = value +} +// SetPromotionKind sets the promotionKind property value. Indicates the promotion kind of the sitePage. The possible values are: microsoftReserved, page, newsPost, unknownFutureValue. +func (m *SitePage) SetPromotionKind(value *PagePromotionType)() { + m.promotionKind = value +} +// SetPublishingState sets the publishingState property value. The publishing status and the MM.mm version of the page. +func (m *SitePage) SetPublishingState(value PublicationFacetable)() { + m.publishingState = value +} +// SetReactions sets the reactions property value. Reactions information for the page. +func (m *SitePage) SetReactions(value ReactionsFacetable)() { + m.reactions = value +} +// SetShowComments sets the showComments property value. Determines whether or not to show comments at the bottom of the page. +func (m *SitePage) SetShowComments(value *bool)() { + m.showComments = value +} +// SetShowRecommendedPages sets the showRecommendedPages property value. Determines whether or not to show recommended pages at the bottom of the page. +func (m *SitePage) SetShowRecommendedPages(value *bool)() { + m.showRecommendedPages = value +} +// SetThumbnailWebUrl sets the thumbnailWebUrl property value. Url of the sitePage's thumbnail image +func (m *SitePage) SetThumbnailWebUrl(value *string)() { + m.thumbnailWebUrl = value +} +// SetTitle sets the title property value. Title of the sitePage. +func (m *SitePage) SetTitle(value *string)() { + m.title = value +} +// SetTitleArea sets the titleArea property value. Title area on the SharePoint page. +func (m *SitePage) SetTitleArea(value TitleAreaable)() { + m.titleArea = value +} +// SetWebParts sets the webParts property value. Collection of webparts on the SharePoint page +func (m *SitePage) SetWebParts(value []WebPartable)() { + m.webParts = value +} diff --git a/src/internal/connector/graph/betaSDK/models/site_page_collection_response.go b/src/internal/connector/graph/betaSDK/models/site_page_collection_response.go new file mode 100644 index 000000000..81a697e9c --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_page_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SitePageCollectionResponse +type SitePageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SitePageable +} +// NewSitePageCollectionResponse instantiates a new SitePageCollectionResponse and sets the default values. +func NewSitePageCollectionResponse()(*SitePageCollectionResponse) { + m := &SitePageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSitePageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSitePageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSitePageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SitePageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSitePageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SitePageable, len(val)) + for i, v := range val { + res[i] = v.(SitePageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SitePageCollectionResponse) GetValue()([]SitePageable) { + return m.value +} +// Serialize serializes information the current object +func (m *SitePageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SitePageCollectionResponse) SetValue(value []SitePageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/site_page_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/site_page_collection_responseable.go new file mode 100644 index 000000000..785acfc6b --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_page_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SitePageCollectionResponseable +type SitePageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SitePageable) + SetValue(value []SitePageable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/site_pageable.go b/src/internal/connector/graph/betaSDK/models/site_pageable.go new file mode 100644 index 000000000..f387738c4 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_pageable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SitePageable +type SitePageable interface { + BaseItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanvasLayout()(CanvasLayoutable) + GetContentType()(ContentTypeInfoable) + GetPageLayout()(*PageLayoutType) + GetPromotionKind()(*PagePromotionType) + GetPublishingState()(PublicationFacetable) + GetReactions()(ReactionsFacetable) + GetShowComments()(*bool) + GetShowRecommendedPages()(*bool) + GetThumbnailWebUrl()(*string) + GetTitle()(*string) + GetTitleArea()(TitleAreaable) + GetWebParts()([]WebPartable) + SetCanvasLayout(value CanvasLayoutable)() + SetContentType(value ContentTypeInfoable)() + SetPageLayout(value *PageLayoutType)() + SetPromotionKind(value *PagePromotionType)() + SetPublishingState(value PublicationFacetable)() + SetReactions(value ReactionsFacetable)() + SetShowComments(value *bool)() + SetShowRecommendedPages(value *bool)() + SetThumbnailWebUrl(value *string)() + SetTitle(value *string)() + SetTitleArea(value TitleAreaable)() + SetWebParts(value []WebPartable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/site_security_level.go b/src/internal/connector/graph/betaSDK/models/site_security_level.go new file mode 100644 index 000000000..9f65ef64d --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_security_level.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SiteSecurityLevel int + +const ( + // User Defined, default value, no intent. + USERDEFINED_SITESECURITYLEVEL SiteSecurityLevel = iota + // Low. + LOW_SITESECURITYLEVEL + // Medium-low. + MEDIUMLOW_SITESECURITYLEVEL + // Medium. + MEDIUM_SITESECURITYLEVEL + // Medium-high. + MEDIUMHIGH_SITESECURITYLEVEL + // High. + HIGH_SITESECURITYLEVEL +) + +func (i SiteSecurityLevel) String() string { + return []string{"userDefined", "low", "mediumLow", "medium", "mediumHigh", "high"}[i] +} +func ParseSiteSecurityLevel(v string) (interface{}, error) { + result := USERDEFINED_SITESECURITYLEVEL + switch v { + case "userDefined": + result = USERDEFINED_SITESECURITYLEVEL + case "low": + result = LOW_SITESECURITYLEVEL + case "mediumLow": + result = MEDIUMLOW_SITESECURITYLEVEL + case "medium": + result = MEDIUM_SITESECURITYLEVEL + case "mediumHigh": + result = MEDIUMHIGH_SITESECURITYLEVEL + case "high": + result = HIGH_SITESECURITYLEVEL + default: + return 0, errors.New("Unknown SiteSecurityLevel value: " + v) + } + return &result, nil +} +func SerializeSiteSecurityLevel(values []SiteSecurityLevel) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/site_settings.go b/src/internal/connector/graph/betaSDK/models/site_settings.go new file mode 100644 index 000000000..a2a36d94a --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_settings.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SiteSettings +type SiteSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The language tag for the language used on this site. + languageTag *string + // The OdataType property + odataType *string + // Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC). + timeZone *string +} +// NewSiteSettings instantiates a new siteSettings and sets the default values. +func NewSiteSettings()(*SiteSettings) { + m := &SiteSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSiteSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSiteSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSiteSettings(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SiteSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SiteSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["languageTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguageTag(val) + } + return nil + } + res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["timeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeZone(val) + } + return nil + } + return res +} +// GetLanguageTag gets the languageTag property value. The language tag for the language used on this site. +func (m *SiteSettings) GetLanguageTag()(*string) { + return m.languageTag +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SiteSettings) GetOdataType()(*string) { + return m.odataType +} +// GetTimeZone gets the timeZone property value. Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC). +func (m *SiteSettings) GetTimeZone()(*string) { + return m.timeZone +} +// Serialize serializes information the current object +func (m *SiteSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("languageTag", m.GetLanguageTag()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timeZone", m.GetTimeZone()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SiteSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLanguageTag sets the languageTag property value. The language tag for the language used on this site. +func (m *SiteSettings) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SiteSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetTimeZone sets the timeZone property value. Indicates the time offset for the time zone of the site from Coordinated Universal Time (UTC). +func (m *SiteSettings) SetTimeZone(value *string)() { + m.timeZone = value +} diff --git a/src/internal/connector/graph/betaSDK/models/site_settingsable.go b/src/internal/connector/graph/betaSDK/models/site_settingsable.go new file mode 100644 index 000000000..0423550ea --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/site_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SiteSettingsable +type SiteSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLanguageTag()(*string) + GetOdataType()(*string) + GetTimeZone()(*string) + SetLanguageTag(value *string)() + SetOdataType(value *string)() + SetTimeZone(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/siteable.go b/src/internal/connector/graph/betaSDK/models/siteable.go new file mode 100644 index 000000000..31e4016a2 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/siteable.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Siteable +type Siteable interface { + BaseItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnalytics()(ItemAnalyticsable) + GetColumns()([]ColumnDefinitionable) + GetContentTypes()([]ContentTypeable) + GetDeleted()(Deletedable) + GetDisplayName()(*string) + GetDrive()(Driveable) + GetDrives()([]Driveable) + GetExternalColumns()([]ColumnDefinitionable) + GetInformationProtection()(InformationProtectionable) + GetItems()([]BaseItemable) + GetLists()([]Listable) + GetOnenote()(Onenoteable) + GetOperations()([]RichLongRunningOperationable) + GetPages()([]SitePageable) + GetPermissions()([]Permissionable) + GetRoot()(Rootable) + GetSettings()(SiteSettingsable) + GetSharepointIds()(SharepointIdsable) + GetSiteCollection()(SiteCollectionable) + GetSites()([]Siteable) + SetAnalytics(value ItemAnalyticsable)() + SetColumns(value []ColumnDefinitionable)() + SetContentTypes(value []ContentTypeable)() + SetDeleted(value Deletedable)() + SetDisplayName(value *string)() + SetDrive(value Driveable)() + SetDrives(value []Driveable)() + SetExternalColumns(value []ColumnDefinitionable)() + SetInformationProtection(value InformationProtectionable)() + SetItems(value []BaseItemable)() + SetLists(value []Listable)() + SetOnenote(value Onenoteable)() + SetOperations(value []RichLongRunningOperationable)() + SetPages(value []SitePageable)() + SetPermissions(value []Permissionable)() + SetRoot(value Rootable)() + SetSettings(value SiteSettingsable)() + SetSharepointIds(value SharepointIdsable)() + SetSiteCollection(value SiteCollectionable)() + SetSites(value []Siteable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/tenantadmin/idle_session_sign_out.go b/src/internal/connector/graph/betaSDK/models/tenantadmin/idle_session_sign_out.go new file mode 100644 index 000000000..8bc817cbd --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/tenantadmin/idle_session_sign_out.go @@ -0,0 +1,149 @@ +package tenantadmin + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdleSessionSignOut +type IdleSessionSignOut 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 idle session sign-out policy is enabled. + isEnabled *bool + // The OdataType property + odataType *string + // Number of seconds of inactivity after which a user is signed out. + signOutAfterInSeconds *int64 + // Number of seconds of inactivity after which a user is notified that they'll be signed out. + warnAfterInSeconds *int64 +} +// NewIdleSessionSignOut instantiates a new idleSessionSignOut and sets the default values. +func NewIdleSessionSignOut()(*IdleSessionSignOut) { + m := &IdleSessionSignOut{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIdleSessionSignOutFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdleSessionSignOutFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdleSessionSignOut(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *IdleSessionSignOut) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdleSessionSignOut) 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 + } + res["signOutAfterInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSignOutAfterInSeconds(val) + } + return nil + } + res["warnAfterInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetWarnAfterInSeconds(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Indicates whether the idle session sign-out policy is enabled. +func (m *IdleSessionSignOut) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IdleSessionSignOut) GetOdataType()(*string) { + return m.odataType +} +// GetSignOutAfterInSeconds gets the signOutAfterInSeconds property value. Number of seconds of inactivity after which a user is signed out. +func (m *IdleSessionSignOut) GetSignOutAfterInSeconds()(*int64) { + return m.signOutAfterInSeconds +} +// GetWarnAfterInSeconds gets the warnAfterInSeconds property value. Number of seconds of inactivity after which a user is notified that they'll be signed out. +func (m *IdleSessionSignOut) GetWarnAfterInSeconds()(*int64) { + return m.warnAfterInSeconds +} +// Serialize serializes information the current object +func (m *IdleSessionSignOut) 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.WriteInt64Value("signOutAfterInSeconds", m.GetSignOutAfterInSeconds()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("warnAfterInSeconds", m.GetWarnAfterInSeconds()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *IdleSessionSignOut) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether the idle session sign-out policy is enabled. +func (m *IdleSessionSignOut) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IdleSessionSignOut) SetOdataType(value *string)() { + m.odataType = value +} +// SetSignOutAfterInSeconds sets the signOutAfterInSeconds property value. Number of seconds of inactivity after which a user is signed out. +func (m *IdleSessionSignOut) SetSignOutAfterInSeconds(value *int64)() { + m.signOutAfterInSeconds = value +} +// SetWarnAfterInSeconds sets the warnAfterInSeconds property value. Number of seconds of inactivity after which a user is notified that they'll be signed out. +func (m *IdleSessionSignOut) SetWarnAfterInSeconds(value *int64)() { + m.warnAfterInSeconds = value +} diff --git a/src/internal/connector/graph/betaSDK/models/tenantadmin/idle_session_sign_outable.go b/src/internal/connector/graph/betaSDK/models/tenantadmin/idle_session_sign_outable.go new file mode 100644 index 000000000..921f1ebd9 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/tenantadmin/idle_session_sign_outable.go @@ -0,0 +1,19 @@ +package tenantadmin + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdleSessionSignOutable +type IdleSessionSignOutable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEnabled()(*bool) + GetOdataType()(*string) + GetSignOutAfterInSeconds()(*int64) + GetWarnAfterInSeconds()(*int64) + SetIsEnabled(value *bool)() + SetOdataType(value *string)() + SetSignOutAfterInSeconds(value *int64)() + SetWarnAfterInSeconds(value *int64)() +} diff --git a/src/internal/connector/graph/betaSDK/models/tenantadmin/image_tagging_choice.go b/src/internal/connector/graph/betaSDK/models/tenantadmin/image_tagging_choice.go new file mode 100644 index 000000000..febb73d69 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/tenantadmin/image_tagging_choice.go @@ -0,0 +1,40 @@ +package tenantadmin +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ImageTaggingChoice int + +const ( + DISABLED_IMAGETAGGINGCHOICE ImageTaggingChoice = iota + BASIC_IMAGETAGGINGCHOICE + ENHANCED_IMAGETAGGINGCHOICE + UNKNOWNFUTUREVALUE_IMAGETAGGINGCHOICE +) + +func (i ImageTaggingChoice) String() string { + return []string{"disabled", "basic", "enhanced", "unknownFutureValue"}[i] +} +func ParseImageTaggingChoice(v string) (interface{}, error) { + result := DISABLED_IMAGETAGGINGCHOICE + switch v { + case "disabled": + result = DISABLED_IMAGETAGGINGCHOICE + case "basic": + result = BASIC_IMAGETAGGINGCHOICE + case "enhanced": + result = ENHANCED_IMAGETAGGINGCHOICE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_IMAGETAGGINGCHOICE + default: + return 0, errors.New("Unknown ImageTaggingChoice value: " + v) + } + return &result, nil +} +func SerializeImageTaggingChoice(values []ImageTaggingChoice) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/tenantadmin/settings.go b/src/internal/connector/graph/betaSDK/models/tenantadmin/settings.go new file mode 100644 index 000000000..67bf0fe0f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/tenantadmin/settings.go @@ -0,0 +1,813 @@ +package tenantadmin + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Settings +type Settings struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Collection of trusted domain GUIDs for the OneDrive sync app. + allowedDomainGuidsForSyncApp []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // Collection of managed paths available for site creation. Read-only. + availableManagedPathsForSiteCreation []string + // The number of days for preserving a deleted user's OneDrive. + deletedUserPersonalSiteRetentionPeriodInDays *int32 + // Collection of file extensions not uploaded by the OneDrive sync app. + excludedFileExtensionsForSyncApp []string + // Specifies the idle session sign-out policies for the tenant. + idleSessionSignOut IdleSessionSignOutable + // Specifies the image tagging option for the tenant. Possible values are: disabled, basic, enhanced. + imageTaggingOption *ImageTaggingChoice + // Indicates whether comments are allowed on modern site pages in SharePoint. + isCommentingOnSitePagesEnabled *bool + // Indicates whether push notifications are enabled for OneDrive events. + isFileActivityNotificationEnabled *bool + // Indicates whether legacy authentication protocols are enabled for the tenant. + isLegacyAuthProtocolsEnabled *bool + // Indicates whetherif Fluid Framework is allowed on SharePoint sites. + isLoopEnabled *bool + // Indicates whether files can be synced using the OneDrive sync app for Mac. + isMacSyncAppEnabled *bool + // Indicates whether guests must sign in using the same account to which sharing invitations are sent. + isRequireAcceptingUserToMatchInvitedUserEnabled *bool + // Indicates whether guests are allowed to reshare files, folders, and sites they don't own. + isResharingByExternalUsersEnabled *bool + // Indicates whether mobile push notifications are enabled for SharePoint. + isSharePointMobileNotificationEnabled *bool + // Indicates whether the newsfeed is allowed on the modern site pages in SharePoint. + isSharePointNewsfeedEnabled *bool + // Indicates whether users are allowed to create sites. + isSiteCreationEnabled *bool + // Indicates whether the UI commands for creating sites are shown. + isSiteCreationUIEnabled *bool + // Indicates whether creating new modern pages is allowed on SharePoint sites. + isSitePagesCreationEnabled *bool + // Indicates whether site storage space is automatically managed or if specific storage limits are set per site. + isSitesStorageLimitAutomatic *bool + // Indicates whether the sync button in OneDrive is hidden. + isSyncButtonHiddenOnPersonalSite *bool + // Indicates whether users are allowed to sync files only on PCs joined to specific domains. + isUnmanagedSyncAppForTenantRestricted *bool + // The default OneDrive storage limit for all new and existing users who are assigned a qualifying license. Measured in megabytes (MB). + personalSiteDefaultStorageLimitInMB *int64 + // Collection of email domains that are allowed for sharing outside the organization. + sharingAllowedDomainList []string + // Collection of email domains that are blocked for sharing outside the organization. + sharingBlockedDomainList []string + // Sharing capability for the tenant. Possible values are: disabled, externalUserSharingOnly, externalUserAndGuestSharing, existingExternalUserSharingOnly. + sharingCapability *SharingCapabilities + // Specifies the external sharing mode for domains. Possible values are: none, allowList, blockList. + sharingDomainRestrictionMode *SharingDomainRestrictionMode + // The value of the team site managed path. This is the path under which new team sites will be created. + siteCreationDefaultManagedPath *string + // The default storage quota for a new site upon creation. Measured in megabytes (MB). + siteCreationDefaultStorageLimitInMB *int32 + // The default timezone of a tenant for newly created sites. For a list of possible values, see SPRegionalSettings.TimeZones property. + tenantDefaultTimezone *string +} +// NewSettings instantiates a new settings and sets the default values. +func NewSettings()(*Settings) { + m := &Settings{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + 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 +} +// GetAllowedDomainGuidsForSyncApp gets the allowedDomainGuidsForSyncApp property value. Collection of trusted domain GUIDs for the OneDrive sync app. +func (m *Settings) GetAllowedDomainGuidsForSyncApp()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.allowedDomainGuidsForSyncApp +} +// GetAvailableManagedPathsForSiteCreation gets the availableManagedPathsForSiteCreation property value. Collection of managed paths available for site creation. Read-only. +func (m *Settings) GetAvailableManagedPathsForSiteCreation()([]string) { + return m.availableManagedPathsForSiteCreation +} +// GetDeletedUserPersonalSiteRetentionPeriodInDays gets the deletedUserPersonalSiteRetentionPeriodInDays property value. The number of days for preserving a deleted user's OneDrive. +func (m *Settings) GetDeletedUserPersonalSiteRetentionPeriodInDays()(*int32) { + return m.deletedUserPersonalSiteRetentionPeriodInDays +} +// GetExcludedFileExtensionsForSyncApp gets the excludedFileExtensionsForSyncApp property value. Collection of file extensions not uploaded by the OneDrive sync app. +func (m *Settings) GetExcludedFileExtensionsForSyncApp()([]string) { + return m.excludedFileExtensionsForSyncApp +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Settings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowedDomainGuidsForSyncApp"] = 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.SetAllowedDomainGuidsForSyncApp(res) + } + return nil + } + res["availableManagedPathsForSiteCreation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAvailableManagedPathsForSiteCreation(res) + } + return nil + } + res["deletedUserPersonalSiteRetentionPeriodInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeletedUserPersonalSiteRetentionPeriodInDays(val) + } + return nil + } + res["excludedFileExtensionsForSyncApp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludedFileExtensionsForSyncApp(res) + } + return nil + } + res["idleSessionSignOut"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdleSessionSignOutFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdleSessionSignOut(val.(IdleSessionSignOutable)) + } + return nil + } + res["imageTaggingOption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImageTaggingChoice) + if err != nil { + return err + } + if val != nil { + m.SetImageTaggingOption(val.(*ImageTaggingChoice)) + } + return nil + } + res["isCommentingOnSitePagesEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCommentingOnSitePagesEnabled(val) + } + return nil + } + res["isFileActivityNotificationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFileActivityNotificationEnabled(val) + } + return nil + } + res["isLegacyAuthProtocolsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsLegacyAuthProtocolsEnabled(val) + } + return nil + } + res["isLoopEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsLoopEnabled(val) + } + return nil + } + res["isMacSyncAppEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMacSyncAppEnabled(val) + } + return nil + } + res["isRequireAcceptingUserToMatchInvitedUserEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRequireAcceptingUserToMatchInvitedUserEnabled(val) + } + return nil + } + res["isResharingByExternalUsersEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsResharingByExternalUsersEnabled(val) + } + return nil + } + res["isSharePointMobileNotificationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSharePointMobileNotificationEnabled(val) + } + return nil + } + res["isSharePointNewsfeedEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSharePointNewsfeedEnabled(val) + } + return nil + } + res["isSiteCreationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSiteCreationEnabled(val) + } + return nil + } + res["isSiteCreationUIEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSiteCreationUIEnabled(val) + } + return nil + } + res["isSitePagesCreationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSitePagesCreationEnabled(val) + } + return nil + } + res["isSitesStorageLimitAutomatic"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSitesStorageLimitAutomatic(val) + } + return nil + } + res["isSyncButtonHiddenOnPersonalSite"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSyncButtonHiddenOnPersonalSite(val) + } + return nil + } + res["isUnmanagedSyncAppForTenantRestricted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsUnmanagedSyncAppForTenantRestricted(val) + } + return nil + } + res["personalSiteDefaultStorageLimitInMB"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetPersonalSiteDefaultStorageLimitInMB(val) + } + return nil + } + res["sharingAllowedDomainList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSharingAllowedDomainList(res) + } + return nil + } + res["sharingBlockedDomainList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSharingBlockedDomainList(res) + } + return nil + } + res["sharingCapability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSharingCapabilities) + if err != nil { + return err + } + if val != nil { + m.SetSharingCapability(val.(*SharingCapabilities)) + } + return nil + } + res["sharingDomainRestrictionMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSharingDomainRestrictionMode) + if err != nil { + return err + } + if val != nil { + m.SetSharingDomainRestrictionMode(val.(*SharingDomainRestrictionMode)) + } + return nil + } + res["siteCreationDefaultManagedPath"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteCreationDefaultManagedPath(val) + } + return nil + } + res["siteCreationDefaultStorageLimitInMB"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSiteCreationDefaultStorageLimitInMB(val) + } + return nil + } + res["tenantDefaultTimezone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDefaultTimezone(val) + } + return nil + } + return res +} +// GetIdleSessionSignOut gets the idleSessionSignOut property value. Specifies the idle session sign-out policies for the tenant. +func (m *Settings) GetIdleSessionSignOut()(IdleSessionSignOutable) { + return m.idleSessionSignOut +} +// GetImageTaggingOption gets the imageTaggingOption property value. Specifies the image tagging option for the tenant. Possible values are: disabled, basic, enhanced. +func (m *Settings) GetImageTaggingOption()(*ImageTaggingChoice) { + return m.imageTaggingOption +} +// GetIsCommentingOnSitePagesEnabled gets the isCommentingOnSitePagesEnabled property value. Indicates whether comments are allowed on modern site pages in SharePoint. +func (m *Settings) GetIsCommentingOnSitePagesEnabled()(*bool) { + return m.isCommentingOnSitePagesEnabled +} +// GetIsFileActivityNotificationEnabled gets the isFileActivityNotificationEnabled property value. Indicates whether push notifications are enabled for OneDrive events. +func (m *Settings) GetIsFileActivityNotificationEnabled()(*bool) { + return m.isFileActivityNotificationEnabled +} +// GetIsLegacyAuthProtocolsEnabled gets the isLegacyAuthProtocolsEnabled property value. Indicates whether legacy authentication protocols are enabled for the tenant. +func (m *Settings) GetIsLegacyAuthProtocolsEnabled()(*bool) { + return m.isLegacyAuthProtocolsEnabled +} +// GetIsLoopEnabled gets the isLoopEnabled property value. Indicates whetherif Fluid Framework is allowed on SharePoint sites. +func (m *Settings) GetIsLoopEnabled()(*bool) { + return m.isLoopEnabled +} +// GetIsMacSyncAppEnabled gets the isMacSyncAppEnabled property value. Indicates whether files can be synced using the OneDrive sync app for Mac. +func (m *Settings) GetIsMacSyncAppEnabled()(*bool) { + return m.isMacSyncAppEnabled +} +// GetIsRequireAcceptingUserToMatchInvitedUserEnabled gets the isRequireAcceptingUserToMatchInvitedUserEnabled property value. Indicates whether guests must sign in using the same account to which sharing invitations are sent. +func (m *Settings) GetIsRequireAcceptingUserToMatchInvitedUserEnabled()(*bool) { + return m.isRequireAcceptingUserToMatchInvitedUserEnabled +} +// GetIsResharingByExternalUsersEnabled gets the isResharingByExternalUsersEnabled property value. Indicates whether guests are allowed to reshare files, folders, and sites they don't own. +func (m *Settings) GetIsResharingByExternalUsersEnabled()(*bool) { + return m.isResharingByExternalUsersEnabled +} +// GetIsSharePointMobileNotificationEnabled gets the isSharePointMobileNotificationEnabled property value. Indicates whether mobile push notifications are enabled for SharePoint. +func (m *Settings) GetIsSharePointMobileNotificationEnabled()(*bool) { + return m.isSharePointMobileNotificationEnabled +} +// GetIsSharePointNewsfeedEnabled gets the isSharePointNewsfeedEnabled property value. Indicates whether the newsfeed is allowed on the modern site pages in SharePoint. +func (m *Settings) GetIsSharePointNewsfeedEnabled()(*bool) { + return m.isSharePointNewsfeedEnabled +} +// GetIsSiteCreationEnabled gets the isSiteCreationEnabled property value. Indicates whether users are allowed to create sites. +func (m *Settings) GetIsSiteCreationEnabled()(*bool) { + return m.isSiteCreationEnabled +} +// GetIsSiteCreationUIEnabled gets the isSiteCreationUIEnabled property value. Indicates whether the UI commands for creating sites are shown. +func (m *Settings) GetIsSiteCreationUIEnabled()(*bool) { + return m.isSiteCreationUIEnabled +} +// GetIsSitePagesCreationEnabled gets the isSitePagesCreationEnabled property value. Indicates whether creating new modern pages is allowed on SharePoint sites. +func (m *Settings) GetIsSitePagesCreationEnabled()(*bool) { + return m.isSitePagesCreationEnabled +} +// GetIsSitesStorageLimitAutomatic gets the isSitesStorageLimitAutomatic property value. Indicates whether site storage space is automatically managed or if specific storage limits are set per site. +func (m *Settings) GetIsSitesStorageLimitAutomatic()(*bool) { + return m.isSitesStorageLimitAutomatic +} +// GetIsSyncButtonHiddenOnPersonalSite gets the isSyncButtonHiddenOnPersonalSite property value. Indicates whether the sync button in OneDrive is hidden. +func (m *Settings) GetIsSyncButtonHiddenOnPersonalSite()(*bool) { + return m.isSyncButtonHiddenOnPersonalSite +} +// GetIsUnmanagedSyncAppForTenantRestricted gets the isUnmanagedSyncAppForTenantRestricted property value. Indicates whether users are allowed to sync files only on PCs joined to specific domains. +func (m *Settings) GetIsUnmanagedSyncAppForTenantRestricted()(*bool) { + return m.isUnmanagedSyncAppForTenantRestricted +} +// GetPersonalSiteDefaultStorageLimitInMB gets the personalSiteDefaultStorageLimitInMB property value. The default OneDrive storage limit for all new and existing users who are assigned a qualifying license. Measured in megabytes (MB). +func (m *Settings) GetPersonalSiteDefaultStorageLimitInMB()(*int64) { + return m.personalSiteDefaultStorageLimitInMB +} +// GetSharingAllowedDomainList gets the sharingAllowedDomainList property value. Collection of email domains that are allowed for sharing outside the organization. +func (m *Settings) GetSharingAllowedDomainList()([]string) { + return m.sharingAllowedDomainList +} +// GetSharingBlockedDomainList gets the sharingBlockedDomainList property value. Collection of email domains that are blocked for sharing outside the organization. +func (m *Settings) GetSharingBlockedDomainList()([]string) { + return m.sharingBlockedDomainList +} +// GetSharingCapability gets the sharingCapability property value. Sharing capability for the tenant. Possible values are: disabled, externalUserSharingOnly, externalUserAndGuestSharing, existingExternalUserSharingOnly. +func (m *Settings) GetSharingCapability()(*SharingCapabilities) { + return m.sharingCapability +} +// GetSharingDomainRestrictionMode gets the sharingDomainRestrictionMode property value. Specifies the external sharing mode for domains. Possible values are: none, allowList, blockList. +func (m *Settings) GetSharingDomainRestrictionMode()(*SharingDomainRestrictionMode) { + return m.sharingDomainRestrictionMode +} +// GetSiteCreationDefaultManagedPath gets the siteCreationDefaultManagedPath property value. The value of the team site managed path. This is the path under which new team sites will be created. +func (m *Settings) GetSiteCreationDefaultManagedPath()(*string) { + return m.siteCreationDefaultManagedPath +} +// GetSiteCreationDefaultStorageLimitInMB gets the siteCreationDefaultStorageLimitInMB property value. The default storage quota for a new site upon creation. Measured in megabytes (MB). +func (m *Settings) GetSiteCreationDefaultStorageLimitInMB()(*int32) { + return m.siteCreationDefaultStorageLimitInMB +} +// GetTenantDefaultTimezone gets the tenantDefaultTimezone property value. The default timezone of a tenant for newly created sites. For a list of possible values, see SPRegionalSettings.TimeZones property. +func (m *Settings) GetTenantDefaultTimezone()(*string) { + return m.tenantDefaultTimezone +} +// Serialize serializes information the current object +func (m *Settings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedDomainGuidsForSyncApp() != nil { + err = writer.WriteCollectionOfUUIDValues("allowedDomainGuidsForSyncApp", m.GetAllowedDomainGuidsForSyncApp()) + if err != nil { + return err + } + } + if m.GetAvailableManagedPathsForSiteCreation() != nil { + err = writer.WriteCollectionOfStringValues("availableManagedPathsForSiteCreation", m.GetAvailableManagedPathsForSiteCreation()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("deletedUserPersonalSiteRetentionPeriodInDays", m.GetDeletedUserPersonalSiteRetentionPeriodInDays()) + if err != nil { + return err + } + } + if m.GetExcludedFileExtensionsForSyncApp() != nil { + err = writer.WriteCollectionOfStringValues("excludedFileExtensionsForSyncApp", m.GetExcludedFileExtensionsForSyncApp()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("idleSessionSignOut", m.GetIdleSessionSignOut()) + if err != nil { + return err + } + } + if m.GetImageTaggingOption() != nil { + cast := (*m.GetImageTaggingOption()).String() + err = writer.WriteStringValue("imageTaggingOption", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCommentingOnSitePagesEnabled", m.GetIsCommentingOnSitePagesEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFileActivityNotificationEnabled", m.GetIsFileActivityNotificationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isLegacyAuthProtocolsEnabled", m.GetIsLegacyAuthProtocolsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isLoopEnabled", m.GetIsLoopEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMacSyncAppEnabled", m.GetIsMacSyncAppEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRequireAcceptingUserToMatchInvitedUserEnabled", m.GetIsRequireAcceptingUserToMatchInvitedUserEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isResharingByExternalUsersEnabled", m.GetIsResharingByExternalUsersEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSharePointMobileNotificationEnabled", m.GetIsSharePointMobileNotificationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSharePointNewsfeedEnabled", m.GetIsSharePointNewsfeedEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSiteCreationEnabled", m.GetIsSiteCreationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSiteCreationUIEnabled", m.GetIsSiteCreationUIEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSitePagesCreationEnabled", m.GetIsSitePagesCreationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSitesStorageLimitAutomatic", m.GetIsSitesStorageLimitAutomatic()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSyncButtonHiddenOnPersonalSite", m.GetIsSyncButtonHiddenOnPersonalSite()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isUnmanagedSyncAppForTenantRestricted", m.GetIsUnmanagedSyncAppForTenantRestricted()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("personalSiteDefaultStorageLimitInMB", m.GetPersonalSiteDefaultStorageLimitInMB()) + if err != nil { + return err + } + } + if m.GetSharingAllowedDomainList() != nil { + err = writer.WriteCollectionOfStringValues("sharingAllowedDomainList", m.GetSharingAllowedDomainList()) + if err != nil { + return err + } + } + if m.GetSharingBlockedDomainList() != nil { + err = writer.WriteCollectionOfStringValues("sharingBlockedDomainList", m.GetSharingBlockedDomainList()) + if err != nil { + return err + } + } + if m.GetSharingCapability() != nil { + cast := (*m.GetSharingCapability()).String() + err = writer.WriteStringValue("sharingCapability", &cast) + if err != nil { + return err + } + } + if m.GetSharingDomainRestrictionMode() != nil { + cast := (*m.GetSharingDomainRestrictionMode()).String() + err = writer.WriteStringValue("sharingDomainRestrictionMode", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("siteCreationDefaultManagedPath", m.GetSiteCreationDefaultManagedPath()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("siteCreationDefaultStorageLimitInMB", m.GetSiteCreationDefaultStorageLimitInMB()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDefaultTimezone", m.GetTenantDefaultTimezone()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedDomainGuidsForSyncApp sets the allowedDomainGuidsForSyncApp property value. Collection of trusted domain GUIDs for the OneDrive sync app. +func (m *Settings) SetAllowedDomainGuidsForSyncApp(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.allowedDomainGuidsForSyncApp = value +} +// SetAvailableManagedPathsForSiteCreation sets the availableManagedPathsForSiteCreation property value. Collection of managed paths available for site creation. Read-only. +func (m *Settings) SetAvailableManagedPathsForSiteCreation(value []string)() { + m.availableManagedPathsForSiteCreation = value +} +// SetDeletedUserPersonalSiteRetentionPeriodInDays sets the deletedUserPersonalSiteRetentionPeriodInDays property value. The number of days for preserving a deleted user's OneDrive. +func (m *Settings) SetDeletedUserPersonalSiteRetentionPeriodInDays(value *int32)() { + m.deletedUserPersonalSiteRetentionPeriodInDays = value +} +// SetExcludedFileExtensionsForSyncApp sets the excludedFileExtensionsForSyncApp property value. Collection of file extensions not uploaded by the OneDrive sync app. +func (m *Settings) SetExcludedFileExtensionsForSyncApp(value []string)() { + m.excludedFileExtensionsForSyncApp = value +} +// SetIdleSessionSignOut sets the idleSessionSignOut property value. Specifies the idle session sign-out policies for the tenant. +func (m *Settings) SetIdleSessionSignOut(value IdleSessionSignOutable)() { + m.idleSessionSignOut = value +} +// SetImageTaggingOption sets the imageTaggingOption property value. Specifies the image tagging option for the tenant. Possible values are: disabled, basic, enhanced. +func (m *Settings) SetImageTaggingOption(value *ImageTaggingChoice)() { + m.imageTaggingOption = value +} +// SetIsCommentingOnSitePagesEnabled sets the isCommentingOnSitePagesEnabled property value. Indicates whether comments are allowed on modern site pages in SharePoint. +func (m *Settings) SetIsCommentingOnSitePagesEnabled(value *bool)() { + m.isCommentingOnSitePagesEnabled = value +} +// SetIsFileActivityNotificationEnabled sets the isFileActivityNotificationEnabled property value. Indicates whether push notifications are enabled for OneDrive events. +func (m *Settings) SetIsFileActivityNotificationEnabled(value *bool)() { + m.isFileActivityNotificationEnabled = value +} +// SetIsLegacyAuthProtocolsEnabled sets the isLegacyAuthProtocolsEnabled property value. Indicates whether legacy authentication protocols are enabled for the tenant. +func (m *Settings) SetIsLegacyAuthProtocolsEnabled(value *bool)() { + m.isLegacyAuthProtocolsEnabled = value +} +// SetIsLoopEnabled sets the isLoopEnabled property value. Indicates whetherif Fluid Framework is allowed on SharePoint sites. +func (m *Settings) SetIsLoopEnabled(value *bool)() { + m.isLoopEnabled = value +} +// SetIsMacSyncAppEnabled sets the isMacSyncAppEnabled property value. Indicates whether files can be synced using the OneDrive sync app for Mac. +func (m *Settings) SetIsMacSyncAppEnabled(value *bool)() { + m.isMacSyncAppEnabled = value +} +// SetIsRequireAcceptingUserToMatchInvitedUserEnabled sets the isRequireAcceptingUserToMatchInvitedUserEnabled property value. Indicates whether guests must sign in using the same account to which sharing invitations are sent. +func (m *Settings) SetIsRequireAcceptingUserToMatchInvitedUserEnabled(value *bool)() { + m.isRequireAcceptingUserToMatchInvitedUserEnabled = value +} +// SetIsResharingByExternalUsersEnabled sets the isResharingByExternalUsersEnabled property value. Indicates whether guests are allowed to reshare files, folders, and sites they don't own. +func (m *Settings) SetIsResharingByExternalUsersEnabled(value *bool)() { + m.isResharingByExternalUsersEnabled = value +} +// SetIsSharePointMobileNotificationEnabled sets the isSharePointMobileNotificationEnabled property value. Indicates whether mobile push notifications are enabled for SharePoint. +func (m *Settings) SetIsSharePointMobileNotificationEnabled(value *bool)() { + m.isSharePointMobileNotificationEnabled = value +} +// SetIsSharePointNewsfeedEnabled sets the isSharePointNewsfeedEnabled property value. Indicates whether the newsfeed is allowed on the modern site pages in SharePoint. +func (m *Settings) SetIsSharePointNewsfeedEnabled(value *bool)() { + m.isSharePointNewsfeedEnabled = value +} +// SetIsSiteCreationEnabled sets the isSiteCreationEnabled property value. Indicates whether users are allowed to create sites. +func (m *Settings) SetIsSiteCreationEnabled(value *bool)() { + m.isSiteCreationEnabled = value +} +// SetIsSiteCreationUIEnabled sets the isSiteCreationUIEnabled property value. Indicates whether the UI commands for creating sites are shown. +func (m *Settings) SetIsSiteCreationUIEnabled(value *bool)() { + m.isSiteCreationUIEnabled = value +} +// SetIsSitePagesCreationEnabled sets the isSitePagesCreationEnabled property value. Indicates whether creating new modern pages is allowed on SharePoint sites. +func (m *Settings) SetIsSitePagesCreationEnabled(value *bool)() { + m.isSitePagesCreationEnabled = value +} +// SetIsSitesStorageLimitAutomatic sets the isSitesStorageLimitAutomatic property value. Indicates whether site storage space is automatically managed or if specific storage limits are set per site. +func (m *Settings) SetIsSitesStorageLimitAutomatic(value *bool)() { + m.isSitesStorageLimitAutomatic = value +} +// SetIsSyncButtonHiddenOnPersonalSite sets the isSyncButtonHiddenOnPersonalSite property value. Indicates whether the sync button in OneDrive is hidden. +func (m *Settings) SetIsSyncButtonHiddenOnPersonalSite(value *bool)() { + m.isSyncButtonHiddenOnPersonalSite = value +} +// SetIsUnmanagedSyncAppForTenantRestricted sets the isUnmanagedSyncAppForTenantRestricted property value. Indicates whether users are allowed to sync files only on PCs joined to specific domains. +func (m *Settings) SetIsUnmanagedSyncAppForTenantRestricted(value *bool)() { + m.isUnmanagedSyncAppForTenantRestricted = value +} +// SetPersonalSiteDefaultStorageLimitInMB sets the personalSiteDefaultStorageLimitInMB property value. The default OneDrive storage limit for all new and existing users who are assigned a qualifying license. Measured in megabytes (MB). +func (m *Settings) SetPersonalSiteDefaultStorageLimitInMB(value *int64)() { + m.personalSiteDefaultStorageLimitInMB = value +} +// SetSharingAllowedDomainList sets the sharingAllowedDomainList property value. Collection of email domains that are allowed for sharing outside the organization. +func (m *Settings) SetSharingAllowedDomainList(value []string)() { + m.sharingAllowedDomainList = value +} +// SetSharingBlockedDomainList sets the sharingBlockedDomainList property value. Collection of email domains that are blocked for sharing outside the organization. +func (m *Settings) SetSharingBlockedDomainList(value []string)() { + m.sharingBlockedDomainList = value +} +// SetSharingCapability sets the sharingCapability property value. Sharing capability for the tenant. Possible values are: disabled, externalUserSharingOnly, externalUserAndGuestSharing, existingExternalUserSharingOnly. +func (m *Settings) SetSharingCapability(value *SharingCapabilities)() { + m.sharingCapability = value +} +// SetSharingDomainRestrictionMode sets the sharingDomainRestrictionMode property value. Specifies the external sharing mode for domains. Possible values are: none, allowList, blockList. +func (m *Settings) SetSharingDomainRestrictionMode(value *SharingDomainRestrictionMode)() { + m.sharingDomainRestrictionMode = value +} +// SetSiteCreationDefaultManagedPath sets the siteCreationDefaultManagedPath property value. The value of the team site managed path. This is the path under which new team sites will be created. +func (m *Settings) SetSiteCreationDefaultManagedPath(value *string)() { + m.siteCreationDefaultManagedPath = value +} +// SetSiteCreationDefaultStorageLimitInMB sets the siteCreationDefaultStorageLimitInMB property value. The default storage quota for a new site upon creation. Measured in megabytes (MB). +func (m *Settings) SetSiteCreationDefaultStorageLimitInMB(value *int32)() { + m.siteCreationDefaultStorageLimitInMB = value +} +// SetTenantDefaultTimezone sets the tenantDefaultTimezone property value. The default timezone of a tenant for newly created sites. For a list of possible values, see SPRegionalSettings.TimeZones property. +func (m *Settings) SetTenantDefaultTimezone(value *string)() { + m.tenantDefaultTimezone = value +} diff --git a/src/internal/connector/graph/betaSDK/models/tenantadmin/settingsable.go b/src/internal/connector/graph/betaSDK/models/tenantadmin/settingsable.go new file mode 100644 index 000000000..d9a80703d --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/tenantadmin/settingsable.go @@ -0,0 +1,71 @@ +package tenantadmin + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Settingsable +type Settingsable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedDomainGuidsForSyncApp()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAvailableManagedPathsForSiteCreation()([]string) + GetDeletedUserPersonalSiteRetentionPeriodInDays()(*int32) + GetExcludedFileExtensionsForSyncApp()([]string) + GetIdleSessionSignOut()(IdleSessionSignOutable) + GetImageTaggingOption()(*ImageTaggingChoice) + GetIsCommentingOnSitePagesEnabled()(*bool) + GetIsFileActivityNotificationEnabled()(*bool) + GetIsLegacyAuthProtocolsEnabled()(*bool) + GetIsLoopEnabled()(*bool) + GetIsMacSyncAppEnabled()(*bool) + GetIsRequireAcceptingUserToMatchInvitedUserEnabled()(*bool) + GetIsResharingByExternalUsersEnabled()(*bool) + GetIsSharePointMobileNotificationEnabled()(*bool) + GetIsSharePointNewsfeedEnabled()(*bool) + GetIsSiteCreationEnabled()(*bool) + GetIsSiteCreationUIEnabled()(*bool) + GetIsSitePagesCreationEnabled()(*bool) + GetIsSitesStorageLimitAutomatic()(*bool) + GetIsSyncButtonHiddenOnPersonalSite()(*bool) + GetIsUnmanagedSyncAppForTenantRestricted()(*bool) + GetPersonalSiteDefaultStorageLimitInMB()(*int64) + GetSharingAllowedDomainList()([]string) + GetSharingBlockedDomainList()([]string) + GetSharingCapability()(*SharingCapabilities) + GetSharingDomainRestrictionMode()(*SharingDomainRestrictionMode) + GetSiteCreationDefaultManagedPath()(*string) + GetSiteCreationDefaultStorageLimitInMB()(*int32) + GetTenantDefaultTimezone()(*string) + SetAllowedDomainGuidsForSyncApp(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAvailableManagedPathsForSiteCreation(value []string)() + SetDeletedUserPersonalSiteRetentionPeriodInDays(value *int32)() + SetExcludedFileExtensionsForSyncApp(value []string)() + SetIdleSessionSignOut(value IdleSessionSignOutable)() + SetImageTaggingOption(value *ImageTaggingChoice)() + SetIsCommentingOnSitePagesEnabled(value *bool)() + SetIsFileActivityNotificationEnabled(value *bool)() + SetIsLegacyAuthProtocolsEnabled(value *bool)() + SetIsLoopEnabled(value *bool)() + SetIsMacSyncAppEnabled(value *bool)() + SetIsRequireAcceptingUserToMatchInvitedUserEnabled(value *bool)() + SetIsResharingByExternalUsersEnabled(value *bool)() + SetIsSharePointMobileNotificationEnabled(value *bool)() + SetIsSharePointNewsfeedEnabled(value *bool)() + SetIsSiteCreationEnabled(value *bool)() + SetIsSiteCreationUIEnabled(value *bool)() + SetIsSitePagesCreationEnabled(value *bool)() + SetIsSitesStorageLimitAutomatic(value *bool)() + SetIsSyncButtonHiddenOnPersonalSite(value *bool)() + SetIsUnmanagedSyncAppForTenantRestricted(value *bool)() + SetPersonalSiteDefaultStorageLimitInMB(value *int64)() + SetSharingAllowedDomainList(value []string)() + SetSharingBlockedDomainList(value []string)() + SetSharingCapability(value *SharingCapabilities)() + SetSharingDomainRestrictionMode(value *SharingDomainRestrictionMode)() + SetSiteCreationDefaultManagedPath(value *string)() + SetSiteCreationDefaultStorageLimitInMB(value *int32)() + SetTenantDefaultTimezone(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/tenantadmin/sharepoint.go b/src/internal/connector/graph/betaSDK/models/tenantadmin/sharepoint.go new file mode 100644 index 000000000..57e9e6a82 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/tenantadmin/sharepoint.go @@ -0,0 +1,61 @@ +package tenantadmin + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Sharepoint +type Sharepoint struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Represents the tenant-level settings for SharePoint and OneDrive. + settings Settingsable +} +// NewSharepoint instantiates a new Sharepoint and sets the default values. +func NewSharepoint()(*Sharepoint) { + m := &Sharepoint{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSharepointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharepointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharepoint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Sharepoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(Settingsable)) + } + return nil + } + return res +} +// GetSettings gets the settings property value. Represents the tenant-level settings for SharePoint and OneDrive. +func (m *Sharepoint) GetSettings()(Settingsable) { + return m.settings +} +// Serialize serializes information the current object +func (m *Sharepoint) 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. Represents the tenant-level settings for SharePoint and OneDrive. +func (m *Sharepoint) SetSettings(value Settingsable)() { + m.settings = value +} diff --git a/src/internal/connector/graph/betaSDK/models/tenantadmin/sharepointable.go b/src/internal/connector/graph/betaSDK/models/tenantadmin/sharepointable.go new file mode 100644 index 000000000..cd35d5ece --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/tenantadmin/sharepointable.go @@ -0,0 +1,14 @@ +package tenantadmin + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Sharepointable +type Sharepointable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSettings()(Settingsable) + SetSettings(value Settingsable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/tenantadmin/sharing_capabilities.go b/src/internal/connector/graph/betaSDK/models/tenantadmin/sharing_capabilities.go new file mode 100644 index 000000000..c2bcf636b --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/tenantadmin/sharing_capabilities.go @@ -0,0 +1,43 @@ +package tenantadmin +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SharingCapabilities int + +const ( + DISABLED_SHARINGCAPABILITIES SharingCapabilities = iota + EXTERNALUSERSHARINGONLY_SHARINGCAPABILITIES + EXTERNALUSERANDGUESTSHARING_SHARINGCAPABILITIES + EXISTINGEXTERNALUSERSHARINGONLY_SHARINGCAPABILITIES + UNKNOWNFUTUREVALUE_SHARINGCAPABILITIES +) + +func (i SharingCapabilities) String() string { + return []string{"disabled", "externalUserSharingOnly", "externalUserAndGuestSharing", "existingExternalUserSharingOnly", "unknownFutureValue"}[i] +} +func ParseSharingCapabilities(v string) (interface{}, error) { + result := DISABLED_SHARINGCAPABILITIES + switch v { + case "disabled": + result = DISABLED_SHARINGCAPABILITIES + case "externalUserSharingOnly": + result = EXTERNALUSERSHARINGONLY_SHARINGCAPABILITIES + case "externalUserAndGuestSharing": + result = EXTERNALUSERANDGUESTSHARING_SHARINGCAPABILITIES + case "existingExternalUserSharingOnly": + result = EXISTINGEXTERNALUSERSHARINGONLY_SHARINGCAPABILITIES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SHARINGCAPABILITIES + default: + return 0, errors.New("Unknown SharingCapabilities value: " + v) + } + return &result, nil +} +func SerializeSharingCapabilities(values []SharingCapabilities) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/tenantadmin/sharing_domain_restriction_mode.go b/src/internal/connector/graph/betaSDK/models/tenantadmin/sharing_domain_restriction_mode.go new file mode 100644 index 000000000..a0d9a81c8 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/tenantadmin/sharing_domain_restriction_mode.go @@ -0,0 +1,40 @@ +package tenantadmin +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SharingDomainRestrictionMode int + +const ( + NONE_SHARINGDOMAINRESTRICTIONMODE SharingDomainRestrictionMode = iota + ALLOWLIST_SHARINGDOMAINRESTRICTIONMODE + BLOCKLIST_SHARINGDOMAINRESTRICTIONMODE + UNKNOWNFUTUREVALUE_SHARINGDOMAINRESTRICTIONMODE +) + +func (i SharingDomainRestrictionMode) String() string { + return []string{"none", "allowList", "blockList", "unknownFutureValue"}[i] +} +func ParseSharingDomainRestrictionMode(v string) (interface{}, error) { + result := NONE_SHARINGDOMAINRESTRICTIONMODE + switch v { + case "none": + result = NONE_SHARINGDOMAINRESTRICTIONMODE + case "allowList": + result = ALLOWLIST_SHARINGDOMAINRESTRICTIONMODE + case "blockList": + result = BLOCKLIST_SHARINGDOMAINRESTRICTIONMODE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SHARINGDOMAINRESTRICTIONMODE + default: + return 0, errors.New("Unknown SharingDomainRestrictionMode value: " + v) + } + return &result, nil +} +func SerializeSharingDomainRestrictionMode(values []SharingDomainRestrictionMode) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/group.go b/src/internal/connector/graph/betaSDK/models/termstore/group.go new file mode 100644 index 000000000..df22f5ca2 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/group.go @@ -0,0 +1,201 @@ +package termstore + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Group provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Group struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Date and time of the group creation. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description that gives details on the term usage. + description *string + // Name of the group. + displayName *string + // ID of the parent site of this group. + parentSiteId *string + // Returns the type of the group. Possible values are: global, system, and siteCollection. + scope *TermGroupScope + // All sets under the group in a term [store]. + sets []Setable +} +// NewGroup instantiates a new group and sets the default values. +func NewGroup()(*Group) { + m := &Group{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + 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 +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time of the group creation. Read-only. +func (m *Group) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description that gives details on the term usage. +func (m *Group) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of the group. +func (m *Group) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Group) 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["parentSiteId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentSiteId(val) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTermGroupScope) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(*TermGroupScope)) + } + return nil + } + res["sets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Setable, len(val)) + for i, v := range val { + res[i] = v.(Setable) + } + m.SetSets(res) + } + return nil + } + return res +} +// GetParentSiteId gets the parentSiteId property value. ID of the parent site of this group. +func (m *Group) GetParentSiteId()(*string) { + return m.parentSiteId +} +// GetScope gets the scope property value. Returns the type of the group. Possible values are: global, system, and siteCollection. +func (m *Group) GetScope()(*TermGroupScope) { + return m.scope +} +// GetSets gets the sets property value. All sets under the group in a term [store]. +func (m *Group) GetSets()([]Setable) { + return m.sets +} +// Serialize serializes information the current object +func (m *Group) 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("parentSiteId", m.GetParentSiteId()) + 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.GetSets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSets())) + for i, v := range m.GetSets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sets", cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time of the group creation. Read-only. +func (m *Group) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description that gives details on the term usage. +func (m *Group) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of the group. +func (m *Group) SetDisplayName(value *string)() { + m.displayName = value +} +// SetParentSiteId sets the parentSiteId property value. ID of the parent site of this group. +func (m *Group) SetParentSiteId(value *string)() { + m.parentSiteId = value +} +// SetScope sets the scope property value. Returns the type of the group. Possible values are: global, system, and siteCollection. +func (m *Group) SetScope(value *TermGroupScope)() { + m.scope = value +} +// SetSets sets the sets property value. All sets under the group in a term [store]. +func (m *Group) SetSets(value []Setable)() { + m.sets = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/group_collection_response.go b/src/internal/connector/graph/betaSDK/models/termstore/group_collection_response.go new file mode 100644 index 000000000..b5bd840ad --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/group_collection_response.go @@ -0,0 +1,69 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// GroupCollectionResponse +type GroupCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Groupable +} +// NewGroupCollectionResponse instantiates a new GroupCollectionResponse and sets the default values. +func NewGroupCollectionResponse()(*GroupCollectionResponse) { + m := &GroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.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/termstore/group_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/termstore/group_collection_responseable.go new file mode 100644 index 000000000..8c6277c23 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/group_collection_responseable.go @@ -0,0 +1,14 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// GroupCollectionResponseable +type GroupCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Groupable) + SetValue(value []Groupable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/groupable.go b/src/internal/connector/graph/betaSDK/models/termstore/groupable.go new file mode 100644 index 000000000..35709d767 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/groupable.go @@ -0,0 +1,25 @@ +package termstore + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Groupable +type Groupable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetParentSiteId()(*string) + GetScope()(*TermGroupScope) + GetSets()([]Setable) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetParentSiteId(value *string)() + SetScope(value *TermGroupScope)() + SetSets(value []Setable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_description.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_description.go new file mode 100644 index 000000000..6ecec627a --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_description.go @@ -0,0 +1,123 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedDescription +type LocalizedDescription struct { + // 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 in the localized language. + description *string + // The language tag for the label. + languageTag *string + // The OdataType property + odataType *string +} +// NewLocalizedDescription instantiates a new localizedDescription and sets the default values. +func NewLocalizedDescription()(*LocalizedDescription) { + m := &LocalizedDescription{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLocalizedDescriptionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocalizedDescriptionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocalizedDescription(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *LocalizedDescription) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description in the localized language. +func (m *LocalizedDescription) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocalizedDescription) 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["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. The language tag for the label. +func (m *LocalizedDescription) GetLanguageTag()(*string) { + return m.languageTag +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LocalizedDescription) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LocalizedDescription) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + 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 *LocalizedDescription) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description in the localized language. +func (m *LocalizedDescription) SetDescription(value *string)() { + m.description = value +} +// SetLanguageTag sets the languageTag property value. The language tag for the label. +func (m *LocalizedDescription) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LocalizedDescription) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_description_collection_response.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_description_collection_response.go new file mode 100644 index 000000000..2633b4048 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_description_collection_response.go @@ -0,0 +1,69 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LocalizedDescriptionCollectionResponse +type LocalizedDescriptionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []LocalizedDescriptionable +} +// NewLocalizedDescriptionCollectionResponse instantiates a new LocalizedDescriptionCollectionResponse and sets the default values. +func NewLocalizedDescriptionCollectionResponse()(*LocalizedDescriptionCollectionResponse) { + m := &LocalizedDescriptionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLocalizedDescriptionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocalizedDescriptionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocalizedDescriptionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocalizedDescriptionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocalizedDescriptionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocalizedDescriptionable, len(val)) + for i, v := range val { + res[i] = v.(LocalizedDescriptionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LocalizedDescriptionCollectionResponse) GetValue()([]LocalizedDescriptionable) { + return m.value +} +// Serialize serializes information the current object +func (m *LocalizedDescriptionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LocalizedDescriptionCollectionResponse) SetValue(value []LocalizedDescriptionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_description_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_description_collection_responseable.go new file mode 100644 index 000000000..6895260f0 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_description_collection_responseable.go @@ -0,0 +1,14 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LocalizedDescriptionCollectionResponseable +type LocalizedDescriptionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LocalizedDescriptionable) + SetValue(value []LocalizedDescriptionable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_descriptionable.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_descriptionable.go new file mode 100644 index 000000000..e41a0518e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_descriptionable.go @@ -0,0 +1,17 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedDescriptionable +type LocalizedDescriptionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetLanguageTag()(*string) + GetOdataType()(*string) + SetDescription(value *string)() + SetLanguageTag(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_label.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_label.go new file mode 100644 index 000000000..bf380f6c1 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_label.go @@ -0,0 +1,149 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedLabel +type LocalizedLabel 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 label is the default label. + isDefault *bool + // The language tag for the label. + languageTag *string + // The name of the label. + name *string + // The OdataType property + odataType *string +} +// NewLocalizedLabel instantiates a new localizedLabel and sets the default values. +func NewLocalizedLabel()(*LocalizedLabel) { + m := &LocalizedLabel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLocalizedLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocalizedLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocalizedLabel(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *LocalizedLabel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocalizedLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["languageTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguageTag(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 +} +// GetIsDefault gets the isDefault property value. Indicates whether the label is the default label. +func (m *LocalizedLabel) GetIsDefault()(*bool) { + return m.isDefault +} +// GetLanguageTag gets the languageTag property value. The language tag for the label. +func (m *LocalizedLabel) GetLanguageTag()(*string) { + return m.languageTag +} +// GetName gets the name property value. The name of the label. +func (m *LocalizedLabel) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LocalizedLabel) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LocalizedLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languageTag", m.GetLanguageTag()) + 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 *LocalizedLabel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsDefault sets the isDefault property value. Indicates whether the label is the default label. +func (m *LocalizedLabel) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetLanguageTag sets the languageTag property value. The language tag for the label. +func (m *LocalizedLabel) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetName sets the name property value. The name of the label. +func (m *LocalizedLabel) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LocalizedLabel) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_label_collection_response.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_label_collection_response.go new file mode 100644 index 000000000..0fa9cab9d --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_label_collection_response.go @@ -0,0 +1,69 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LocalizedLabelCollectionResponse +type LocalizedLabelCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []LocalizedLabelable +} +// NewLocalizedLabelCollectionResponse instantiates a new LocalizedLabelCollectionResponse and sets the default values. +func NewLocalizedLabelCollectionResponse()(*LocalizedLabelCollectionResponse) { + m := &LocalizedLabelCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLocalizedLabelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocalizedLabelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocalizedLabelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocalizedLabelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocalizedLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocalizedLabelable, len(val)) + for i, v := range val { + res[i] = v.(LocalizedLabelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LocalizedLabelCollectionResponse) GetValue()([]LocalizedLabelable) { + return m.value +} +// Serialize serializes information the current object +func (m *LocalizedLabelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LocalizedLabelCollectionResponse) SetValue(value []LocalizedLabelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_label_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_label_collection_responseable.go new file mode 100644 index 000000000..def8977b7 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_label_collection_responseable.go @@ -0,0 +1,14 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LocalizedLabelCollectionResponseable +type LocalizedLabelCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LocalizedLabelable) + SetValue(value []LocalizedLabelable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_labelable.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_labelable.go new file mode 100644 index 000000000..776085f2d --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_labelable.go @@ -0,0 +1,19 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedLabelable +type LocalizedLabelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsDefault()(*bool) + GetLanguageTag()(*string) + GetName()(*string) + GetOdataType()(*string) + SetIsDefault(value *bool)() + SetLanguageTag(value *string)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_name.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_name.go new file mode 100644 index 000000000..9be9ea927 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_name.go @@ -0,0 +1,123 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedName +type LocalizedName struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The language tag for the label. + languageTag *string + // The name in the localized language. + name *string + // The OdataType property + odataType *string +} +// NewLocalizedName instantiates a new localizedName and sets the default values. +func NewLocalizedName()(*LocalizedName) { + m := &LocalizedName{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLocalizedNameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocalizedNameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocalizedName(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *LocalizedName) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocalizedName) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["languageTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguageTag(val) + } + return nil + } + res["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 +} +// GetLanguageTag gets the languageTag property value. The language tag for the label. +func (m *LocalizedName) GetLanguageTag()(*string) { + return m.languageTag +} +// GetName gets the name property value. The name in the localized language. +func (m *LocalizedName) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LocalizedName) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LocalizedName) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("languageTag", m.GetLanguageTag()) + 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 *LocalizedName) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLanguageTag sets the languageTag property value. The language tag for the label. +func (m *LocalizedName) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetName sets the name property value. The name in the localized language. +func (m *LocalizedName) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LocalizedName) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_name_collection_response.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_name_collection_response.go new file mode 100644 index 000000000..4db2d7e28 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_name_collection_response.go @@ -0,0 +1,69 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LocalizedNameCollectionResponse +type LocalizedNameCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []LocalizedNameable +} +// NewLocalizedNameCollectionResponse instantiates a new LocalizedNameCollectionResponse and sets the default values. +func NewLocalizedNameCollectionResponse()(*LocalizedNameCollectionResponse) { + m := &LocalizedNameCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLocalizedNameCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocalizedNameCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocalizedNameCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocalizedNameCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocalizedNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocalizedNameable, len(val)) + for i, v := range val { + res[i] = v.(LocalizedNameable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LocalizedNameCollectionResponse) GetValue()([]LocalizedNameable) { + return m.value +} +// Serialize serializes information the current object +func (m *LocalizedNameCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LocalizedNameCollectionResponse) SetValue(value []LocalizedNameable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_name_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_name_collection_responseable.go new file mode 100644 index 000000000..6b74872c9 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_name_collection_responseable.go @@ -0,0 +1,14 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LocalizedNameCollectionResponseable +type LocalizedNameCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LocalizedNameable) + SetValue(value []LocalizedNameable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/localized_nameable.go b/src/internal/connector/graph/betaSDK/models/termstore/localized_nameable.go new file mode 100644 index 000000000..ae2d2523a --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/localized_nameable.go @@ -0,0 +1,17 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedNameable +type LocalizedNameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLanguageTag()(*string) + GetName()(*string) + GetOdataType()(*string) + SetLanguageTag(value *string)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/relation.go b/src/internal/connector/graph/betaSDK/models/termstore/relation.go new file mode 100644 index 000000000..52be6fc28 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/relation.go @@ -0,0 +1,140 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Relation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Relation struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The from [term] of the relation. The term from which the relationship is defined. A null value would indicate the relation is directly with the [set]. + fromTerm Termable + // The type of relation. Possible values are: pin, reuse. + relationship *RelationType + // The [set] in which the relation is relevant. + set Setable + // The to [term] of the relation. The term to which the relationship is defined. + toTerm Termable +} +// NewRelation instantiates a new relation and sets the default values. +func NewRelation()(*Relation) { + m := &Relation{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateRelationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRelationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRelation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Relation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["fromTerm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFromTerm(val.(Termable)) + } + return nil + } + res["relationship"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRelationType) + if err != nil { + return err + } + if val != nil { + m.SetRelationship(val.(*RelationType)) + } + return nil + } + res["set"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSet(val.(Setable)) + } + return nil + } + res["toTerm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetToTerm(val.(Termable)) + } + return nil + } + return res +} +// GetFromTerm gets the fromTerm property value. The from [term] of the relation. The term from which the relationship is defined. A null value would indicate the relation is directly with the [set]. +func (m *Relation) GetFromTerm()(Termable) { + return m.fromTerm +} +// GetRelationship gets the relationship property value. The type of relation. Possible values are: pin, reuse. +func (m *Relation) GetRelationship()(*RelationType) { + return m.relationship +} +// GetSet gets the set property value. The [set] in which the relation is relevant. +func (m *Relation) GetSet()(Setable) { + return m.set +} +// GetToTerm gets the toTerm property value. The to [term] of the relation. The term to which the relationship is defined. +func (m *Relation) GetToTerm()(Termable) { + return m.toTerm +} +// Serialize serializes information the current object +func (m *Relation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("fromTerm", m.GetFromTerm()) + 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.WriteObjectValue("set", m.GetSet()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("toTerm", m.GetToTerm()) + if err != nil { + return err + } + } + return nil +} +// SetFromTerm sets the fromTerm property value. The from [term] of the relation. The term from which the relationship is defined. A null value would indicate the relation is directly with the [set]. +func (m *Relation) SetFromTerm(value Termable)() { + m.fromTerm = value +} +// SetRelationship sets the relationship property value. The type of relation. Possible values are: pin, reuse. +func (m *Relation) SetRelationship(value *RelationType)() { + m.relationship = value +} +// SetSet sets the set property value. The [set] in which the relation is relevant. +func (m *Relation) SetSet(value Setable)() { + m.set = value +} +// SetToTerm sets the toTerm property value. The to [term] of the relation. The term to which the relationship is defined. +func (m *Relation) SetToTerm(value Termable)() { + m.toTerm = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/relation_collection_response.go b/src/internal/connector/graph/betaSDK/models/termstore/relation_collection_response.go new file mode 100644 index 000000000..f4cb12e4c --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/relation_collection_response.go @@ -0,0 +1,69 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RelationCollectionResponse +type RelationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Relationable +} +// NewRelationCollectionResponse instantiates a new RelationCollectionResponse and sets the default values. +func NewRelationCollectionResponse()(*RelationCollectionResponse) { + m := &RelationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRelationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRelationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRelationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RelationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Relationable, len(val)) + for i, v := range val { + res[i] = v.(Relationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RelationCollectionResponse) GetValue()([]Relationable) { + return m.value +} +// Serialize serializes information the current object +func (m *RelationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RelationCollectionResponse) SetValue(value []Relationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/relation_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/termstore/relation_collection_responseable.go new file mode 100644 index 000000000..696f90b98 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/relation_collection_responseable.go @@ -0,0 +1,14 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RelationCollectionResponseable +type RelationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Relationable) + SetValue(value []Relationable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/relation_type.go b/src/internal/connector/graph/betaSDK/models/termstore/relation_type.go new file mode 100644 index 000000000..9b2d6c6a3 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/relation_type.go @@ -0,0 +1,34 @@ +package termstore +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RelationType int + +const ( + PIN_RELATIONTYPE RelationType = iota + REUSE_RELATIONTYPE +) + +func (i RelationType) String() string { + return []string{"pin", "reuse"}[i] +} +func ParseRelationType(v string) (interface{}, error) { + result := PIN_RELATIONTYPE + switch v { + case "pin": + result = PIN_RELATIONTYPE + case "reuse": + result = REUSE_RELATIONTYPE + default: + return 0, errors.New("Unknown RelationType value: " + v) + } + return &result, nil +} +func SerializeRelationType(values []RelationType) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/relationable.go b/src/internal/connector/graph/betaSDK/models/termstore/relationable.go new file mode 100644 index 000000000..29ac1b5c9 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/relationable.go @@ -0,0 +1,20 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Relationable +type Relationable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFromTerm()(Termable) + GetRelationship()(*RelationType) + GetSet()(Setable) + GetToTerm()(Termable) + SetFromTerm(value Termable)() + SetRelationship(value *RelationType)() + SetSet(value Setable)() + SetToTerm(value Termable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/set.go b/src/internal/connector/graph/betaSDK/models/termstore/set.go new file mode 100644 index 000000000..b0d99c617 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/set.go @@ -0,0 +1,284 @@ +package termstore + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Set +type Set struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Children terms of set in term [store]. + children []Termable + // Date and time of set creation. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description giving details on the term usage. + description *string + // Name of the set for each languageTag. + localizedNames []LocalizedNameable + // The parentGroup property + parentGroup Groupable + // Custom properties for the set. + properties []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable + // Indicates which terms have been pinned or reused directly under the set. + relations []Relationable + // All the terms under the set. + terms []Termable +} +// NewSet instantiates a new set and sets the default values. +func NewSet()(*Set) { + m := &Set{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSet(), nil +} +// GetChildren gets the children property value. Children terms of set in term [store]. +func (m *Set) GetChildren()([]Termable) { + return m.children +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time of set creation. Read-only. +func (m *Set) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description giving details on the term usage. +func (m *Set) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Set) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Termable, len(val)) + for i, v := range val { + res[i] = v.(Termable) + } + m.SetChildren(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["localizedNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocalizedNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocalizedNameable, len(val)) + for i, v := range val { + res[i] = v.(LocalizedNameable) + } + m.SetLocalizedNames(res) + } + return nil + } + res["parentGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentGroup(val.(Groupable)) + } + return nil + } + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable) + } + m.SetProperties(res) + } + return nil + } + res["relations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Relationable, len(val)) + for i, v := range val { + res[i] = v.(Relationable) + } + m.SetRelations(res) + } + return nil + } + res["terms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Termable, len(val)) + for i, v := range val { + res[i] = v.(Termable) + } + m.SetTerms(res) + } + return nil + } + return res +} +// GetLocalizedNames gets the localizedNames property value. Name of the set for each languageTag. +func (m *Set) GetLocalizedNames()([]LocalizedNameable) { + return m.localizedNames +} +// GetParentGroup gets the parentGroup property value. The parentGroup property +func (m *Set) GetParentGroup()(Groupable) { + return m.parentGroup +} +// GetProperties gets the properties property value. Custom properties for the set. +func (m *Set) GetProperties()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable) { + return m.properties +} +// GetRelations gets the relations property value. Indicates which terms have been pinned or reused directly under the set. +func (m *Set) GetRelations()([]Relationable) { + return m.relations +} +// GetTerms gets the terms property value. All the terms under the set. +func (m *Set) GetTerms()([]Termable) { + return m.terms +} +// Serialize serializes information the current object +func (m *Set) 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.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetLocalizedNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocalizedNames())) + for i, v := range m.GetLocalizedNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("localizedNames", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parentGroup", m.GetParentGroup()) + 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 + } + } + if m.GetRelations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRelations())) + for i, v := range m.GetRelations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("relations", cast) + if err != nil { + return err + } + } + if m.GetTerms() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTerms())) + for i, v := range m.GetTerms() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("terms", cast) + if err != nil { + return err + } + } + return nil +} +// SetChildren sets the children property value. Children terms of set in term [store]. +func (m *Set) SetChildren(value []Termable)() { + m.children = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time of set creation. Read-only. +func (m *Set) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description giving details on the term usage. +func (m *Set) SetDescription(value *string)() { + m.description = value +} +// SetLocalizedNames sets the localizedNames property value. Name of the set for each languageTag. +func (m *Set) SetLocalizedNames(value []LocalizedNameable)() { + m.localizedNames = value +} +// SetParentGroup sets the parentGroup property value. The parentGroup property +func (m *Set) SetParentGroup(value Groupable)() { + m.parentGroup = value +} +// SetProperties sets the properties property value. Custom properties for the set. +func (m *Set) SetProperties(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable)() { + m.properties = value +} +// SetRelations sets the relations property value. Indicates which terms have been pinned or reused directly under the set. +func (m *Set) SetRelations(value []Relationable)() { + m.relations = value +} +// SetTerms sets the terms property value. All the terms under the set. +func (m *Set) SetTerms(value []Termable)() { + m.terms = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/set_collection_response.go b/src/internal/connector/graph/betaSDK/models/termstore/set_collection_response.go new file mode 100644 index 000000000..37f743d75 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/set_collection_response.go @@ -0,0 +1,69 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SetCollectionResponse +type SetCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Setable +} +// NewSetCollectionResponse instantiates a new SetCollectionResponse and sets the default values. +func NewSetCollectionResponse()(*SetCollectionResponse) { + m := &SetCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Setable, len(val)) + for i, v := range val { + res[i] = v.(Setable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SetCollectionResponse) GetValue()([]Setable) { + return m.value +} +// Serialize serializes information the current object +func (m *SetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SetCollectionResponse) SetValue(value []Setable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/set_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/termstore/set_collection_responseable.go new file mode 100644 index 000000000..aff1b2e58 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/set_collection_responseable.go @@ -0,0 +1,14 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SetCollectionResponseable +type SetCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Setable) + SetValue(value []Setable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/setable.go b/src/internal/connector/graph/betaSDK/models/termstore/setable.go new file mode 100644 index 000000000..647e045ce --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/setable.go @@ -0,0 +1,29 @@ +package termstore + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Setable +type Setable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildren()([]Termable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetLocalizedNames()([]LocalizedNameable) + GetParentGroup()(Groupable) + GetProperties()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable) + GetRelations()([]Relationable) + GetTerms()([]Termable) + SetChildren(value []Termable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetLocalizedNames(value []LocalizedNameable)() + SetParentGroup(value Groupable)() + SetProperties(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable)() + SetRelations(value []Relationable)() + SetTerms(value []Termable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/store.go b/src/internal/connector/graph/betaSDK/models/termstore/store.go new file mode 100644 index 000000000..f98af1e7c --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/store.go @@ -0,0 +1,159 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Store +type Store struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Default language of the term store. + defaultLanguageTag *string + // Collection of all groups available in the term store. + groups []Groupable + // List of languages for the term store. + languageTags []string + // Collection of all sets available in the term store. + sets []Setable +} +// NewStore instantiates a new store and sets the default values. +func NewStore()(*Store) { + m := &Store{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateStoreFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateStoreFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStore(), nil +} +// GetDefaultLanguageTag gets the defaultLanguageTag property value. Default language of the term store. +func (m *Store) GetDefaultLanguageTag()(*string) { + return m.defaultLanguageTag +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Store) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + 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["groups"] = 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.SetGroups(res) + } + 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["sets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Setable, len(val)) + for i, v := range val { + res[i] = v.(Setable) + } + m.SetSets(res) + } + return nil + } + return res +} +// GetGroups gets the groups property value. Collection of all groups available in the term store. +func (m *Store) GetGroups()([]Groupable) { + return m.groups +} +// GetLanguageTags gets the languageTags property value. List of languages for the term store. +func (m *Store) GetLanguageTags()([]string) { + return m.languageTags +} +// GetSets gets the sets property value. Collection of all sets available in the term store. +func (m *Store) GetSets()([]Setable) { + return m.sets +} +// Serialize serializes information the current object +func (m *Store) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("defaultLanguageTag", m.GetDefaultLanguageTag()) + 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.GetLanguageTags() != nil { + err = writer.WriteCollectionOfStringValues("languageTags", m.GetLanguageTags()) + if err != nil { + return err + } + } + if m.GetSets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSets())) + for i, v := range m.GetSets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sets", cast) + if err != nil { + return err + } + } + return nil +} +// SetDefaultLanguageTag sets the defaultLanguageTag property value. Default language of the term store. +func (m *Store) SetDefaultLanguageTag(value *string)() { + m.defaultLanguageTag = value +} +// SetGroups sets the groups property value. Collection of all groups available in the term store. +func (m *Store) SetGroups(value []Groupable)() { + m.groups = value +} +// SetLanguageTags sets the languageTags property value. List of languages for the term store. +func (m *Store) SetLanguageTags(value []string)() { + m.languageTags = value +} +// SetSets sets the sets property value. Collection of all sets available in the term store. +func (m *Store) SetSets(value []Setable)() { + m.sets = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/storeable.go b/src/internal/connector/graph/betaSDK/models/termstore/storeable.go new file mode 100644 index 000000000..9e4f74590 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/storeable.go @@ -0,0 +1,20 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Storeable +type Storeable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultLanguageTag()(*string) + GetGroups()([]Groupable) + GetLanguageTags()([]string) + GetSets()([]Setable) + SetDefaultLanguageTag(value *string)() + SetGroups(value []Groupable)() + SetLanguageTags(value []string)() + SetSets(value []Setable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/term.go b/src/internal/connector/graph/betaSDK/models/termstore/term.go new file mode 100644 index 000000000..41b963bd2 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/term.go @@ -0,0 +1,284 @@ +package termstore + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Term +type Term struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Children of current term. + children []Termable + // Date and time of term creation. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description about term that is dependent on the languageTag. + descriptions []LocalizedDescriptionable + // Label metadata for a term. + labels []LocalizedLabelable + // Last date and time of term modification. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Collection of properties on the term. + properties []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable + // To indicate which terms are related to the current term as either pinned or reused. + relations []Relationable + // The [set] in which the term is created. + set Setable +} +// NewTerm instantiates a new term and sets the default values. +func NewTerm()(*Term) { + m := &Term{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTermFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTermFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTerm(), nil +} +// GetChildren gets the children property value. Children of current term. +func (m *Term) GetChildren()([]Termable) { + return m.children +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time of term creation. Read-only. +func (m *Term) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescriptions gets the descriptions property value. Description about term that is dependent on the languageTag. +func (m *Term) GetDescriptions()([]LocalizedDescriptionable) { + return m.descriptions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Term) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Termable, len(val)) + for i, v := range val { + res[i] = v.(Termable) + } + m.SetChildren(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["descriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocalizedDescriptionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocalizedDescriptionable, len(val)) + for i, v := range val { + res[i] = v.(LocalizedDescriptionable) + } + m.SetDescriptions(res) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocalizedLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocalizedLabelable, len(val)) + for i, v := range val { + res[i] = v.(LocalizedLabelable) + } + m.SetLabels(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["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable) + } + m.SetProperties(res) + } + return nil + } + res["relations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Relationable, len(val)) + for i, v := range val { + res[i] = v.(Relationable) + } + m.SetRelations(res) + } + return nil + } + res["set"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSet(val.(Setable)) + } + return nil + } + return res +} +// GetLabels gets the labels property value. Label metadata for a term. +func (m *Term) GetLabels()([]LocalizedLabelable) { + return m.labels +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last date and time of term modification. Read-only. +func (m *Term) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetProperties gets the properties property value. Collection of properties on the term. +func (m *Term) GetProperties()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable) { + return m.properties +} +// GetRelations gets the relations property value. To indicate which terms are related to the current term as either pinned or reused. +func (m *Term) GetRelations()([]Relationable) { + return m.relations +} +// GetSet gets the set property value. The [set] in which the term is created. +func (m *Term) GetSet()(Setable) { + return m.set +} +// Serialize serializes information the current object +func (m *Term) 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.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + 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 + } + } + 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 + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + 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 + } + } + if m.GetRelations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRelations())) + for i, v := range m.GetRelations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("relations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("set", m.GetSet()) + if err != nil { + return err + } + } + return nil +} +// SetChildren sets the children property value. Children of current term. +func (m *Term) SetChildren(value []Termable)() { + m.children = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time of term creation. Read-only. +func (m *Term) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescriptions sets the descriptions property value. Description about term that is dependent on the languageTag. +func (m *Term) SetDescriptions(value []LocalizedDescriptionable)() { + m.descriptions = value +} +// SetLabels sets the labels property value. Label metadata for a term. +func (m *Term) SetLabels(value []LocalizedLabelable)() { + m.labels = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last date and time of term modification. Read-only. +func (m *Term) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetProperties sets the properties property value. Collection of properties on the term. +func (m *Term) SetProperties(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable)() { + m.properties = value +} +// SetRelations sets the relations property value. To indicate which terms are related to the current term as either pinned or reused. +func (m *Term) SetRelations(value []Relationable)() { + m.relations = value +} +// SetSet sets the set property value. The [set] in which the term is created. +func (m *Term) SetSet(value Setable)() { + m.set = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/term_collection_response.go b/src/internal/connector/graph/betaSDK/models/termstore/term_collection_response.go new file mode 100644 index 000000000..e866b04b7 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/term_collection_response.go @@ -0,0 +1,69 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TermCollectionResponse +type TermCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Termable +} +// NewTermCollectionResponse instantiates a new TermCollectionResponse and sets the default values. +func NewTermCollectionResponse()(*TermCollectionResponse) { + m := &TermCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTermCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTermCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTermCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TermCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Termable, len(val)) + for i, v := range val { + res[i] = v.(Termable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TermCollectionResponse) GetValue()([]Termable) { + return m.value +} +// Serialize serializes information the current object +func (m *TermCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TermCollectionResponse) SetValue(value []Termable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/term_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/termstore/term_collection_responseable.go new file mode 100644 index 000000000..dfa58cae7 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/term_collection_responseable.go @@ -0,0 +1,14 @@ +package termstore + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TermCollectionResponseable +type TermCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Termable) + SetValue(value []Termable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/term_group_scope.go b/src/internal/connector/graph/betaSDK/models/termstore/term_group_scope.go new file mode 100644 index 000000000..fee5a1e8e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/term_group_scope.go @@ -0,0 +1,37 @@ +package termstore +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TermGroupScope int + +const ( + GLOBAL_TERMGROUPSCOPE TermGroupScope = iota + SYSTEM_TERMGROUPSCOPE + SITECOLLECTION_TERMGROUPSCOPE +) + +func (i TermGroupScope) String() string { + return []string{"global", "system", "siteCollection"}[i] +} +func ParseTermGroupScope(v string) (interface{}, error) { + result := GLOBAL_TERMGROUPSCOPE + switch v { + case "global": + result = GLOBAL_TERMGROUPSCOPE + case "system": + result = SYSTEM_TERMGROUPSCOPE + case "siteCollection": + result = SITECOLLECTION_TERMGROUPSCOPE + default: + return 0, errors.New("Unknown TermGroupScope value: " + v) + } + return &result, nil +} +func SerializeTermGroupScope(values []TermGroupScope) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/termstore/termable.go b/src/internal/connector/graph/betaSDK/models/termstore/termable.go new file mode 100644 index 000000000..aac027230 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/termstore/termable.go @@ -0,0 +1,29 @@ +package termstore + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Termable +type Termable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildren()([]Termable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescriptions()([]LocalizedDescriptionable) + GetLabels()([]LocalizedLabelable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetProperties()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable) + GetRelations()([]Relationable) + GetSet()(Setable) + SetChildren(value []Termable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescriptions(value []LocalizedDescriptionable)() + SetLabels(value []LocalizedLabelable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetProperties(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValueable)() + SetRelations(value []Relationable)() + SetSet(value Setable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device.go new file mode 100644 index 000000000..685d9a44f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device.go @@ -0,0 +1,104 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADDevice +type AzureADDevice struct { + UpdatableAsset + // Specifies areas of the service in which the device is enrolled. Read-only. Returned by default. + enrollments []UpdatableAssetEnrollmentable + // Specifies any errors that prevent the device from being enrolled in update management or receving deployed content. Read-only. Returned by default. + errors []UpdatableAssetErrorable +} +// NewAzureADDevice instantiates a new AzureADDevice and sets the default values. +func NewAzureADDevice()(*AzureADDevice) { + m := &AzureADDevice{ + UpdatableAsset: *NewUpdatableAsset(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.azureADDevice"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAzureADDeviceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureADDeviceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureADDevice(), nil +} +// GetEnrollments gets the enrollments property value. Specifies areas of the service in which the device is enrolled. Read-only. Returned by default. +func (m *AzureADDevice) GetEnrollments()([]UpdatableAssetEnrollmentable) { + return m.enrollments +} +// GetErrors gets the errors property value. Specifies any errors that prevent the device from being enrolled in update management or receving deployed content. Read-only. Returned by default. +func (m *AzureADDevice) GetErrors()([]UpdatableAssetErrorable) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureADDevice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UpdatableAsset.GetFieldDeserializers() + res["enrollments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetEnrollmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetEnrollmentable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetEnrollmentable) + } + m.SetEnrollments(res) + } + return nil + } + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetErrorable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetErrorable) + } + m.SetErrors(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AzureADDevice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UpdatableAsset.Serialize(writer) + if err != nil { + return err + } + if m.GetEnrollments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEnrollments())) + for i, v := range m.GetEnrollments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("enrollments", cast) + 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 + } + } + return nil +} +// SetEnrollments sets the enrollments property value. Specifies areas of the service in which the device is enrolled. Read-only. Returned by default. +func (m *AzureADDevice) SetEnrollments(value []UpdatableAssetEnrollmentable)() { + m.enrollments = value +} +// SetErrors sets the errors property value. Specifies any errors that prevent the device from being enrolled in update management or receving deployed content. Read-only. Returned by default. +func (m *AzureADDevice) SetErrors(value []UpdatableAssetErrorable)() { + m.errors = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_collection_response.go new file mode 100644 index 000000000..3ae5b1871 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AzureADDeviceCollectionResponse +type AzureADDeviceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AzureADDeviceable +} +// NewAzureADDeviceCollectionResponse instantiates a new AzureADDeviceCollectionResponse and sets the default values. +func NewAzureADDeviceCollectionResponse()(*AzureADDeviceCollectionResponse) { + m := &AzureADDeviceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAzureADDeviceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureADDeviceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureADDeviceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureADDeviceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAzureADDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AzureADDeviceable, len(val)) + for i, v := range val { + res[i] = v.(AzureADDeviceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AzureADDeviceCollectionResponse) GetValue()([]AzureADDeviceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AzureADDeviceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AzureADDeviceCollectionResponse) SetValue(value []AzureADDeviceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_collection_responseable.go new file mode 100644 index 000000000..39e2d2d17 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AzureADDeviceCollectionResponseable +type AzureADDeviceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AzureADDeviceable) + SetValue(value []AzureADDeviceable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_registration_error.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_registration_error.go new file mode 100644 index 000000000..d08f8f455 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_registration_error.go @@ -0,0 +1,63 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADDeviceRegistrationError +type AzureADDeviceRegistrationError struct { + UpdatableAssetError + // The reason property + reason *AzureADDeviceRegistrationErrorReason +} +// NewAzureADDeviceRegistrationError instantiates a new AzureADDeviceRegistrationError and sets the default values. +func NewAzureADDeviceRegistrationError()(*AzureADDeviceRegistrationError) { + m := &AzureADDeviceRegistrationError{ + UpdatableAssetError: *NewUpdatableAssetError(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.azureADDeviceRegistrationError"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAzureADDeviceRegistrationErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureADDeviceRegistrationErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureADDeviceRegistrationError(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureADDeviceRegistrationError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UpdatableAssetError.GetFieldDeserializers() + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAzureADDeviceRegistrationErrorReason) + if err != nil { + return err + } + if val != nil { + m.SetReason(val.(*AzureADDeviceRegistrationErrorReason)) + } + return nil + } + return res +} +// GetReason gets the reason property value. The reason property +func (m *AzureADDeviceRegistrationError) GetReason()(*AzureADDeviceRegistrationErrorReason) { + return m.reason +} +// Serialize serializes information the current object +func (m *AzureADDeviceRegistrationError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UpdatableAssetError.Serialize(writer) + if err != nil { + return err + } + if m.GetReason() != nil { + cast := (*m.GetReason()).String() + err = writer.WriteStringValue("reason", &cast) + if err != nil { + return err + } + } + return nil +} +// SetReason sets the reason property value. The reason property +func (m *AzureADDeviceRegistrationError) SetReason(value *AzureADDeviceRegistrationErrorReason)() { + m.reason = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_registration_error_reason.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_registration_error_reason.go new file mode 100644 index 000000000..06f1ec4db --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_registration_error_reason.go @@ -0,0 +1,43 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AzureADDeviceRegistrationErrorReason int + +const ( + INVALIDGLOBALDEVICEID_AZUREADDEVICEREGISTRATIONERRORREASON AzureADDeviceRegistrationErrorReason = iota + INVALIDAZUREADDEVICEID_AZUREADDEVICEREGISTRATIONERRORREASON + MISSINGTRUSTTYPE_AZUREADDEVICEREGISTRATIONERRORREASON + INVALIDAZUREADJOIN_AZUREADDEVICEREGISTRATIONERRORREASON + UNKNOWNFUTUREVALUE_AZUREADDEVICEREGISTRATIONERRORREASON +) + +func (i AzureADDeviceRegistrationErrorReason) String() string { + return []string{"invalidGlobalDeviceId", "invalidAzureADDeviceId", "missingTrustType", "invalidAzureADJoin", "unknownFutureValue"}[i] +} +func ParseAzureADDeviceRegistrationErrorReason(v string) (interface{}, error) { + result := INVALIDGLOBALDEVICEID_AZUREADDEVICEREGISTRATIONERRORREASON + switch v { + case "invalidGlobalDeviceId": + result = INVALIDGLOBALDEVICEID_AZUREADDEVICEREGISTRATIONERRORREASON + case "invalidAzureADDeviceId": + result = INVALIDAZUREADDEVICEID_AZUREADDEVICEREGISTRATIONERRORREASON + case "missingTrustType": + result = MISSINGTRUSTTYPE_AZUREADDEVICEREGISTRATIONERRORREASON + case "invalidAzureADJoin": + result = INVALIDAZUREADJOIN_AZUREADDEVICEREGISTRATIONERRORREASON + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AZUREADDEVICEREGISTRATIONERRORREASON + default: + return 0, errors.New("Unknown AzureADDeviceRegistrationErrorReason value: " + v) + } + return &result, nil +} +func SerializeAzureADDeviceRegistrationErrorReason(values []AzureADDeviceRegistrationErrorReason) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_registration_errorable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_registration_errorable.go new file mode 100644 index 000000000..e592de8c9 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_device_registration_errorable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADDeviceRegistrationErrorable +type AzureADDeviceRegistrationErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UpdatableAssetErrorable + GetReason()(*AzureADDeviceRegistrationErrorReason) + SetReason(value *AzureADDeviceRegistrationErrorReason)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_deviceable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_deviceable.go new file mode 100644 index 000000000..81e98f719 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/azure_a_d_deviceable.go @@ -0,0 +1,15 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADDeviceable +type AzureADDeviceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UpdatableAssetable + GetEnrollments()([]UpdatableAssetEnrollmentable) + GetErrors()([]UpdatableAssetErrorable) + SetEnrollments(value []UpdatableAssetEnrollmentable)() + SetErrors(value []UpdatableAssetErrorable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog.go new file mode 100644 index 000000000..1f19002eb --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Catalog +type Catalog struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Lists the content that you can approve for deployment. Read-only. + entries []CatalogEntryable +} +// NewCatalog instantiates a new catalog and sets the default values. +func NewCatalog()(*Catalog) { + m := &Catalog{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCatalogFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCatalogFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCatalog(), nil +} +// GetEntries gets the entries property value. Lists the content that you can approve for deployment. Read-only. +func (m *Catalog) GetEntries()([]CatalogEntryable) { + return m.entries +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Catalog) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["entries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCatalogEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CatalogEntryable, len(val)) + for i, v := range val { + res[i] = v.(CatalogEntryable) + } + m.SetEntries(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Catalog) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetEntries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEntries())) + for i, v := range m.GetEntries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("entries", cast) + if err != nil { + return err + } + } + return nil +} +// SetEntries sets the entries property value. Lists the content that you can approve for deployment. Read-only. +func (m *Catalog) SetEntries(value []CatalogEntryable)() { + m.entries = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entry.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entry.go new file mode 100644 index 000000000..cdfe1a409 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entry.go @@ -0,0 +1,136 @@ +package windowsupdates + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CatalogEntry provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CatalogEntry struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The date on which the content is no longer available to deploy using the service. Read-only. + deployableUntilDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name of the content. Read-only. + displayName *string + // The release date for the content. Read-only. + releaseDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCatalogEntry instantiates a new catalogEntry and sets the default values. +func NewCatalogEntry()(*CatalogEntry) { + m := &CatalogEntry{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCatalogEntryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCatalogEntryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry": + return NewFeatureUpdateCatalogEntry(), nil + case "#microsoft.graph.windowsUpdates.qualityUpdateCatalogEntry": + return NewQualityUpdateCatalogEntry(), nil + case "#microsoft.graph.windowsUpdates.softwareUpdateCatalogEntry": + return NewSoftwareUpdateCatalogEntry(), nil + } + } + } + } + return NewCatalogEntry(), nil +} +// GetDeployableUntilDateTime gets the deployableUntilDateTime property value. The date on which the content is no longer available to deploy using the service. Read-only. +func (m *CatalogEntry) GetDeployableUntilDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deployableUntilDateTime +} +// GetDisplayName gets the displayName property value. The display name of the content. Read-only. +func (m *CatalogEntry) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CatalogEntry) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deployableUntilDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeployableUntilDateTime(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["releaseDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReleaseDateTime(val) + } + return nil + } + return res +} +// GetReleaseDateTime gets the releaseDateTime property value. The release date for the content. Read-only. +func (m *CatalogEntry) GetReleaseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.releaseDateTime +} +// Serialize serializes information the current object +func (m *CatalogEntry) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("deployableUntilDateTime", m.GetDeployableUntilDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("releaseDateTime", m.GetReleaseDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetDeployableUntilDateTime sets the deployableUntilDateTime property value. The date on which the content is no longer available to deploy using the service. Read-only. +func (m *CatalogEntry) SetDeployableUntilDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deployableUntilDateTime = value +} +// SetDisplayName sets the displayName property value. The display name of the content. Read-only. +func (m *CatalogEntry) SetDisplayName(value *string)() { + m.displayName = value +} +// SetReleaseDateTime sets the releaseDateTime property value. The release date for the content. Read-only. +func (m *CatalogEntry) SetReleaseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.releaseDateTime = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entry_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entry_collection_response.go new file mode 100644 index 000000000..7d783856c --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entry_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CatalogEntryCollectionResponse +type CatalogEntryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CatalogEntryable +} +// NewCatalogEntryCollectionResponse instantiates a new CatalogEntryCollectionResponse and sets the default values. +func NewCatalogEntryCollectionResponse()(*CatalogEntryCollectionResponse) { + m := &CatalogEntryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCatalogEntryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCatalogEntryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCatalogEntryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CatalogEntryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCatalogEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CatalogEntryable, len(val)) + for i, v := range val { + res[i] = v.(CatalogEntryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CatalogEntryCollectionResponse) GetValue()([]CatalogEntryable) { + return m.value +} +// Serialize serializes information the current object +func (m *CatalogEntryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CatalogEntryCollectionResponse) SetValue(value []CatalogEntryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entry_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entry_collection_responseable.go new file mode 100644 index 000000000..b30364a4f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entry_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CatalogEntryCollectionResponseable +type CatalogEntryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CatalogEntryable) + SetValue(value []CatalogEntryable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entryable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entryable.go new file mode 100644 index 000000000..e5c7fad61 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalog_entryable.go @@ -0,0 +1,19 @@ +package windowsupdates + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CatalogEntryable +type CatalogEntryable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeployableUntilDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetReleaseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetDeployableUntilDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetReleaseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/catalogable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalogable.go new file mode 100644 index 000000000..66e3719f7 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/catalogable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Catalogable +type Catalogable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEntries()([]CatalogEntryable) + SetEntries(value []CatalogEntryable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployable_content.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployable_content.go new file mode 100644 index 000000000..660123138 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployable_content.go @@ -0,0 +1,97 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeployableContent +type DeployableContent struct { + // 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 +} +// NewDeployableContent instantiates a new deployableContent and sets the default values. +func NewDeployableContent()(*DeployableContent) { + m := &DeployableContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeployableContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeployableContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.expeditedQualityUpdateReference": + return NewExpeditedQualityUpdateReference(), nil + case "#microsoft.graph.windowsUpdates.featureUpdateReference": + return NewFeatureUpdateReference(), nil + case "#microsoft.graph.windowsUpdates.qualityUpdateReference": + return NewQualityUpdateReference(), nil + case "#microsoft.graph.windowsUpdates.softwareUpdateReference": + return NewSoftwareUpdateReference(), nil + case "#microsoft.graph.windowsUpdates.windowsUpdateReference": + return NewWindowsUpdateReference(), nil + } + } + } + } + return NewDeployableContent(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeployableContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeployableContent) 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 *DeployableContent) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeployableContent) 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 *DeployableContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeployableContent) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployable_contentable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployable_contentable.go new file mode 100644 index 000000000..138e41bca --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployable_contentable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeployableContentable +type DeployableContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment.go new file mode 100644 index 000000000..e4cb4694f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment.go @@ -0,0 +1,192 @@ +package windowsupdates + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Deployment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Deployment struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Specifies the audience to which content is deployed. + audience DeploymentAudienceable + // Specifies what content to deploy. Cannot be changed. Returned by default. + content DeployableContentable + // The date and time the deployment was created. Returned by default. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time the deployment was last modified. Returned by default. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Settings specified on the specific deployment governing how to deploy content. Returned by default. + settings DeploymentSettingsable + // Execution status of the deployment. Returned by default. + state DeploymentStateable +} +// NewDeployment instantiates a new deployment and sets the default values. +func NewDeployment()(*Deployment) { + m := &Deployment{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateDeploymentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeploymentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeployment(), nil +} +// GetAudience gets the audience property value. Specifies the audience to which content is deployed. +func (m *Deployment) GetAudience()(DeploymentAudienceable) { + return m.audience +} +// GetContent gets the content property value. Specifies what content to deploy. Cannot be changed. Returned by default. +func (m *Deployment) GetContent()(DeployableContentable) { + return m.content +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the deployment was created. Returned by default. Read-only. +func (m *Deployment) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Deployment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["audience"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeploymentAudienceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAudience(val.(DeploymentAudienceable)) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeployableContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContent(val.(DeployableContentable)) + } + 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["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeploymentSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(DeploymentSettingsable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeploymentStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(DeploymentStateable)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the deployment was last modified. Returned by default. Read-only. +func (m *Deployment) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetSettings gets the settings property value. Settings specified on the specific deployment governing how to deploy content. Returned by default. +func (m *Deployment) GetSettings()(DeploymentSettingsable) { + return m.settings +} +// GetState gets the state property value. Execution status of the deployment. Returned by default. +func (m *Deployment) GetState()(DeploymentStateable) { + return m.state +} +// Serialize serializes information the current object +func (m *Deployment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("audience", m.GetAudience()) + 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 + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("state", m.GetState()) + if err != nil { + return err + } + } + return nil +} +// SetAudience sets the audience property value. Specifies the audience to which content is deployed. +func (m *Deployment) SetAudience(value DeploymentAudienceable)() { + m.audience = value +} +// SetContent sets the content property value. Specifies what content to deploy. Cannot be changed. Returned by default. +func (m *Deployment) SetContent(value DeployableContentable)() { + m.content = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the deployment was created. Returned by default. Read-only. +func (m *Deployment) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the deployment was last modified. Returned by default. Read-only. +func (m *Deployment) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetSettings sets the settings property value. Settings specified on the specific deployment governing how to deploy content. Returned by default. +func (m *Deployment) SetSettings(value DeploymentSettingsable)() { + m.settings = value +} +// SetState sets the state property value. Execution status of the deployment. Returned by default. +func (m *Deployment) SetState(value DeploymentStateable)() { + m.state = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_audience.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_audience.go new file mode 100644 index 000000000..2756dc8ed --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_audience.go @@ -0,0 +1,103 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeploymentAudience +type DeploymentAudience struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Specifies the assets to exclude from the audience. + exclusions []UpdatableAssetable + // Specifies the assets to include in the audience. + members []UpdatableAssetable +} +// NewDeploymentAudience instantiates a new deploymentAudience and sets the default values. +func NewDeploymentAudience()(*DeploymentAudience) { + m := &DeploymentAudience{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateDeploymentAudienceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeploymentAudienceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentAudience(), nil +} +// GetExclusions gets the exclusions property value. Specifies the assets to exclude from the audience. +func (m *DeploymentAudience) GetExclusions()([]UpdatableAssetable) { + return m.exclusions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeploymentAudience) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["exclusions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetable) + } + m.SetExclusions(res) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetable) + } + m.SetMembers(res) + } + return nil + } + return res +} +// GetMembers gets the members property value. Specifies the assets to include in the audience. +func (m *DeploymentAudience) GetMembers()([]UpdatableAssetable) { + return m.members +} +// Serialize serializes information the current object +func (m *DeploymentAudience) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetExclusions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExclusions())) + for i, v := range m.GetExclusions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exclusions", 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 + } + } + return nil +} +// SetExclusions sets the exclusions property value. Specifies the assets to exclude from the audience. +func (m *DeploymentAudience) SetExclusions(value []UpdatableAssetable)() { + m.exclusions = value +} +// SetMembers sets the members property value. Specifies the assets to include in the audience. +func (m *DeploymentAudience) SetMembers(value []UpdatableAssetable)() { + m.members = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_audienceable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_audienceable.go new file mode 100644 index 000000000..ef24edc28 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_audienceable.go @@ -0,0 +1,16 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeploymentAudienceable +type DeploymentAudienceable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExclusions()([]UpdatableAssetable) + GetMembers()([]UpdatableAssetable) + SetExclusions(value []UpdatableAssetable)() + SetMembers(value []UpdatableAssetable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_collection_response.go new file mode 100644 index 000000000..54680b64f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeploymentCollectionResponse +type DeploymentCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Deploymentable +} +// NewDeploymentCollectionResponse instantiates a new DeploymentCollectionResponse and sets the default values. +func NewDeploymentCollectionResponse()(*DeploymentCollectionResponse) { + m := &DeploymentCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeploymentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeploymentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeploymentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeploymentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Deploymentable, len(val)) + for i, v := range val { + res[i] = v.(Deploymentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeploymentCollectionResponse) GetValue()([]Deploymentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeploymentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeploymentCollectionResponse) SetValue(value []Deploymentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_collection_responseable.go new file mode 100644 index 000000000..b28fd051d --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeploymentCollectionResponseable +type DeploymentCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Deploymentable) + SetValue(value []Deploymentable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_settings.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_settings.go new file mode 100644 index 000000000..8b64d6c40 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_settings.go @@ -0,0 +1,167 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentSettings +type DeploymentSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Settings governing conditions to monitor and automated actions to take. + monitoring MonitoringSettingsable + // The OdataType property + odataType *string + // Settings governing how the content is rolled out. + rollout RolloutSettingsable + // Settings governing safeguard holds on offering content. + safeguard SafeguardSettingsable +} +// NewDeploymentSettings instantiates a new deploymentSettings and sets the default values. +func NewDeploymentSettings()(*DeploymentSettings) { + m := &DeploymentSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeploymentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeploymentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.windowsDeploymentSettings": + return NewWindowsDeploymentSettings(), nil + } + } + } + } + return NewDeploymentSettings(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeploymentSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeploymentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["monitoring"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMonitoringSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMonitoring(val.(MonitoringSettingsable)) + } + return nil + } + res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["rollout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRolloutSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRollout(val.(RolloutSettingsable)) + } + return nil + } + res["safeguard"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSafeguardSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSafeguard(val.(SafeguardSettingsable)) + } + return nil + } + return res +} +// GetMonitoring gets the monitoring property value. Settings governing conditions to monitor and automated actions to take. +func (m *DeploymentSettings) GetMonitoring()(MonitoringSettingsable) { + return m.monitoring +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeploymentSettings) GetOdataType()(*string) { + return m.odataType +} +// GetRollout gets the rollout property value. Settings governing how the content is rolled out. +func (m *DeploymentSettings) GetRollout()(RolloutSettingsable) { + return m.rollout +} +// GetSafeguard gets the safeguard property value. Settings governing safeguard holds on offering content. +func (m *DeploymentSettings) GetSafeguard()(SafeguardSettingsable) { + return m.safeguard +} +// Serialize serializes information the current object +func (m *DeploymentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("monitoring", m.GetMonitoring()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("rollout", m.GetRollout()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("safeguard", m.GetSafeguard()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeploymentSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMonitoring sets the monitoring property value. Settings governing conditions to monitor and automated actions to take. +func (m *DeploymentSettings) SetMonitoring(value MonitoringSettingsable)() { + m.monitoring = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeploymentSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetRollout sets the rollout property value. Settings governing how the content is rolled out. +func (m *DeploymentSettings) SetRollout(value RolloutSettingsable)() { + m.rollout = value +} +// SetSafeguard sets the safeguard property value. Settings governing safeguard holds on offering content. +func (m *DeploymentSettings) SetSafeguard(value SafeguardSettingsable)() { + m.safeguard = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_settingsable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_settingsable.go new file mode 100644 index 000000000..5df7e52ad --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_settingsable.go @@ -0,0 +1,19 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentSettingsable +type DeploymentSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMonitoring()(MonitoringSettingsable) + GetOdataType()(*string) + GetRollout()(RolloutSettingsable) + GetSafeguard()(SafeguardSettingsable) + SetMonitoring(value MonitoringSettingsable)() + SetOdataType(value *string)() + SetRollout(value RolloutSettingsable)() + SetSafeguard(value SafeguardSettingsable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state.go new file mode 100644 index 000000000..272a82049 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state.go @@ -0,0 +1,159 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentState +type DeploymentState struct { + // 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 reasons the deployment has its state value. Read-only. + reasons []DeploymentStateReasonable + // The requestedValue property + requestedValue *RequestedDeploymentStateValue + // The value property + value *DeploymentStateValue +} +// NewDeploymentState instantiates a new deploymentState and sets the default values. +func NewDeploymentState()(*DeploymentState) { + m := &DeploymentState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeploymentStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeploymentStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentState(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeploymentState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeploymentState) 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["reasons"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeploymentStateReasonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeploymentStateReasonable, len(val)) + for i, v := range val { + res[i] = v.(DeploymentStateReasonable) + } + m.SetReasons(res) + } + return nil + } + res["requestedValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRequestedDeploymentStateValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestedValue(val.(*RequestedDeploymentStateValue)) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeploymentStateValue) + if err != nil { + return err + } + if val != nil { + m.SetValue(val.(*DeploymentStateValue)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeploymentState) GetOdataType()(*string) { + return m.odataType +} +// GetReasons gets the reasons property value. Specifies the reasons the deployment has its state value. Read-only. +func (m *DeploymentState) GetReasons()([]DeploymentStateReasonable) { + return m.reasons +} +// GetRequestedValue gets the requestedValue property value. The requestedValue property +func (m *DeploymentState) GetRequestedValue()(*RequestedDeploymentStateValue) { + return m.requestedValue +} +// GetValue gets the value property value. The value property +func (m *DeploymentState) GetValue()(*DeploymentStateValue) { + return m.value +} +// Serialize serializes information the current object +func (m *DeploymentState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetReasons() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReasons())) + for i, v := range m.GetReasons() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("reasons", cast) + if err != nil { + return err + } + } + if m.GetRequestedValue() != nil { + cast := (*m.GetRequestedValue()).String() + err := writer.WriteStringValue("requestedValue", &cast) + if err != nil { + return err + } + } + if m.GetValue() != nil { + cast := (*m.GetValue()).String() + err := writer.WriteStringValue("value", &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 *DeploymentState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeploymentState) SetOdataType(value *string)() { + m.odataType = value +} +// SetReasons sets the reasons property value. Specifies the reasons the deployment has its state value. Read-only. +func (m *DeploymentState) SetReasons(value []DeploymentStateReasonable)() { + m.reasons = value +} +// SetRequestedValue sets the requestedValue property value. The requestedValue property +func (m *DeploymentState) SetRequestedValue(value *RequestedDeploymentStateValue)() { + m.requestedValue = value +} +// SetValue sets the value property value. The value property +func (m *DeploymentState) SetValue(value *DeploymentStateValue)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason.go new file mode 100644 index 000000000..8f8f3b402 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason.go @@ -0,0 +1,98 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentStateReason +type DeploymentStateReason struct { + // 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 value property + value *DeploymentStateReasonValue +} +// NewDeploymentStateReason instantiates a new deploymentStateReason and sets the default values. +func NewDeploymentStateReason()(*DeploymentStateReason) { + m := &DeploymentStateReason{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeploymentStateReasonFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeploymentStateReasonFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentStateReason(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *DeploymentStateReason) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeploymentStateReason) 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["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeploymentStateReasonValue) + if err != nil { + return err + } + if val != nil { + m.SetValue(val.(*DeploymentStateReasonValue)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeploymentStateReason) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. The value property +func (m *DeploymentStateReason) GetValue()(*DeploymentStateReasonValue) { + return m.value +} +// Serialize serializes information the current object +func (m *DeploymentStateReason) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetValue() != nil { + cast := (*m.GetValue()).String() + err := writer.WriteStringValue("value", &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 *DeploymentStateReason) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeploymentStateReason) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. The value property +func (m *DeploymentStateReason) SetValue(value *DeploymentStateReasonValue)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason_collection_response.go new file mode 100644 index 000000000..05af8bb81 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeploymentStateReasonCollectionResponse +type DeploymentStateReasonCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []DeploymentStateReasonable +} +// NewDeploymentStateReasonCollectionResponse instantiates a new DeploymentStateReasonCollectionResponse and sets the default values. +func NewDeploymentStateReasonCollectionResponse()(*DeploymentStateReasonCollectionResponse) { + m := &DeploymentStateReasonCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeploymentStateReasonCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeploymentStateReasonCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeploymentStateReasonCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeploymentStateReasonCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeploymentStateReasonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeploymentStateReasonable, len(val)) + for i, v := range val { + res[i] = v.(DeploymentStateReasonable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeploymentStateReasonCollectionResponse) GetValue()([]DeploymentStateReasonable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeploymentStateReasonCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeploymentStateReasonCollectionResponse) SetValue(value []DeploymentStateReasonable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason_collection_responseable.go new file mode 100644 index 000000000..96d731445 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeploymentStateReasonCollectionResponseable +type DeploymentStateReasonCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeploymentStateReasonable) + SetValue(value []DeploymentStateReasonable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason_value.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason_value.go new file mode 100644 index 000000000..61933aed5 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reason_value.go @@ -0,0 +1,46 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeploymentStateReasonValue int + +const ( + SCHEDULEDBYOFFERWINDOW_DEPLOYMENTSTATEREASONVALUE DeploymentStateReasonValue = iota + OFFERINGBYREQUEST_DEPLOYMENTSTATEREASONVALUE + PAUSEDBYREQUEST_DEPLOYMENTSTATEREASONVALUE + PAUSEDBYMONITORING_DEPLOYMENTSTATEREASONVALUE + UNKNOWNFUTUREVALUE_DEPLOYMENTSTATEREASONVALUE + FAULTEDBYCONTENTOUTDATED_DEPLOYMENTSTATEREASONVALUE +) + +func (i DeploymentStateReasonValue) String() string { + return []string{"scheduledByOfferWindow", "offeringByRequest", "pausedByRequest", "pausedByMonitoring", "unknownFutureValue", "faultedByContentOutdated"}[i] +} +func ParseDeploymentStateReasonValue(v string) (interface{}, error) { + result := SCHEDULEDBYOFFERWINDOW_DEPLOYMENTSTATEREASONVALUE + switch v { + case "scheduledByOfferWindow": + result = SCHEDULEDBYOFFERWINDOW_DEPLOYMENTSTATEREASONVALUE + case "offeringByRequest": + result = OFFERINGBYREQUEST_DEPLOYMENTSTATEREASONVALUE + case "pausedByRequest": + result = PAUSEDBYREQUEST_DEPLOYMENTSTATEREASONVALUE + case "pausedByMonitoring": + result = PAUSEDBYMONITORING_DEPLOYMENTSTATEREASONVALUE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEPLOYMENTSTATEREASONVALUE + case "faultedByContentOutdated": + result = FAULTEDBYCONTENTOUTDATED_DEPLOYMENTSTATEREASONVALUE + default: + return 0, errors.New("Unknown DeploymentStateReasonValue value: " + v) + } + return &result, nil +} +func SerializeDeploymentStateReasonValue(values []DeploymentStateReasonValue) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reasonable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reasonable.go new file mode 100644 index 000000000..82ecf85e6 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_reasonable.go @@ -0,0 +1,15 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentStateReasonable +type DeploymentStateReasonable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetValue()(*DeploymentStateReasonValue) + SetOdataType(value *string)() + SetValue(value *DeploymentStateReasonValue)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_value.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_value.go new file mode 100644 index 000000000..f63e4fdb9 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_state_value.go @@ -0,0 +1,46 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeploymentStateValue int + +const ( + SCHEDULED_DEPLOYMENTSTATEVALUE DeploymentStateValue = iota + OFFERING_DEPLOYMENTSTATEVALUE + PAUSED_DEPLOYMENTSTATEVALUE + FAULTED_DEPLOYMENTSTATEVALUE + ARCHIVED_DEPLOYMENTSTATEVALUE + UNKNOWNFUTUREVALUE_DEPLOYMENTSTATEVALUE +) + +func (i DeploymentStateValue) String() string { + return []string{"scheduled", "offering", "paused", "faulted", "archived", "unknownFutureValue"}[i] +} +func ParseDeploymentStateValue(v string) (interface{}, error) { + result := SCHEDULED_DEPLOYMENTSTATEVALUE + switch v { + case "scheduled": + result = SCHEDULED_DEPLOYMENTSTATEVALUE + case "offering": + result = OFFERING_DEPLOYMENTSTATEVALUE + case "paused": + result = PAUSED_DEPLOYMENTSTATEVALUE + case "faulted": + result = FAULTED_DEPLOYMENTSTATEVALUE + case "archived": + result = ARCHIVED_DEPLOYMENTSTATEVALUE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEPLOYMENTSTATEVALUE + default: + return 0, errors.New("Unknown DeploymentStateValue value: " + v) + } + return &result, nil +} +func SerializeDeploymentStateValue(values []DeploymentStateValue) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_stateable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_stateable.go new file mode 100644 index 000000000..98ac7f76e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deployment_stateable.go @@ -0,0 +1,19 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeploymentStateable +type DeploymentStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetReasons()([]DeploymentStateReasonable) + GetRequestedValue()(*RequestedDeploymentStateValue) + GetValue()(*DeploymentStateValue) + SetOdataType(value *string)() + SetReasons(value []DeploymentStateReasonable)() + SetRequestedValue(value *RequestedDeploymentStateValue)() + SetValue(value *DeploymentStateValue)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/deploymentable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/deploymentable.go new file mode 100644 index 000000000..273bbf915 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/deploymentable.go @@ -0,0 +1,25 @@ +package windowsupdates + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Deploymentable +type Deploymentable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAudience()(DeploymentAudienceable) + GetContent()(DeployableContentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSettings()(DeploymentSettingsable) + GetState()(DeploymentStateable) + SetAudience(value DeploymentAudienceable)() + SetContent(value DeployableContentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSettings(value DeploymentSettingsable)() + SetState(value DeploymentStateable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/equivalent_content_option.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/equivalent_content_option.go new file mode 100644 index 000000000..69dafd57f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/equivalent_content_option.go @@ -0,0 +1,37 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EquivalentContentOption int + +const ( + NONE_EQUIVALENTCONTENTOPTION EquivalentContentOption = iota + LATESTSECURITY_EQUIVALENTCONTENTOPTION + UNKNOWNFUTUREVALUE_EQUIVALENTCONTENTOPTION +) + +func (i EquivalentContentOption) String() string { + return []string{"none", "latestSecurity", "unknownFutureValue"}[i] +} +func ParseEquivalentContentOption(v string) (interface{}, error) { + result := NONE_EQUIVALENTCONTENTOPTION + switch v { + case "none": + result = NONE_EQUIVALENTCONTENTOPTION + case "latestSecurity": + result = LATESTSECURITY_EQUIVALENTCONTENTOPTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EQUIVALENTCONTENTOPTION + default: + return 0, errors.New("Unknown EquivalentContentOption value: " + v) + } + return &result, nil +} +func SerializeEquivalentContentOption(values []EquivalentContentOption) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/expedited_quality_update_reference.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/expedited_quality_update_reference.go new file mode 100644 index 000000000..a87cde1c9 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/expedited_quality_update_reference.go @@ -0,0 +1,63 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpeditedQualityUpdateReference +type ExpeditedQualityUpdateReference struct { + QualityUpdateReference + // Specifies other content to consider as equivalent. Supports a subset of the values for equivalentContentOption. Default value is latestSecurity. Possible values are: latestSecurity, unknownFutureValue. + equivalentContent *EquivalentContentOption +} +// NewExpeditedQualityUpdateReference instantiates a new ExpeditedQualityUpdateReference and sets the default values. +func NewExpeditedQualityUpdateReference()(*ExpeditedQualityUpdateReference) { + m := &ExpeditedQualityUpdateReference{ + QualityUpdateReference: *NewQualityUpdateReference(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.expeditedQualityUpdateReference"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExpeditedQualityUpdateReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExpeditedQualityUpdateReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExpeditedQualityUpdateReference(), nil +} +// GetEquivalentContent gets the equivalentContent property value. Specifies other content to consider as equivalent. Supports a subset of the values for equivalentContentOption. Default value is latestSecurity. Possible values are: latestSecurity, unknownFutureValue. +func (m *ExpeditedQualityUpdateReference) GetEquivalentContent()(*EquivalentContentOption) { + return m.equivalentContent +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExpeditedQualityUpdateReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.QualityUpdateReference.GetFieldDeserializers() + res["equivalentContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEquivalentContentOption) + if err != nil { + return err + } + if val != nil { + m.SetEquivalentContent(val.(*EquivalentContentOption)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ExpeditedQualityUpdateReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.QualityUpdateReference.Serialize(writer) + if err != nil { + return err + } + if m.GetEquivalentContent() != nil { + cast := (*m.GetEquivalentContent()).String() + err = writer.WriteStringValue("equivalentContent", &cast) + if err != nil { + return err + } + } + return nil +} +// SetEquivalentContent sets the equivalentContent property value. Specifies other content to consider as equivalent. Supports a subset of the values for equivalentContentOption. Default value is latestSecurity. Possible values are: latestSecurity, unknownFutureValue. +func (m *ExpeditedQualityUpdateReference) SetEquivalentContent(value *EquivalentContentOption)() { + m.equivalentContent = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/expedited_quality_update_referenceable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/expedited_quality_update_referenceable.go new file mode 100644 index 000000000..47e8e38e4 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/expedited_quality_update_referenceable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpeditedQualityUpdateReferenceable +type ExpeditedQualityUpdateReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + QualityUpdateReferenceable + GetEquivalentContent()(*EquivalentContentOption) + SetEquivalentContent(value *EquivalentContentOption)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entry.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entry.go new file mode 100644 index 000000000..d2328d6e6 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entry.go @@ -0,0 +1,62 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureUpdateCatalogEntry +type FeatureUpdateCatalogEntry struct { + SoftwareUpdateCatalogEntry + // The version of the feature update. Read-only. + version *string +} +// NewFeatureUpdateCatalogEntry instantiates a new FeatureUpdateCatalogEntry and sets the default values. +func NewFeatureUpdateCatalogEntry()(*FeatureUpdateCatalogEntry) { + m := &FeatureUpdateCatalogEntry{ + SoftwareUpdateCatalogEntry: *NewSoftwareUpdateCatalogEntry(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFeatureUpdateCatalogEntryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFeatureUpdateCatalogEntryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFeatureUpdateCatalogEntry(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FeatureUpdateCatalogEntry) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SoftwareUpdateCatalogEntry.GetFieldDeserializers() + 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 version of the feature update. Read-only. +func (m *FeatureUpdateCatalogEntry) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *FeatureUpdateCatalogEntry) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SoftwareUpdateCatalogEntry.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetVersion sets the version property value. The version of the feature update. Read-only. +func (m *FeatureUpdateCatalogEntry) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entry_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entry_collection_response.go new file mode 100644 index 000000000..50b2291cf --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entry_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// FeatureUpdateCatalogEntryCollectionResponse +type FeatureUpdateCatalogEntryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []FeatureUpdateCatalogEntryable +} +// NewFeatureUpdateCatalogEntryCollectionResponse instantiates a new FeatureUpdateCatalogEntryCollectionResponse and sets the default values. +func NewFeatureUpdateCatalogEntryCollectionResponse()(*FeatureUpdateCatalogEntryCollectionResponse) { + m := &FeatureUpdateCatalogEntryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFeatureUpdateCatalogEntryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFeatureUpdateCatalogEntryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFeatureUpdateCatalogEntryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FeatureUpdateCatalogEntryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFeatureUpdateCatalogEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FeatureUpdateCatalogEntryable, len(val)) + for i, v := range val { + res[i] = v.(FeatureUpdateCatalogEntryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FeatureUpdateCatalogEntryCollectionResponse) GetValue()([]FeatureUpdateCatalogEntryable) { + return m.value +} +// Serialize serializes information the current object +func (m *FeatureUpdateCatalogEntryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FeatureUpdateCatalogEntryCollectionResponse) SetValue(value []FeatureUpdateCatalogEntryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entry_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entry_collection_responseable.go new file mode 100644 index 000000000..426216e50 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entry_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// FeatureUpdateCatalogEntryCollectionResponseable +type FeatureUpdateCatalogEntryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FeatureUpdateCatalogEntryable) + SetValue(value []FeatureUpdateCatalogEntryable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entryable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entryable.go new file mode 100644 index 000000000..ab047e68f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_catalog_entryable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureUpdateCatalogEntryable +type FeatureUpdateCatalogEntryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SoftwareUpdateCatalogEntryable + GetVersion()(*string) + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_reference.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_reference.go new file mode 100644 index 000000000..47522177f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_reference.go @@ -0,0 +1,62 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureUpdateReference +type FeatureUpdateReference struct { + WindowsUpdateReference + // Specifies a feature update by version. + version *string +} +// NewFeatureUpdateReference instantiates a new FeatureUpdateReference and sets the default values. +func NewFeatureUpdateReference()(*FeatureUpdateReference) { + m := &FeatureUpdateReference{ + WindowsUpdateReference: *NewWindowsUpdateReference(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.featureUpdateReference"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFeatureUpdateReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFeatureUpdateReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFeatureUpdateReference(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FeatureUpdateReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WindowsUpdateReference.GetFieldDeserializers() + 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. Specifies a feature update by version. +func (m *FeatureUpdateReference) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *FeatureUpdateReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WindowsUpdateReference.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetVersion sets the version property value. Specifies a feature update by version. +func (m *FeatureUpdateReference) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_referenceable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_referenceable.go new file mode 100644 index 000000000..0895969f3 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/feature_update_referenceable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureUpdateReferenceable +type FeatureUpdateReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WindowsUpdateReferenceable + GetVersion()(*string) + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_action.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_action.go new file mode 100644 index 000000000..f57816eed --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_action.go @@ -0,0 +1,37 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MonitoringAction int + +const ( + ALERTERROR_MONITORINGACTION MonitoringAction = iota + PAUSEDEPLOYMENT_MONITORINGACTION + UNKNOWNFUTUREVALUE_MONITORINGACTION +) + +func (i MonitoringAction) String() string { + return []string{"alertError", "pauseDeployment", "unknownFutureValue"}[i] +} +func ParseMonitoringAction(v string) (interface{}, error) { + result := ALERTERROR_MONITORINGACTION + switch v { + case "alertError": + result = ALERTERROR_MONITORINGACTION + case "pauseDeployment": + result = PAUSEDEPLOYMENT_MONITORINGACTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MONITORINGACTION + default: + return 0, errors.New("Unknown MonitoringAction value: " + v) + } + return &result, nil +} +func SerializeMonitoringAction(values []MonitoringAction) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_rule.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_rule.go new file mode 100644 index 000000000..9ae44837b --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_rule.go @@ -0,0 +1,151 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MonitoringRule +type MonitoringRule struct { + // The action triggered when the threshold for the given signal is met. Possible values are: alertError, pauseDeployment, unknownFutureValue. + action *MonitoringAction + // 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 signal to monitor. Possible values are: rollback, unknownFutureValue. + signal *MonitoringSignal + // The threshold for a signal at which to trigger action. An integer from 1 to 100 (inclusive). + threshold *int32 +} +// NewMonitoringRule instantiates a new monitoringRule and sets the default values. +func NewMonitoringRule()(*MonitoringRule) { + m := &MonitoringRule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMonitoringRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMonitoringRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMonitoringRule(), nil +} +// GetAction gets the action property value. The action triggered when the threshold for the given signal is met. Possible values are: alertError, pauseDeployment, unknownFutureValue. +func (m *MonitoringRule) GetAction()(*MonitoringAction) { + 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 *MonitoringRule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MonitoringRule) 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(ParseMonitoringAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*MonitoringAction)) + } + return nil + } + res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataType(val) + } + return nil + } + res["signal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMonitoringSignal) + if err != nil { + return err + } + if val != nil { + m.SetSignal(val.(*MonitoringSignal)) + } + return nil + } + res["threshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetThreshold(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MonitoringRule) GetOdataType()(*string) { + return m.odataType +} +// GetSignal gets the signal property value. The signal to monitor. Possible values are: rollback, unknownFutureValue. +func (m *MonitoringRule) GetSignal()(*MonitoringSignal) { + return m.signal +} +// GetThreshold gets the threshold property value. The threshold for a signal at which to trigger action. An integer from 1 to 100 (inclusive). +func (m *MonitoringRule) GetThreshold()(*int32) { + return m.threshold +} +// Serialize serializes information the current object +func (m *MonitoringRule) 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.GetSignal() != nil { + cast := (*m.GetSignal()).String() + err := writer.WriteStringValue("signal", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("threshold", m.GetThreshold()) + 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 triggered when the threshold for the given signal is met. Possible values are: alertError, pauseDeployment, unknownFutureValue. +func (m *MonitoringRule) SetAction(value *MonitoringAction)() { + 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 *MonitoringRule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MonitoringRule) SetOdataType(value *string)() { + m.odataType = value +} +// SetSignal sets the signal property value. The signal to monitor. Possible values are: rollback, unknownFutureValue. +func (m *MonitoringRule) SetSignal(value *MonitoringSignal)() { + m.signal = value +} +// SetThreshold sets the threshold property value. The threshold for a signal at which to trigger action. An integer from 1 to 100 (inclusive). +func (m *MonitoringRule) SetThreshold(value *int32)() { + m.threshold = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_rule_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_rule_collection_response.go new file mode 100644 index 000000000..c3c351760 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_rule_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// MonitoringRuleCollectionResponse +type MonitoringRuleCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []MonitoringRuleable +} +// NewMonitoringRuleCollectionResponse instantiates a new MonitoringRuleCollectionResponse and sets the default values. +func NewMonitoringRuleCollectionResponse()(*MonitoringRuleCollectionResponse) { + m := &MonitoringRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMonitoringRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMonitoringRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMonitoringRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MonitoringRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMonitoringRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MonitoringRuleable, len(val)) + for i, v := range val { + res[i] = v.(MonitoringRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MonitoringRuleCollectionResponse) GetValue()([]MonitoringRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *MonitoringRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MonitoringRuleCollectionResponse) SetValue(value []MonitoringRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_rule_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_rule_collection_responseable.go new file mode 100644 index 000000000..e46499eb9 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_rule_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// MonitoringRuleCollectionResponseable +type MonitoringRuleCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MonitoringRuleable) + SetValue(value []MonitoringRuleable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_ruleable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_ruleable.go new file mode 100644 index 000000000..bebbafef4 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_ruleable.go @@ -0,0 +1,19 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MonitoringRuleable +type MonitoringRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*MonitoringAction) + GetOdataType()(*string) + GetSignal()(*MonitoringSignal) + GetThreshold()(*int32) + SetAction(value *MonitoringAction)() + SetOdataType(value *string)() + SetSignal(value *MonitoringSignal)() + SetThreshold(value *int32)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_settings.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_settings.go new file mode 100644 index 000000000..e88894cf5 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_settings.go @@ -0,0 +1,105 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MonitoringSettings +type MonitoringSettings 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 rules through which monitoring signals can trigger actions on the deployment. Rules are combined using 'or'. + monitoringRules []MonitoringRuleable + // The OdataType property + odataType *string +} +// NewMonitoringSettings instantiates a new monitoringSettings and sets the default values. +func NewMonitoringSettings()(*MonitoringSettings) { + m := &MonitoringSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMonitoringSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMonitoringSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMonitoringSettings(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *MonitoringSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MonitoringSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["monitoringRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMonitoringRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MonitoringRuleable, len(val)) + for i, v := range val { + res[i] = v.(MonitoringRuleable) + } + m.SetMonitoringRules(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 +} +// GetMonitoringRules gets the monitoringRules property value. Specifies the rules through which monitoring signals can trigger actions on the deployment. Rules are combined using 'or'. +func (m *MonitoringSettings) GetMonitoringRules()([]MonitoringRuleable) { + return m.monitoringRules +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MonitoringSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MonitoringSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMonitoringRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMonitoringRules())) + for i, v := range m.GetMonitoringRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("monitoringRules", 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 *MonitoringSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMonitoringRules sets the monitoringRules property value. Specifies the rules through which monitoring signals can trigger actions on the deployment. Rules are combined using 'or'. +func (m *MonitoringSettings) SetMonitoringRules(value []MonitoringRuleable)() { + m.monitoringRules = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MonitoringSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_settingsable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_settingsable.go new file mode 100644 index 000000000..b64ea944e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_settingsable.go @@ -0,0 +1,15 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MonitoringSettingsable +type MonitoringSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMonitoringRules()([]MonitoringRuleable) + GetOdataType()(*string) + SetMonitoringRules(value []MonitoringRuleable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_signal.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_signal.go new file mode 100644 index 000000000..2699253d7 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/monitoring_signal.go @@ -0,0 +1,34 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MonitoringSignal int + +const ( + ROLLBACK_MONITORINGSIGNAL MonitoringSignal = iota + UNKNOWNFUTUREVALUE_MONITORINGSIGNAL +) + +func (i MonitoringSignal) String() string { + return []string{"rollback", "unknownFutureValue"}[i] +} +func ParseMonitoringSignal(v string) (interface{}, error) { + result := ROLLBACK_MONITORINGSIGNAL + switch v { + case "rollback": + result = ROLLBACK_MONITORINGSIGNAL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MONITORINGSIGNAL + default: + return 0, errors.New("Unknown MonitoringSignal value: " + v) + } + return &result, nil +} +func SerializeMonitoringSignal(values []MonitoringSignal) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connection.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connection.go new file mode 100644 index 000000000..cf4812653 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connection.go @@ -0,0 +1,114 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OperationalInsightsConnection +type OperationalInsightsConnection struct { + ResourceConnection + // The name of the Azure resource group that contains the Log Analytics workspace. + azureResourceGroupName *string + // The Azure subscription ID that contains the Log Analytics workspace. + azureSubscriptionId *string + // The name of the Log Analytics workspace. + workspaceName *string +} +// NewOperationalInsightsConnection instantiates a new OperationalInsightsConnection and sets the default values. +func NewOperationalInsightsConnection()(*OperationalInsightsConnection) { + m := &OperationalInsightsConnection{ + ResourceConnection: *NewResourceConnection(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.operationalInsightsConnection"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOperationalInsightsConnectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOperationalInsightsConnectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOperationalInsightsConnection(), nil +} +// GetAzureResourceGroupName gets the azureResourceGroupName property value. The name of the Azure resource group that contains the Log Analytics workspace. +func (m *OperationalInsightsConnection) GetAzureResourceGroupName()(*string) { + return m.azureResourceGroupName +} +// GetAzureSubscriptionId gets the azureSubscriptionId property value. The Azure subscription ID that contains the Log Analytics workspace. +func (m *OperationalInsightsConnection) GetAzureSubscriptionId()(*string) { + return m.azureSubscriptionId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OperationalInsightsConnection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ResourceConnection.GetFieldDeserializers() + res["azureResourceGroupName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureResourceGroupName(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["workspaceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkspaceName(val) + } + return nil + } + return res +} +// GetWorkspaceName gets the workspaceName property value. The name of the Log Analytics workspace. +func (m *OperationalInsightsConnection) GetWorkspaceName()(*string) { + return m.workspaceName +} +// Serialize serializes information the current object +func (m *OperationalInsightsConnection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ResourceConnection.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureResourceGroupName", m.GetAzureResourceGroupName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureSubscriptionId", m.GetAzureSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("workspaceName", m.GetWorkspaceName()) + if err != nil { + return err + } + } + return nil +} +// SetAzureResourceGroupName sets the azureResourceGroupName property value. The name of the Azure resource group that contains the Log Analytics workspace. +func (m *OperationalInsightsConnection) SetAzureResourceGroupName(value *string)() { + m.azureResourceGroupName = value +} +// SetAzureSubscriptionId sets the azureSubscriptionId property value. The Azure subscription ID that contains the Log Analytics workspace. +func (m *OperationalInsightsConnection) SetAzureSubscriptionId(value *string)() { + m.azureSubscriptionId = value +} +// SetWorkspaceName sets the workspaceName property value. The name of the Log Analytics workspace. +func (m *OperationalInsightsConnection) SetWorkspaceName(value *string)() { + m.workspaceName = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connection_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connection_collection_response.go new file mode 100644 index 000000000..a896dd011 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connection_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// OperationalInsightsConnectionCollectionResponse +type OperationalInsightsConnectionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []OperationalInsightsConnectionable +} +// NewOperationalInsightsConnectionCollectionResponse instantiates a new OperationalInsightsConnectionCollectionResponse and sets the default values. +func NewOperationalInsightsConnectionCollectionResponse()(*OperationalInsightsConnectionCollectionResponse) { + m := &OperationalInsightsConnectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOperationalInsightsConnectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOperationalInsightsConnectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOperationalInsightsConnectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OperationalInsightsConnectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOperationalInsightsConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OperationalInsightsConnectionable, len(val)) + for i, v := range val { + res[i] = v.(OperationalInsightsConnectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OperationalInsightsConnectionCollectionResponse) GetValue()([]OperationalInsightsConnectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *OperationalInsightsConnectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OperationalInsightsConnectionCollectionResponse) SetValue(value []OperationalInsightsConnectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connection_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connection_collection_responseable.go new file mode 100644 index 000000000..b238e52fc --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connection_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// OperationalInsightsConnectionCollectionResponseable +type OperationalInsightsConnectionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OperationalInsightsConnectionable) + SetValue(value []OperationalInsightsConnectionable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connectionable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connectionable.go new file mode 100644 index 000000000..40741d236 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/operational_insights_connectionable.go @@ -0,0 +1,17 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OperationalInsightsConnectionable +type OperationalInsightsConnectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ResourceConnectionable + GetAzureResourceGroupName()(*string) + GetAzureSubscriptionId()(*string) + GetWorkspaceName()(*string) + SetAzureResourceGroupName(value *string)() + SetAzureSubscriptionId(value *string)() + SetWorkspaceName(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entry.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entry.go new file mode 100644 index 000000000..68f3107f9 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entry.go @@ -0,0 +1,89 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// QualityUpdateCatalogEntry +type QualityUpdateCatalogEntry struct { + SoftwareUpdateCatalogEntry + // Indicates whether the content can be deployed as an expedited quality update. Read-only. + isExpeditable *bool + // The qualityUpdateClassification property + qualityUpdateClassification *QualityUpdateClassification +} +// NewQualityUpdateCatalogEntry instantiates a new QualityUpdateCatalogEntry and sets the default values. +func NewQualityUpdateCatalogEntry()(*QualityUpdateCatalogEntry) { + m := &QualityUpdateCatalogEntry{ + SoftwareUpdateCatalogEntry: *NewSoftwareUpdateCatalogEntry(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.qualityUpdateCatalogEntry"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateQualityUpdateCatalogEntryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateQualityUpdateCatalogEntryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewQualityUpdateCatalogEntry(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *QualityUpdateCatalogEntry) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SoftwareUpdateCatalogEntry.GetFieldDeserializers() + res["isExpeditable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsExpeditable(val) + } + return nil + } + res["qualityUpdateClassification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseQualityUpdateClassification) + if err != nil { + return err + } + if val != nil { + m.SetQualityUpdateClassification(val.(*QualityUpdateClassification)) + } + return nil + } + return res +} +// GetIsExpeditable gets the isExpeditable property value. Indicates whether the content can be deployed as an expedited quality update. Read-only. +func (m *QualityUpdateCatalogEntry) GetIsExpeditable()(*bool) { + return m.isExpeditable +} +// GetQualityUpdateClassification gets the qualityUpdateClassification property value. The qualityUpdateClassification property +func (m *QualityUpdateCatalogEntry) GetQualityUpdateClassification()(*QualityUpdateClassification) { + return m.qualityUpdateClassification +} +// Serialize serializes information the current object +func (m *QualityUpdateCatalogEntry) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SoftwareUpdateCatalogEntry.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isExpeditable", m.GetIsExpeditable()) + if err != nil { + return err + } + } + if m.GetQualityUpdateClassification() != nil { + cast := (*m.GetQualityUpdateClassification()).String() + err = writer.WriteStringValue("qualityUpdateClassification", &cast) + if err != nil { + return err + } + } + return nil +} +// SetIsExpeditable sets the isExpeditable property value. Indicates whether the content can be deployed as an expedited quality update. Read-only. +func (m *QualityUpdateCatalogEntry) SetIsExpeditable(value *bool)() { + m.isExpeditable = value +} +// SetQualityUpdateClassification sets the qualityUpdateClassification property value. The qualityUpdateClassification property +func (m *QualityUpdateCatalogEntry) SetQualityUpdateClassification(value *QualityUpdateClassification)() { + m.qualityUpdateClassification = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entry_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entry_collection_response.go new file mode 100644 index 000000000..9c1aa73cf --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entry_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// QualityUpdateCatalogEntryCollectionResponse +type QualityUpdateCatalogEntryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []QualityUpdateCatalogEntryable +} +// NewQualityUpdateCatalogEntryCollectionResponse instantiates a new QualityUpdateCatalogEntryCollectionResponse and sets the default values. +func NewQualityUpdateCatalogEntryCollectionResponse()(*QualityUpdateCatalogEntryCollectionResponse) { + m := &QualityUpdateCatalogEntryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateQualityUpdateCatalogEntryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateQualityUpdateCatalogEntryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewQualityUpdateCatalogEntryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *QualityUpdateCatalogEntryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateQualityUpdateCatalogEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]QualityUpdateCatalogEntryable, len(val)) + for i, v := range val { + res[i] = v.(QualityUpdateCatalogEntryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *QualityUpdateCatalogEntryCollectionResponse) GetValue()([]QualityUpdateCatalogEntryable) { + return m.value +} +// Serialize serializes information the current object +func (m *QualityUpdateCatalogEntryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *QualityUpdateCatalogEntryCollectionResponse) SetValue(value []QualityUpdateCatalogEntryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entry_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entry_collection_responseable.go new file mode 100644 index 000000000..547a66b2e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entry_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// QualityUpdateCatalogEntryCollectionResponseable +type QualityUpdateCatalogEntryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]QualityUpdateCatalogEntryable) + SetValue(value []QualityUpdateCatalogEntryable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entryable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entryable.go new file mode 100644 index 000000000..6caea8a87 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_catalog_entryable.go @@ -0,0 +1,15 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// QualityUpdateCatalogEntryable +type QualityUpdateCatalogEntryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SoftwareUpdateCatalogEntryable + GetIsExpeditable()(*bool) + GetQualityUpdateClassification()(*QualityUpdateClassification) + SetIsExpeditable(value *bool)() + SetQualityUpdateClassification(value *QualityUpdateClassification)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_classification.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_classification.go new file mode 100644 index 000000000..7c1dee7fe --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_classification.go @@ -0,0 +1,40 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type QualityUpdateClassification int + +const ( + ALL_QUALITYUPDATECLASSIFICATION QualityUpdateClassification = iota + SECURITY_QUALITYUPDATECLASSIFICATION + NONSECURITY_QUALITYUPDATECLASSIFICATION + UNKNOWNFUTUREVALUE_QUALITYUPDATECLASSIFICATION +) + +func (i QualityUpdateClassification) String() string { + return []string{"all", "security", "nonSecurity", "unknownFutureValue"}[i] +} +func ParseQualityUpdateClassification(v string) (interface{}, error) { + result := ALL_QUALITYUPDATECLASSIFICATION + switch v { + case "all": + result = ALL_QUALITYUPDATECLASSIFICATION + case "security": + result = SECURITY_QUALITYUPDATECLASSIFICATION + case "nonSecurity": + result = NONSECURITY_QUALITYUPDATECLASSIFICATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_QUALITYUPDATECLASSIFICATION + default: + return 0, errors.New("Unknown QualityUpdateClassification value: " + v) + } + return &result, nil +} +func SerializeQualityUpdateClassification(values []QualityUpdateClassification) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_reference.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_reference.go new file mode 100644 index 000000000..43ca39fcd --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_reference.go @@ -0,0 +1,108 @@ +package windowsupdates + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// QualityUpdateReference +type QualityUpdateReference struct { + WindowsUpdateReference + // Specifies the classification of the referenced content. Supports a subset of the values for qualityUpdateClassification. Possible values are: security, unknownFutureValue. + classification *QualityUpdateClassification + // Specifies a quality update in the given servicingChannel with the given classification by date (i.e. the last update published on the specified date). Default value is security. + releaseDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewQualityUpdateReference instantiates a new QualityUpdateReference and sets the default values. +func NewQualityUpdateReference()(*QualityUpdateReference) { + m := &QualityUpdateReference{ + WindowsUpdateReference: *NewWindowsUpdateReference(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.qualityUpdateReference"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateQualityUpdateReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateQualityUpdateReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.expeditedQualityUpdateReference": + return NewExpeditedQualityUpdateReference(), nil + } + } + } + } + return NewQualityUpdateReference(), nil +} +// GetClassification gets the classification property value. Specifies the classification of the referenced content. Supports a subset of the values for qualityUpdateClassification. Possible values are: security, unknownFutureValue. +func (m *QualityUpdateReference) GetClassification()(*QualityUpdateClassification) { + return m.classification +} +// GetFieldDeserializers the deserialization information for the current model +func (m *QualityUpdateReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WindowsUpdateReference.GetFieldDeserializers() + res["classification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseQualityUpdateClassification) + if err != nil { + return err + } + if val != nil { + m.SetClassification(val.(*QualityUpdateClassification)) + } + 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 + } + return res +} +// GetReleaseDateTime gets the releaseDateTime property value. Specifies a quality update in the given servicingChannel with the given classification by date (i.e. the last update published on the specified date). Default value is security. +func (m *QualityUpdateReference) GetReleaseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.releaseDateTime +} +// Serialize serializes information the current object +func (m *QualityUpdateReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WindowsUpdateReference.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.WriteTimeValue("releaseDateTime", m.GetReleaseDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetClassification sets the classification property value. Specifies the classification of the referenced content. Supports a subset of the values for qualityUpdateClassification. Possible values are: security, unknownFutureValue. +func (m *QualityUpdateReference) SetClassification(value *QualityUpdateClassification)() { + m.classification = value +} +// SetReleaseDateTime sets the releaseDateTime property value. Specifies a quality update in the given servicingChannel with the given classification by date (i.e. the last update published on the specified date). Default value is security. +func (m *QualityUpdateReference) SetReleaseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.releaseDateTime = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_referenceable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_referenceable.go new file mode 100644 index 000000000..2b3c086d1 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/quality_update_referenceable.go @@ -0,0 +1,16 @@ +package windowsupdates + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// QualityUpdateReferenceable +type QualityUpdateReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WindowsUpdateReferenceable + GetClassification()(*QualityUpdateClassification) + GetReleaseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetClassification(value *QualityUpdateClassification)() + SetReleaseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/requested_deployment_state_value.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/requested_deployment_state_value.go new file mode 100644 index 000000000..abd8e240d --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/requested_deployment_state_value.go @@ -0,0 +1,40 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RequestedDeploymentStateValue int + +const ( + NONE_REQUESTEDDEPLOYMENTSTATEVALUE RequestedDeploymentStateValue = iota + PAUSED_REQUESTEDDEPLOYMENTSTATEVALUE + ARCHIVED_REQUESTEDDEPLOYMENTSTATEVALUE + UNKNOWNFUTUREVALUE_REQUESTEDDEPLOYMENTSTATEVALUE +) + +func (i RequestedDeploymentStateValue) String() string { + return []string{"none", "paused", "archived", "unknownFutureValue"}[i] +} +func ParseRequestedDeploymentStateValue(v string) (interface{}, error) { + result := NONE_REQUESTEDDEPLOYMENTSTATEVALUE + switch v { + case "none": + result = NONE_REQUESTEDDEPLOYMENTSTATEVALUE + case "paused": + result = PAUSED_REQUESTEDDEPLOYMENTSTATEVALUE + case "archived": + result = ARCHIVED_REQUESTEDDEPLOYMENTSTATEVALUE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_REQUESTEDDEPLOYMENTSTATEVALUE + default: + return 0, errors.New("Unknown RequestedDeploymentStateValue value: " + v) + } + return &result, nil +} +func SerializeRequestedDeploymentStateValue(values []RequestedDeploymentStateValue) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection.go new file mode 100644 index 000000000..f3e4c014e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection.go @@ -0,0 +1,80 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ResourceConnection provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ResourceConnection struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The state of the connection. The possible values are: connected, notAuthorized, notFound, unknownFutureValue. + state *ResourceConnectionState +} +// NewResourceConnection instantiates a new resourceConnection and sets the default values. +func NewResourceConnection()(*ResourceConnection) { + m := &ResourceConnection{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateResourceConnectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceConnectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.operationalInsightsConnection": + return NewOperationalInsightsConnection(), nil + } + } + } + } + return NewResourceConnection(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceConnection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseResourceConnectionState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ResourceConnectionState)) + } + return nil + } + return res +} +// GetState gets the state property value. The state of the connection. The possible values are: connected, notAuthorized, notFound, unknownFutureValue. +func (m *ResourceConnection) GetState()(*ResourceConnectionState) { + return m.state +} +// Serialize serializes information the current object +func (m *ResourceConnection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + 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 +} +// SetState sets the state property value. The state of the connection. The possible values are: connected, notAuthorized, notFound, unknownFutureValue. +func (m *ResourceConnection) SetState(value *ResourceConnectionState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection_collection_response.go new file mode 100644 index 000000000..890c4544e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ResourceConnectionCollectionResponse +type ResourceConnectionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ResourceConnectionable +} +// NewResourceConnectionCollectionResponse instantiates a new ResourceConnectionCollectionResponse and sets the default values. +func NewResourceConnectionCollectionResponse()(*ResourceConnectionCollectionResponse) { + m := &ResourceConnectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateResourceConnectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceConnectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceConnectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceConnectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceConnectionable, len(val)) + for i, v := range val { + res[i] = v.(ResourceConnectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ResourceConnectionCollectionResponse) GetValue()([]ResourceConnectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ResourceConnectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ResourceConnectionCollectionResponse) SetValue(value []ResourceConnectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection_collection_responseable.go new file mode 100644 index 000000000..6192c2d05 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ResourceConnectionCollectionResponseable +type ResourceConnectionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ResourceConnectionable) + SetValue(value []ResourceConnectionable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection_state.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection_state.go new file mode 100644 index 000000000..4cb69e96c --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connection_state.go @@ -0,0 +1,40 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ResourceConnectionState int + +const ( + CONNECTED_RESOURCECONNECTIONSTATE ResourceConnectionState = iota + NOTAUTHORIZED_RESOURCECONNECTIONSTATE + NOTFOUND_RESOURCECONNECTIONSTATE + UNKNOWNFUTUREVALUE_RESOURCECONNECTIONSTATE +) + +func (i ResourceConnectionState) String() string { + return []string{"connected", "notAuthorized", "notFound", "unknownFutureValue"}[i] +} +func ParseResourceConnectionState(v string) (interface{}, error) { + result := CONNECTED_RESOURCECONNECTIONSTATE + switch v { + case "connected": + result = CONNECTED_RESOURCECONNECTIONSTATE + case "notAuthorized": + result = NOTAUTHORIZED_RESOURCECONNECTIONSTATE + case "notFound": + result = NOTFOUND_RESOURCECONNECTIONSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RESOURCECONNECTIONSTATE + default: + return 0, errors.New("Unknown ResourceConnectionState value: " + v) + } + return &result, nil +} +func SerializeResourceConnectionState(values []ResourceConnectionState) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connectionable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connectionable.go new file mode 100644 index 000000000..b59e40ab4 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/resource_connectionable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ResourceConnectionable +type ResourceConnectionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetState()(*ResourceConnectionState) + SetState(value *ResourceConnectionState)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/rollout_settings.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/rollout_settings.go new file mode 100644 index 000000000..6ca565b40 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/rollout_settings.go @@ -0,0 +1,176 @@ +package windowsupdates + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RolloutSettings +type RolloutSettings 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 number of devices that are offered at the same time. Has no effect when endDateTime is set. When endDateTime and devicesPerOffer are both not set, all devices in the deployment are offered content at the same time. + devicesPerOffer *int32 + // Specifies duration between each set of devices being offered the update. Has an effect when endDateTime or devicesPerOffer are defined. Default value is P1D (1 day). + durationBetweenOffers *string + // Specifies the date before which all devices currently in the deployment are offered the update. Devices added after this date are offered immediately. When endDateTime and devicesPerOffer are both not set, all devices in the deployment are offered content at the same time. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Date on which devices in the deployment start receiving the update. When not set, the deployment starts as soon as devices are assigned. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewRolloutSettings instantiates a new rolloutSettings and sets the default values. +func NewRolloutSettings()(*RolloutSettings) { + m := &RolloutSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRolloutSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRolloutSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRolloutSettings(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RolloutSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDevicesPerOffer gets the devicesPerOffer property value. Specifies the number of devices that are offered at the same time. Has no effect when endDateTime is set. When endDateTime and devicesPerOffer are both not set, all devices in the deployment are offered content at the same time. +func (m *RolloutSettings) GetDevicesPerOffer()(*int32) { + return m.devicesPerOffer +} +// GetDurationBetweenOffers gets the durationBetweenOffers property value. Specifies duration between each set of devices being offered the update. Has an effect when endDateTime or devicesPerOffer are defined. Default value is P1D (1 day). +func (m *RolloutSettings) GetDurationBetweenOffers()(*string) { + return m.durationBetweenOffers +} +// GetEndDateTime gets the endDateTime property value. Specifies the date before which all devices currently in the deployment are offered the update. Devices added after this date are offered immediately. When endDateTime and devicesPerOffer are both not set, all devices in the deployment are offered content at the same time. +func (m *RolloutSettings) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RolloutSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["devicesPerOffer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDevicesPerOffer(val) + } + return nil + } + res["durationBetweenOffers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDurationBetweenOffers(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RolloutSettings) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. Date on which devices in the deployment start receiving the update. When not set, the deployment starts as soon as devices are assigned. +func (m *RolloutSettings) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *RolloutSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("devicesPerOffer", m.GetDevicesPerOffer()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("durationBetweenOffers", m.GetDurationBetweenOffers()) + 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.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *RolloutSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDevicesPerOffer sets the devicesPerOffer property value. Specifies the number of devices that are offered at the same time. Has no effect when endDateTime is set. When endDateTime and devicesPerOffer are both not set, all devices in the deployment are offered content at the same time. +func (m *RolloutSettings) SetDevicesPerOffer(value *int32)() { + m.devicesPerOffer = value +} +// SetDurationBetweenOffers sets the durationBetweenOffers property value. Specifies duration between each set of devices being offered the update. Has an effect when endDateTime or devicesPerOffer are defined. Default value is P1D (1 day). +func (m *RolloutSettings) SetDurationBetweenOffers(value *string)() { + m.durationBetweenOffers = value +} +// SetEndDateTime sets the endDateTime property value. Specifies the date before which all devices currently in the deployment are offered the update. Devices added after this date are offered immediately. When endDateTime and devicesPerOffer are both not set, all devices in the deployment are offered content at the same time. +func (m *RolloutSettings) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RolloutSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. Date on which devices in the deployment start receiving the update. When not set, the deployment starts as soon as devices are assigned. +func (m *RolloutSettings) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/rollout_settingsable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/rollout_settingsable.go new file mode 100644 index 000000000..0792eddc4 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/rollout_settingsable.go @@ -0,0 +1,22 @@ +package windowsupdates + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RolloutSettingsable +type RolloutSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDevicesPerOffer()(*int32) + GetDurationBetweenOffers()(*string) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetDevicesPerOffer(value *int32)() + SetDurationBetweenOffers(value *string)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_category.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_category.go new file mode 100644 index 000000000..b023f4bba --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_category.go @@ -0,0 +1,34 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SafeguardCategory int + +const ( + LIKELYISSUES_SAFEGUARDCATEGORY SafeguardCategory = iota + UNKNOWNFUTUREVALUE_SAFEGUARDCATEGORY +) + +func (i SafeguardCategory) String() string { + return []string{"likelyIssues", "unknownFutureValue"}[i] +} +func ParseSafeguardCategory(v string) (interface{}, error) { + result := LIKELYISSUES_SAFEGUARDCATEGORY + switch v { + case "likelyIssues": + result = LIKELYISSUES_SAFEGUARDCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SAFEGUARDCATEGORY + default: + return 0, errors.New("Unknown SafeguardCategory value: " + v) + } + return &result, nil +} +func SerializeSafeguardCategory(values []SafeguardCategory) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profile.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profile.go new file mode 100644 index 000000000..c99c55a2f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profile.go @@ -0,0 +1,98 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SafeguardProfile +type SafeguardProfile 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 category of safeguards. The possible values are: likelyIssues, unknownFutureValue. + category *SafeguardCategory + // The OdataType property + odataType *string +} +// NewSafeguardProfile instantiates a new safeguardProfile and sets the default values. +func NewSafeguardProfile()(*SafeguardProfile) { + m := &SafeguardProfile{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSafeguardProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSafeguardProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSafeguardProfile(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SafeguardProfile) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCategory gets the category property value. Specifies the category of safeguards. The possible values are: likelyIssues, unknownFutureValue. +func (m *SafeguardProfile) GetCategory()(*SafeguardCategory) { + return m.category +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SafeguardProfile) 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(ParseSafeguardCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*SafeguardCategory)) + } + return nil + } + res["@odata.type"] = 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 *SafeguardProfile) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *SafeguardProfile) 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("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SafeguardProfile) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCategory sets the category property value. Specifies the category of safeguards. The possible values are: likelyIssues, unknownFutureValue. +func (m *SafeguardProfile) SetCategory(value *SafeguardCategory)() { + m.category = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SafeguardProfile) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profile_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profile_collection_response.go new file mode 100644 index 000000000..8c6d914fb --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profile_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SafeguardProfileCollectionResponse +type SafeguardProfileCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []SafeguardProfileable +} +// NewSafeguardProfileCollectionResponse instantiates a new SafeguardProfileCollectionResponse and sets the default values. +func NewSafeguardProfileCollectionResponse()(*SafeguardProfileCollectionResponse) { + m := &SafeguardProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSafeguardProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSafeguardProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSafeguardProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SafeguardProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSafeguardProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SafeguardProfileable, len(val)) + for i, v := range val { + res[i] = v.(SafeguardProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SafeguardProfileCollectionResponse) GetValue()([]SafeguardProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *SafeguardProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SafeguardProfileCollectionResponse) SetValue(value []SafeguardProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profile_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profile_collection_responseable.go new file mode 100644 index 000000000..63930f188 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profile_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SafeguardProfileCollectionResponseable +type SafeguardProfileCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SafeguardProfileable) + SetValue(value []SafeguardProfileable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profileable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profileable.go new file mode 100644 index 000000000..b80e8666e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_profileable.go @@ -0,0 +1,15 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SafeguardProfileable +type SafeguardProfileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*SafeguardCategory) + GetOdataType()(*string) + SetCategory(value *SafeguardCategory)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_settings.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_settings.go new file mode 100644 index 000000000..f1f3ca8a8 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_settings.go @@ -0,0 +1,105 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SafeguardSettings +type SafeguardSettings 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 safeguards to ignore per device. + disabledSafeguardProfiles []SafeguardProfileable + // The OdataType property + odataType *string +} +// NewSafeguardSettings instantiates a new safeguardSettings and sets the default values. +func NewSafeguardSettings()(*SafeguardSettings) { + m := &SafeguardSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSafeguardSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSafeguardSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSafeguardSettings(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *SafeguardSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisabledSafeguardProfiles gets the disabledSafeguardProfiles property value. List of safeguards to ignore per device. +func (m *SafeguardSettings) GetDisabledSafeguardProfiles()([]SafeguardProfileable) { + return m.disabledSafeguardProfiles +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SafeguardSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["disabledSafeguardProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSafeguardProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SafeguardProfileable, len(val)) + for i, v := range val { + res[i] = v.(SafeguardProfileable) + } + m.SetDisabledSafeguardProfiles(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 *SafeguardSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *SafeguardSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDisabledSafeguardProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDisabledSafeguardProfiles())) + for i, v := range m.GetDisabledSafeguardProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("disabledSafeguardProfiles", 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 *SafeguardSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisabledSafeguardProfiles sets the disabledSafeguardProfiles property value. List of safeguards to ignore per device. +func (m *SafeguardSettings) SetDisabledSafeguardProfiles(value []SafeguardProfileable)() { + m.disabledSafeguardProfiles = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SafeguardSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_settingsable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_settingsable.go new file mode 100644 index 000000000..da03669fe --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/safeguard_settingsable.go @@ -0,0 +1,15 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SafeguardSettingsable +type SafeguardSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisabledSafeguardProfiles()([]SafeguardProfileable) + GetOdataType()(*string) + SetDisabledSafeguardProfiles(value []SafeguardProfileable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entry.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entry.go new file mode 100644 index 000000000..a47251ef0 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entry.go @@ -0,0 +1,56 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SoftwareUpdateCatalogEntry +type SoftwareUpdateCatalogEntry struct { + CatalogEntry +} +// NewSoftwareUpdateCatalogEntry instantiates a new SoftwareUpdateCatalogEntry and sets the default values. +func NewSoftwareUpdateCatalogEntry()(*SoftwareUpdateCatalogEntry) { + m := &SoftwareUpdateCatalogEntry{ + CatalogEntry: *NewCatalogEntry(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.softwareUpdateCatalogEntry"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSoftwareUpdateCatalogEntryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSoftwareUpdateCatalogEntryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.featureUpdateCatalogEntry": + return NewFeatureUpdateCatalogEntry(), nil + case "#microsoft.graph.windowsUpdates.qualityUpdateCatalogEntry": + return NewQualityUpdateCatalogEntry(), nil + } + } + } + } + return NewSoftwareUpdateCatalogEntry(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SoftwareUpdateCatalogEntry) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CatalogEntry.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *SoftwareUpdateCatalogEntry) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CatalogEntry.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entry_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entry_collection_response.go new file mode 100644 index 000000000..2c477e733 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entry_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SoftwareUpdateCatalogEntryCollectionResponse +type SoftwareUpdateCatalogEntryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []SoftwareUpdateCatalogEntryable +} +// NewSoftwareUpdateCatalogEntryCollectionResponse instantiates a new SoftwareUpdateCatalogEntryCollectionResponse and sets the default values. +func NewSoftwareUpdateCatalogEntryCollectionResponse()(*SoftwareUpdateCatalogEntryCollectionResponse) { + m := &SoftwareUpdateCatalogEntryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSoftwareUpdateCatalogEntryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSoftwareUpdateCatalogEntryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSoftwareUpdateCatalogEntryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SoftwareUpdateCatalogEntryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSoftwareUpdateCatalogEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SoftwareUpdateCatalogEntryable, len(val)) + for i, v := range val { + res[i] = v.(SoftwareUpdateCatalogEntryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SoftwareUpdateCatalogEntryCollectionResponse) GetValue()([]SoftwareUpdateCatalogEntryable) { + return m.value +} +// Serialize serializes information the current object +func (m *SoftwareUpdateCatalogEntryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SoftwareUpdateCatalogEntryCollectionResponse) SetValue(value []SoftwareUpdateCatalogEntryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entry_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entry_collection_responseable.go new file mode 100644 index 000000000..bef05f74e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entry_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SoftwareUpdateCatalogEntryCollectionResponseable +type SoftwareUpdateCatalogEntryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SoftwareUpdateCatalogEntryable) + SetValue(value []SoftwareUpdateCatalogEntryable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entryable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entryable.go new file mode 100644 index 000000000..73e652267 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_catalog_entryable.go @@ -0,0 +1,11 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SoftwareUpdateCatalogEntryable +type SoftwareUpdateCatalogEntryable interface { + CatalogEntryable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_reference.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_reference.go new file mode 100644 index 000000000..b5d7df763 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_reference.go @@ -0,0 +1,60 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SoftwareUpdateReference +type SoftwareUpdateReference struct { + DeployableContent +} +// NewSoftwareUpdateReference instantiates a new SoftwareUpdateReference and sets the default values. +func NewSoftwareUpdateReference()(*SoftwareUpdateReference) { + m := &SoftwareUpdateReference{ + DeployableContent: *NewDeployableContent(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.softwareUpdateReference"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSoftwareUpdateReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSoftwareUpdateReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.expeditedQualityUpdateReference": + return NewExpeditedQualityUpdateReference(), nil + case "#microsoft.graph.windowsUpdates.featureUpdateReference": + return NewFeatureUpdateReference(), nil + case "#microsoft.graph.windowsUpdates.qualityUpdateReference": + return NewQualityUpdateReference(), nil + case "#microsoft.graph.windowsUpdates.windowsUpdateReference": + return NewWindowsUpdateReference(), nil + } + } + } + } + return NewSoftwareUpdateReference(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SoftwareUpdateReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeployableContent.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *SoftwareUpdateReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeployableContent.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_referenceable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_referenceable.go new file mode 100644 index 000000000..d2ec065f8 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/software_update_referenceable.go @@ -0,0 +1,11 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SoftwareUpdateReferenceable +type SoftwareUpdateReferenceable interface { + DeployableContentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset.go new file mode 100644 index 000000000..fbb1f4178 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset.go @@ -0,0 +1,55 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAsset provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type UpdatableAsset struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity +} +// NewUpdatableAsset instantiates a new updatableAsset and sets the default values. +func NewUpdatableAsset()(*UpdatableAsset) { + m := &UpdatableAsset{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateUpdatableAssetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdatableAssetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.azureADDevice": + return NewAzureADDevice(), nil + case "#microsoft.graph.windowsUpdates.updatableAssetGroup": + return NewUpdatableAssetGroup(), nil + } + } + } + } + return NewUpdatableAsset(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UpdatableAsset) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *UpdatableAsset) 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/windowsupdates/updatable_asset_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_collection_response.go new file mode 100644 index 000000000..bdfa60b42 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAssetCollectionResponse +type UpdatableAssetCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UpdatableAssetable +} +// NewUpdatableAssetCollectionResponse instantiates a new UpdatableAssetCollectionResponse and sets the default values. +func NewUpdatableAssetCollectionResponse()(*UpdatableAssetCollectionResponse) { + m := &UpdatableAssetCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUpdatableAssetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdatableAssetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUpdatableAssetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UpdatableAssetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UpdatableAssetCollectionResponse) GetValue()([]UpdatableAssetable) { + return m.value +} +// Serialize serializes information the current object +func (m *UpdatableAssetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UpdatableAssetCollectionResponse) SetValue(value []UpdatableAssetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_collection_responseable.go new file mode 100644 index 000000000..ae58cc8ef --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAssetCollectionResponseable +type UpdatableAssetCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UpdatableAssetable) + SetValue(value []UpdatableAssetable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollment.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollment.go new file mode 100644 index 000000000..6d22785a9 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollment.go @@ -0,0 +1,89 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UpdatableAssetEnrollment +type UpdatableAssetEnrollment struct { + // 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 +} +// NewUpdatableAssetEnrollment instantiates a new updatableAssetEnrollment and sets the default values. +func NewUpdatableAssetEnrollment()(*UpdatableAssetEnrollment) { + m := &UpdatableAssetEnrollment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateUpdatableAssetEnrollmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdatableAssetEnrollmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.updateManagementEnrollment": + return NewUpdateManagementEnrollment(), nil + } + } + } + } + return NewUpdatableAssetEnrollment(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UpdatableAssetEnrollment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UpdatableAssetEnrollment) 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 *UpdatableAssetEnrollment) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *UpdatableAssetEnrollment) 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 *UpdatableAssetEnrollment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *UpdatableAssetEnrollment) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollment_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollment_collection_response.go new file mode 100644 index 000000000..61989c473 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollment_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAssetEnrollmentCollectionResponse +type UpdatableAssetEnrollmentCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UpdatableAssetEnrollmentable +} +// NewUpdatableAssetEnrollmentCollectionResponse instantiates a new UpdatableAssetEnrollmentCollectionResponse and sets the default values. +func NewUpdatableAssetEnrollmentCollectionResponse()(*UpdatableAssetEnrollmentCollectionResponse) { + m := &UpdatableAssetEnrollmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUpdatableAssetEnrollmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdatableAssetEnrollmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUpdatableAssetEnrollmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UpdatableAssetEnrollmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetEnrollmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetEnrollmentable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetEnrollmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UpdatableAssetEnrollmentCollectionResponse) GetValue()([]UpdatableAssetEnrollmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *UpdatableAssetEnrollmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UpdatableAssetEnrollmentCollectionResponse) SetValue(value []UpdatableAssetEnrollmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollment_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollment_collection_responseable.go new file mode 100644 index 000000000..ef1402ce6 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollment_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAssetEnrollmentCollectionResponseable +type UpdatableAssetEnrollmentCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UpdatableAssetEnrollmentable) + SetValue(value []UpdatableAssetEnrollmentable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollmentable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollmentable.go new file mode 100644 index 000000000..757e13412 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_enrollmentable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UpdatableAssetEnrollmentable +type UpdatableAssetEnrollmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_error.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_error.go new file mode 100644 index 000000000..0b0791602 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_error.go @@ -0,0 +1,89 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UpdatableAssetError +type UpdatableAssetError struct { + // 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 +} +// NewUpdatableAssetError instantiates a new updatableAssetError and sets the default values. +func NewUpdatableAssetError()(*UpdatableAssetError) { + m := &UpdatableAssetError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateUpdatableAssetErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdatableAssetErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.azureADDeviceRegistrationError": + return NewAzureADDeviceRegistrationError(), nil + } + } + } + } + return NewUpdatableAssetError(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UpdatableAssetError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UpdatableAssetError) 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 *UpdatableAssetError) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *UpdatableAssetError) 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 *UpdatableAssetError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *UpdatableAssetError) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_error_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_error_collection_response.go new file mode 100644 index 000000000..fd83f9331 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_error_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAssetErrorCollectionResponse +type UpdatableAssetErrorCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UpdatableAssetErrorable +} +// NewUpdatableAssetErrorCollectionResponse instantiates a new UpdatableAssetErrorCollectionResponse and sets the default values. +func NewUpdatableAssetErrorCollectionResponse()(*UpdatableAssetErrorCollectionResponse) { + m := &UpdatableAssetErrorCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUpdatableAssetErrorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdatableAssetErrorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUpdatableAssetErrorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UpdatableAssetErrorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetErrorable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetErrorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UpdatableAssetErrorCollectionResponse) GetValue()([]UpdatableAssetErrorable) { + return m.value +} +// Serialize serializes information the current object +func (m *UpdatableAssetErrorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UpdatableAssetErrorCollectionResponse) SetValue(value []UpdatableAssetErrorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_error_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_error_collection_responseable.go new file mode 100644 index 000000000..c2b3194a2 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_error_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAssetErrorCollectionResponseable +type UpdatableAssetErrorCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UpdatableAssetErrorable) + SetValue(value []UpdatableAssetErrorable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_errorable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_errorable.go new file mode 100644 index 000000000..5bdfd4de5 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_errorable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UpdatableAssetErrorable +type UpdatableAssetErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_group.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_group.go new file mode 100644 index 000000000..1558f8876 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_group.go @@ -0,0 +1,70 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UpdatableAssetGroup +type UpdatableAssetGroup struct { + UpdatableAsset + // Members of the group. Read-only. + members []UpdatableAssetable +} +// NewUpdatableAssetGroup instantiates a new UpdatableAssetGroup and sets the default values. +func NewUpdatableAssetGroup()(*UpdatableAssetGroup) { + m := &UpdatableAssetGroup{ + UpdatableAsset: *NewUpdatableAsset(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.updatableAssetGroup"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateUpdatableAssetGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdatableAssetGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUpdatableAssetGroup(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UpdatableAssetGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UpdatableAsset.GetFieldDeserializers() + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetable) + } + m.SetMembers(res) + } + return nil + } + return res +} +// GetMembers gets the members property value. Members of the group. Read-only. +func (m *UpdatableAssetGroup) GetMembers()([]UpdatableAssetable) { + return m.members +} +// Serialize serializes information the current object +func (m *UpdatableAssetGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UpdatableAsset.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 + } + } + return nil +} +// SetMembers sets the members property value. Members of the group. Read-only. +func (m *UpdatableAssetGroup) SetMembers(value []UpdatableAssetable)() { + m.members = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_group_collection_response.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_group_collection_response.go new file mode 100644 index 000000000..cdee00e56 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_group_collection_response.go @@ -0,0 +1,69 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAssetGroupCollectionResponse +type UpdatableAssetGroupCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UpdatableAssetGroupable +} +// NewUpdatableAssetGroupCollectionResponse instantiates a new UpdatableAssetGroupCollectionResponse and sets the default values. +func NewUpdatableAssetGroupCollectionResponse()(*UpdatableAssetGroupCollectionResponse) { + m := &UpdatableAssetGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUpdatableAssetGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdatableAssetGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUpdatableAssetGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UpdatableAssetGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetGroupable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UpdatableAssetGroupCollectionResponse) GetValue()([]UpdatableAssetGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *UpdatableAssetGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UpdatableAssetGroupCollectionResponse) SetValue(value []UpdatableAssetGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_group_collection_responseable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_group_collection_responseable.go new file mode 100644 index 000000000..485a4115f --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_group_collection_responseable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAssetGroupCollectionResponseable +type UpdatableAssetGroupCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UpdatableAssetGroupable) + SetValue(value []UpdatableAssetGroupable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_groupable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_groupable.go new file mode 100644 index 000000000..44a139089 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_asset_groupable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UpdatableAssetGroupable +type UpdatableAssetGroupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UpdatableAssetable + GetMembers()([]UpdatableAssetable) + SetMembers(value []UpdatableAssetable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_assetable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_assetable.go new file mode 100644 index 000000000..1ea7b85aa --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatable_assetable.go @@ -0,0 +1,12 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UpdatableAssetable +type UpdatableAssetable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/update_category.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/update_category.go new file mode 100644 index 000000000..329038416 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/update_category.go @@ -0,0 +1,37 @@ +package windowsupdates +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type UpdateCategory int + +const ( + FEATURE_UPDATECATEGORY UpdateCategory = iota + QUALITY_UPDATECATEGORY + UNKNOWNFUTUREVALUE_UPDATECATEGORY +) + +func (i UpdateCategory) String() string { + return []string{"feature", "quality", "unknownFutureValue"}[i] +} +func ParseUpdateCategory(v string) (interface{}, error) { + result := FEATURE_UPDATECATEGORY + switch v { + case "feature": + result = FEATURE_UPDATECATEGORY + case "quality": + result = QUALITY_UPDATECATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_UPDATECATEGORY + default: + return 0, errors.New("Unknown UpdateCategory value: " + v) + } + return &result, nil +} +func SerializeUpdateCategory(values []UpdateCategory) []string { + result := make([]string, len(values)) + for i, v := range values { + result[i] = v.String() + } + return result +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/update_management_enrollment.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/update_management_enrollment.go new file mode 100644 index 000000000..da09b5ee3 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/update_management_enrollment.go @@ -0,0 +1,63 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UpdateManagementEnrollment +type UpdateManagementEnrollment struct { + UpdatableAssetEnrollment + // The updateCategory property + updateCategory *UpdateCategory +} +// NewUpdateManagementEnrollment instantiates a new UpdateManagementEnrollment and sets the default values. +func NewUpdateManagementEnrollment()(*UpdateManagementEnrollment) { + m := &UpdateManagementEnrollment{ + UpdatableAssetEnrollment: *NewUpdatableAssetEnrollment(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.updateManagementEnrollment"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateUpdateManagementEnrollmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdateManagementEnrollmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUpdateManagementEnrollment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UpdateManagementEnrollment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UpdatableAssetEnrollment.GetFieldDeserializers() + res["updateCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUpdateCategory) + if err != nil { + return err + } + if val != nil { + m.SetUpdateCategory(val.(*UpdateCategory)) + } + return nil + } + return res +} +// GetUpdateCategory gets the updateCategory property value. The updateCategory property +func (m *UpdateManagementEnrollment) GetUpdateCategory()(*UpdateCategory) { + return m.updateCategory +} +// Serialize serializes information the current object +func (m *UpdateManagementEnrollment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UpdatableAssetEnrollment.Serialize(writer) + if err != nil { + return err + } + if m.GetUpdateCategory() != nil { + cast := (*m.GetUpdateCategory()).String() + err = writer.WriteStringValue("updateCategory", &cast) + if err != nil { + return err + } + } + return nil +} +// SetUpdateCategory sets the updateCategory property value. The updateCategory property +func (m *UpdateManagementEnrollment) SetUpdateCategory(value *UpdateCategory)() { + m.updateCategory = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/update_management_enrollmentable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/update_management_enrollmentable.go new file mode 100644 index 000000000..20c54bf6e --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/update_management_enrollmentable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UpdateManagementEnrollmentable +type UpdateManagementEnrollmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UpdatableAssetEnrollmentable + GetUpdateCategory()(*UpdateCategory) + SetUpdateCategory(value *UpdateCategory)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updates.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updates.go new file mode 100644 index 000000000..b51094787 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updates.go @@ -0,0 +1,163 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Updates +type Updates struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Catalog of content that can be approved for deployment by the deployment service. Read-only. + catalog Catalogable + // Deployments created using the deployment service. Read-only. + deployments []Deploymentable + // Service connections to external resources such as analytics workspaces. + resourceConnections []ResourceConnectionable + // Assets registered with the deployment service that can receive updates. Read-only. + updatableAssets []UpdatableAssetable +} +// NewUpdates instantiates a new updates and sets the default values. +func NewUpdates()(*Updates) { + m := &Updates{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateUpdatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUpdatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUpdates(), nil +} +// GetCatalog gets the catalog property value. Catalog of content that can be approved for deployment by the deployment service. Read-only. +func (m *Updates) GetCatalog()(Catalogable) { + return m.catalog +} +// GetDeployments gets the deployments property value. Deployments created using the deployment service. Read-only. +func (m *Updates) GetDeployments()([]Deploymentable) { + return m.deployments +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Updates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["catalog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCatalogFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCatalog(val.(Catalogable)) + } + return nil + } + res["deployments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeploymentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Deploymentable, len(val)) + for i, v := range val { + res[i] = v.(Deploymentable) + } + m.SetDeployments(res) + } + return nil + } + res["resourceConnections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceConnectionable, len(val)) + for i, v := range val { + res[i] = v.(ResourceConnectionable) + } + m.SetResourceConnections(res) + } + return nil + } + res["updatableAssets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUpdatableAssetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UpdatableAssetable, len(val)) + for i, v := range val { + res[i] = v.(UpdatableAssetable) + } + m.SetUpdatableAssets(res) + } + return nil + } + return res +} +// GetResourceConnections gets the resourceConnections property value. Service connections to external resources such as analytics workspaces. +func (m *Updates) GetResourceConnections()([]ResourceConnectionable) { + return m.resourceConnections +} +// GetUpdatableAssets gets the updatableAssets property value. Assets registered with the deployment service that can receive updates. Read-only. +func (m *Updates) GetUpdatableAssets()([]UpdatableAssetable) { + return m.updatableAssets +} +// Serialize serializes information the current object +func (m *Updates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("catalog", m.GetCatalog()) + 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 + } + } + if m.GetResourceConnections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResourceConnections())) + for i, v := range m.GetResourceConnections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resourceConnections", cast) + if err != nil { + return err + } + } + if m.GetUpdatableAssets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUpdatableAssets())) + for i, v := range m.GetUpdatableAssets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("updatableAssets", cast) + if err != nil { + return err + } + } + return nil +} +// SetCatalog sets the catalog property value. Catalog of content that can be approved for deployment by the deployment service. Read-only. +func (m *Updates) SetCatalog(value Catalogable)() { + m.catalog = value +} +// SetDeployments sets the deployments property value. Deployments created using the deployment service. Read-only. +func (m *Updates) SetDeployments(value []Deploymentable)() { + m.deployments = value +} +// SetResourceConnections sets the resourceConnections property value. Service connections to external resources such as analytics workspaces. +func (m *Updates) SetResourceConnections(value []ResourceConnectionable)() { + m.resourceConnections = value +} +// SetUpdatableAssets sets the updatableAssets property value. Assets registered with the deployment service that can receive updates. Read-only. +func (m *Updates) SetUpdatableAssets(value []UpdatableAssetable)() { + m.updatableAssets = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/updatesable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatesable.go new file mode 100644 index 000000000..84a30e0c4 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/updatesable.go @@ -0,0 +1,20 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Updatesable +type Updatesable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCatalog()(Catalogable) + GetDeployments()([]Deploymentable) + GetResourceConnections()([]ResourceConnectionable) + GetUpdatableAssets()([]UpdatableAssetable) + SetCatalog(value Catalogable)() + SetDeployments(value []Deploymentable)() + SetResourceConnections(value []ResourceConnectionable)() + SetUpdatableAssets(value []UpdatableAssetable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/user_experience_settings.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/user_experience_settings.go new file mode 100644 index 000000000..cad2ee90d --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/user_experience_settings.go @@ -0,0 +1,97 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserExperienceSettings +type UserExperienceSettings 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 number of days after an update is installed, during which the user of the device can control when the device restarts. + daysUntilForcedReboot *int32 + // The OdataType property + odataType *string +} +// NewUserExperienceSettings instantiates a new userExperienceSettings and sets the default values. +func NewUserExperienceSettings()(*UserExperienceSettings) { + m := &UserExperienceSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateUserExperienceSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserExperienceSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserExperienceSettings(), nil +} +// GetAdditionalData gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserExperienceSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDaysUntilForcedReboot gets the daysUntilForcedReboot property value. Specifies the number of days after an update is installed, during which the user of the device can control when the device restarts. +func (m *UserExperienceSettings) GetDaysUntilForcedReboot()(*int32) { + return m.daysUntilForcedReboot +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserExperienceSettings) 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *UserExperienceSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *UserExperienceSettings) 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.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalData sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. +func (m *UserExperienceSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDaysUntilForcedReboot sets the daysUntilForcedReboot property value. Specifies the number of days after an update is installed, during which the user of the device can control when the device restarts. +func (m *UserExperienceSettings) SetDaysUntilForcedReboot(value *int32)() { + m.daysUntilForcedReboot = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *UserExperienceSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/user_experience_settingsable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/user_experience_settingsable.go new file mode 100644 index 000000000..b8062956b --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/user_experience_settingsable.go @@ -0,0 +1,15 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserExperienceSettingsable +type UserExperienceSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDaysUntilForcedReboot()(*int32) + GetOdataType()(*string) + SetDaysUntilForcedReboot(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/windows.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows.go new file mode 100644 index 000000000..a182b2b59 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows.go @@ -0,0 +1,61 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Windows +type Windows struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Entity that acts as a container for the functionality of the Windows Update for Business deployment service. Read-only. + updates Updatesable +} +// NewWindows instantiates a new Windows and sets the default values. +func NewWindows()(*Windows) { + m := &Windows{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateWindowsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWindowsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWindows(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Windows) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["updates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUpdatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUpdates(val.(Updatesable)) + } + return nil + } + return res +} +// GetUpdates gets the updates property value. Entity that acts as a container for the functionality of the Windows Update for Business deployment service. Read-only. +func (m *Windows) GetUpdates()(Updatesable) { + return m.updates +} +// Serialize serializes information the current object +func (m *Windows) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("updates", m.GetUpdates()) + if err != nil { + return err + } + } + return nil +} +// SetUpdates sets the updates property value. Entity that acts as a container for the functionality of the Windows Update for Business deployment service. Read-only. +func (m *Windows) SetUpdates(value Updatesable)() { + m.updates = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_deployment_settings.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_deployment_settings.go new file mode 100644 index 000000000..1b167c980 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_deployment_settings.go @@ -0,0 +1,62 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WindowsDeploymentSettings +type WindowsDeploymentSettings struct { + DeploymentSettings + // Settings governing the user's update experience on a device. + userExperience UserExperienceSettingsable +} +// NewWindowsDeploymentSettings instantiates a new WindowsDeploymentSettings and sets the default values. +func NewWindowsDeploymentSettings()(*WindowsDeploymentSettings) { + m := &WindowsDeploymentSettings{ + DeploymentSettings: *NewDeploymentSettings(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.windowsDeploymentSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateWindowsDeploymentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWindowsDeploymentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWindowsDeploymentSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WindowsDeploymentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeploymentSettings.GetFieldDeserializers() + res["userExperience"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserExperienceSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserExperience(val.(UserExperienceSettingsable)) + } + return nil + } + return res +} +// GetUserExperience gets the userExperience property value. Settings governing the user's update experience on a device. +func (m *WindowsDeploymentSettings) GetUserExperience()(UserExperienceSettingsable) { + return m.userExperience +} +// Serialize serializes information the current object +func (m *WindowsDeploymentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeploymentSettings.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("userExperience", m.GetUserExperience()) + if err != nil { + return err + } + } + return nil +} +// SetUserExperience sets the userExperience property value. Settings governing the user's update experience on a device. +func (m *WindowsDeploymentSettings) SetUserExperience(value UserExperienceSettingsable)() { + m.userExperience = value +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_deployment_settingsable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_deployment_settingsable.go new file mode 100644 index 000000000..d56975a00 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_deployment_settingsable.go @@ -0,0 +1,13 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WindowsDeploymentSettingsable +type WindowsDeploymentSettingsable interface { + DeploymentSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserExperience()(UserExperienceSettingsable) + SetUserExperience(value UserExperienceSettingsable)() +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_update_reference.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_update_reference.go new file mode 100644 index 000000000..d4fd583ce --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_update_reference.go @@ -0,0 +1,58 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WindowsUpdateReference +type WindowsUpdateReference struct { + SoftwareUpdateReference +} +// NewWindowsUpdateReference instantiates a new WindowsUpdateReference and sets the default values. +func NewWindowsUpdateReference()(*WindowsUpdateReference) { + m := &WindowsUpdateReference{ + SoftwareUpdateReference: *NewSoftwareUpdateReference(), + } + odataTypeValue := "#microsoft.graph.windowsUpdates.windowsUpdateReference"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateWindowsUpdateReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWindowsUpdateReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsUpdates.expeditedQualityUpdateReference": + return NewExpeditedQualityUpdateReference(), nil + case "#microsoft.graph.windowsUpdates.featureUpdateReference": + return NewFeatureUpdateReference(), nil + case "#microsoft.graph.windowsUpdates.qualityUpdateReference": + return NewQualityUpdateReference(), nil + } + } + } + } + return NewWindowsUpdateReference(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WindowsUpdateReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SoftwareUpdateReference.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *WindowsUpdateReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SoftwareUpdateReference.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_update_referenceable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_update_referenceable.go new file mode 100644 index 000000000..c1e08e8af --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/windows_update_referenceable.go @@ -0,0 +1,11 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WindowsUpdateReferenceable +type WindowsUpdateReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SoftwareUpdateReferenceable +} diff --git a/src/internal/connector/graph/betaSDK/models/windowsupdates/windowsable.go b/src/internal/connector/graph/betaSDK/models/windowsupdates/windowsable.go new file mode 100644 index 000000000..ee392f537 --- /dev/null +++ b/src/internal/connector/graph/betaSDK/models/windowsupdates/windowsable.go @@ -0,0 +1,14 @@ +package windowsupdates + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Windowsable +type Windowsable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUpdates()(Updatesable) + SetUpdates(value Updatesable)() +}