diff --git a/src/main/java/com/microsoft/graph/callrecords/models/extensions/CallRecord.java b/src/main/java/com/microsoft/graph/callrecords/models/extensions/CallRecord.java index 7dffa92eceb..2969835219c 100644 --- a/src/main/java/com/microsoft/graph/callrecords/models/extensions/CallRecord.java +++ b/src/main/java/com/microsoft/graph/callrecords/models/extensions/CallRecord.java @@ -108,6 +108,8 @@ public class CallRecord extends Entity implements IJsonBackedObject { * The Sessions. * 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. */ + @SerializedName("sessions") + @Expose public SessionCollectionPage sessions; diff --git a/src/main/java/com/microsoft/graph/callrecords/models/extensions/Session.java b/src/main/java/com/microsoft/graph/callrecords/models/extensions/Session.java index c6cc159c9fc..1b053513494 100644 --- a/src/main/java/com/microsoft/graph/callrecords/models/extensions/Session.java +++ b/src/main/java/com/microsoft/graph/callrecords/models/extensions/Session.java @@ -84,6 +84,8 @@ public class Session extends Entity implements IJsonBackedObject { * The Segments. * The list of segments involved in the session. Read-only. Nullable. */ + @SerializedName("segments") + @Expose public SegmentCollectionPage segments; diff --git a/src/main/java/com/microsoft/graph/core/Constants.java b/src/main/java/com/microsoft/graph/core/Constants.java index 3691af5e865..8f25e74ae2c 100644 --- a/src/main/java/com/microsoft/graph/core/Constants.java +++ b/src/main/java/com/microsoft/graph/core/Constants.java @@ -28,5 +28,7 @@ private Constants() { public static final String APPID = "app-id"; public static final String USERNAME = "user@email.com"; public static final String PASSWORD = "password"; + public static final String TENANTID = "tenantid"; + public static final String CLIENTSECRET = "clientsecret"; public static final String VERSION_NAME = "2.0.0"; } diff --git a/src/main/java/com/microsoft/graph/core/DefaultConnectionConfig.java b/src/main/java/com/microsoft/graph/core/DefaultConnectionConfig.java index 4e7fb9188ef..90cdcb9dac9 100644 --- a/src/main/java/com/microsoft/graph/core/DefaultConnectionConfig.java +++ b/src/main/java/com/microsoft/graph/core/DefaultConnectionConfig.java @@ -110,7 +110,7 @@ public void setReadTimeout(int readTimeoutValue) { * @param maxRedirects Max redirects that a request can take */ public void setMaxRedirects(int maxRedirects) { - this.maxRedirects = maxRedirects; + DefaultConnectionConfig.maxRedirects = maxRedirects; } /** @@ -128,7 +128,7 @@ public int getMaxRedirects() { * @param shouldRedirect Callback called before doing a redirect */ public void setShouldRedirect(IShouldRedirect shouldRedirect) { - this.shouldRedirect = shouldRedirect; + DefaultConnectionConfig.shouldRedirect = shouldRedirect; } /** @@ -146,7 +146,7 @@ public IShouldRedirect getShouldRedirect() { * @param shouldretry The callback called before retry */ public void setShouldRetry(IShouldRetry shouldretry) { - this.shouldRetry = shouldretry; + DefaultConnectionConfig.shouldRetry = shouldretry; } /** @@ -164,7 +164,7 @@ public IShouldRetry getShouldRetry() { * @param maxRetries Max retries for a request */ public void setMaxRetries(int maxRetries) { - this.maxRetries = maxRetries; + DefaultConnectionConfig.maxRetries = maxRetries; } /** @@ -182,7 +182,7 @@ public int getMaxRetries() { * @param delay Delay in seconds between retries */ public void setDelay(long delay) { - this.delay = delay; + DefaultConnectionConfig.delay = delay; } /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/AndroidManagedAppProtection.java b/src/main/java/com/microsoft/graph/models/extensions/AndroidManagedAppProtection.java index 718d4a9ee93..9997c10bb1c 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/AndroidManagedAppProtection.java +++ b/src/main/java/com/microsoft/graph/models/extensions/AndroidManagedAppProtection.java @@ -98,6 +98,8 @@ public class AndroidManagedAppProtection extends TargetedManagedAppProtection im * The Apps. * List of apps to which the policy is deployed. */ + @SerializedName("apps") + @Expose public ManagedMobileAppCollectionPage apps; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/AppCatalogs.java b/src/main/java/com/microsoft/graph/models/extensions/AppCatalogs.java index 895db494100..f854537ea7d 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/AppCatalogs.java +++ b/src/main/java/com/microsoft/graph/models/extensions/AppCatalogs.java @@ -33,6 +33,8 @@ public class AppCatalogs extends Entity implements IJsonBackedObject { * The Teams Apps. * */ + @SerializedName("teamsApps") + @Expose public TeamsAppCollectionPage teamsApps; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Application.java b/src/main/java/com/microsoft/graph/models/extensions/Application.java index cf532df5790..d747a6d2213 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Application.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Application.java @@ -271,6 +271,8 @@ public class Application extends DirectoryObject implements IJsonBackedObject { * The Extension Properties. * Read-only. Nullable. */ + @SerializedName("extensionProperties") + @Expose public ExtensionPropertyCollectionPage extensionProperties; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/AuditLogRoot.java b/src/main/java/com/microsoft/graph/models/extensions/AuditLogRoot.java index c557585d47f..7cabf2ef16c 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/AuditLogRoot.java +++ b/src/main/java/com/microsoft/graph/models/extensions/AuditLogRoot.java @@ -39,18 +39,24 @@ public class AuditLogRoot extends Entity implements IJsonBackedObject { * The Directory Audits. * Read-only. Nullable. */ + @SerializedName("directoryAudits") + @Expose public DirectoryAuditCollectionPage directoryAudits; /** * The Restricted Sign Ins. * */ + @SerializedName("restrictedSignIns") + @Expose public RestrictedSignInCollectionPage restrictedSignIns; /** * The Sign Ins. * Read-only. Nullable. */ + @SerializedName("signIns") + @Expose public SignInCollectionPage signIns; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Calendar.java b/src/main/java/com/microsoft/graph/models/extensions/Calendar.java index e6f5aec0c73..64fa66bf6a5 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Calendar.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Calendar.java @@ -133,30 +133,40 @@ public class Calendar extends Entity implements IJsonBackedObject { * The Calendar Permissions. * The permissions of the users with whom the calendar is shared. */ + @SerializedName("calendarPermissions") + @Expose public CalendarPermissionCollectionPage calendarPermissions; /** * The Calendar View. * The calendar view for the calendar. Navigation property. Read-only. */ + @SerializedName("calendarView") + @Expose public EventCollectionPage calendarView; /** * The Events. * The events in the calendar. Navigation property. Read-only. */ + @SerializedName("events") + @Expose public EventCollectionPage events; /** * The Multi Value Extended Properties. * The collection of multi-value extended properties defined for the calendar. Read-only. Nullable. */ + @SerializedName("multiValueExtendedProperties") + @Expose public MultiValueLegacyExtendedPropertyCollectionPage multiValueExtendedProperties; /** * The Single Value Extended Properties. * The collection of single-value extended properties defined for the calendar. Read-only. Nullable. */ + @SerializedName("singleValueExtendedProperties") + @Expose public SingleValueLegacyExtendedPropertyCollectionPage singleValueExtendedProperties; diff --git a/src/main/java/com/microsoft/graph/models/extensions/CalendarGroup.java b/src/main/java/com/microsoft/graph/models/extensions/CalendarGroup.java index 44b9277ba8f..85f2199aaf0 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/CalendarGroup.java +++ b/src/main/java/com/microsoft/graph/models/extensions/CalendarGroup.java @@ -57,6 +57,8 @@ public class CalendarGroup extends Entity implements IJsonBackedObject { * The Calendars. * The calendars in the calendar group. Navigation property. Read-only. Nullable. */ + @SerializedName("calendars") + @Expose public CalendarCollectionPage calendars; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Call.java b/src/main/java/com/microsoft/graph/models/extensions/Call.java index dcaf8e45bd4..b59562816ab 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Call.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Call.java @@ -211,12 +211,16 @@ public class Call extends Entity implements IJsonBackedObject { * The Operations. * Read-only. Nullable. */ + @SerializedName("operations") + @Expose public CommsOperationCollectionPage operations; /** * The Participants. * Read-only. Nullable. */ + @SerializedName("participants") + @Expose public ParticipantCollectionPage participants; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Channel.java b/src/main/java/com/microsoft/graph/models/extensions/Channel.java index 91e4f080faa..96b1e7a9375 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Channel.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Channel.java @@ -89,18 +89,24 @@ public class Channel extends Entity implements IJsonBackedObject { * The Members. * */ + @SerializedName("members") + @Expose public ConversationMemberCollectionPage members; /** * The Messages. * A collection of all the messages in the channel. A navigation property. Nullable. */ + @SerializedName("messages") + @Expose public ChatMessageCollectionPage messages; /** * The Tabs. * A collection of all the tabs in the channel. A navigation property. */ + @SerializedName("tabs") + @Expose public TeamsTabCollectionPage tabs; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ChatMessage.java b/src/main/java/com/microsoft/graph/models/extensions/ChatMessage.java index 5237a883076..22c8cd8f6f4 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ChatMessage.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ChatMessage.java @@ -180,12 +180,16 @@ public class ChatMessage extends Entity implements IJsonBackedObject { * The Hosted Contents. * */ + @SerializedName("hostedContents") + @Expose public ChatMessageHostedContentCollectionPage hostedContents; /** * The Replies. * */ + @SerializedName("replies") + @Expose public ChatMessageCollectionPage replies; diff --git a/src/main/java/com/microsoft/graph/models/extensions/CloudCommunications.java b/src/main/java/com/microsoft/graph/models/extensions/CloudCommunications.java index d94c8540eab..6fc2794ca1d 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/CloudCommunications.java +++ b/src/main/java/com/microsoft/graph/models/extensions/CloudCommunications.java @@ -39,18 +39,24 @@ public class CloudCommunications extends Entity implements IJsonBackedObject { * The Calls. * */ + @SerializedName("calls") + @Expose public CallCollectionPage calls; /** * The Call Records. * */ + @SerializedName("callRecords") + @Expose public CallRecordCollectionPage callRecords; /** * The Online Meetings. * */ + @SerializedName("onlineMeetings") + @Expose public OnlineMeetingCollectionPage onlineMeetings; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ConditionalAccessRoot.java b/src/main/java/com/microsoft/graph/models/extensions/ConditionalAccessRoot.java index 4a63cef6d0e..d3c45398334 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ConditionalAccessRoot.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ConditionalAccessRoot.java @@ -36,12 +36,16 @@ public class ConditionalAccessRoot extends Entity implements IJsonBackedObject { * The Named Locations. * */ + @SerializedName("namedLocations") + @Expose public NamedLocationCollectionPage namedLocations; /** * The Policies. * */ + @SerializedName("policies") + @Expose public ConditionalAccessPolicyCollectionPage policies; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Contact.java b/src/main/java/com/microsoft/graph/models/extensions/Contact.java index 5818b17f328..226dbcf643c 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Contact.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Contact.java @@ -306,12 +306,16 @@ public class Contact extends OutlookItem implements IJsonBackedObject { * The Extensions. * The collection of open extensions defined for the contact. Read-only. Nullable. */ + @SerializedName("extensions") + @Expose public ExtensionCollectionPage extensions; /** * The Multi Value Extended Properties. * The collection of multi-value extended properties defined for the contact. Read-only. Nullable. */ + @SerializedName("multiValueExtendedProperties") + @Expose public MultiValueLegacyExtendedPropertyCollectionPage multiValueExtendedProperties; /** @@ -326,6 +330,8 @@ public class Contact extends OutlookItem implements IJsonBackedObject { * The Single Value Extended Properties. * The collection of single-value extended properties defined for the contact. Read-only. Nullable. */ + @SerializedName("singleValueExtendedProperties") + @Expose public SingleValueLegacyExtendedPropertyCollectionPage singleValueExtendedProperties; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ContactFolder.java b/src/main/java/com/microsoft/graph/models/extensions/ContactFolder.java index 24d7e76c6ff..e14763a0727 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ContactFolder.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ContactFolder.java @@ -58,24 +58,32 @@ public class ContactFolder extends Entity implements IJsonBackedObject { * The Child Folders. * The collection of child folders in the folder. Navigation property. Read-only. Nullable. */ + @SerializedName("childFolders") + @Expose public ContactFolderCollectionPage childFolders; /** * The Contacts. * The contacts in the folder. Navigation property. Read-only. Nullable. */ + @SerializedName("contacts") + @Expose public ContactCollectionPage contacts; /** * The Multi Value Extended Properties. * The collection of multi-value extended properties defined for the contactFolder. Read-only. Nullable. */ + @SerializedName("multiValueExtendedProperties") + @Expose public MultiValueLegacyExtendedPropertyCollectionPage multiValueExtendedProperties; /** * The Single Value Extended Properties. * The collection of single-value extended properties defined for the contactFolder. Read-only. Nullable. */ + @SerializedName("singleValueExtendedProperties") + @Expose public SingleValueLegacyExtendedPropertyCollectionPage singleValueExtendedProperties; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ContentType.java b/src/main/java/com/microsoft/graph/models/extensions/ContentType.java index e46c442e4e0..60ca1113387 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ContentType.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ContentType.java @@ -107,6 +107,8 @@ public class ContentType extends Entity implements IJsonBackedObject { * The Column Links. * The collection of columns that are required by this content type */ + @SerializedName("columnLinks") + @Expose public ColumnLinkCollectionPage columnLinks; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Conversation.java b/src/main/java/com/microsoft/graph/models/extensions/Conversation.java index 4c9b63de27a..77f471532b4 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Conversation.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Conversation.java @@ -73,6 +73,8 @@ public class Conversation extends Entity implements IJsonBackedObject { * The Threads. * A collection of all the conversation threads in the conversation. A navigation property. Read-only. Nullable. */ + @SerializedName("threads") + @Expose public ConversationThreadCollectionPage threads; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ConversationThread.java b/src/main/java/com/microsoft/graph/models/extensions/ConversationThread.java index ffb698bea41..fed518c5174 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ConversationThread.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ConversationThread.java @@ -98,6 +98,8 @@ public class ConversationThread extends Entity implements IJsonBackedObject { * The Posts. * Read-only. Nullable. */ + @SerializedName("posts") + @Expose public PostCollectionPage posts; diff --git a/src/main/java/com/microsoft/graph/models/extensions/DefaultManagedAppProtection.java b/src/main/java/com/microsoft/graph/models/extensions/DefaultManagedAppProtection.java index 565ae3148ec..0cea381e36c 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/DefaultManagedAppProtection.java +++ b/src/main/java/com/microsoft/graph/models/extensions/DefaultManagedAppProtection.java @@ -116,6 +116,8 @@ public class DefaultManagedAppProtection extends ManagedAppProtection implements * The Apps. * List of apps to which the policy is deployed. */ + @SerializedName("apps") + @Expose public ManagedMobileAppCollectionPage apps; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/Device.java b/src/main/java/com/microsoft/graph/models/extensions/Device.java index 311a74d3fe0..1d74f59c5e4 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Device.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Device.java @@ -212,6 +212,8 @@ public class Device extends DirectoryObject implements IJsonBackedObject { * The Extensions. * The collection of open extensions defined for the device. Read-only. Nullable. */ + @SerializedName("extensions") + @Expose public ExtensionCollectionPage extensions; diff --git a/src/main/java/com/microsoft/graph/models/extensions/DeviceAppManagement.java b/src/main/java/com/microsoft/graph/models/extensions/DeviceAppManagement.java index 9a677239ac1..382514cc2ae 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/DeviceAppManagement.java +++ b/src/main/java/com/microsoft/graph/models/extensions/DeviceAppManagement.java @@ -104,84 +104,112 @@ public class DeviceAppManagement extends Entity implements IJsonBackedObject { * The Managed EBooks. * The Managed eBook. */ + @SerializedName("managedEBooks") + @Expose public ManagedEBookCollectionPage managedEBooks; /** * The Mobile App Categories. * The mobile app categories. */ + @SerializedName("mobileAppCategories") + @Expose public MobileAppCategoryCollectionPage mobileAppCategories; /** * The Mobile App Configurations. * The Managed Device Mobile Application Configurations. */ + @SerializedName("mobileAppConfigurations") + @Expose public ManagedDeviceMobileAppConfigurationCollectionPage mobileAppConfigurations; /** * The Mobile Apps. * The mobile apps. */ + @SerializedName("mobileApps") + @Expose public MobileAppCollectionPage mobileApps; /** * The Vpp Tokens. * List of Vpp tokens for this organization. */ + @SerializedName("vppTokens") + @Expose public VppTokenCollectionPage vppTokens; /** * The Android Managed App Protections. * Android managed app policies. */ + @SerializedName("androidManagedAppProtections") + @Expose public AndroidManagedAppProtectionCollectionPage androidManagedAppProtections; /** * The Default Managed App Protections. * Default managed app policies. */ + @SerializedName("defaultManagedAppProtections") + @Expose public DefaultManagedAppProtectionCollectionPage defaultManagedAppProtections; /** * The Ios Managed App Protections. * iOS managed app policies. */ + @SerializedName("iosManagedAppProtections") + @Expose public IosManagedAppProtectionCollectionPage iosManagedAppProtections; /** * The Managed App Policies. * Managed app policies. */ + @SerializedName("managedAppPolicies") + @Expose public ManagedAppPolicyCollectionPage managedAppPolicies; /** * The Managed App Registrations. * The managed app registrations. */ + @SerializedName("managedAppRegistrations") + @Expose public ManagedAppRegistrationCollectionPage managedAppRegistrations; /** * The Managed App Statuses. * The managed app statuses. */ + @SerializedName("managedAppStatuses") + @Expose public ManagedAppStatusCollectionPage managedAppStatuses; /** * The Mdm Windows Information Protection Policies. * Windows information protection for apps running on devices which are MDM enrolled. */ + @SerializedName("mdmWindowsInformationProtectionPolicies") + @Expose public MdmWindowsInformationProtectionPolicyCollectionPage mdmWindowsInformationProtectionPolicies; /** * The Targeted Managed App Configurations. * Targeted managed app configurations. */ + @SerializedName("targetedManagedAppConfigurations") + @Expose public TargetedManagedAppConfigurationCollectionPage targetedManagedAppConfigurations; /** * The Windows Information Protection Policies. * Windows information protection for apps running on devices which are not MDM enrolled. */ + @SerializedName("windowsInformationProtectionPolicies") + @Expose public WindowsInformationProtectionPolicyCollectionPage windowsInformationProtectionPolicies; diff --git a/src/main/java/com/microsoft/graph/models/extensions/DeviceCompliancePolicy.java b/src/main/java/com/microsoft/graph/models/extensions/DeviceCompliancePolicy.java index 2560c241351..d0fa86e5dff 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/DeviceCompliancePolicy.java +++ b/src/main/java/com/microsoft/graph/models/extensions/DeviceCompliancePolicy.java @@ -87,18 +87,24 @@ public class DeviceCompliancePolicy extends Entity implements IJsonBackedObject * The Assignments. * The collection of assignments for this compliance policy. */ + @SerializedName("assignments") + @Expose public DeviceCompliancePolicyAssignmentCollectionPage assignments; /** * The Device Setting State Summaries. * Compliance Setting State Device Summary */ + @SerializedName("deviceSettingStateSummaries") + @Expose public SettingStateDeviceSummaryCollectionPage deviceSettingStateSummaries; /** * The Device Statuses. * List of DeviceComplianceDeviceStatus. */ + @SerializedName("deviceStatuses") + @Expose public DeviceComplianceDeviceStatusCollectionPage deviceStatuses; /** @@ -113,12 +119,16 @@ public class DeviceCompliancePolicy extends Entity implements IJsonBackedObject * The Scheduled Actions For Rule. * The list of scheduled action for this rule */ + @SerializedName("scheduledActionsForRule") + @Expose public DeviceComplianceScheduledActionForRuleCollectionPage scheduledActionsForRule; /** * The User Statuses. * List of DeviceComplianceUserStatus. */ + @SerializedName("userStatuses") + @Expose public DeviceComplianceUserStatusCollectionPage userStatuses; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/DeviceCompliancePolicySettingStateSummary.java b/src/main/java/com/microsoft/graph/models/extensions/DeviceCompliancePolicySettingStateSummary.java index d7a1211a1c6..14352f3e1f0 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/DeviceCompliancePolicySettingStateSummary.java +++ b/src/main/java/com/microsoft/graph/models/extensions/DeviceCompliancePolicySettingStateSummary.java @@ -114,6 +114,8 @@ public class DeviceCompliancePolicySettingStateSummary extends Entity implements * The Device Compliance Setting States. * Not yet documented */ + @SerializedName("deviceComplianceSettingStates") + @Expose public DeviceComplianceSettingStateCollectionPage deviceComplianceSettingStates; diff --git a/src/main/java/com/microsoft/graph/models/extensions/DeviceComplianceScheduledActionForRule.java b/src/main/java/com/microsoft/graph/models/extensions/DeviceComplianceScheduledActionForRule.java index bafd2b2f6ca..da010ca2462 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/DeviceComplianceScheduledActionForRule.java +++ b/src/main/java/com/microsoft/graph/models/extensions/DeviceComplianceScheduledActionForRule.java @@ -41,6 +41,8 @@ public class DeviceComplianceScheduledActionForRule extends Entity implements IJ * The Scheduled Action Configurations. * The list of scheduled action configurations for this compliance policy. */ + @SerializedName("scheduledActionConfigurations") + @Expose public DeviceComplianceActionItemCollectionPage scheduledActionConfigurations; diff --git a/src/main/java/com/microsoft/graph/models/extensions/DeviceConfiguration.java b/src/main/java/com/microsoft/graph/models/extensions/DeviceConfiguration.java index 153641f2152..965c681bfbe 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/DeviceConfiguration.java +++ b/src/main/java/com/microsoft/graph/models/extensions/DeviceConfiguration.java @@ -84,18 +84,24 @@ public class DeviceConfiguration extends Entity implements IJsonBackedObject { * The Assignments. * The list of assignments for the device configuration profile. */ + @SerializedName("assignments") + @Expose public DeviceConfigurationAssignmentCollectionPage assignments; /** * The Device Setting State Summaries. * Device Configuration Setting State Device Summary */ + @SerializedName("deviceSettingStateSummaries") + @Expose public SettingStateDeviceSummaryCollectionPage deviceSettingStateSummaries; /** * The Device Statuses. * Device configuration installation status by device. */ + @SerializedName("deviceStatuses") + @Expose public DeviceConfigurationDeviceStatusCollectionPage deviceStatuses; /** @@ -110,6 +116,8 @@ public class DeviceConfiguration extends Entity implements IJsonBackedObject { * The User Statuses. * Device configuration installation status by user. */ + @SerializedName("userStatuses") + @Expose public DeviceConfigurationUserStatusCollectionPage userStatuses; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/DeviceEnrollmentConfiguration.java b/src/main/java/com/microsoft/graph/models/extensions/DeviceEnrollmentConfiguration.java index 0953d4040a6..112594f3486 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/DeviceEnrollmentConfiguration.java +++ b/src/main/java/com/microsoft/graph/models/extensions/DeviceEnrollmentConfiguration.java @@ -81,6 +81,8 @@ public class DeviceEnrollmentConfiguration extends Entity implements IJsonBacked * The Assignments. * The list of group assignments for the device configuration profile. */ + @SerializedName("assignments") + @Expose public EnrollmentConfigurationAssignmentCollectionPage assignments; diff --git a/src/main/java/com/microsoft/graph/models/extensions/DeviceManagement.java b/src/main/java/com/microsoft/graph/models/extensions/DeviceManagement.java index 50aef564f9d..39c8e97a963 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/DeviceManagement.java +++ b/src/main/java/com/microsoft/graph/models/extensions/DeviceManagement.java @@ -137,12 +137,16 @@ public class DeviceManagement extends Entity implements IJsonBackedObject { * The Terms And Conditions. * The terms and conditions associated with device management of the company. */ + @SerializedName("termsAndConditions") + @Expose public TermsAndConditionsCollectionPage termsAndConditions; /** * The Device Compliance Policies. * The device compliance policies. */ + @SerializedName("deviceCompliancePolicies") + @Expose public DeviceCompliancePolicyCollectionPage deviceCompliancePolicies; /** @@ -157,6 +161,8 @@ public class DeviceManagement extends Entity implements IJsonBackedObject { * The Device Compliance Policy Setting State Summaries. * The summary states of compliance policy settings for this account. */ + @SerializedName("deviceCompliancePolicySettingStateSummaries") + @Expose public DeviceCompliancePolicySettingStateSummaryCollectionPage deviceCompliancePolicySettingStateSummaries; /** @@ -171,12 +177,16 @@ public class DeviceManagement extends Entity implements IJsonBackedObject { * The Device Configurations. * The device configurations. */ + @SerializedName("deviceConfigurations") + @Expose public DeviceConfigurationCollectionPage deviceConfigurations; /** * The Ios Update Statuses. * The IOS software update installation statuses for this account. */ + @SerializedName("iosUpdateStatuses") + @Expose public IosUpdateDeviceStatusCollectionPage iosUpdateStatuses; /** @@ -191,6 +201,8 @@ public class DeviceManagement extends Entity implements IJsonBackedObject { * The Compliance Management Partners. * The list of Compliance Management Partners configured by the tenant. */ + @SerializedName("complianceManagementPartners") + @Expose public ComplianceManagementPartnerCollectionPage complianceManagementPartners; /** @@ -205,30 +217,40 @@ public class DeviceManagement extends Entity implements IJsonBackedObject { * The Device Categories. * The list of device categories with the tenant. */ + @SerializedName("deviceCategories") + @Expose public DeviceCategoryCollectionPage deviceCategories; /** * The Device Enrollment Configurations. * The list of device enrollment configurations */ + @SerializedName("deviceEnrollmentConfigurations") + @Expose public DeviceEnrollmentConfigurationCollectionPage deviceEnrollmentConfigurations; /** * The Device Management Partners. * The list of Device Management Partners configured by the tenant. */ + @SerializedName("deviceManagementPartners") + @Expose public DeviceManagementPartnerCollectionPage deviceManagementPartners; /** * The Exchange Connectors. * The list of Exchange Connectors configured by the tenant. */ + @SerializedName("exchangeConnectors") + @Expose public DeviceManagementExchangeConnectorCollectionPage exchangeConnectors; /** * The Mobile Threat Defense Connectors. * The list of Mobile threat Defense connectors configured by the tenant. */ + @SerializedName("mobileThreatDefenseConnectors") + @Expose public MobileThreatDefenseConnectorCollectionPage mobileThreatDefenseConnectors; /** @@ -243,6 +265,8 @@ public class DeviceManagement extends Entity implements IJsonBackedObject { * The Detected Apps. * The list of detected apps associated with a device. */ + @SerializedName("detectedApps") + @Expose public DetectedAppCollectionPage detectedApps; /** @@ -257,60 +281,80 @@ public class DeviceManagement extends Entity implements IJsonBackedObject { * The Managed Devices. * The list of managed devices. */ + @SerializedName("managedDevices") + @Expose public ManagedDeviceCollectionPage managedDevices; /** * The Notification Message Templates. * The Notification Message Templates. */ + @SerializedName("notificationMessageTemplates") + @Expose public NotificationMessageTemplateCollectionPage notificationMessageTemplates; /** * The Resource Operations. * The Resource Operations. */ + @SerializedName("resourceOperations") + @Expose public ResourceOperationCollectionPage resourceOperations; /** * The Role Assignments. * The Role Assignments. */ + @SerializedName("roleAssignments") + @Expose public DeviceAndAppManagementRoleAssignmentCollectionPage roleAssignments; /** * The Role Definitions. * The Role Definitions. */ + @SerializedName("roleDefinitions") + @Expose public RoleDefinitionCollectionPage roleDefinitions; /** * The Remote Assistance Partners. * The remote assist partners. */ + @SerializedName("remoteAssistancePartners") + @Expose public RemoteAssistancePartnerCollectionPage remoteAssistancePartners; /** * The Telecom Expense Management Partners. * The telecom expense management partners. */ + @SerializedName("telecomExpenseManagementPartners") + @Expose public TelecomExpenseManagementPartnerCollectionPage telecomExpenseManagementPartners; /** * The Troubleshooting Events. * The list of troubleshooting events for the tenant. */ + @SerializedName("troubleshootingEvents") + @Expose public DeviceManagementTroubleshootingEventCollectionPage troubleshootingEvents; /** * The Windows Information Protection App Learning Summaries. * The windows information protection app learning summaries. */ + @SerializedName("windowsInformationProtectionAppLearningSummaries") + @Expose public WindowsInformationProtectionAppLearningSummaryCollectionPage windowsInformationProtectionAppLearningSummaries; /** * The Windows Information Protection Network Learning Summaries. * The windows information protection network learning summaries. */ + @SerializedName("windowsInformationProtectionNetworkLearningSummaries") + @Expose public WindowsInformationProtectionNetworkLearningSummaryCollectionPage windowsInformationProtectionNetworkLearningSummaries; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Directory.java b/src/main/java/com/microsoft/graph/models/extensions/Directory.java index 04c17986b7d..946ca56f2df 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Directory.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Directory.java @@ -33,6 +33,8 @@ public class Directory extends Entity implements IJsonBackedObject { * The Deleted Items. * Recently deleted items. Read-only. Nullable. */ + @SerializedName("deletedItems") + @Expose public DirectoryObjectCollectionPage deletedItems; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Domain.java b/src/main/java/com/microsoft/graph/models/extensions/Domain.java index 3ae751a87af..9eaecd0da0a 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Domain.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Domain.java @@ -147,12 +147,16 @@ public class Domain extends Entity implements IJsonBackedObject { * The Service Configuration Records. * DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services.Read-only, Nullable */ + @SerializedName("serviceConfigurationRecords") + @Expose public DomainDnsRecordCollectionPage serviceConfigurationRecords; /** * The Verification Dns Records. * DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Azure AD.Read-only, Nullable */ + @SerializedName("verificationDnsRecords") + @Expose public DomainDnsRecordCollectionPage verificationDnsRecords; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Drive.java b/src/main/java/com/microsoft/graph/models/extensions/Drive.java index 4360d3c3ab0..ce1ef90fff3 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Drive.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Drive.java @@ -78,12 +78,16 @@ public class Drive extends BaseItem implements IJsonBackedObject { * The Following. * The list of items the user is following. Only in OneDrive for Business. */ + @SerializedName("following") + @Expose public DriveItemCollectionPage following; /** * The Items. * All items contained in the drive. Read-only. Nullable. */ + @SerializedName("items") + @Expose public DriveItemCollectionPage items; /** @@ -106,6 +110,8 @@ public class Drive extends BaseItem implements IJsonBackedObject { * The Special. * Collection of common folders available in OneDrive. Read-only. Nullable. */ + @SerializedName("special") + @Expose public DriveItemCollectionPage special; diff --git a/src/main/java/com/microsoft/graph/models/extensions/DriveItem.java b/src/main/java/com/microsoft/graph/models/extensions/DriveItem.java index 9032a5c17bb..987e762bff7 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/DriveItem.java +++ b/src/main/java/com/microsoft/graph/models/extensions/DriveItem.java @@ -249,6 +249,8 @@ public class DriveItem extends BaseItem implements IJsonBackedObject { * The Children. * Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. */ + @SerializedName("children") + @Expose public DriveItemCollectionPage children; /** @@ -263,24 +265,32 @@ public class DriveItem extends BaseItem implements IJsonBackedObject { * The Permissions. * The set of permissions for the item. Read-only. Nullable. */ + @SerializedName("permissions") + @Expose public PermissionCollectionPage permissions; /** * The Subscriptions. * The set of subscriptions on the item. Only supported on the root of a drive. */ + @SerializedName("subscriptions") + @Expose public SubscriptionCollectionPage subscriptions; /** * The Thumbnails. * Collection containing [ThumbnailSet][] objects associated with the item. For more info, see [getting thumbnails][]. Read-only. Nullable. */ + @SerializedName("thumbnails") + @Expose public ThumbnailSetCollectionPage thumbnails; /** * The Versions. * The list of previous versions of the item. For more info, see [getting previous versions][]. Read-only. Nullable. */ + @SerializedName("versions") + @Expose public DriveItemVersionCollectionPage versions; diff --git a/src/main/java/com/microsoft/graph/models/extensions/EducationRoot.java b/src/main/java/com/microsoft/graph/models/extensions/EducationRoot.java index d503a550881..0b9128c1db5 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/EducationRoot.java +++ b/src/main/java/com/microsoft/graph/models/extensions/EducationRoot.java @@ -39,6 +39,8 @@ public class EducationRoot extends Entity implements IJsonBackedObject { * The Classes. * Read-only. Nullable. */ + @SerializedName("classes") + @Expose public EducationClassCollectionPage classes; /** @@ -53,12 +55,16 @@ public class EducationRoot extends Entity implements IJsonBackedObject { * The Schools. * Read-only. Nullable. */ + @SerializedName("schools") + @Expose public EducationSchoolCollectionPage schools; /** * The Users. * Read-only. Nullable. */ + @SerializedName("users") + @Expose public EducationUserCollectionPage users; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Event.java b/src/main/java/com/microsoft/graph/models/extensions/Event.java index e132d72aa1d..271f42434db 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Event.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Event.java @@ -303,6 +303,14 @@ public class Event extends OutlookItem implements IJsonBackedObject { @Expose public String subject; + /** + * The Transaction Id. + * + */ + @SerializedName("transactionId") + @Expose + public String transactionId; + /** * The Type. * The event type. The possible values are: singleInstance, occurrence, exception, seriesMaster. Read-only. @@ -323,6 +331,8 @@ public class Event extends OutlookItem implements IJsonBackedObject { * The Attachments. * The collection of fileAttachment and itemAttachment attachments for the event. Navigation property. Read-only. Nullable. */ + @SerializedName("attachments") + @Expose public AttachmentCollectionPage attachments; /** @@ -337,24 +347,32 @@ public class Event extends OutlookItem implements IJsonBackedObject { * The Extensions. * The collection of open extensions defined for the event. Read-only. Nullable. */ + @SerializedName("extensions") + @Expose public ExtensionCollectionPage extensions; /** * The Instances. * The instances of the event. Navigation property. Read-only. Nullable. */ + @SerializedName("instances") + @Expose public EventCollectionPage instances; /** * The Multi Value Extended Properties. * The collection of multi-value extended properties defined for the event. Read-only. Nullable. */ + @SerializedName("multiValueExtendedProperties") + @Expose public MultiValueLegacyExtendedPropertyCollectionPage multiValueExtendedProperties; /** * The Single Value Extended Properties. * The collection of single-value extended properties defined for the event. Read-only. Nullable. */ + @SerializedName("singleValueExtendedProperties") + @Expose public SingleValueLegacyExtendedPropertyCollectionPage singleValueExtendedProperties; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Group.java b/src/main/java/com/microsoft/graph/models/extensions/Group.java index 3f2ac92dd38..2ebb8235278 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Group.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Group.java @@ -366,6 +366,8 @@ public class Group extends DirectoryObject implements IJsonBackedObject { * The App Role Assignments. * */ + @SerializedName("appRoleAssignments") + @Expose public AppRoleAssignmentCollectionPage appRoleAssignments; /** @@ -404,6 +406,8 @@ public class Group extends DirectoryObject implements IJsonBackedObject { * The Settings. * Read-only. Nullable. */ + @SerializedName("settings") + @Expose public GroupSettingCollectionPage settings; /** @@ -422,6 +426,8 @@ public class Group extends DirectoryObject implements IJsonBackedObject { * The Accepted Senders. * The list of users or groups that are allowed to create post's or calendar events in this group. If this list is non-empty then only users or groups listed here are allowed to post. */ + @SerializedName("acceptedSenders") + @Expose public DirectoryObjectCollectionPage acceptedSenders; /** @@ -436,18 +442,24 @@ public class Group extends DirectoryObject implements IJsonBackedObject { * The Calendar View. * The calendar view for the calendar. Read-only. */ + @SerializedName("calendarView") + @Expose public EventCollectionPage calendarView; /** * The Conversations. * The group's conversations. */ + @SerializedName("conversations") + @Expose public ConversationCollectionPage conversations; /** * The Events. * The group's calendar events. */ + @SerializedName("events") + @Expose public EventCollectionPage events; /** @@ -462,18 +474,24 @@ public class Group extends DirectoryObject implements IJsonBackedObject { * The Photos. * The profile photos owned by the group. Read-only. Nullable. */ + @SerializedName("photos") + @Expose public ProfilePhotoCollectionPage photos; /** * The Rejected Senders. * The list of users or groups that are not allowed to create posts or calendar events in this group. Nullable */ + @SerializedName("rejectedSenders") + @Expose public DirectoryObjectCollectionPage rejectedSenders; /** * The Threads. * The group's conversation threads. Nullable. */ + @SerializedName("threads") + @Expose public ConversationThreadCollectionPage threads; /** @@ -488,24 +506,32 @@ public class Group extends DirectoryObject implements IJsonBackedObject { * The Drives. * The group's drives. Read-only. */ + @SerializedName("drives") + @Expose public DriveCollectionPage drives; /** * The Sites. * The list of SharePoint sites in this group. Access the default site with /sites/root. */ + @SerializedName("sites") + @Expose public SiteCollectionPage sites; /** * The Extensions. * The collection of open extensions defined for the group. Read-only. Nullable. */ + @SerializedName("extensions") + @Expose public ExtensionCollectionPage extensions; /** * The Group Lifecycle Policies. * The collection of lifecycle policies for this group. Read-only. Nullable. */ + @SerializedName("groupLifecyclePolicies") + @Expose public GroupLifecyclePolicyCollectionPage groupLifecyclePolicies; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/InferenceClassification.java b/src/main/java/com/microsoft/graph/models/extensions/InferenceClassification.java index 7ee2be0aeaf..845da8bd440 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/InferenceClassification.java +++ b/src/main/java/com/microsoft/graph/models/extensions/InferenceClassification.java @@ -33,6 +33,8 @@ public class InferenceClassification extends Entity implements IJsonBackedObject * The Overrides. * A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable. */ + @SerializedName("overrides") + @Expose public InferenceClassificationOverrideCollectionPage overrides; diff --git a/src/main/java/com/microsoft/graph/models/extensions/InformationProtection.java b/src/main/java/com/microsoft/graph/models/extensions/InformationProtection.java index 669fe920931..6c4bab27311 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/InformationProtection.java +++ b/src/main/java/com/microsoft/graph/models/extensions/InformationProtection.java @@ -33,6 +33,8 @@ public class InformationProtection extends Entity implements IJsonBackedObject { * The Threat Assessment Requests. * */ + @SerializedName("threatAssessmentRequests") + @Expose public ThreatAssessmentRequestCollectionPage threatAssessmentRequests; diff --git a/src/main/java/com/microsoft/graph/models/extensions/IosManagedAppProtection.java b/src/main/java/com/microsoft/graph/models/extensions/IosManagedAppProtection.java index 56cabe6d26b..17e7c164a4e 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/IosManagedAppProtection.java +++ b/src/main/java/com/microsoft/graph/models/extensions/IosManagedAppProtection.java @@ -75,6 +75,8 @@ public class IosManagedAppProtection extends TargetedManagedAppProtection implem * The Apps. * List of apps to which the policy is deployed. */ + @SerializedName("apps") + @Expose public ManagedMobileAppCollectionPage apps; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/ItemActivityStat.java b/src/main/java/com/microsoft/graph/models/extensions/ItemActivityStat.java index 1914fedc1dc..a40d2abf93d 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ItemActivityStat.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ItemActivityStat.java @@ -107,6 +107,8 @@ public class ItemActivityStat extends Entity implements IJsonBackedObject { * The Activities. * Exposes the itemActivities represented in this itemActivityStat resource. */ + @SerializedName("activities") + @Expose public ItemActivityCollectionPage activities; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ItemAnalytics.java b/src/main/java/com/microsoft/graph/models/extensions/ItemAnalytics.java index 69054381deb..7a55feeae61 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ItemAnalytics.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ItemAnalytics.java @@ -41,6 +41,8 @@ public class ItemAnalytics extends Entity implements IJsonBackedObject { * The Item Activity Stats. * */ + @SerializedName("itemActivityStats") + @Expose public ItemActivityStatCollectionPage itemActivityStats; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/List.java b/src/main/java/com/microsoft/graph/models/extensions/List.java index 5ed7f08bcf7..8eaa7be8ce0 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/List.java +++ b/src/main/java/com/microsoft/graph/models/extensions/List.java @@ -78,12 +78,16 @@ public class List extends BaseItem implements IJsonBackedObject { * The Columns. * The collection of field definitions for this list. */ + @SerializedName("columns") + @Expose public ColumnDefinitionCollectionPage columns; /** * The Content Types. * The collection of content types present in this list. */ + @SerializedName("contentTypes") + @Expose public ContentTypeCollectionPage contentTypes; /** @@ -98,12 +102,16 @@ public class List extends BaseItem implements IJsonBackedObject { * The Items. * All items contained in the list. */ + @SerializedName("items") + @Expose public ListItemCollectionPage items; /** * The Subscriptions. * The set of subscriptions on the list. */ + @SerializedName("subscriptions") + @Expose public SubscriptionCollectionPage subscriptions; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ListItem.java b/src/main/java/com/microsoft/graph/models/extensions/ListItem.java index aab2c711fe3..3b1a41eaaad 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ListItem.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ListItem.java @@ -78,6 +78,8 @@ public class ListItem extends BaseItem implements IJsonBackedObject { * The Versions. * The list of previous versions of the list item. */ + @SerializedName("versions") + @Expose public ListItemVersionCollectionPage versions; diff --git a/src/main/java/com/microsoft/graph/models/extensions/MailFolder.java b/src/main/java/com/microsoft/graph/models/extensions/MailFolder.java index afd82f69659..797d2c8547a 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/MailFolder.java +++ b/src/main/java/com/microsoft/graph/models/extensions/MailFolder.java @@ -85,30 +85,40 @@ public class MailFolder extends Entity implements IJsonBackedObject { * The Child Folders. * The collection of child folders in the mailFolder. */ + @SerializedName("childFolders") + @Expose public MailFolderCollectionPage childFolders; /** * The Message Rules. * The collection of rules that apply to the user's Inbox folder. */ + @SerializedName("messageRules") + @Expose public MessageRuleCollectionPage messageRules; /** * The Messages. * The collection of messages in the mailFolder. */ + @SerializedName("messages") + @Expose public MessageCollectionPage messages; /** * The Multi Value Extended Properties. * The collection of multi-value extended properties defined for the mailFolder. Read-only. Nullable. */ + @SerializedName("multiValueExtendedProperties") + @Expose public MultiValueLegacyExtendedPropertyCollectionPage multiValueExtendedProperties; /** * The Single Value Extended Properties. * The collection of single-value extended properties defined for the mailFolder. Read-only. Nullable. */ + @SerializedName("singleValueExtendedProperties") + @Expose public SingleValueLegacyExtendedPropertyCollectionPage singleValueExtendedProperties; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ManagedAppRegistration.java b/src/main/java/com/microsoft/graph/models/extensions/ManagedAppRegistration.java index a40f4f632ff..504765f931c 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ManagedAppRegistration.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ManagedAppRegistration.java @@ -134,18 +134,24 @@ public class ManagedAppRegistration extends Entity implements IJsonBackedObject * The Applied Policies. * Zero or more policys already applied on the registered app when it last synchronized with managment service. */ + @SerializedName("appliedPolicies") + @Expose public ManagedAppPolicyCollectionPage appliedPolicies; /** * The Intended Policies. * Zero or more policies admin intended for the app as of now. */ + @SerializedName("intendedPolicies") + @Expose public ManagedAppPolicyCollectionPage intendedPolicies; /** * The Operations. * Zero or more long running operations triggered on the app registration. */ + @SerializedName("operations") + @Expose public ManagedAppOperationCollectionPage operations; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ManagedDevice.java b/src/main/java/com/microsoft/graph/models/extensions/ManagedDevice.java index 062b4995495..767dd6dc7fe 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ManagedDevice.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ManagedDevice.java @@ -416,12 +416,16 @@ public class ManagedDevice extends Entity implements IJsonBackedObject { * The Device Compliance Policy States. * Device compliance policy states for this device. */ + @SerializedName("deviceCompliancePolicyStates") + @Expose public DeviceCompliancePolicyStateCollectionPage deviceCompliancePolicyStates; /** * The Device Configuration States. * Device configuration states for this device. */ + @SerializedName("deviceConfigurationStates") + @Expose public DeviceConfigurationStateCollectionPage deviceConfigurationStates; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/ManagedDeviceMobileAppConfiguration.java b/src/main/java/com/microsoft/graph/models/extensions/ManagedDeviceMobileAppConfiguration.java index 3fc8e5fcb6b..447d744caf1 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ManagedDeviceMobileAppConfiguration.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ManagedDeviceMobileAppConfiguration.java @@ -89,12 +89,16 @@ public class ManagedDeviceMobileAppConfiguration extends Entity implements IJson * The Assignments. * The list of group assignemenets for app configration. */ + @SerializedName("assignments") + @Expose public ManagedDeviceMobileAppConfigurationAssignmentCollectionPage assignments; /** * The Device Statuses. * List of ManagedDeviceMobileAppConfigurationDeviceStatus. */ + @SerializedName("deviceStatuses") + @Expose public ManagedDeviceMobileAppConfigurationDeviceStatusCollectionPage deviceStatuses; /** @@ -109,6 +113,8 @@ public class ManagedDeviceMobileAppConfiguration extends Entity implements IJson * The User Statuses. * List of ManagedDeviceMobileAppConfigurationUserStatus. */ + @SerializedName("userStatuses") + @Expose public ManagedDeviceMobileAppConfigurationUserStatusCollectionPage userStatuses; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/ManagedEBook.java b/src/main/java/com/microsoft/graph/models/extensions/ManagedEBook.java index 7b3d4a1eba1..4a338621dab 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ManagedEBook.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ManagedEBook.java @@ -113,12 +113,16 @@ public class ManagedEBook extends Entity implements IJsonBackedObject { * The Assignments. * The list of assignments for this eBook. */ + @SerializedName("assignments") + @Expose public ManagedEBookAssignmentCollectionPage assignments; /** * The Device States. * The list of installation states for this eBook. */ + @SerializedName("deviceStates") + @Expose public DeviceInstallStateCollectionPage deviceStates; /** @@ -133,6 +137,8 @@ public class ManagedEBook extends Entity implements IJsonBackedObject { * The User State Summary. * The list of installation states for this eBook. */ + @SerializedName("userStateSummary") + @Expose public UserInstallStateSummaryCollectionPage userStateSummary; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ManagedMobileLobApp.java b/src/main/java/com/microsoft/graph/models/extensions/ManagedMobileLobApp.java index ca6a454909f..259dd0be70e 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ManagedMobileLobApp.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ManagedMobileLobApp.java @@ -57,6 +57,8 @@ public class ManagedMobileLobApp extends ManagedApp implements IJsonBackedObject * The Content Versions. * The list of content versions for this app. */ + @SerializedName("contentVersions") + @Expose public MobileAppContentCollectionPage contentVersions; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Message.java b/src/main/java/com/microsoft/graph/models/extensions/Message.java index 6f93086d29f..5f87f711e93 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Message.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Message.java @@ -256,24 +256,32 @@ public class Message extends OutlookItem implements IJsonBackedObject { * The Attachments. * The fileAttachment and itemAttachment attachments for the message. */ + @SerializedName("attachments") + @Expose public AttachmentCollectionPage attachments; /** * The Extensions. * The collection of open extensions defined for the message. Nullable. */ + @SerializedName("extensions") + @Expose public ExtensionCollectionPage extensions; /** * The Multi Value Extended Properties. * The collection of multi-value extended properties defined for the message. Nullable. */ + @SerializedName("multiValueExtendedProperties") + @Expose public MultiValueLegacyExtendedPropertyCollectionPage multiValueExtendedProperties; /** * The Single Value Extended Properties. * The collection of single-value extended properties defined for the message. Nullable. */ + @SerializedName("singleValueExtendedProperties") + @Expose public SingleValueLegacyExtendedPropertyCollectionPage singleValueExtendedProperties; diff --git a/src/main/java/com/microsoft/graph/models/extensions/MobileApp.java b/src/main/java/com/microsoft/graph/models/extensions/MobileApp.java index d816d110751..41bf9e90fe2 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/MobileApp.java +++ b/src/main/java/com/microsoft/graph/models/extensions/MobileApp.java @@ -142,6 +142,8 @@ public class MobileApp extends Entity implements IJsonBackedObject { * The Assignments. * The list of group assignments for this mobile app. */ + @SerializedName("assignments") + @Expose public MobileAppAssignmentCollectionPage assignments; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/MobileAppContent.java b/src/main/java/com/microsoft/graph/models/extensions/MobileAppContent.java index 4ab936e12ec..7850e5aefad 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/MobileAppContent.java +++ b/src/main/java/com/microsoft/graph/models/extensions/MobileAppContent.java @@ -33,6 +33,8 @@ public class MobileAppContent extends Entity implements IJsonBackedObject { * The Files. * The list of files for this app content version. */ + @SerializedName("files") + @Expose public MobileAppContentFileCollectionPage files; diff --git a/src/main/java/com/microsoft/graph/models/extensions/MobileLobApp.java b/src/main/java/com/microsoft/graph/models/extensions/MobileLobApp.java index 0055624fa7d..0410fad2503 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/MobileLobApp.java +++ b/src/main/java/com/microsoft/graph/models/extensions/MobileLobApp.java @@ -57,6 +57,8 @@ public class MobileLobApp extends MobileApp implements IJsonBackedObject { * The Content Versions. * The list of content versions for this app. */ + @SerializedName("contentVersions") + @Expose public MobileAppContentCollectionPage contentVersions; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Notebook.java b/src/main/java/com/microsoft/graph/models/extensions/Notebook.java index 9446ce7c82d..7038b1ff8dc 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Notebook.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Notebook.java @@ -86,12 +86,16 @@ public class Notebook extends OnenoteEntityHierarchyModel implements IJsonBacked * The Section Groups. * The section groups in the notebook. Read-only. Nullable. */ + @SerializedName("sectionGroups") + @Expose public SectionGroupCollectionPage sectionGroups; /** * The Sections. * The sections in the notebook. Read-only. Nullable. */ + @SerializedName("sections") + @Expose public OnenoteSectionCollectionPage sections; diff --git a/src/main/java/com/microsoft/graph/models/extensions/NotificationMessageTemplate.java b/src/main/java/com/microsoft/graph/models/extensions/NotificationMessageTemplate.java index b9a95612e98..95b6aa07c00 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/NotificationMessageTemplate.java +++ b/src/main/java/com/microsoft/graph/models/extensions/NotificationMessageTemplate.java @@ -66,6 +66,8 @@ public class NotificationMessageTemplate extends Entity implements IJsonBackedOb * The Localized Notification Messages. * The list of localized messages for this Notification Message Template. */ + @SerializedName("localizedNotificationMessages") + @Expose public LocalizedNotificationMessageCollectionPage localizedNotificationMessages; diff --git a/src/main/java/com/microsoft/graph/models/extensions/OfficeGraphInsights.java b/src/main/java/com/microsoft/graph/models/extensions/OfficeGraphInsights.java index 6248dac666b..f0c3ef0174a 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/OfficeGraphInsights.java +++ b/src/main/java/com/microsoft/graph/models/extensions/OfficeGraphInsights.java @@ -39,18 +39,24 @@ public class OfficeGraphInsights extends Entity implements IJsonBackedObject { * The Shared. * Calculated relationship identifying documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for Business and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. */ + @SerializedName("shared") + @Expose public SharedInsightCollectionPage shared; /** * The Trending. * Calculated relationship identifying documents trending around a user. Trending documents are calculated based on activity of the user's closest network of people and include files stored in OneDrive for Business and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. */ + @SerializedName("trending") + @Expose public TrendingCollectionPage trending; /** * The Used. * Calculated relationship identifying the latest documents viewed or modified by a user, including OneDrive for Business and SharePoint documents, ranked by recency of use. */ + @SerializedName("used") + @Expose public UsedInsightCollectionPage used; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Onenote.java b/src/main/java/com/microsoft/graph/models/extensions/Onenote.java index d2fe1833828..ef5c7d0c810 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Onenote.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Onenote.java @@ -48,36 +48,48 @@ public class Onenote extends Entity implements IJsonBackedObject { * The Notebooks. * The collection of OneNote notebooks that are owned by the user or group. Read-only. Nullable. */ + @SerializedName("notebooks") + @Expose public NotebookCollectionPage notebooks; /** * The Operations. * The status of OneNote operations. Getting an operations collection is not supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable. */ + @SerializedName("operations") + @Expose public OnenoteOperationCollectionPage operations; /** * The Pages. * The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. */ + @SerializedName("pages") + @Expose public OnenotePageCollectionPage pages; /** * The Resources. * The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. */ + @SerializedName("resources") + @Expose public OnenoteResourceCollectionPage resources; /** * The Section Groups. * The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. */ + @SerializedName("sectionGroups") + @Expose public SectionGroupCollectionPage sectionGroups; /** * The Sections. * The sections in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. */ + @SerializedName("sections") + @Expose public OnenoteSectionCollectionPage sections; diff --git a/src/main/java/com/microsoft/graph/models/extensions/OnenoteSection.java b/src/main/java/com/microsoft/graph/models/extensions/OnenoteSection.java index 9468972b0a3..e2e2ebf71bb 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/OnenoteSection.java +++ b/src/main/java/com/microsoft/graph/models/extensions/OnenoteSection.java @@ -60,6 +60,8 @@ public class OnenoteSection extends OnenoteEntityHierarchyModel implements IJson * The Pages. * The collection of pages in the section. Read-only. Nullable. */ + @SerializedName("pages") + @Expose public OnenotePageCollectionPage pages; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/Organization.java b/src/main/java/com/microsoft/graph/models/extensions/Organization.java index 7d3f74d505a..53ba22ba2c9 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Organization.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Organization.java @@ -223,6 +223,8 @@ public class Organization extends DirectoryObject implements IJsonBackedObject { * The Extensions. * The collection of open extensions defined for the organization. Read-only. Nullable. */ + @SerializedName("extensions") + @Expose public ExtensionCollectionPage extensions; diff --git a/src/main/java/com/microsoft/graph/models/extensions/OutlookUser.java b/src/main/java/com/microsoft/graph/models/extensions/OutlookUser.java index 937f812450d..262299533ca 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/OutlookUser.java +++ b/src/main/java/com/microsoft/graph/models/extensions/OutlookUser.java @@ -33,6 +33,8 @@ public class OutlookUser extends Entity implements IJsonBackedObject { * The Master Categories. * A list of categories defined for the user. */ + @SerializedName("masterCategories") + @Expose public OutlookCategoryCollectionPage masterCategories; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Planner.java b/src/main/java/com/microsoft/graph/models/extensions/Planner.java index 2412f9e2220..7db97e4cbd5 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Planner.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Planner.java @@ -39,18 +39,24 @@ public class Planner extends Entity implements IJsonBackedObject { * The Buckets. * Read-only. Nullable. Returns a collection of the specified buckets */ + @SerializedName("buckets") + @Expose public PlannerBucketCollectionPage buckets; /** * The Plans. * Read-only. Nullable. Returns a collection of the specified plans */ + @SerializedName("plans") + @Expose public PlannerPlanCollectionPage plans; /** * The Tasks. * Read-only. Nullable. Returns a collection of the specified tasks */ + @SerializedName("tasks") + @Expose public PlannerTaskCollectionPage tasks; diff --git a/src/main/java/com/microsoft/graph/models/extensions/PlannerBucket.java b/src/main/java/com/microsoft/graph/models/extensions/PlannerBucket.java index 66e22063402..f0ec896dc7d 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/PlannerBucket.java +++ b/src/main/java/com/microsoft/graph/models/extensions/PlannerBucket.java @@ -57,6 +57,8 @@ public class PlannerBucket extends Entity implements IJsonBackedObject { * The Tasks. * Read-only. Nullable. The collection of tasks in the bucket. */ + @SerializedName("tasks") + @Expose public PlannerTaskCollectionPage tasks; diff --git a/src/main/java/com/microsoft/graph/models/extensions/PlannerGroup.java b/src/main/java/com/microsoft/graph/models/extensions/PlannerGroup.java index 7c288091912..ae75f5f4c02 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/PlannerGroup.java +++ b/src/main/java/com/microsoft/graph/models/extensions/PlannerGroup.java @@ -33,6 +33,8 @@ public class PlannerGroup extends Entity implements IJsonBackedObject { * The Plans. * Read-only. Nullable. Returns the plannerPlans owned by the group. */ + @SerializedName("plans") + @Expose public PlannerPlanCollectionPage plans; diff --git a/src/main/java/com/microsoft/graph/models/extensions/PlannerPlan.java b/src/main/java/com/microsoft/graph/models/extensions/PlannerPlan.java index 8378857dd3f..e613910bf67 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/PlannerPlan.java +++ b/src/main/java/com/microsoft/graph/models/extensions/PlannerPlan.java @@ -70,6 +70,8 @@ public class PlannerPlan extends Entity implements IJsonBackedObject { * The Buckets. * Read-only. Nullable. Collection of buckets in the plan. */ + @SerializedName("buckets") + @Expose public PlannerBucketCollectionPage buckets; /** @@ -84,6 +86,8 @@ public class PlannerPlan extends Entity implements IJsonBackedObject { * The Tasks. * Read-only. Nullable. Collection of tasks in the plan. */ + @SerializedName("tasks") + @Expose public PlannerTaskCollectionPage tasks; diff --git a/src/main/java/com/microsoft/graph/models/extensions/PlannerUser.java b/src/main/java/com/microsoft/graph/models/extensions/PlannerUser.java index 19e254e9d45..16d94a516de 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/PlannerUser.java +++ b/src/main/java/com/microsoft/graph/models/extensions/PlannerUser.java @@ -36,12 +36,16 @@ public class PlannerUser extends Entity implements IJsonBackedObject { * The Plans. * Read-only. Nullable. Returns the plannerTasks assigned to the user. */ + @SerializedName("plans") + @Expose public PlannerPlanCollectionPage plans; /** * The Tasks. * Read-only. Nullable. Returns the plannerPlans shared with the user. */ + @SerializedName("tasks") + @Expose public PlannerTaskCollectionPage tasks; diff --git a/src/main/java/com/microsoft/graph/models/extensions/PolicyRoot.java b/src/main/java/com/microsoft/graph/models/extensions/PolicyRoot.java index 1da83e3f966..fda0d9ce6b4 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/PolicyRoot.java +++ b/src/main/java/com/microsoft/graph/models/extensions/PolicyRoot.java @@ -49,36 +49,48 @@ public class PolicyRoot extends Entity implements IJsonBackedObject { * The Activity Based Timeout Policies. * */ + @SerializedName("activityBasedTimeoutPolicies") + @Expose public ActivityBasedTimeoutPolicyCollectionPage activityBasedTimeoutPolicies; /** * The Claims Mapping Policies. * */ + @SerializedName("claimsMappingPolicies") + @Expose public ClaimsMappingPolicyCollectionPage claimsMappingPolicies; /** * The Home Realm Discovery Policies. * */ + @SerializedName("homeRealmDiscoveryPolicies") + @Expose public HomeRealmDiscoveryPolicyCollectionPage homeRealmDiscoveryPolicies; /** * The Token Issuance Policies. * */ + @SerializedName("tokenIssuancePolicies") + @Expose public TokenIssuancePolicyCollectionPage tokenIssuancePolicies; /** * The Token Lifetime Policies. * */ + @SerializedName("tokenLifetimePolicies") + @Expose public TokenLifetimePolicyCollectionPage tokenLifetimePolicies; /** * The Conditional Access Policies. * */ + @SerializedName("conditionalAccessPolicies") + @Expose public ConditionalAccessPolicyCollectionPage conditionalAccessPolicies; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/Post.java b/src/main/java/com/microsoft/graph/models/extensions/Post.java index f98f8321f4c..201447ed635 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Post.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Post.java @@ -109,12 +109,16 @@ public class Post extends OutlookItem implements IJsonBackedObject { * The Attachments. * Read-only. Nullable. */ + @SerializedName("attachments") + @Expose public AttachmentCollectionPage attachments; /** * The Extensions. * The collection of open extensions defined for the post. Read-only. Nullable. */ + @SerializedName("extensions") + @Expose public ExtensionCollectionPage extensions; /** @@ -129,12 +133,16 @@ public class Post extends OutlookItem implements IJsonBackedObject { * The Multi Value Extended Properties. * The collection of multi-value extended properties defined for the post. Read-only. Nullable. */ + @SerializedName("multiValueExtendedProperties") + @Expose public MultiValueLegacyExtendedPropertyCollectionPage multiValueExtendedProperties; /** * The Single Value Extended Properties. * The collection of single-value extended properties defined for the post. Read-only. Nullable. */ + @SerializedName("singleValueExtendedProperties") + @Expose public SingleValueLegacyExtendedPropertyCollectionPage singleValueExtendedProperties; diff --git a/src/main/java/com/microsoft/graph/models/extensions/RoleDefinition.java b/src/main/java/com/microsoft/graph/models/extensions/RoleDefinition.java index aa5b373fd10..c5b0183066e 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/RoleDefinition.java +++ b/src/main/java/com/microsoft/graph/models/extensions/RoleDefinition.java @@ -66,6 +66,8 @@ public class RoleDefinition extends Entity implements IJsonBackedObject { * The Role Assignments. * List of Role assignments for this role definition. */ + @SerializedName("roleAssignments") + @Expose public RoleAssignmentCollectionPage roleAssignments; diff --git a/src/main/java/com/microsoft/graph/models/extensions/RoomList.java b/src/main/java/com/microsoft/graph/models/extensions/RoomList.java index a44121fe4b0..7f11a8adbfa 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/RoomList.java +++ b/src/main/java/com/microsoft/graph/models/extensions/RoomList.java @@ -41,6 +41,8 @@ public class RoomList extends Place implements IJsonBackedObject { * The Rooms. * Read-only. Nullable. */ + @SerializedName("rooms") + @Expose public RoomCollectionPage rooms; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Schedule.java b/src/main/java/com/microsoft/graph/models/extensions/Schedule.java index 319c879a560..898d3330bf0 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Schedule.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Schedule.java @@ -138,54 +138,72 @@ public class Schedule extends Entity implements IJsonBackedObject { * The Offer Shift Requests. * */ + @SerializedName("offerShiftRequests") + @Expose public OfferShiftRequestCollectionPage offerShiftRequests; /** * The Open Shift Change Requests. * */ + @SerializedName("openShiftChangeRequests") + @Expose public OpenShiftChangeRequestCollectionPage openShiftChangeRequests; /** * The Open Shifts. * */ + @SerializedName("openShifts") + @Expose public OpenShiftCollectionPage openShifts; /** * The Scheduling Groups. * The logical grouping of users in the schedule (usually by role). */ + @SerializedName("schedulingGroups") + @Expose public SchedulingGroupCollectionPage schedulingGroups; /** * The Shifts. * The shifts in the schedule. */ + @SerializedName("shifts") + @Expose public ShiftCollectionPage shifts; /** * The Swap Shifts Change Requests. * */ + @SerializedName("swapShiftsChangeRequests") + @Expose public SwapShiftsChangeRequestCollectionPage swapShiftsChangeRequests; /** * The Time Off Reasons. * The set of reasons for a time off in the schedule. */ + @SerializedName("timeOffReasons") + @Expose public TimeOffReasonCollectionPage timeOffReasons; /** * The Time Off Requests. * */ + @SerializedName("timeOffRequests") + @Expose public TimeOffRequestCollectionPage timeOffRequests; /** * The Times Off. * The instances of times off in the schedule. */ + @SerializedName("timesOff") + @Expose public TimeOffCollectionPage timesOff; diff --git a/src/main/java/com/microsoft/graph/models/extensions/SectionGroup.java b/src/main/java/com/microsoft/graph/models/extensions/SectionGroup.java index 3db43ac7b84..78adb05d154 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/SectionGroup.java +++ b/src/main/java/com/microsoft/graph/models/extensions/SectionGroup.java @@ -69,12 +69,16 @@ public class SectionGroup extends OnenoteEntityHierarchyModel implements IJsonBa * The Section Groups. * The section groups in the section. Read-only. Nullable. */ + @SerializedName("sectionGroups") + @Expose public SectionGroupCollectionPage sectionGroups; /** * The Sections. * The sections in the section group. Read-only. Nullable. */ + @SerializedName("sections") + @Expose public OnenoteSectionCollectionPage sections; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Security.java b/src/main/java/com/microsoft/graph/models/extensions/Security.java index e7af6da324e..465facf023a 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Security.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Security.java @@ -39,18 +39,24 @@ public class Security extends Entity implements IJsonBackedObject { * The Alerts. * Read-only. Nullable. */ + @SerializedName("alerts") + @Expose public AlertCollectionPage alerts; /** * The Secure Score Control Profiles. * */ + @SerializedName("secureScoreControlProfiles") + @Expose public SecureScoreControlProfileCollectionPage secureScoreControlProfiles; /** * The Secure Scores. * */ + @SerializedName("secureScores") + @Expose public SecureScoreCollectionPage secureScores; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ServicePrincipal.java b/src/main/java/com/microsoft/graph/models/extensions/ServicePrincipal.java index b5a13473780..595439dab94 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ServicePrincipal.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ServicePrincipal.java @@ -292,12 +292,16 @@ public class ServicePrincipal extends DirectoryObject implements IJsonBackedObje * The App Role Assigned To. * Principals (users, groups, and service principals) that are assigned to this service principal. Read-only. */ + @SerializedName("appRoleAssignedTo") + @Expose public AppRoleAssignmentCollectionPage appRoleAssignedTo; /** * The App Role Assignments. * Applications that this service principal is assigned to. Read-only. Nullable. */ + @SerializedName("appRoleAssignments") + @Expose public AppRoleAssignmentCollectionPage appRoleAssignments; /** @@ -316,6 +320,8 @@ public class ServicePrincipal extends DirectoryObject implements IJsonBackedObje * The Endpoints. * Endpoints available for discovery. Services like Sharepoint populate this property with a tenant specific SharePoint endpoints that other applications can discover and use in their experiences. */ + @SerializedName("endpoints") + @Expose public EndpointCollectionPage endpoints; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/SharedDriveItem.java b/src/main/java/com/microsoft/graph/models/extensions/SharedDriveItem.java index 16686a9a59b..ff15239503b 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/SharedDriveItem.java +++ b/src/main/java/com/microsoft/graph/models/extensions/SharedDriveItem.java @@ -54,6 +54,8 @@ public class SharedDriveItem extends BaseItem implements IJsonBackedObject { * The Items. * All driveItems contained in the sharing root. This collection cannot be enumerated. */ + @SerializedName("items") + @Expose public DriveItemCollectionPage items; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/Site.java b/src/main/java/com/microsoft/graph/models/extensions/Site.java index b15ddc2a97c..8c06ea1115f 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Site.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Site.java @@ -101,12 +101,16 @@ public class Site extends BaseItem implements IJsonBackedObject { * The Columns. * The collection of column definitions reusable across lists under this site. */ + @SerializedName("columns") + @Expose public ColumnDefinitionCollectionPage columns; /** * The Content Types. * The collection of content types defined for this site. */ + @SerializedName("contentTypes") + @Expose public ContentTypeCollectionPage contentTypes; /** @@ -121,24 +125,32 @@ public class Site extends BaseItem implements IJsonBackedObject { * The Drives. * The collection of drives (document libraries) under this site. */ + @SerializedName("drives") + @Expose public DriveCollectionPage drives; /** * The Items. * Used to address any item contained in this site. This collection cannot be enumerated. */ + @SerializedName("items") + @Expose public BaseItemCollectionPage items; /** * The Lists. * The collection of lists under this site. */ + @SerializedName("lists") + @Expose public ListCollectionPage lists; /** * The Sites. * The collection of the sub-sites under this site. */ + @SerializedName("sites") + @Expose public SiteCollectionPage sites; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/TargetedManagedAppConfiguration.java b/src/main/java/com/microsoft/graph/models/extensions/TargetedManagedAppConfiguration.java index 341609701c1..f1b60a384e5 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/TargetedManagedAppConfiguration.java +++ b/src/main/java/com/microsoft/graph/models/extensions/TargetedManagedAppConfiguration.java @@ -53,12 +53,16 @@ public class TargetedManagedAppConfiguration extends ManagedAppConfiguration imp * The Apps. * List of apps to which the policy is deployed. */ + @SerializedName("apps") + @Expose public ManagedMobileAppCollectionPage apps; /** * The Assignments. * Navigation property to list of inclusion and exclusion groups to which the policy is deployed. */ + @SerializedName("assignments") + @Expose public TargetedManagedAppPolicyAssignmentCollectionPage assignments; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/TargetedManagedAppProtection.java b/src/main/java/com/microsoft/graph/models/extensions/TargetedManagedAppProtection.java index b157972cd56..d978003b4d2 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/TargetedManagedAppProtection.java +++ b/src/main/java/com/microsoft/graph/models/extensions/TargetedManagedAppProtection.java @@ -41,6 +41,8 @@ public class TargetedManagedAppProtection extends ManagedAppProtection implement * The Assignments. * Navigation property to list of inclusion and exclusion groups to which the policy is deployed. */ + @SerializedName("assignments") + @Expose public TargetedManagedAppPolicyAssignmentCollectionPage assignments; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Team.java b/src/main/java/com/microsoft/graph/models/extensions/Team.java index 28f83fb36aa..41cbddd2e5d 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Team.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Team.java @@ -129,7 +129,7 @@ public class Team extends Entity implements IJsonBackedObject { /** * The Visibility. - * The visibility of a the group and team. Defaults to Public. + * The visibility of the group and team. Defaults to Public. */ @SerializedName("visibility") @Expose @@ -155,6 +155,8 @@ public class Team extends Entity implements IJsonBackedObject { * The Channels. * The collection of channels & messages associated with the team. */ + @SerializedName("channels") + @Expose public ChannelCollectionPage channels; /** @@ -169,18 +171,24 @@ public class Team extends Entity implements IJsonBackedObject { * The Installed Apps. * The apps installed in this team. */ + @SerializedName("installedApps") + @Expose public TeamsAppInstallationCollectionPage installedApps; /** * The Members. * Members and owners of the team. */ + @SerializedName("members") + @Expose public ConversationMemberCollectionPage members; /** * The Operations. * The async operations that ran or are running on this team. */ + @SerializedName("operations") + @Expose public TeamsAsyncOperationCollectionPage operations; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/TeamsApp.java b/src/main/java/com/microsoft/graph/models/extensions/TeamsApp.java index 27fc9643848..358a90e2bb5 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/TeamsApp.java +++ b/src/main/java/com/microsoft/graph/models/extensions/TeamsApp.java @@ -58,6 +58,8 @@ public class TeamsApp extends Entity implements IJsonBackedObject { * The App Definitions. * The details for each version of the app. */ + @SerializedName("appDefinitions") + @Expose public TeamsAppDefinitionCollectionPage appDefinitions; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Teamwork.java b/src/main/java/com/microsoft/graph/models/extensions/Teamwork.java index 35fcbc8965c..daf1705114b 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Teamwork.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Teamwork.java @@ -33,6 +33,8 @@ public class Teamwork extends Entity implements IJsonBackedObject { * The Workforce Integrations. * */ + @SerializedName("workforceIntegrations") + @Expose public WorkforceIntegrationCollectionPage workforceIntegrations; diff --git a/src/main/java/com/microsoft/graph/models/extensions/TermsAndConditions.java b/src/main/java/com/microsoft/graph/models/extensions/TermsAndConditions.java index d6467161ec2..7cf7e9b562d 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/TermsAndConditions.java +++ b/src/main/java/com/microsoft/graph/models/extensions/TermsAndConditions.java @@ -100,12 +100,16 @@ public class TermsAndConditions extends Entity implements IJsonBackedObject { * The Acceptance Statuses. * The list of acceptance statuses for this T&C policy. */ + @SerializedName("acceptanceStatuses") + @Expose public TermsAndConditionsAcceptanceStatusCollectionPage acceptanceStatuses; /** * The Assignments. * The list of assignments for this T&C policy. */ + @SerializedName("assignments") + @Expose public TermsAndConditionsAssignmentCollectionPage assignments; diff --git a/src/main/java/com/microsoft/graph/models/extensions/ThreatAssessmentRequest.java b/src/main/java/com/microsoft/graph/models/extensions/ThreatAssessmentRequest.java index 19c814d315b..8c74da95aea 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/ThreatAssessmentRequest.java +++ b/src/main/java/com/microsoft/graph/models/extensions/ThreatAssessmentRequest.java @@ -95,6 +95,8 @@ public class ThreatAssessmentRequest extends Entity implements IJsonBackedObject * The Results. * A collection of threat assessment results. Read-only. By default, a GET /threatAssessmentRequests/{id} does not return this property unless you apply $expand on it. */ + @SerializedName("results") + @Expose public ThreatAssessmentResultCollectionPage results; diff --git a/src/main/java/com/microsoft/graph/models/extensions/User.java b/src/main/java/com/microsoft/graph/models/extensions/User.java index 244d7218b66..4f83d1dcd8c 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/User.java +++ b/src/main/java/com/microsoft/graph/models/extensions/User.java @@ -156,7 +156,7 @@ public class User extends DirectoryObject implements IJsonBackedObject { /** * The Company Name. - * The company name which the user is associated. This property can be useful for describing the company that an external user comes from. + * The company name which the user is associated. This property can be useful for describing the company that an external user comes from. The maximum length of the company name is 64 chararcters.Returned only on $select. */ @SerializedName("companyName") @Expose @@ -178,6 +178,14 @@ public class User extends DirectoryObject implements IJsonBackedObject { @Expose public String country; + /** + * The Created Date Time. + * The created date of the user object. + */ + @SerializedName("createdDateTime") + @Expose + public java.util.Calendar createdDateTime; + /** * The Creation Type. * Indicates whether the user account was created as a regular school or work account (null), an external account (Invitation), a local account for an Azure Active Directory B2C tenant (LocalAccount) or self-service sign-up using email verification (EmailVerified). Read-only. @@ -300,7 +308,7 @@ public class User extends DirectoryObject implements IJsonBackedObject { /** * The Mail. - * The SMTP address for the user, for example, 'jeff@contoso.onmicrosoft.com'. Read-Only. Supports $filter. + * The SMTP address for the user, for example, 'jeff@contoso.onmicrosoft.com'. Supports $filter. */ @SerializedName("mail") @Expose @@ -630,6 +638,8 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The App Role Assignments. * */ + @SerializedName("appRoleAssignments") + @Expose public AppRoleAssignmentCollectionPage appRoleAssignments; /** @@ -648,6 +658,8 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The License Details. * A collection of this user's license details. Read-only. */ + @SerializedName("licenseDetails") + @Expose public LicenseDetailsCollectionPage licenseDetails; /** @@ -706,36 +718,48 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The Calendar Groups. * The user's calendar groups. Read-only. Nullable. */ + @SerializedName("calendarGroups") + @Expose public CalendarGroupCollectionPage calendarGroups; /** * The Calendars. * The user's calendars. Read-only. Nullable. */ + @SerializedName("calendars") + @Expose public CalendarCollectionPage calendars; /** * The Calendar View. * The calendar view for the calendar. Read-only. Nullable. */ + @SerializedName("calendarView") + @Expose public EventCollectionPage calendarView; /** * The Contact Folders. * The user's contacts folders. Read-only. Nullable. */ + @SerializedName("contactFolders") + @Expose public ContactFolderCollectionPage contactFolders; /** * The Contacts. * The user's contacts. Read-only. Nullable. */ + @SerializedName("contacts") + @Expose public ContactCollectionPage contacts; /** * The Events. * The user's events. Default is to show Events under the Default Calendar. Read-only. Nullable. */ + @SerializedName("events") + @Expose public EventCollectionPage events; /** @@ -750,12 +774,16 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The Mail Folders. * The user's mail folders. Read-only. Nullable. */ + @SerializedName("mailFolders") + @Expose public MailFolderCollectionPage mailFolders; /** * The Messages. * The messages in a mailbox or folder. Read-only. Nullable. */ + @SerializedName("messages") + @Expose public MessageCollectionPage messages; /** @@ -770,6 +798,8 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The People. * People that are relevant to the user. Read-only. Nullable. */ + @SerializedName("people") + @Expose public PersonCollectionPage people; /** @@ -784,6 +814,8 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The Photos. * */ + @SerializedName("photos") + @Expose public ProfilePhotoCollectionPage photos; /** @@ -798,6 +830,8 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The Drives. * A collection of drives available for this user. Read-only. */ + @SerializedName("drives") + @Expose public DriveCollectionPage drives; /** @@ -810,12 +844,16 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The Extensions. * The collection of open extensions defined for the user. Read-only. Nullable. */ + @SerializedName("extensions") + @Expose public ExtensionCollectionPage extensions; /** * The Managed Devices. * The managed devices associated with the user. */ + @SerializedName("managedDevices") + @Expose public ManagedDeviceCollectionPage managedDevices; /** @@ -828,6 +866,8 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The Device Management Troubleshooting Events. * The list of troubleshooting events for this user. */ + @SerializedName("deviceManagementTroubleshootingEvents") + @Expose public DeviceManagementTroubleshootingEventCollectionPage deviceManagementTroubleshootingEvents; /** @@ -866,18 +906,24 @@ public class User extends DirectoryObject implements IJsonBackedObject { * The Activities. * The user's activities across devices. Read-only. Nullable. */ + @SerializedName("activities") + @Expose public UserActivityCollectionPage activities; /** * The Online Meetings. * */ + @SerializedName("onlineMeetings") + @Expose public OnlineMeetingCollectionPage onlineMeetings; /** * The Joined Teams. * */ + @SerializedName("joinedTeams") + @Expose public TeamCollectionPage joinedTeams; diff --git a/src/main/java/com/microsoft/graph/models/extensions/UserActivity.java b/src/main/java/com/microsoft/graph/models/extensions/UserActivity.java index 0c5b47c89e2..bd8bd3b29f8 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/UserActivity.java +++ b/src/main/java/com/microsoft/graph/models/extensions/UserActivity.java @@ -139,6 +139,8 @@ public class UserActivity extends Entity implements IJsonBackedObject { * The History Items. * Optional. NavigationProperty/Containment; navigation property to the activity's historyItems. */ + @SerializedName("historyItems") + @Expose public ActivityHistoryItemCollectionPage historyItems; diff --git a/src/main/java/com/microsoft/graph/models/extensions/UserInstallStateSummary.java b/src/main/java/com/microsoft/graph/models/extensions/UserInstallStateSummary.java index 80d99cfd3ec..36c48e09326 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/UserInstallStateSummary.java +++ b/src/main/java/com/microsoft/graph/models/extensions/UserInstallStateSummary.java @@ -65,6 +65,8 @@ public class UserInstallStateSummary extends Entity implements IJsonBackedObject * The Device States. * The install state of the eBook. */ + @SerializedName("deviceStates") + @Expose public DeviceInstallStateCollectionPage deviceStates; diff --git a/src/main/java/com/microsoft/graph/models/extensions/WindowsInformationProtection.java b/src/main/java/com/microsoft/graph/models/extensions/WindowsInformationProtection.java index 3cff9bba507..b7e1469fd3c 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/WindowsInformationProtection.java +++ b/src/main/java/com/microsoft/graph/models/extensions/WindowsInformationProtection.java @@ -218,18 +218,24 @@ public class WindowsInformationProtection extends ManagedAppPolicy implements IJ * The Assignments. * Navigation property to list of security groups targeted for policy. */ + @SerializedName("assignments") + @Expose public TargetedManagedAppPolicyAssignmentCollectionPage assignments; /** * The Exempt App Locker Files. * Another way to input exempt apps through xml files */ + @SerializedName("exemptAppLockerFiles") + @Expose public WindowsInformationProtectionAppLockerFileCollectionPage exemptAppLockerFiles; /** * The Protected App Locker Files. * Another way to input protected apps through xml files */ + @SerializedName("protectedAppLockerFiles") + @Expose public WindowsInformationProtectionAppLockerFileCollectionPage protectedAppLockerFiles; diff --git a/src/main/java/com/microsoft/graph/models/extensions/Workbook.java b/src/main/java/com/microsoft/graph/models/extensions/Workbook.java index f56a4f5768d..ade99ea72e9 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/Workbook.java +++ b/src/main/java/com/microsoft/graph/models/extensions/Workbook.java @@ -55,6 +55,8 @@ public class Workbook extends Entity implements IJsonBackedObject { * The Comments. * */ + @SerializedName("comments") + @Expose public WorkbookCommentCollectionPage comments; /** @@ -69,24 +71,32 @@ public class Workbook extends Entity implements IJsonBackedObject { * The Names. * Represents a collection of workbook scoped named items (named ranges and constants). Read-only. */ + @SerializedName("names") + @Expose public WorkbookNamedItemCollectionPage names; /** * The Operations. * The status of workbook operations. Getting an operation collection is not supported, but you can get the status of a long-running operation if the Location header is returned in the response. Read-only. */ + @SerializedName("operations") + @Expose public WorkbookOperationCollectionPage operations; /** * The Tables. * Represents a collection of tables associated with the workbook. Read-only. */ + @SerializedName("tables") + @Expose public WorkbookTableCollectionPage tables; /** * The Worksheets. * Represents a collection of worksheets associated with the workbook. Read-only. */ + @SerializedName("worksheets") + @Expose public WorkbookWorksheetCollectionPage worksheets; diff --git a/src/main/java/com/microsoft/graph/models/extensions/WorkbookChart.java b/src/main/java/com/microsoft/graph/models/extensions/WorkbookChart.java index 844f878b98f..96712bcdbe5 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/WorkbookChart.java +++ b/src/main/java/com/microsoft/graph/models/extensions/WorkbookChart.java @@ -111,6 +111,8 @@ public class WorkbookChart extends Entity implements IJsonBackedObject { * The Series. * Represents either a single series or collection of series in the chart. Read-only. */ + @SerializedName("series") + @Expose public WorkbookChartSeriesCollectionPage series; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/WorkbookChartSeries.java b/src/main/java/com/microsoft/graph/models/extensions/WorkbookChartSeries.java index 4eafe0ebe2b..bafff03c9f2 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/WorkbookChartSeries.java +++ b/src/main/java/com/microsoft/graph/models/extensions/WorkbookChartSeries.java @@ -50,6 +50,8 @@ public class WorkbookChartSeries extends Entity implements IJsonBackedObject { * The Points. * Represents a collection of all points in the series. Read-only. */ + @SerializedName("points") + @Expose public WorkbookChartPointCollectionPage points; diff --git a/src/main/java/com/microsoft/graph/models/extensions/WorkbookComment.java b/src/main/java/com/microsoft/graph/models/extensions/WorkbookComment.java index dee1ec11d1d..1c063166106 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/WorkbookComment.java +++ b/src/main/java/com/microsoft/graph/models/extensions/WorkbookComment.java @@ -49,6 +49,8 @@ public class WorkbookComment extends Entity implements IJsonBackedObject { * The Replies. * Read-only. Nullable. */ + @SerializedName("replies") + @Expose public WorkbookCommentReplyCollectionPage replies; diff --git a/src/main/java/com/microsoft/graph/models/extensions/WorkbookRangeFormat.java b/src/main/java/com/microsoft/graph/models/extensions/WorkbookRangeFormat.java index 442af73ac05..e616c8514af 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/WorkbookRangeFormat.java +++ b/src/main/java/com/microsoft/graph/models/extensions/WorkbookRangeFormat.java @@ -76,6 +76,8 @@ public class WorkbookRangeFormat extends Entity implements IJsonBackedObject { * The Borders. * Collection of border objects that apply to the overall range selected Read-only. */ + @SerializedName("borders") + @Expose public WorkbookRangeBorderCollectionPage borders; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/WorkbookRangeView.java b/src/main/java/com/microsoft/graph/models/extensions/WorkbookRangeView.java index 1d63da9a7ed..bc409665a4f 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/WorkbookRangeView.java +++ b/src/main/java/com/microsoft/graph/models/extensions/WorkbookRangeView.java @@ -121,6 +121,8 @@ public class WorkbookRangeView extends Entity implements IJsonBackedObject { * The Rows. * Represents a collection of range views associated with the range. Read-only. Read-only. */ + @SerializedName("rows") + @Expose public WorkbookRangeViewCollectionPage rows; diff --git a/src/main/java/com/microsoft/graph/models/extensions/WorkbookTable.java b/src/main/java/com/microsoft/graph/models/extensions/WorkbookTable.java index 02dc143cadf..06bb7d08018 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/WorkbookTable.java +++ b/src/main/java/com/microsoft/graph/models/extensions/WorkbookTable.java @@ -118,12 +118,16 @@ public class WorkbookTable extends Entity implements IJsonBackedObject { * The Columns. * Represents a collection of all the columns in the table. Read-only. */ + @SerializedName("columns") + @Expose public WorkbookTableColumnCollectionPage columns; /** * The Rows. * Represents a collection of all the rows in the table. Read-only. */ + @SerializedName("rows") + @Expose public WorkbookTableRowCollectionPage rows; /** diff --git a/src/main/java/com/microsoft/graph/models/extensions/WorkbookWorksheet.java b/src/main/java/com/microsoft/graph/models/extensions/WorkbookWorksheet.java index 5e7575ece39..efec8acbd8e 100644 --- a/src/main/java/com/microsoft/graph/models/extensions/WorkbookWorksheet.java +++ b/src/main/java/com/microsoft/graph/models/extensions/WorkbookWorksheet.java @@ -67,18 +67,24 @@ public class WorkbookWorksheet extends Entity implements IJsonBackedObject { * The Charts. * Returns collection of charts that are part of the worksheet. Read-only. */ + @SerializedName("charts") + @Expose public WorkbookChartCollectionPage charts; /** * The Names. * Returns collection of names that are associated with the worksheet. Read-only. */ + @SerializedName("names") + @Expose public WorkbookNamedItemCollectionPage names; /** * The Pivot Tables. * Collection of PivotTables that are part of the worksheet. */ + @SerializedName("pivotTables") + @Expose public WorkbookPivotTableCollectionPage pivotTables; /** @@ -93,6 +99,8 @@ public class WorkbookWorksheet extends Entity implements IJsonBackedObject { * The Tables. * Collection of tables that are part of the worksheet. Read-only. */ + @SerializedName("tables") + @Expose public WorkbookTableCollectionPage tables; diff --git a/src/main/java/com/microsoft/graph/serializer/AttachmentCollectionPageSerializer.java b/src/main/java/com/microsoft/graph/serializer/AttachmentCollectionPageSerializer.java new file mode 100644 index 00000000000..19f4e12010f --- /dev/null +++ b/src/main/java/com/microsoft/graph/serializer/AttachmentCollectionPageSerializer.java @@ -0,0 +1,95 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) 2017 Microsoft Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sub-license, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// ------------------------------------------------------------------------------ + +package com.microsoft.graph.serializer; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.JsonParser; +import com.microsoft.graph.logger.ILogger; +import com.microsoft.graph.models.extensions.Attachment; +import com.microsoft.graph.requests.extensions.AttachmentCollectionPage; +import com.microsoft.graph.requests.extensions.AttachmentCollectionResponse; + +public class AttachmentCollectionPageSerializer { + + private static DefaultSerializer serializer; + + /** + * Not available for instantiation + */ + private AttachmentCollectionPageSerializer() { + } + + /** + * Serializes an AttachmentCollectionPage + * + * @param src the AttachmentCollectionPage variable for serialization + * @param logger the logger + * @return JsonElement of AttachmentCollectionPage + */ + public static JsonElement serialize(final AttachmentCollectionPage src, final ILogger logger) { + if(src == null) { + return null; + } + JsonArray jsonArray = new JsonArray(); + List attachments = src.getCurrentPage(); + serializer = new DefaultSerializer(logger); + String json; + JsonObject jsonObject; + for(Attachment attachment : attachments) { + jsonObject = new JsonObject(); + json = serializer.serializeObject(attachment); + jsonObject = (JsonObject)JsonParser.parseString(json); + jsonArray.add(jsonObject); + } + return jsonArray; + } + + /** + * Deserializes the JsonElement + * + * @param json the source AttachmentCollectionPage's Json + * @param logger the logger + * @throws JsonParseException the parse exception + * @return the deserialized AttachmentCollectionPage + */ + public static AttachmentCollectionPage deserialize(final JsonElement json, final ILogger logger) throws JsonParseException { + if (json == null) { + return null; + } + final AttachmentCollectionResponse response = new AttachmentCollectionResponse(); + serializer = new DefaultSerializer(logger); + final JsonObject[] sourceArray = serializer.deserializeObject(json.toString(), JsonObject[].class); + final Attachment[] array = new Attachment[sourceArray.length]; + for (int i = 0; i < sourceArray.length; i++) { + array[i] = serializer.deserializeObject(sourceArray[i].toString(), Attachment.class); + array[i].setRawObject(serializer, sourceArray[i]); + } + response.value = Arrays.asList(array); + return new AttachmentCollectionPage(response, null); + } +} \ No newline at end of file diff --git a/src/main/java/com/microsoft/graph/serializer/GsonFactory.java b/src/main/java/com/microsoft/graph/serializer/GsonFactory.java index 694a7d2dabb..32bf0668700 100644 --- a/src/main/java/com/microsoft/graph/serializer/GsonFactory.java +++ b/src/main/java/com/microsoft/graph/serializer/GsonFactory.java @@ -33,6 +33,7 @@ import com.google.gson.JsonSerializer; import com.microsoft.graph.logger.ILogger; import com.microsoft.graph.models.extensions.DateOnly; +import com.microsoft.graph.requests.extensions.AttachmentCollectionPage; import com.microsoft.graph.models.extensions.TimeOfDay; import java.lang.reflect.Type; @@ -210,7 +211,25 @@ public Duration deserialize(final JsonElement json, } } }; + + final JsonSerializer attachmentCollectionPageSerializer = new JsonSerializer() { + @Override + public JsonElement serialize(final AttachmentCollectionPage src, + final Type typeOfSrc, + final JsonSerializationContext context) { + return AttachmentCollectionPageSerializer.serialize(src, logger); + } + }; + final JsonDeserializer attachmentCollectionPageDeserializer = new JsonDeserializer() { + @Override + public AttachmentCollectionPage deserialize(final JsonElement json, + final Type typeOfT, + final JsonDeserializationContext context) throws JsonParseException { + return AttachmentCollectionPageSerializer.deserialize(json, logger); + } + }; + final JsonDeserializer timeOfDayJsonDeserializer = new JsonDeserializer() { @Override public TimeOfDay deserialize(final JsonElement json, @@ -238,6 +257,8 @@ public TimeOfDay deserialize(final JsonElement json, .registerTypeAdapter(EnumSet.class, enumSetJsonDeserializer) .registerTypeAdapter(Duration.class, durationJsonSerializer) .registerTypeAdapter(Duration.class, durationJsonDeserializer) + .registerTypeAdapter(AttachmentCollectionPage.class, attachmentCollectionPageSerializer) + .registerTypeAdapter(AttachmentCollectionPage.class, attachmentCollectionPageDeserializer) .registerTypeAdapter(TimeOfDay.class, timeOfDayJsonDeserializer) .registerTypeAdapterFactory(new FallbackTypeAdapterFactory(logger)) .create(); diff --git a/src/test/java/com/microsoft/graph/functional/CustomRequestTests.java b/src/test/java/com/microsoft/graph/functional/CustomRequestTests.java index 3eadaf08d3a..a4faa12101e 100644 --- a/src/test/java/com/microsoft/graph/functional/CustomRequestTests.java +++ b/src/test/java/com/microsoft/graph/functional/CustomRequestTests.java @@ -52,7 +52,6 @@ public void testCustomGet() { */ @Test public void testCustomPut() { - JsonParser parser = new JsonParser(); DefaultSerializer serializer = new DefaultSerializer(new DefaultLogger()); String str = "{ \"appActivityId\": \"/article?12345\", \"activitySourceHost\": \"https://www.contoso.com\", \"userTimezone\": \"Africa/Casablanca\"," + " \"appDisplayName\": \"Contoso, Ltd.\", \"activationUrl\": \"https://www.contoso.com/article?id=12345\", \"contentUrl\": \"https://www.contoso.com/article?id=12345\", " @@ -65,7 +64,7 @@ public void testCustomPut() { JsonObject response = testBase.graphClient. customRequest("/me/activities/%2Farticle%3F12346"). buildRequest(). - put(parser.parse(str).getAsJsonObject()); + put(JsonParser.parseString(str).getAsJsonObject()); UserActivity userActivity = serializer.deserializeObject(str, UserActivity.class); UserActivity responseWithClass = testBase.graphClient. diff --git a/src/test/java/com/microsoft/graph/functional/OutlookTests.java b/src/test/java/com/microsoft/graph/functional/OutlookTests.java index f9186ac3c07..a6d218c9595 100644 --- a/src/test/java/com/microsoft/graph/functional/OutlookTests.java +++ b/src/test/java/com/microsoft/graph/functional/OutlookTests.java @@ -3,7 +3,12 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; import java.util.ArrayList; +import java.util.Arrays; import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.Duration; @@ -12,16 +17,25 @@ import org.junit.Ignore; import org.junit.Test; -//import com.microsoft.graph.extensions.IDirectoryDeletedItemsCollectionPage; +import com.microsoft.graph.models.extensions.Attendee; import com.microsoft.graph.models.extensions.AttendeeBase; +import com.microsoft.graph.models.extensions.Contact; +import com.microsoft.graph.models.extensions.DateTimeTimeZone; import com.microsoft.graph.models.extensions.EmailAddress; +import com.microsoft.graph.models.extensions.Event; +import com.microsoft.graph.models.extensions.FileAttachment; +import com.microsoft.graph.models.extensions.ItemAttachment; +import com.microsoft.graph.models.extensions.ItemBody; import com.microsoft.graph.models.extensions.MeetingTimeSuggestionsResult; import com.microsoft.graph.models.extensions.Message; import com.microsoft.graph.models.extensions.Recipient; import com.microsoft.graph.models.extensions.User; +import com.microsoft.graph.models.generated.BodyType; import com.microsoft.graph.options.QueryOption; +import com.microsoft.graph.requests.extensions.AttachmentCollectionPage; import com.microsoft.graph.requests.extensions.IMessageCollectionPage; import com.microsoft.graph.requests.extensions.IUserCollectionPage; +import com.microsoft.graph.requests.extensions.AttachmentCollectionResponse; @Ignore public class OutlookTests { @@ -105,4 +119,134 @@ public void testSendDraft() { IMessageCollectionPage mcp = testBase.graphClient.me().messages().buildRequest(options).get(); assertFalse(mcp.getCurrentPage().isEmpty()); } + + @Test + public void sendEmailWithAttachment() throws Exception{ + TestBase testBase = new TestBase(); + Message message = getMessage(); + message.hasAttachments = true; + AttachmentCollectionResponse response = new AttachmentCollectionResponse(); + response.value = Arrays.asList(getFileAttachment(),getItemAttachmentWithEvent(),getItemAttachmentWithContact()); + message.attachments = new AttachmentCollectionPage(response, null); + testBase.graphClient.me().sendMail(message, true).buildRequest().post(); + } + + @Test + public void uploadEmailAsDraftWithAttachmentThenSend() { + TestBase testBase = new TestBase(); + Message message = getMessage(); + Message m = testBase.graphClient.me().messages().buildRequest().post(message); + assertNotNull(m); + testBase.graphClient.me().messages(m.id).send().buildRequest().post(); + } + + @Test + public void sendEventWithAttachment() throws Exception{ + TestBase testBase = new TestBase(); + Event event = getEvent(); + event.body = getItemBody(); + event.hasAttachments = true; + AttachmentCollectionResponse response = new AttachmentCollectionResponse(); + response.value = Arrays.asList(getFileAttachment(),getItemAttachmentWithContact()); + event.attachments = new AttachmentCollectionPage(response, null); + Event eventResponse = testBase.graphClient.me().events().buildRequest().post(event); + assertNotNull(eventResponse); + } + + private ItemBody getItemBody() { + ItemBody itemBody = new ItemBody(); + itemBody.content = " test body "; + itemBody.contentType = BodyType.HTML; + return itemBody; + } + + public Message getMessage() { + Message message = new Message(); + java.util.List emails = Arrays.asList("test_email@test_domain.com"); + java.util.List listReceipient = new ArrayList<>(); + for(String email : emails) { + EmailAddress emailAddress = new EmailAddress(); + emailAddress.address = email; + Recipient recipient = new Recipient(); + recipient.emailAddress = emailAddress; + listReceipient.add(recipient); + } + message.body = getItemBody(); + message.toRecipients = listReceipient; + message.subject = "Test Message"; + message.id = "1234"; + return message; + } + + private FileAttachment getFileAttachment() throws Exception{ + FileAttachment fileAttachment = new FileAttachment(); + fileAttachment.name = "document.pdf"; + File pdfFile = new File("src/test/resources/document.pdf"); + InputStream fileStream = new FileInputStream(pdfFile); + fileAttachment.contentBytes = OutlookTests.getByteArray(fileStream); + fileAttachment.oDataType = "#microsoft.graph.fileAttachment"; + fileAttachment.id="54321"; + return fileAttachment; + } + + private ItemAttachment getItemAttachmentWithEvent() { + ItemAttachment itemAttachmentEvent = new ItemAttachment(); + itemAttachmentEvent.oDataType = "#microsoft.graph.itemAttachment"; + itemAttachmentEvent.name = "event name"; + itemAttachmentEvent.item = getEvent(); + itemAttachmentEvent.item.oDataType = "microsoft.graph.event"; + return itemAttachmentEvent; + } + + private ItemAttachment getItemAttachmentWithContact() { + Contact contact = new Contact(); + contact.displayName = "displayname"; + contact.mobilePhone="123456890"; + ItemAttachment itemAttachmentContact = new ItemAttachment(); + itemAttachmentContact.oDataType = "#microsoft.graph.itemAttachment"; + itemAttachmentContact.name = "Attachment name"; + itemAttachmentContact.item = contact; + itemAttachmentContact.item.oDataType = "microsoft.graph.contact"; + return itemAttachmentContact; + } + + private Event getEvent() { + Event event = new Event(); + java.util.List emails = Arrays.asList("test_email@test_domain.com"); + java.util.List attendees = new ArrayList<>(); + for(String email : emails) { + EmailAddress emailAddress = new EmailAddress(); + emailAddress.address = email; + Attendee attendee = new Attendee(); + attendee.emailAddress = emailAddress; + attendees.add(attendee); + } + DateTimeTimeZone start = new DateTimeTimeZone(); + start.timeZone = "UTC"; + start.dateTime = "2018-10-16T06:15:26.544Z"; + DateTimeTimeZone end = new DateTimeTimeZone(); + end.timeZone = "UTC"; + end.dateTime = "2018-11-18T07:30:26.544Z"; + event.start = start; + event.end = end; + event.subject = "Test Event Subject"; + event.id = "1234"; + return event; + } + + public static byte[] getByteArray(InputStream in) { + try { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + int nRead; + byte[] data = new byte[16384]; + while ((nRead = in.read(data, 0, data.length)) != -1) { + buffer.write(data, 0, nRead); + } + buffer.flush(); + return buffer.toByteArray(); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } } \ No newline at end of file diff --git a/src/test/java/com/microsoft/graph/functional/TestBase.java b/src/test/java/com/microsoft/graph/functional/TestBase.java index 5e357420af5..d2a074cc5c5 100644 --- a/src/test/java/com/microsoft/graph/functional/TestBase.java +++ b/src/test/java/com/microsoft/graph/functional/TestBase.java @@ -21,10 +21,11 @@ public class TestBase { private String clientId; private String username; private String password; + private String clientSecret; // Don't use password grant in your apps. Only use for legacy solutions and automated testing. private String grantType = "password"; - private String tokenEndpoint = "https://login.microsoftonline.com/common/oauth2/token"; - private String resourceId = "https%3A%2F%2Fgraph.microsoft.com%2F"; + private String tokenEndpoint = "https://login.microsoftonline.com/"+ Constants.TENANTID +"/oauth2/v2.0/token"; + private String resourceId = "https%3A%2F%2Fgraph.microsoft.com%2F.default"; private String accessToken = null; protected IGraphServiceClient graphClient = null; @@ -34,6 +35,7 @@ public TestBase() clientId = Constants.APPID; username = Constants.USERNAME; password = Constants.PASSWORD; + clientSecret = Constants.CLIENTSECRET; GetAuthenticatedClient(); } @@ -77,12 +79,13 @@ private String GetAccessToken() conn.setInstanceFollowRedirects(false); conn.connect(); OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream(), "UTF-8"); - String payload = String.format("grant_type=%1$s&resource=%2$s&client_id=%3$s&username=%4$s&password=%5$s", + String payload = String.format("grant_type=%1$s&scope=%2$s&client_id=%3$s&username=%4$s&password=%5$s&client_secret=%6$s", grantType, resourceId, clientId, username, - password); + password, + clientSecret); writer.write(payload); writer.close(); try { diff --git a/src/test/java/com/microsoft/graph/http/BaseCollectionRequestTests.java b/src/test/java/com/microsoft/graph/http/BaseCollectionRequestTests.java index 2780a035d90..ba6afeccd87 100644 --- a/src/test/java/com/microsoft/graph/http/BaseCollectionRequestTests.java +++ b/src/test/java/com/microsoft/graph/http/BaseCollectionRequestTests.java @@ -81,7 +81,6 @@ public void testFunctionParameters() { final Option f1 = new FunctionOption("1", "one"); final Option f2 = new FunctionOption("2", null); final BaseCollectionRequest request = new BaseCollectionRequest("https://a.b.c", null, Arrays.asList(f1, f2), null,null){}; - String urlTest = request.getRequestUrl().toString(); assertEquals("https://a.b.c(1='one',2=null)", request.getRequestUrl().toString()); request.addFunctionOption(new FunctionOption("3","two"));; assertEquals("https://a.b.c(1='one',2=null,3='two')", request.getRequestUrl().toString()); diff --git a/src/test/java/com/microsoft/graph/http/CoreHttpProviderTests.java b/src/test/java/com/microsoft/graph/http/CoreHttpProviderTests.java index 03eec4a2c73..dea29b50140 100644 --- a/src/test/java/com/microsoft/graph/http/CoreHttpProviderTests.java +++ b/src/test/java/com/microsoft/graph/http/CoreHttpProviderTests.java @@ -40,23 +40,6 @@ public void testErrorResponse() throws Exception { toSerialize.error.innererror = null; setDefaultHttpProvider(toSerialize); - final ITestConnectionData data = new ITestConnectionData() { - @Override - public int getRequestCode() { - return 415; - } - - @Override - public String getJsonResponse() { - return "{}"; - } - - @Override - public Map getHeaders() { - return new HashMap<>(); - } - }; - try { mProvider.send(new MockHttpRequest(), DriveItem.class, null); fail("Expected exception in previous statement"); @@ -87,23 +70,6 @@ public void testVerboseErrorResponse() throws Exception { new MockExecutors(), logger); - final ITestConnectionData data = new ITestConnectionData() { - @Override - public int getRequestCode() { - return 415; - } - - @Override - public String getJsonResponse() { - return "{}"; - } - - @Override - public Map getHeaders() { - return new HashMap<>(); - } - }; - try { mProvider.send(new MockHttpRequest(), DriveItem.class, null); fail("Expected exception in previous statement"); diff --git a/src/test/java/com/microsoft/graph/http/DefaultHttpProviderTests.java b/src/test/java/com/microsoft/graph/http/DefaultHttpProviderTests.java index 9fba64db55f..ae4c671a276 100644 --- a/src/test/java/com/microsoft/graph/http/DefaultHttpProviderTests.java +++ b/src/test/java/com/microsoft/graph/http/DefaultHttpProviderTests.java @@ -344,7 +344,7 @@ public Map getHeaders() { }; mProvider.setConnectionFactory(new MockConnectionFactory(new MockConnection(data))); - for (final int ignored : codes) { + for (@SuppressWarnings("unused") final int ignored : codes) { DriveItem result = mProvider.send(new MockHttpRequest(), DriveItem.class, null); currentCode.incrementAndGet(); assertNull(result); diff --git a/src/test/java/com/microsoft/graph/http/MockHttpProvider.java b/src/test/java/com/microsoft/graph/http/MockHttpProvider.java index 0666eef0cc2..df6e3d8b2b5 100644 --- a/src/test/java/com/microsoft/graph/http/MockHttpProvider.java +++ b/src/test/java/com/microsoft/graph/http/MockHttpProvider.java @@ -65,7 +65,7 @@ public void send(IHttpRequest request, if(connection.getResponseCode() == 200) { if(connection.getHeaders().containsKey("Content-Type")) { if (connection.getHeaders().get("Content-Type").equals("application/json")){ - JsonObject jsonObject = new JsonParser().parse(connection.getResponseMessage()).getAsJsonObject(); + JsonObject jsonObject = JsonParser.parseString(connection.getResponseMessage()).getAsJsonObject(); result = (Result) jsonObject; }else if (connection.getHeaders().get("Content-Type").equals("application/octet-stream")) { result = (Result) new BufferedInputStream(connection.getInputStream()); @@ -89,7 +89,7 @@ public Result send(IHttpRequest request, if(connection.getResponseCode() == 200) { if(connection.getHeaders().containsKey("Content-Type")) { if (connection.getHeaders().get("Content-Type").equals("application/json")){ - JsonObject jsonObject = new JsonParser().parse(connection.getResponseMessage()).getAsJsonObject(); + JsonObject jsonObject = JsonParser.parseString(connection.getResponseMessage()).getAsJsonObject(); return (Result) jsonObject; }else if (connection.getHeaders().get("Content-Type").equals("application/octet-stream")) { return (Result) new BufferedInputStream(connection.getInputStream()); diff --git a/src/test/java/com/microsoft/graph/models/extensions/MultipartTests.java b/src/test/java/com/microsoft/graph/models/extensions/MultipartTests.java index c873119ded8..f03d661eb45 100644 --- a/src/test/java/com/microsoft/graph/models/extensions/MultipartTests.java +++ b/src/test/java/com/microsoft/graph/models/extensions/MultipartTests.java @@ -51,7 +51,6 @@ public void testCreatePartHeaderWithContenttype() { public void testCreatePartHeader() { String actual = multipart.createPartHeader(null, null, null); String expected = "--"+multipart.getBoundary()+"\r\nContent-Disposition: form-data\r\n\r\n"; - System.out.println(actual); assertEquals(expected, actual); } diff --git a/src/test/java/com/microsoft/graph/serializer/AdditionalDataTests.java b/src/test/java/com/microsoft/graph/serializer/AdditionalDataTests.java index 6bdce918f07..1a79a1f9006 100644 --- a/src/test/java/com/microsoft/graph/serializer/AdditionalDataTests.java +++ b/src/test/java/com/microsoft/graph/serializer/AdditionalDataTests.java @@ -93,8 +93,7 @@ public void testHashMapChildAdditionalData() { String serialized = serializer.serializeObject(deserializedObject); - JsonParser parser = new JsonParser(); - JsonObject jsonObject = parser.parse(serialized).getAsJsonObject(); + JsonObject jsonObject = JsonParser.parseString(serialized).getAsJsonObject(); assertNotNull(jsonObject.get("checklist").getAsJsonObject().get("1234")); assertNull(jsonObject.get("checklist").getAsJsonObject().get("1234").getAsJsonObject().get("1234")); assertNull(jsonObject.get("checklist").getAsJsonObject().get("1234").getAsJsonObject().get("66442")); diff --git a/src/test/java/com/microsoft/graph/serializer/AttachmentCollectionPageSerializerTests.java b/src/test/java/com/microsoft/graph/serializer/AttachmentCollectionPageSerializerTests.java new file mode 100644 index 00000000000..7f0fb743e1d --- /dev/null +++ b/src/test/java/com/microsoft/graph/serializer/AttachmentCollectionPageSerializerTests.java @@ -0,0 +1,125 @@ +package com.microsoft.graph.serializer; + +import static org.junit.Assert.assertEquals; + +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; + +import org.junit.Before; +import org.junit.Test; + +import com.google.gson.JsonElement; +import com.google.gson.JsonParser; +import com.microsoft.graph.logger.MockLogger; +import com.microsoft.graph.models.extensions.Attachment; +import com.microsoft.graph.models.extensions.Attendee; +import com.microsoft.graph.models.extensions.Contact; +import com.microsoft.graph.models.extensions.DateTimeTimeZone; +import com.microsoft.graph.models.extensions.EmailAddress; +import com.microsoft.graph.models.extensions.Event; +import com.microsoft.graph.models.extensions.FileAttachment; +import com.microsoft.graph.models.extensions.ItemAttachment; +import com.microsoft.graph.requests.extensions.AttachmentCollectionPage; +import com.microsoft.graph.requests.extensions.AttachmentCollectionResponse; + +public class AttachmentCollectionPageSerializerTests { + private MockLogger logger; + @Before + public void setUp() { + logger = new MockLogger(); + } + + @Test + public void testAttachmentCollectionPageSerialization() throws Exception { + String expectedString = "[{\"contentBytes\":\"ZGF0YQ==\",\"name\":\"document.pdf\",\"@odata.type\":\"#microsoft.graph.fileAttachment\",\"id\":\"54321\"},{\"item\":{\"end\":{\"dateTime\":\"2018-11-18T07:30:26.544Z\",\"timeZone\":\"UTC\"},\"start\":{\"dateTime\":\"2018-10-16T06:15:26.544Z\",\"timeZone\":\"UTC\"},\"subject\":\"Test Event Subject\",\"@odata.type\":\"microsoft.graph.event\",\"id\":\"1234\"},\"name\":\"Holiday event\",\"@odata.type\":\"#microsoft.graph.itemAttachment\"},{\"item\":{\"displayName\":\"displayname\",\"mobilePhone\":\"123456890\",\"@odata.type\":\"microsoft.graph.contact\"},\"name\":\"Attachment name\",\"@odata.type\":\"#microsoft.graph.itemAttachment\"}]"; + AttachmentCollectionResponse response = new AttachmentCollectionResponse(); + response.value = Arrays.asList(getFileAttachment(),getItemAttachmentWithEvent(),getItemAttachmentWithContact()); + AttachmentCollectionPage attachmentCollectionPage = new AttachmentCollectionPage(response, null); + JsonElement serializedJson = AttachmentCollectionPageSerializer.serialize(attachmentCollectionPage, logger); + logger.logDebug(serializedJson.toString()); + assertEquals(expectedString,serializedJson.toString()); + } + + @Test + public void testAttachmentCollectionPageDeserialization() throws Exception { + String jsonString = "[{\"contentBytes\":\"ZGF0YQ==\",\"name\":\"document.pdf\",\"@odata.type\":\"#microsoft.graph.fileAttachment\",\"id\":\"54321\"},{\"@odata.type\":\"#microsoft.graph.itemAttachment\",\"name\":\"Holiday event\",\"id\":null,\"isInline\":null,\"size\":null,\"item\":{\"subject\":\"Test Event Subject\",\"start\":{\"dateTime\":\"2018-10-16T06:15:26.544Z\",\"timeZone\":\"UTC\"},\"end\":{\"dateTime\":\"2018-11-18T07:30:26.544Z\",\"timeZone\":\"UTC\"},\"@odata.type\":\"microsoft.graph.event\",\"id\":\"1234\"}},{\"@odata.type\":\"#microsoft.graph.itemAttachment\",\"name\":\"Attachment name\",\"id\":null,\"isInline\":null,\"size\":null,\"item\":{\"displayName\":\"displayname\",\"mobilePhone\":\"123456890\",\"@odata.type\":\"microsoft.graph.contact\"}}]"; + JsonElement jsonElement = JsonParser.parseString(jsonString); + AttachmentCollectionPage attachmentCollectionPage = AttachmentCollectionPageSerializer.deserialize(jsonElement, logger); + for(Attachment attachment: attachmentCollectionPage.getCurrentPage()) { + if(attachment instanceof FileAttachment) { + FileAttachment fileAttachment = (FileAttachment)attachment; + assertEquals(fileAttachment.name, getFileAttachment().name); + String actual = ByteArraySerializer.serialize(fileAttachment.contentBytes); + String expected = ByteArraySerializer.serialize(getFileAttachment().contentBytes); + assertEquals(expected,actual); + } + else if(attachment instanceof ItemAttachment) { + ItemAttachment itemAttachment = (ItemAttachment)attachment; + if(itemAttachment.item instanceof Event) { + Event event = (Event)itemAttachment.item; + assertEquals(getEvent().subject, event.subject); + } + else if(itemAttachment.item instanceof Contact) { + Contact actual = (Contact)itemAttachment.item; + Contact expected = (Contact) getItemAttachmentWithContact().item; + assertEquals(expected.mobilePhone, actual.mobilePhone); + } + } + } + } + + private FileAttachment getFileAttachment() throws Exception{ + FileAttachment fileAttachment = new FileAttachment(); + fileAttachment.name = "document.pdf"; + fileAttachment.contentBytes = "data".getBytes(StandardCharsets.UTF_8); + fileAttachment.oDataType = "#microsoft.graph.fileAttachment"; + fileAttachment.id="54321"; + return fileAttachment; + } + + private ItemAttachment getItemAttachmentWithEvent() { + ItemAttachment itemAttachmentEvent = new ItemAttachment(); + itemAttachmentEvent.oDataType = "#microsoft.graph.itemAttachment"; + itemAttachmentEvent.name = "Holiday event"; + itemAttachmentEvent.item = getEvent(); + itemAttachmentEvent.item.oDataType = "microsoft.graph.event"; + return itemAttachmentEvent; + } + + private ItemAttachment getItemAttachmentWithContact() { + Contact contact = new Contact(); + contact.displayName = "displayname"; + contact.mobilePhone="123456890"; + ItemAttachment itemAttachmentContact = new ItemAttachment(); + itemAttachmentContact.oDataType = "#microsoft.graph.itemAttachment"; + itemAttachmentContact.name = "Attachment name"; + itemAttachmentContact.item = contact; + itemAttachmentContact.item.oDataType = "microsoft.graph.contact"; + return itemAttachmentContact; + } + + private Event getEvent() { + Event event = new Event(); + java.util.List emails = Arrays.asList("test_email@test_domain.com"); + java.util.List attendees = new ArrayList<>(); + for(String email : emails) { + EmailAddress emailAddress = new EmailAddress(); + emailAddress.address = email; + Attendee attendee = new Attendee(); + attendee.emailAddress = emailAddress; + attendees.add(attendee); + } + DateTimeTimeZone start = new DateTimeTimeZone(); + start.timeZone = "UTC"; + start.dateTime = "2018-10-16T06:15:26.544Z"; + DateTimeTimeZone end = new DateTimeTimeZone(); + end.timeZone = "UTC"; + end.dateTime = "2018-11-18T07:30:26.544Z"; + event.start = start; + event.end = end; + event.subject = "Test Event Subject"; + event.id = "1234"; + return event; + } +} \ No newline at end of file