From 3c6fdbe01671e5f5c7e58e1d0b42f6f8e09e0361 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 13 Nov 2024 06:43:25 -0500 Subject: [PATCH 1/4] chore: refreshes generated client --- src/sample/generated/ApiClient.cs | 26 +- src/sample/generated/Models/AccessAction.cs | 34 +- src/sample/generated/Models/ActionState.cs | 7 +- .../generated/Models/ActivityHistoryItem.cs | 63 +- src/sample/generated/Models/AddIn.cs | 52 +- .../generated/Models/AdministrativeUnit.cs | 93 +- .../AdministrativeUnitCollectionResponse.cs | 44 +- .../generated/Models/AgreementAcceptance.cs | 59 +- .../Models/AgreementAcceptanceState.cs | 15 +- src/sample/generated/Models/Album.cs | 38 +- .../generated/Models/AlternativeSecurityId.cs | 40 +- src/sample/generated/Models/ApiApplication.cs | 58 +- .../Models/AppCredentialRestrictionType.cs | 21 +- src/sample/generated/Models/AppIdentity.cs | 46 +- .../Models/AppKeyCredentialRestrictionType.cs | 13 +- .../generated/Models/AppLogUploadState.cs | 7 +- .../Models/AppManagementConfiguration.cs | 50 +- .../generated/Models/AppManagementPolicy.cs | 47 +- src/sample/generated/Models/AppRole.cs | 48 +- .../generated/Models/AppRoleAssignment.cs | 45 +- .../AppRoleAssignmentCollectionResponse.cs | 44 +- src/sample/generated/Models/Application.cs | 303 +-- .../Models/ApplicationCollectionResponse.cs | 44 +- src/sample/generated/Models/AssignedLabel.cs | 38 +- .../generated/Models/AssignedLicense.cs | 42 +- src/sample/generated/Models/AssignedPlan.cs | 42 +- .../generated/Models/AssociatedTeamInfo.cs | 29 +- src/sample/generated/Models/Attachment.cs | 39 +- src/sample/generated/Models/AttachmentBase.cs | 37 +- .../AttachmentBaseCollectionResponse.cs | 44 +- .../generated/Models/AttachmentSession.cs | 35 +- .../AttachmentSessionCollectionResponse.cs | 44 +- .../generated/Models/AttendanceInterval.cs | 40 +- .../generated/Models/AttendanceRecord.cs | 51 +- src/sample/generated/Models/Attendee.cs | 45 +- src/sample/generated/Models/AttendeeBase.cs | 35 +- src/sample/generated/Models/AttendeeType.cs | 15 +- .../generated/Models/AttestationLevel.cs | 15 +- .../generated/Models/AttributeDefinition.cs | 86 +- .../Models/AttributeDefinitionMetadata.cs | 27 +- .../AttributeDefinitionMetadataEntry.cs | 42 +- .../generated/Models/AttributeFlowBehavior.cs | 13 +- .../generated/Models/AttributeFlowType.cs | 19 +- .../generated/Models/AttributeMapping.cs | 62 +- .../Models/AttributeMappingSource.cs | 52 +- .../Models/AttributeMappingSourceType.cs | 15 +- src/sample/generated/Models/AttributeType.cs | 21 +- src/sample/generated/Models/Audio.cs | 66 +- .../generated/Models/AudioConferencing.cs | 50 +- src/sample/generated/Models/Authentication.cs | 115 +- .../generated/Models/AuthenticationMethod.cs | 29 +- .../Models/AuthenticationMethodKeyStrength.cs | 15 +- .../Models/AuthenticationMethodSignInState.cs | 23 +- .../Models/AuthenticationPhoneType.cs | 17 +- .../generated/Models/AuthorizationInfo.cs | 36 +- .../Models/AutomaticRepliesSetting.cs | 66 +- .../Models/AutomaticRepliesStatus.cs | 15 +- src/sample/generated/Models/BaseItem.cs | 81 +- .../generated/Models/BaseItemVersion.cs | 47 +- src/sample/generated/Models/BaseSitePage.cs | 70 + src/sample/generated/Models/BodyType.cs | 13 +- src/sample/generated/Models/BooleanColumn.cs | 34 +- .../Models/BroadcastMeetingAudience.cs | 17 +- .../Models/BroadcastMeetingCaptionSettings.cs | 40 +- .../Models/BroadcastMeetingSettings.cs | 56 +- src/sample/generated/Models/BulkUpload.cs | 46 + src/sample/generated/Models/Bundle.cs | 44 +- .../generated/Models/CalculatedColumn.cs | 40 +- src/sample/generated/Models/Calendar.cs | 115 +- src/sample/generated/Models/CalendarColor.cs | 31 +- src/sample/generated/Models/CalendarGroup.cs | 43 +- .../generated/Models/CalendarPermission.cs | 55 +- .../generated/Models/CalendarRoleType.cs | 25 +- src/sample/generated/Models/CallRecording.cs | 114 ++ src/sample/generated/Models/CallTranscript.cs | 81 +- src/sample/generated/Models/CategoryColor.cs | 61 +- src/sample/generated/Models/Certification.cs | 44 +- .../generated/Models/ChangeTrackedEntity.cs | 41 +- src/sample/generated/Models/Channel.cs | 107 +- .../generated/Models/ChannelIdentity.cs | 38 +- .../generated/Models/ChannelMembershipType.cs | 17 +- src/sample/generated/Models/ChannelSummary.cs | 71 + src/sample/generated/Models/Chat.cs | 119 +- src/sample/generated/Models/ChatInfo.cs | 40 +- src/sample/generated/Models/ChatMessage.cs | 151 +- .../generated/Models/ChatMessageActions.cs | 17 +- .../generated/Models/ChatMessageAttachment.cs | 60 +- .../Models/ChatMessageFromIdentitySet.cs | 29 +- .../Models/ChatMessageHistoryItem.cs | 50 +- .../Models/ChatMessageHostedContent.cs | 29 +- .../generated/Models/ChatMessageImportance.cs | 17 +- .../generated/Models/ChatMessageInfo.cs | 63 +- .../generated/Models/ChatMessageMention.cs | 46 +- .../Models/ChatMessageMentionedIdentitySet.cs | 37 +- .../Models/ChatMessagePolicyViolation.cs | 62 +- ...hatMessagePolicyViolationDlpActionTypes.cs | 17 +- .../ChatMessagePolicyViolationPolicyTip.cs | 40 +- ...atMessagePolicyViolationUserActionTypes.cs | 15 +- ...ssagePolicyViolationVerdictDetailsTypes.cs | 17 +- .../generated/Models/ChatMessageReaction.cs | 46 +- .../Models/ChatMessageReactionIdentitySet.cs | 29 +- .../generated/Models/ChatMessageType.cs | 19 +- src/sample/generated/Models/ChatType.cs | 17 +- src/sample/generated/Models/ChatViewpoint.cs | 38 +- src/sample/generated/Models/ChecklistItem.cs | 41 +- .../Models/ChecklistItemCollectionResponse.cs | 44 +- src/sample/generated/Models/ChoiceColumn.cs | 40 +- .../generated/Models/ClaimsMappingPolicy.cs | 29 +- .../generated/Models/CloudClipboardItem.cs | 68 + .../Models/CloudClipboardItemPayload.cs | 75 + .../generated/Models/CloudClipboardRoot.cs | 56 + .../generated/Models/ColumnDefinition.cs | 207 +- src/sample/generated/Models/ColumnLink.cs | 31 +- src/sample/generated/Models/ColumnTypes.cs | 47 +- .../generated/Models/ColumnValidation.cs | 46 +- .../generated/Models/ComplianceState.cs | 7 +- .../generated/Models/ComplianceStatus.cs | 25 +- ...nfigurationManagerClientEnabledFeatures.cs | 44 +- src/sample/generated/Models/Contact.cs | 187 +- src/sample/generated/Models/ContactFolder.cs | 65 +- .../generated/Models/ContainerFilter.cs | 36 +- .../Models/ContentApprovalStatusColumn.cs | 34 +- src/sample/generated/Models/ContentType.cs | 127 +- .../generated/Models/ContentTypeInfo.cs | 38 +- .../generated/Models/ContentTypeOrder.cs | 38 +- src/sample/generated/Models/Conversation.cs | 47 +- .../generated/Models/ConversationMember.cs | 35 +- .../generated/Models/ConversationThread.cs | 65 +- src/sample/generated/Models/CourseStatus.cs | 17 +- src/sample/generated/Models/CurrencyColumn.cs | 36 +- .../CustomAppManagementConfiguration.cs | 46 + .../Models/CustomSecurityAttributeValue.cs | 34 +- src/sample/generated/Models/DateTimeColumn.cs | 38 +- .../generated/Models/DateTimeTimeZone.cs | 38 +- .../generated/Models/DayOfWeekObject.cs | 23 +- .../generated/Models/DefaultColumnValue.cs | 38 +- .../DelegateMeetingMessageDeliveryOptions.cs | 15 +- .../DelegatedPermissionClassification.cs | 39 +- src/sample/generated/Models/Deleted.cs | 36 +- src/sample/generated/Models/Device.cs | 187 +- .../generated/Models/DeviceActionResult.cs | 44 +- src/sample/generated/Models/DeviceCategory.cs | 31 +- .../Models/DeviceCollectionResponse.cs | 44 +- .../DeviceCompliancePolicySettingState.cs | 66 +- .../Models/DeviceCompliancePolicyState.cs | 53 +- .../Models/DeviceConfigurationSettingState.cs | 66 +- .../Models/DeviceConfigurationState.cs | 53 +- .../generated/Models/DeviceEnrollmentType.cs | 7 +- .../Models/DeviceHealthAttestationState.cs | 98 +- .../Models/DeviceLogCollectionResponse.cs | 47 +- .../DeviceManagementExchangeAccessState.cs | 7 +- ...viceManagementExchangeAccessStateReason.cs | 7 +- .../DeviceManagementTroubleshootingEvent.cs | 31 +- .../Models/DeviceRegistrationState.cs | 7 +- .../generated/Models/DirectoryDefinition.cs | 51 +- .../DirectoryDefinitionDiscoverabilities.cs | 21 +- .../generated/Models/DirectoryObject.cs | 31 +- .../DirectoryObjectCollectionResponse.cs | 44 +- src/sample/generated/Models/DirectoryRole.cs | 51 +- .../Models/DirectoryRoleCollectionResponse.cs | 44 +- .../Models/DisplayNameLocalization.cs | 38 +- src/sample/generated/Models/DocumentSet.cs | 72 +- .../generated/Models/DocumentSetContent.cs | 46 +- .../generated/Models/DocumentSetVersion.cs | 53 +- .../Models/DocumentSetVersionItem.cs | 40 +- src/sample/generated/Models/Drive.cs | 113 +- src/sample/generated/Models/DriveItem.cs | 277 +-- .../generated/Models/DriveItemVersion.cs | 33 +- src/sample/generated/Models/EmailAddress.cs | 38 +- .../Models/EmailAuthenticationMethod.cs | 31 +- .../Models/EmployeeExperienceUser.cs | 37 +- .../generated/Models/EmployeeOrgData.cs | 38 +- src/sample/generated/Models/Endpoint.cs | 39 +- .../Models/EndpointCollectionResponse.cs | 44 +- src/sample/generated/Models/Entity.cs | 36 +- src/sample/generated/Models/Event.cs | 263 +-- .../generated/Models/EventMessageDetail.cs | 34 +- src/sample/generated/Models/EventType.cs | 17 +- src/sample/generated/Models/Extension.cs | 29 +- .../Models/ExtensionCollectionResponse.cs | 44 +- .../generated/Models/ExtensionProperty.cs | 47 +- .../generated/Models/ExternalAudienceScope.cs | 15 +- src/sample/generated/Models/ExternalLink.cs | 36 +- .../Models/FederatedIdentityCredential.cs | 49 +- .../Models/Fido2AuthenticationMethod.cs | 45 +- src/sample/generated/Models/FieldValueSet.cs | 29 +- src/sample/generated/Models/FileObject.cs | 46 +- src/sample/generated/Models/FileSystemInfo.cs | 40 +- src/sample/generated/Models/Filter.cs | 58 +- src/sample/generated/Models/FilterClause.cs | 46 +- src/sample/generated/Models/FilterGroup.cs | 44 +- src/sample/generated/Models/FilterOperand.cs | 36 +- src/sample/generated/Models/Folder.cs | 44 +- src/sample/generated/Models/FolderView.cs | 40 +- src/sample/generated/Models/FollowupFlag.cs | 64 +- .../generated/Models/FollowupFlagStatus.cs | 15 +- src/sample/generated/Models/FreeBusyStatus.cs | 21 +- src/sample/generated/Models/GeoCoordinates.cs | 40 +- .../generated/Models/GeolocationColumn.cs | 34 +- .../generated/Models/GiphyRatingType.cs | 15 +- src/sample/generated/Models/Group.cs | 437 +++-- .../Models/GroupCollectionResponse.cs | 44 +- src/sample/generated/Models/GroupFilter.cs | 36 +- .../generated/Models/GroupLifecyclePolicy.cs | 35 +- src/sample/generated/Models/GroupSetting.cs | 41 +- src/sample/generated/Models/Hashes.cs | 42 +- .../Models/HomeRealmDiscoveryPolicy.cs | 29 +- .../Models/HyperlinkOrPictureColumn.cs | 36 +- src/sample/generated/Models/Identity.cs | 42 +- src/sample/generated/Models/IdentitySet.cs | 58 +- src/sample/generated/Models/Image.cs | 38 +- src/sample/generated/Models/ImageInfo.cs | 42 +- .../generated/Models/ImplicitGrantSettings.cs | 38 +- src/sample/generated/Models/Importance.cs | 15 +- src/sample/generated/Models/IncompleteData.cs | 38 +- .../Models/InferenceClassification.cs | 37 +- .../Models/InferenceClassificationOverride.cs | 43 +- .../Models/InferenceClassificationType.cs | 13 +- .../generated/Models/InformationalUrl.cs | 44 +- .../generated/Models/InsightIdentity.cs | 40 +- src/sample/generated/Models/IntegerRange.cs | 38 +- .../generated/Models/InternetMessageHeader.cs | 38 +- src/sample/generated/Models/ItemActionStat.cs | 38 +- src/sample/generated/Models/ItemActivity.cs | 55 +- .../generated/Models/ItemActivityStat.cs | 91 +- src/sample/generated/Models/ItemAnalytics.cs | 53 +- src/sample/generated/Models/ItemBody.cs | 42 +- src/sample/generated/Models/ItemInsights.cs | 46 + src/sample/generated/Models/ItemReference.cs | 66 +- .../generated/Models/ItemRetentionLabel.cs | 84 + .../generated/Models/JoinMeetingIdSettings.cs | 40 +- src/sample/generated/Models/Json.cs | 34 +- src/sample/generated/Models/KeyCredential.cs | 50 +- .../Models/KeyCredentialConfiguration.cs | 46 +- src/sample/generated/Models/KeyValue.cs | 38 +- src/sample/generated/Models/KeyValuePair.cs | 38 +- .../Models/LearningCourseActivity.cs | 49 +- .../Models/LicenseAssignmentState.cs | 46 +- src/sample/generated/Models/LicenseDetails.cs | 47 +- .../LicenseDetailsCollectionResponse.cs | 44 +- .../Models/LicenseProcessingState.cs | 36 +- src/sample/generated/Models/LinkedResource.cs | 37 +- .../LinkedResourceCollectionResponse.cs | 44 +- src/sample/generated/Models/List.cs | 103 +- src/sample/generated/Models/ListInfo.cs | 40 +- src/sample/generated/Models/ListItem.cs | 85 +- .../generated/Models/ListItemVersion.cs | 37 +- .../generated/Models/LobbyBypassScope.cs | 23 +- .../generated/Models/LobbyBypassSettings.cs | 42 +- src/sample/generated/Models/LocaleInfo.cs | 38 +- src/sample/generated/Models/Location.cs | 70 +- src/sample/generated/Models/LocationType.cs | 29 +- .../generated/Models/LocationUniqueIdType.cs | 19 +- .../generated/Models/LongRunningOperation.cs | 47 +- .../Models/LongRunningOperationStatus.cs | 19 +- src/sample/generated/Models/LookupColumn.cs | 44 +- src/sample/generated/Models/MailFolder.cs | 81 +- .../generated/Models/MailboxSettings.cs | 78 +- src/sample/generated/Models/Malware.cs | 36 +- .../Models/ManagedAppFlaggedReason.cs | 7 +- .../generated/Models/ManagedAppOperation.cs | 35 +- .../generated/Models/ManagedAppPolicy.cs | 37 +- .../Models/ManagedAppRegistration.cs | 87 +- src/sample/generated/Models/ManagedDevice.cs | 238 +-- .../Models/ManagedDeviceOwnerType.cs | 7 +- ...ManagedDevicePartnerReportedHealthState.cs | 7 +- .../generated/Models/ManagementAgentType.cs | 11 +- .../Models/MeetingAttendanceReport.cs | 43 +- .../Models/MeetingChatHistoryDefaultMode.cs | 15 +- .../generated/Models/MeetingChatMode.cs | 17 +- .../Models/MeetingParticipantInfo.cs | 50 +- .../generated/Models/MeetingParticipants.cs | 52 +- src/sample/generated/Models/Message.cs | 207 +- .../generated/Models/MessageActionFlag.cs | 31 +- src/sample/generated/Models/MessageRule.cs | 63 +- .../generated/Models/MessageRuleActions.cs | 78 +- .../generated/Models/MessageRulePredicates.cs | 124 +- ...rosoftAuthenticatorAuthenticationMethod.cs | 45 +- .../generated/Models/MobileAppIdentifier.cs | 32 +- .../MultiValueLegacyExtendedProperty.cs | 31 +- src/sample/generated/Models/Mutability.cs | 17 +- .../Models/NativeAuthenticationApisEnabled.cs | 25 + src/sample/generated/Models/Notebook.cs | 67 +- src/sample/generated/Models/NotebookLinks.cs | 50 +- src/sample/generated/Models/NumberColumn.cs | 42 +- .../generated/Models/OAuth2PermissionGrant.cs | 47 +- ...OAuth2PermissionGrantCollectionResponse.cs | 44 +- .../Models/ODataErrors/ErrorDetails.cs | 40 +- .../Models/ODataErrors/InnerError.cs | 32 +- .../generated/Models/ODataErrors/MainError.cs | 56 +- .../Models/ODataErrors/ODataError.cs | 42 +- .../generated/Models/ObjectDefinition.cs | 54 +- .../Models/ObjectDefinitionMetadata.cs | 23 +- .../Models/ObjectDefinitionMetadataEntry.cs | 42 +- .../generated/Models/ObjectFlowTypes.cs | 17 +- src/sample/generated/Models/ObjectIdentity.cs | 46 +- src/sample/generated/Models/ObjectMapping.cs | 72 +- .../generated/Models/ObjectMappingMetadata.cs | 23 +- .../Models/ObjectMappingMetadataEntry.cs | 42 +- .../generated/Models/OfferShiftRequest.cs | 37 +- .../generated/Models/OfficeGraphInsights.cs | 59 +- .../Models/OnPremisesExtensionAttributes.cs | 64 +- .../Models/OnPremisesProvisioningError.cs | 42 +- src/sample/generated/Models/Onenote.cs | 77 +- .../Models/OnenoteEntityBaseModel.cs | 31 +- .../Models/OnenoteEntityHierarchyModel.cs | 49 +- .../Models/OnenoteEntitySchemaObjectModel.cs | 31 +- .../generated/Models/OnenoteOperation.cs | 43 +- .../generated/Models/OnenoteOperationError.cs | 38 +- src/sample/generated/Models/OnenotePage.cs | 69 +- .../generated/Models/OnenoteResource.cs | 33 +- src/sample/generated/Models/OnenoteSection.cs | 65 +- .../generated/Models/OnenoteUserRole.cs | 17 +- src/sample/generated/Models/OnlineMeeting.cs | 209 +-- .../generated/Models/OnlineMeetingBase.cs | 182 ++ .../generated/Models/OnlineMeetingInfo.cs | 52 +- .../Models/OnlineMeetingPresenters.cs | 19 +- .../Models/OnlineMeetingProviderType.cs | 17 +- .../generated/Models/OnlineMeetingRole.cs | 19 +- src/sample/generated/Models/OpenShift.cs | 47 +- .../Models/OpenShiftChangeRequest.cs | 31 +- src/sample/generated/Models/OpenShiftItem.cs | 31 +- src/sample/generated/Models/Operation.cs | 39 +- src/sample/generated/Models/OperationError.cs | 38 +- .../generated/Models/OperationStatus.cs | 17 +- src/sample/generated/Models/OptionalClaim.cs | 42 +- src/sample/generated/Models/OptionalClaims.cs | 58 +- src/sample/generated/Models/OrgContact.cs | 119 +- .../Models/OrgContactCollectionResponse.cs | 44 +- .../generated/Models/OutlookCategory.cs | 37 +- .../OutlookCategoryCollectionResponse.cs | 44 +- .../generated/Models/OutlookGeoCoordinates.cs | 44 +- src/sample/generated/Models/OutlookItem.cs | 37 +- src/sample/generated/Models/OutlookUser.cs | 37 +- src/sample/generated/Models/Package.cs | 36 +- src/sample/generated/Models/PageLayoutType.cs | 28 + src/sample/generated/Models/PageLinks.cs | 50 +- .../Models/ParentalControlSettings.cs | 38 +- .../Models/PasswordAuthenticationMethod.cs | 33 +- .../generated/Models/PasswordCredential.cs | 50 +- .../Models/PasswordCredentialConfiguration.cs | 46 +- .../generated/Models/PasswordProfile.cs | 46 +- .../generated/Models/PatternedRecurrence.cs | 50 +- .../generated/Models/PendingContentUpdate.cs | 36 +- .../generated/Models/PendingOperations.cs | 42 +- src/sample/generated/Models/Permission.cs | 95 +- .../Models/PermissionClassificationType.cs | 17 +- .../generated/Models/PermissionScope.cs | 52 +- src/sample/generated/Models/Person.cs | 97 +- .../generated/Models/PersonOrGroupColumn.cs | 40 +- src/sample/generated/Models/PersonType.cs | 38 +- src/sample/generated/Models/Phone.cs | 46 +- .../Models/PhoneAuthenticationMethod.cs | 43 +- src/sample/generated/Models/PhoneType.cs | 29 +- src/sample/generated/Models/Photo.cs | 52 +- .../generated/Models/PhysicalAddress.cs | 44 +- .../generated/Models/PhysicalOfficeAddress.cs | 46 +- .../generated/Models/PinnedChatMessageInfo.cs | 37 +- .../Models/PlannerAppliedCategories.cs | 34 +- .../PlannerAssignedToTaskBoardTaskFormat.cs | 39 +- .../generated/Models/PlannerAssignments.cs | 34 +- src/sample/generated/Models/PlannerBucket.cs | 43 +- .../PlannerBucketTaskBoardTaskFormat.cs | 31 +- .../Models/PlannerCategoryDescriptions.cs | 84 +- .../generated/Models/PlannerChecklistItems.cs | 34 +- .../generated/Models/PlannerContainerType.cs | 15 +- .../Models/PlannerExternalReferences.cs | 34 +- src/sample/generated/Models/PlannerGroup.cs | 37 +- .../Models/PlannerOrderHintsByAssignee.cs | 34 +- src/sample/generated/Models/PlannerPlan.cs | 77 +- .../generated/Models/PlannerPlanContainer.cs | 44 +- .../generated/Models/PlannerPlanDetails.cs | 45 +- .../generated/Models/PlannerPreviewType.cs | 19 +- .../PlannerProgressTaskBoardTaskFormat.cs | 31 +- src/sample/generated/Models/PlannerTask.cs | 135 +- .../generated/Models/PlannerTaskDetails.cs | 53 +- src/sample/generated/Models/PlannerUser.cs | 45 +- src/sample/generated/Models/PlannerUserIds.cs | 34 +- src/sample/generated/Models/PolicyBase.cs | 33 +- .../generated/Models/PolicyPlatformType.cs | 7 +- src/sample/generated/Models/Post.cs | 109 +- .../Models/PreAuthorizedApplication.cs | 38 +- src/sample/generated/Models/Presence.cs | 41 +- .../generated/Models/PresenceStatusMessage.cs | 54 +- src/sample/generated/Models/PrintColorMode.cs | 19 +- src/sample/generated/Models/PrintConnector.cs | 47 +- src/sample/generated/Models/PrintDocument.cs | 35 +- .../generated/Models/PrintDuplexMode.cs | 17 +- src/sample/generated/Models/PrintEvent.cs | 13 +- src/sample/generated/Models/PrintFinishing.cs | 233 ++- src/sample/generated/Models/PrintJob.cs | 77 +- .../generated/Models/PrintJobConfiguration.cs | 130 +- .../Models/PrintJobProcessingState.cs | 27 +- .../generated/Models/PrintJobStateDetail.cs | 25 +- src/sample/generated/Models/PrintJobStatus.cs | 52 +- src/sample/generated/Models/PrintMargin.cs | 42 +- .../generated/Models/PrintMultipageLayout.cs | 27 +- .../generated/Models/PrintOrientation.cs | 19 +- src/sample/generated/Models/PrintQuality.cs | 17 +- src/sample/generated/Models/PrintScaling.cs | 21 +- src/sample/generated/Models/PrintTask.cs | 55 +- .../generated/Models/PrintTaskDefinition.cs | 47 +- .../Models/PrintTaskProcessingState.cs | 19 +- .../generated/Models/PrintTaskStatus.cs | 42 +- .../generated/Models/PrintTaskTrigger.cs | 43 +- src/sample/generated/Models/Printer.cs | 61 +- src/sample/generated/Models/PrinterBase.cs | 77 +- .../generated/Models/PrinterCapabilities.cs | 138 +- .../generated/Models/PrinterDefaults.cs | 100 +- .../Models/PrinterFeedOrientation.cs | 15 +- .../generated/Models/PrinterLocation.cs | 68 +- .../Models/PrinterProcessingState.cs | 19 +- .../Models/PrinterProcessingStateDetail.cs | 1661 ++++++++++++++++- src/sample/generated/Models/PrinterShare.cs | 65 +- .../generated/Models/PrinterShareViewpoint.cs | 36 +- src/sample/generated/Models/PrinterStatus.cs | 50 +- src/sample/generated/Models/ProfilePhoto.cs | 33 +- .../Models/ProfilePhotoCollectionResponse.cs | 44 +- .../generated/Models/ProvisionedPlan.cs | 40 +- .../Models/PublicClientApplication.cs | 38 +- src/sample/generated/Models/PublicError.cs | 56 +- .../generated/Models/PublicErrorDetail.cs | 40 +- .../generated/Models/PublicInnerError.cs | 48 +- .../generated/Models/PublicationFacet.cs | 46 +- .../generated/Models/QuarantineReason.cs | 25 +- src/sample/generated/Models/Quota.cs | 52 +- src/sample/generated/Models/Recipient.cs | 42 +- .../generated/Models/RecurrencePattern.cs | 66 +- .../generated/Models/RecurrencePatternType.cs | 21 +- .../generated/Models/RecurrenceRange.cs | 48 +- .../generated/Models/RecurrenceRangeType.cs | 15 +- .../generated/Models/RedirectUriSettings.cs | 38 +- .../generated/Models/ReferenceUpdate.cs | 38 +- .../generated/Models/ReferencedObject.cs | 38 +- .../RemoteDesktopSecurityConfiguration.cs | 60 + src/sample/generated/Models/RemoteItem.cs | 144 +- .../Models/RequestSignatureVerification.cs | 42 +- .../Models/RequiredResourceAccess.cs | 44 +- src/sample/generated/Models/ResourceAccess.cs | 38 +- .../generated/Models/ResourceReference.cs | 40 +- .../Models/ResourceSpecificPermission.cs | 44 +- .../Models/ResourceSpecificPermissionGrant.cs | 45 +- .../generated/Models/ResourceVisualization.cs | 50 +- src/sample/generated/Models/ResponseStatus.cs | 42 +- src/sample/generated/Models/ResponseType.cs | 21 +- .../Models/RetentionLabelSettings.cs | 80 + .../Models/RichLongRunningOperation.cs | 43 +- src/sample/generated/Models/Root.cs | 34 +- .../Models/SamlSingleSignOnSettings.cs | 36 +- src/sample/generated/Models/Schedule.cs | 125 +- .../generated/Models/ScheduleChangeRequest.cs | 53 +- .../Models/ScheduleChangeRequestActor.cs | 19 +- .../generated/Models/ScheduleChangeState.cs | 17 +- src/sample/generated/Models/ScheduleEntity.cs | 44 +- .../generated/Models/ScheduleEntityTheme.cs | 35 +- .../generated/Models/SchedulingGroup.cs | 35 +- .../generated/Models/ScopedRoleMembership.cs | 41 +- .../generated/Models/ScoredEmailAddress.cs | 46 +- src/sample/generated/Models/SearchResult.cs | 36 +- src/sample/generated/Models/SectionGroup.cs | 65 +- src/sample/generated/Models/SectionLinks.cs | 50 +- .../Security/BehaviorDuringRetentionPeriod.cs | 32 + .../Models/SelectionLikelihoodInfo.cs | 13 +- src/sample/generated/Models/Sensitivity.cs | 17 +- .../generated/Models/ServicePlanInfo.cs | 44 +- .../generated/Models/ServicePrincipal.cs | 347 ++-- .../ServicePrincipalCollectionResponse.cs | 44 +- .../ServicePrincipalLockConfiguration.cs | 44 +- .../Models/ServiceProvisioningError.cs | 46 +- .../Models/ServiceStorageQuotaBreakdown.cs | 46 + ...StorageQuotaBreakdownCollectionResponse.cs | 75 + src/sample/generated/Models/SettingSource.cs | 44 +- .../generated/Models/SettingSourceType.cs | 13 +- src/sample/generated/Models/SettingValue.cs | 38 +- .../generated/Models/SharePointIdentity.cs | 31 +- .../generated/Models/SharePointIdentitySet.cs | 53 +- src/sample/generated/Models/Shared.cs | 56 +- src/sample/generated/Models/SharedInsight.cs | 77 +- .../Models/SharedInsightCollectionResponse.cs | 75 + .../Models/SharedWithChannelTeamInfo.cs | 39 +- src/sample/generated/Models/SharepointIds.cs | 48 +- src/sample/generated/Models/SharingDetail.cs | 58 +- .../generated/Models/SharingInvitation.cs | 48 +- src/sample/generated/Models/SharingLink.cs | 52 +- src/sample/generated/Models/Shift.cs | 49 +- src/sample/generated/Models/ShiftActivity.cs | 50 +- .../generated/Models/ShiftAvailability.cs | 52 +- src/sample/generated/Models/ShiftItem.cs | 41 +- .../generated/Models/ShiftPreferences.cs | 37 +- src/sample/generated/Models/SignInActivity.cs | 60 +- .../SingleValueLegacyExtendedProperty.cs | 31 +- src/sample/generated/Models/Site.cs | 189 +- .../generated/Models/SiteArchivalDetails.cs | 59 + .../generated/Models/SiteArchiveStatus.cs | 28 + src/sample/generated/Models/SiteCollection.cs | 58 +- src/sample/generated/Models/SizeRange.cs | 38 +- .../SoftwareOathAuthenticationMethod.cs | 31 +- src/sample/generated/Models/SpaApplication.cs | 36 +- src/sample/generated/Models/SpecialFolder.cs | 36 +- src/sample/generated/Models/Status.cs | 19 +- .../Models/StoragePlanInformation.cs | 36 +- .../generated/Models/StorageQuotaBreakdown.cs | 70 + ...tringKeyAttributeMappingSourceValuePair.cs | 44 +- .../Models/StringKeyLongValuePair.cs | 40 +- .../Models/StringKeyStringValuePair.cs | 38 +- src/sample/generated/Models/StsPolicy.cs | 41 +- src/sample/generated/Models/Subscription.cs | 71 +- .../Models/SwapShiftsChangeRequest.cs | 31 +- .../generated/Models/Synchronization.cs | 53 +- .../generated/Models/SynchronizationError.cs | 40 +- .../generated/Models/SynchronizationJob.cs | 73 +- .../Models/SynchronizationMetadata.cs | 27 +- .../Models/SynchronizationMetadataEntry.cs | 42 +- .../Models/SynchronizationProgress.cs | 42 +- .../Models/SynchronizationQuarantine.cs | 56 +- .../generated/Models/SynchronizationRule.cs | 78 +- .../Models/SynchronizationSchedule.cs | 46 +- .../Models/SynchronizationScheduleState.cs | 15 +- .../generated/Models/SynchronizationSchema.cs | 47 +- .../generated/Models/SynchronizationSecret.cs | 99 +- ...SynchronizationSecretKeyStringValuePair.cs | 42 +- .../generated/Models/SynchronizationStatus.cs | 98 +- .../Models/SynchronizationStatusCode.cs | 19 +- .../Models/SynchronizationTaskExecution.cs | 72 +- .../SynchronizationTaskExecutionResult.cs | 15 +- .../Models/SynchronizationTemplate.cs | 55 +- src/sample/generated/Models/SystemFacet.cs | 34 +- .../generated/Models/TargetDeviceGroup.cs | 56 + src/sample/generated/Models/TaskStatus.cs | 19 +- src/sample/generated/Models/Team.cs | 203 +- .../generated/Models/TeamFunSettings.cs | 46 +- .../generated/Models/TeamGuestSettings.cs | 38 +- src/sample/generated/Models/TeamInfo.cs | 43 +- .../generated/Models/TeamMemberSettings.cs | 46 +- .../generated/Models/TeamMessagingSettings.cs | 44 +- .../generated/Models/TeamSpecialization.cs | 25 +- src/sample/generated/Models/TeamSummary.cs | 40 +- .../generated/Models/TeamVisibilityType.cs | 17 +- src/sample/generated/Models/TeamsApp.cs | 47 +- .../generated/Models/TeamsAppAuthorization.cs | 42 +- .../generated/Models/TeamsAppDefinition.cs | 71 +- .../Models/TeamsAppDistributionMethod.cs | 17 +- .../generated/Models/TeamsAppInstallation.cs | 53 +- .../generated/Models/TeamsAppPermissionSet.cs | 42 +- .../Models/TeamsAppPublishingState.cs | 17 +- .../TeamsAppResourceSpecificPermission.cs | 42 +- .../TeamsAppResourceSpecificPermissionType.cs | 15 +- .../generated/Models/TeamsAsyncOperation.cs | 59 +- .../Models/TeamsAsyncOperationStatus.cs | 21 +- .../Models/TeamsAsyncOperationType.cs | 33 +- src/sample/generated/Models/TeamsTab.cs | 49 +- .../generated/Models/TeamsTabConfiguration.cs | 42 +- src/sample/generated/Models/TeamsTemplate.cs | 29 +- src/sample/generated/Models/TeamworkBot.cs | 29 +- .../Models/TeamworkConversationIdentity.cs | 35 +- .../TeamworkConversationIdentityType.cs | 17 +- .../generated/Models/TeamworkHostedContent.cs | 33 +- .../Models/TeamworkOnlineMeetingInfo.cs | 46 +- src/sample/generated/Models/TeamworkTag.cs | 51 +- .../generated/Models/TeamworkTagMember.cs | 35 +- .../generated/Models/TeamworkTagType.cs | 13 +- .../generated/Models/TeamworkUserIdentity.cs | 35 +- .../Models/TeamworkUserIdentityType.cs | 27 +- ...TemporaryAccessPassAuthenticationMethod.cs | 43 +- src/sample/generated/Models/TermColumn.cs | 54 +- .../generated/Models/TermStore/Group.cs | 51 +- .../Models/TermStore/LocalizedDescription.cs | 38 +- .../Models/TermStore/LocalizedLabel.cs | 40 +- .../Models/TermStore/LocalizedName.cs | 38 +- .../generated/Models/TermStore/Relation.cs | 59 +- .../Models/TermStore/RelationType.cs | 15 +- src/sample/generated/Models/TermStore/Set.cs | 81 +- .../generated/Models/TermStore/Store.cs | 49 +- src/sample/generated/Models/TermStore/Term.cs | 81 +- .../Models/TermStore/TermGroupScope.cs | 17 +- src/sample/generated/Models/TextColumn.cs | 44 +- src/sample/generated/Models/Thumbnail.cs | 44 +- .../generated/Models/ThumbnailColumn.cs | 34 +- src/sample/generated/Models/ThumbnailSet.cs | 61 +- src/sample/generated/Models/TimeOff.cs | 47 +- src/sample/generated/Models/TimeOffItem.cs | 31 +- src/sample/generated/Models/TimeOffReason.cs | 39 +- .../generated/Models/TimeOffReasonIconType.cs | 53 +- src/sample/generated/Models/TimeOffRequest.cs | 35 +- src/sample/generated/Models/TimeRange.cs | 38 +- src/sample/generated/Models/TimeSlot.cs | 50 +- src/sample/generated/Models/TimeZoneBase.cs | 36 +- src/sample/generated/Models/Todo.cs | 37 +- src/sample/generated/Models/TodoTask.cs | 143 +- .../Models/TodoTaskCollectionResponse.cs | 44 +- src/sample/generated/Models/TodoTaskList.cs | 57 +- .../Models/TodoTaskListCollectionResponse.cs | 44 +- .../generated/Models/TokenIssuancePolicy.cs | 29 +- .../generated/Models/TokenLifetimePolicy.cs | 29 +- src/sample/generated/Models/Trending.cs | 59 +- .../Models/TrendingCollectionResponse.cs | 75 + .../generated/Models/UnifiedStorageQuota.cs | 92 + src/sample/generated/Models/UsageDetails.cs | 38 +- src/sample/generated/Models/UsedInsight.cs | 61 +- .../Models/UsedInsightCollectionResponse.cs | 75 + src/sample/generated/Models/User.cs | 787 ++++---- src/sample/generated/Models/UserActivity.cs | 79 +- .../Models/UserCollectionResponse.cs | 44 +- src/sample/generated/Models/UserIdentity.cs | 35 +- .../generated/Models/UserInsightsSettings.cs | 50 + src/sample/generated/Models/UserPrint.cs | 42 +- src/sample/generated/Models/UserPurpose.cs | 23 +- .../Models/UserScopeTeamsAppInstallation.cs | 37 +- src/sample/generated/Models/UserSettings.cs | 75 +- .../generated/Models/UserSolutionRoot.cs | 56 + src/sample/generated/Models/UserStorage.cs | 56 + src/sample/generated/Models/UserTeamwork.cs | 65 +- .../generated/Models/VerifiedPublisher.cs | 40 +- src/sample/generated/Models/Video.cs | 54 +- src/sample/generated/Models/VisualInfo.cs | 56 +- .../Models/WatermarkProtectionValues.cs | 38 +- src/sample/generated/Models/WeakAlgorithms.cs | 13 +- src/sample/generated/Models/WebApplication.cs | 56 +- src/sample/generated/Models/Website.cs | 44 +- src/sample/generated/Models/WebsiteType.cs | 19 +- src/sample/generated/Models/WeekIndex.cs | 19 +- .../generated/Models/WellknownListName.cs | 17 +- .../Models/WindowsDefenderProductStatus.cs | 7 +- .../Models/WindowsDeviceHealthState.cs | 7 +- .../Models/WindowsDeviceMalwareState.cs | 67 +- ...owsHelloForBusinessAuthenticationMethod.cs | 47 +- .../Models/WindowsMalwareCategory.cs | 7 +- .../Models/WindowsMalwareExecutionState.cs | 7 +- .../Models/WindowsMalwareSeverity.cs | 7 +- .../generated/Models/WindowsMalwareState.cs | 7 +- .../Models/WindowsMalwareThreatState.cs | 7 +- .../Models/WindowsProtectionState.cs | 83 +- src/sample/generated/Models/WindowsSetting.cs | 80 + .../WindowsSettingCollectionResponse.cs | 75 + .../Models/WindowsSettingInstance.cs | 68 + ...indowsSettingInstanceCollectionResponse.cs | 75 + .../generated/Models/WindowsSettingType.cs | 24 + src/sample/generated/Models/Workbook.cs | 85 +- .../generated/Models/WorkbookApplication.cs | 31 +- src/sample/generated/Models/WorkbookChart.cs | 95 +- .../Models/WorkbookChartAreaFormat.cs | 45 +- .../generated/Models/WorkbookChartAxes.cs | 53 +- .../generated/Models/WorkbookChartAxis.cs | 93 +- .../Models/WorkbookChartAxisFormat.cs | 45 +- .../Models/WorkbookChartAxisTitle.cs | 43 +- .../Models/WorkbookChartAxisTitleFormat.cs | 37 +- .../Models/WorkbookChartDataLabelFormat.cs | 45 +- .../Models/WorkbookChartDataLabels.cs | 67 +- .../generated/Models/WorkbookChartFill.cs | 29 +- .../generated/Models/WorkbookChartFont.cs | 53 +- .../Models/WorkbookChartGridlines.cs | 41 +- .../Models/WorkbookChartGridlinesFormat.cs | 37 +- .../generated/Models/WorkbookChartLegend.cs | 47 +- .../Models/WorkbookChartLegendFormat.cs | 45 +- .../Models/WorkbookChartLineFormat.cs | 33 +- .../generated/Models/WorkbookChartPoint.cs | 45 +- .../Models/WorkbookChartPointFormat.cs | 37 +- .../generated/Models/WorkbookChartSeries.cs | 51 +- .../Models/WorkbookChartSeriesFormat.cs | 45 +- .../generated/Models/WorkbookChartTitle.cs | 49 +- .../Models/WorkbookChartTitleFormat.cs | 45 +- .../generated/Models/WorkbookComment.cs | 47 +- .../generated/Models/WorkbookCommentReply.cs | 37 +- src/sample/generated/Models/WorkbookFilter.cs | 37 +- .../Models/WorkbookFilterCriteria.cs | 74 +- .../generated/Models/WorkbookFunctions.cs | 29 +- src/sample/generated/Models/WorkbookIcon.cs | 42 +- .../generated/Models/WorkbookNamedItem.cs | 61 +- .../generated/Models/WorkbookOperation.cs | 45 +- .../Models/WorkbookOperationError.cs | 46 +- .../Models/WorkbookOperationStatus.cs | 17 +- .../generated/Models/WorkbookPivotTable.cs | 41 +- .../generated/Models/WorkbookSortField.cs | 52 +- src/sample/generated/Models/WorkbookTable.cs | 91 +- .../generated/Models/WorkbookTableColumn.cs | 53 +- .../generated/Models/WorkbookTableRow.cs | 41 +- .../generated/Models/WorkbookTableSort.cs | 47 +- .../generated/Models/WorkbookWorksheet.cs | 85 +- .../Models/WorkbookWorksheetProtection.cs | 41 +- .../WorkbookWorksheetProtectionOptions.cs | 56 +- src/sample/generated/Models/WorkingHours.cs | 54 +- .../generated/Models/WorkingTimeSchedule.cs | 46 + .../Users/Count/CountRequestBuilder.cs | 49 +- .../Count/CountRequestBuilder.cs | 49 +- .../CreatedObjectsRequestBuilder.cs | 78 +- .../Item/DirectoryObjectItemRequestBuilder.cs | 55 +- ...softGraphServicePrincipalRequestBuilder.cs | 49 +- .../Count/CountRequestBuilder.cs | 49 +- ...softGraphServicePrincipalRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- .../DirectReportsRequestBuilder.cs | 78 +- .../Item/DirectoryObjectItemRequestBuilder.cs | 61 +- .../MicrosoftGraphOrgContactRequestBuilder.cs | 49 +- .../MicrosoftGraphUserRequestBuilder.cs | 49 +- .../Count/CountRequestBuilder.cs | 49 +- .../MicrosoftGraphOrgContactRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- .../MicrosoftGraphUserRequestBuilder.cs | 57 +- .../Extensions/Count/CountRequestBuilder.cs | 49 +- .../Extensions/ExtensionsRequestBuilder.cs | 92 +- .../Item/ExtensionItemRequestBuilder.cs | 104 +- .../Item/Insights/InsightsRequestBuilder.cs | 363 ++++ .../Shared/Count/CountRequestBuilder.cs | 130 ++ .../LastSharedMethodRequestBuilder.cs | 147 ++ .../Item/Resource/ResourceRequestBuilder.cs | 147 ++ .../Item/SharedInsightItemRequestBuilder.cs | 333 ++++ .../Insights/Shared/SharedRequestBuilder.cs | 337 ++++ .../Trending/Count/CountRequestBuilder.cs | 130 ++ .../Item/Resource/ResourceRequestBuilder.cs | 147 ++ .../Item/TrendingItemRequestBuilder.cs | 315 ++++ .../Trending/TrendingRequestBuilder.cs | 336 ++++ .../Used/Count/CountRequestBuilder.cs | 130 ++ .../Item/Resource/ResourceRequestBuilder.cs | 147 ++ .../Item/UsedInsightItemRequestBuilder.cs | 315 ++++ .../Item/Insights/Used/UsedRequestBuilder.cs | 336 ++++ .../Count/CountRequestBuilder.cs | 49 +- .../Item/LicenseDetailsItemRequestBuilder.cs | 104 +- .../LicenseDetailsRequestBuilder.cs | 101 +- .../MailboxSettingsRequestBuilder.cs | 86 +- .../Item/Manager/ManagerRequestBuilder.cs | 134 +- .../Item/Manager/Ref/RefRequestBuilder.cs | 119 +- .../MemberOf/Count/CountRequestBuilder.cs | 49 +- .../Item/DirectoryObjectItemRequestBuilder.cs | 67 +- ...ftGraphAdministrativeUnitRequestBuilder.cs | 49 +- ...crosoftGraphDirectoryRoleRequestBuilder.cs | 49 +- .../MicrosoftGraphGroupRequestBuilder.cs | 58 +- .../Item/MemberOf/MemberOfRequestBuilder.cs | 89 +- .../Count/CountRequestBuilder.cs | 49 +- ...ftGraphAdministrativeUnitRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- ...crosoftGraphDirectoryRoleRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- .../MicrosoftGraphGroupRequestBuilder.cs | 66 +- .../Count/CountRequestBuilder.cs | 49 +- ...OAuth2PermissionGrantItemRequestBuilder.cs | 49 +- .../Oauth2PermissionGrantsRequestBuilder.cs | 71 +- .../Count/CountRequestBuilder.cs | 65 +- .../Item/OutlookCategoryItemRequestBuilder.cs | 144 +- .../MasterCategoriesRequestBuilder.cs | 141 +- .../Item/Outlook/OutlookRequestBuilder.cs | 72 +- .../OwnedDevices/Count/CountRequestBuilder.cs | 49 +- .../Item/DirectoryObjectItemRequestBuilder.cs | 75 +- ...oftGraphAppRoleAssignmentRequestBuilder.cs | 49 +- .../MicrosoftGraphDeviceRequestBuilder.cs | 49 +- .../MicrosoftGraphEndpointRequestBuilder.cs | 49 +- .../Count/CountRequestBuilder.cs | 49 +- ...oftGraphAppRoleAssignmentRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- .../MicrosoftGraphDeviceRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- .../MicrosoftGraphEndpointRequestBuilder.cs | 57 +- .../OwnedDevicesRequestBuilder.cs | 90 +- .../OwnedObjects/Count/CountRequestBuilder.cs | 49 +- .../Item/DirectoryObjectItemRequestBuilder.cs | 75 +- ...MicrosoftGraphApplicationRequestBuilder.cs | 49 +- .../MicrosoftGraphGroupRequestBuilder.cs | 49 +- ...softGraphServicePrincipalRequestBuilder.cs | 49 +- .../Count/CountRequestBuilder.cs | 49 +- ...MicrosoftGraphApplicationRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- .../MicrosoftGraphGroupRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- ...softGraphServicePrincipalRequestBuilder.cs | 57 +- .../OwnedObjectsRequestBuilder.cs | 90 +- .../Users/Item/Photo/PhotoRequestBuilder.cs | 137 +- .../Item/Photo/Value/ContentRequestBuilder.cs | 153 +- .../Item/ProfilePhotoItemRequestBuilder.cs | 81 +- .../Item/Value/ContentRequestBuilder.cs | 158 +- .../Users/Item/Photos/PhotosRequestBuilder.cs | 114 +- .../Count/CountRequestBuilder.cs | 49 +- .../Item/DirectoryObjectItemRequestBuilder.cs | 67 +- ...oftGraphAppRoleAssignmentRequestBuilder.cs | 49 +- .../MicrosoftGraphDeviceRequestBuilder.cs | 49 +- .../MicrosoftGraphEndpointRequestBuilder.cs | 49 +- .../Count/CountRequestBuilder.cs | 49 +- ...oftGraphAppRoleAssignmentRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- .../MicrosoftGraphDeviceRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- .../MicrosoftGraphEndpointRequestBuilder.cs | 57 +- .../RegisteredDevicesRequestBuilder.cs | 84 +- .../ItemInsightsRequestBuilder.cs | 280 +++ .../Item/Settings/SettingsRequestBuilder.cs | 200 +- .../ShiftPreferencesRequestBuilder.cs | 118 +- .../Storage/Quota/QuotaRequestBuilder.cs | 307 +++ .../Services/Count/CountRequestBuilder.cs | 130 ++ ...StorageQuotaBreakdownItemRequestBuilder.cs | 297 +++ .../Quota/Services/ServicesRequestBuilder.cs | 334 ++++ .../Settings/Storage/StorageRequestBuilder.cs | 305 +++ .../Windows/Count/CountRequestBuilder.cs | 130 ++ .../Instances/Count/CountRequestBuilder.cs | 136 ++ .../Item/Instances/InstancesRequestBuilder.cs | 346 ++++ ...indowsSettingInstanceItemRequestBuilder.cs | 315 ++++ .../Item/WindowsSettingItemRequestBuilder.cs | 325 ++++ .../Settings/Windows/WindowsRequestBuilder.cs | 336 ++++ .../Sponsors/Count/CountRequestBuilder.cs | 130 ++ .../Item/DirectoryObjectItemRequestBuilder.cs | 147 ++ .../Item/Sponsors/SponsorsRequestBuilder.cs | 261 +++ .../Todo/Lists/Count/CountRequestBuilder.cs | 49 +- .../Extensions/Count/CountRequestBuilder.cs | 49 +- .../Extensions/ExtensionsRequestBuilder.cs | 92 +- .../Item/ExtensionItemRequestBuilder.cs | 104 +- .../Item/Tasks/Count/CountRequestBuilder.cs | 49 +- .../AttachmentSessionsRequestBuilder.cs | 96 +- .../Count/CountRequestBuilder.cs | 65 +- .../AttachmentSessionItemRequestBuilder.cs | 128 +- .../Item/Content/ContentRequestBuilder.cs | 157 +- .../Attachments/AttachmentsRequestBuilder.cs | 141 +- .../Attachments/Count/CountRequestBuilder.cs | 65 +- .../Item/AttachmentBaseItemRequestBuilder.cs | 115 +- .../Item/Value/ContentRequestBuilder.cs | 171 +- .../ChecklistItemsRequestBuilder.cs | 108 +- .../Count/CountRequestBuilder.cs | 49 +- .../Item/ChecklistItemItemRequestBuilder.cs | 127 +- .../Extensions/Count/CountRequestBuilder.cs | 49 +- .../Extensions/ExtensionsRequestBuilder.cs | 92 +- .../Item/ExtensionItemRequestBuilder.cs | 104 +- .../Count/CountRequestBuilder.cs | 49 +- .../Item/LinkedResourceItemRequestBuilder.cs | 127 +- .../LinkedResourcesRequestBuilder.cs | 108 +- .../Tasks/Item/TodoTaskItemRequestBuilder.cs | 157 +- .../Lists/Item/Tasks/TasksRequestBuilder.cs | 108 +- .../Item/TodoTaskListItemRequestBuilder.cs | 139 +- .../Item/Todo/Lists/ListsRequestBuilder.cs | 108 +- .../Users/Item/Todo/TodoRequestBuilder.cs | 110 +- .../Count/CountRequestBuilder.cs | 49 +- .../Item/DirectoryObjectItemRequestBuilder.cs | 67 +- ...ftGraphAdministrativeUnitRequestBuilder.cs | 49 +- ...crosoftGraphDirectoryRoleRequestBuilder.cs | 49 +- .../MicrosoftGraphGroupRequestBuilder.cs | 49 +- .../Count/CountRequestBuilder.cs | 49 +- ...ftGraphAdministrativeUnitRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- ...crosoftGraphDirectoryRoleRequestBuilder.cs | 57 +- .../Count/CountRequestBuilder.cs | 49 +- .../MicrosoftGraphGroupRequestBuilder.cs | 57 +- .../TransitiveMemberOfRequestBuilder.cs | 89 +- .../Users/Item/UserItemRequestBuilder.cs | 280 ++- .../generated/Users/UsersRequestBuilder.cs | 106 +- src/sample/generated/kiota-lock.json | 6 +- 840 files changed, 36980 insertions(+), 15360 deletions(-) create mode 100644 src/sample/generated/Models/BaseSitePage.cs create mode 100644 src/sample/generated/Models/BulkUpload.cs create mode 100644 src/sample/generated/Models/CallRecording.cs create mode 100644 src/sample/generated/Models/ChannelSummary.cs create mode 100644 src/sample/generated/Models/CloudClipboardItem.cs create mode 100644 src/sample/generated/Models/CloudClipboardItemPayload.cs create mode 100644 src/sample/generated/Models/CloudClipboardRoot.cs create mode 100644 src/sample/generated/Models/CustomAppManagementConfiguration.cs create mode 100644 src/sample/generated/Models/ItemInsights.cs create mode 100644 src/sample/generated/Models/ItemRetentionLabel.cs create mode 100644 src/sample/generated/Models/NativeAuthenticationApisEnabled.cs create mode 100644 src/sample/generated/Models/OnlineMeetingBase.cs create mode 100644 src/sample/generated/Models/PageLayoutType.cs create mode 100644 src/sample/generated/Models/RemoteDesktopSecurityConfiguration.cs create mode 100644 src/sample/generated/Models/RetentionLabelSettings.cs create mode 100644 src/sample/generated/Models/Security/BehaviorDuringRetentionPeriod.cs create mode 100644 src/sample/generated/Models/ServiceStorageQuotaBreakdown.cs create mode 100644 src/sample/generated/Models/ServiceStorageQuotaBreakdownCollectionResponse.cs create mode 100644 src/sample/generated/Models/SharedInsightCollectionResponse.cs create mode 100644 src/sample/generated/Models/SiteArchivalDetails.cs create mode 100644 src/sample/generated/Models/SiteArchiveStatus.cs create mode 100644 src/sample/generated/Models/StorageQuotaBreakdown.cs create mode 100644 src/sample/generated/Models/TargetDeviceGroup.cs create mode 100644 src/sample/generated/Models/TrendingCollectionResponse.cs create mode 100644 src/sample/generated/Models/UnifiedStorageQuota.cs create mode 100644 src/sample/generated/Models/UsedInsightCollectionResponse.cs create mode 100644 src/sample/generated/Models/UserInsightsSettings.cs create mode 100644 src/sample/generated/Models/UserSolutionRoot.cs create mode 100644 src/sample/generated/Models/UserStorage.cs create mode 100644 src/sample/generated/Models/WindowsSetting.cs create mode 100644 src/sample/generated/Models/WindowsSettingCollectionResponse.cs create mode 100644 src/sample/generated/Models/WindowsSettingInstance.cs create mode 100644 src/sample/generated/Models/WindowsSettingInstanceCollectionResponse.cs create mode 100644 src/sample/generated/Models/WindowsSettingType.cs create mode 100644 src/sample/generated/Models/WorkingTimeSchedule.cs create mode 100644 src/sample/generated/Users/Item/Insights/InsightsRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Shared/Count/CountRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Shared/Item/LastSharedMethod/LastSharedMethodRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Shared/Item/Resource/ResourceRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Shared/Item/SharedInsightItemRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Shared/SharedRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Trending/Count/CountRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Trending/Item/Resource/ResourceRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Trending/Item/TrendingItemRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Trending/TrendingRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Used/Count/CountRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Used/Item/Resource/ResourceRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Used/Item/UsedInsightItemRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Insights/Used/UsedRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/ItemInsights/ItemInsightsRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Storage/Quota/QuotaRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Storage/Quota/Services/Count/CountRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Storage/Quota/Services/Item/ServiceStorageQuotaBreakdownItemRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Storage/Quota/Services/ServicesRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Storage/StorageRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Windows/Count/CountRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Windows/Item/Instances/Count/CountRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Windows/Item/Instances/InstancesRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Windows/Item/Instances/Item/WindowsSettingInstanceItemRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Windows/Item/WindowsSettingItemRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Settings/Windows/WindowsRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Sponsors/Count/CountRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilder.cs create mode 100644 src/sample/generated/Users/Item/Sponsors/SponsorsRequestBuilder.cs diff --git a/src/sample/generated/ApiClient.cs b/src/sample/generated/ApiClient.cs index 304809e2..1f22fd20 100644 --- a/src/sample/generated/ApiClient.cs +++ b/src/sample/generated/ApiClient.cs @@ -1,4 +1,5 @@ // +#pragma warning disable CS0618 using ApiSdk.Users; using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -15,15 +16,20 @@ using System.Text; using System.Threading.Tasks; using System; -namespace ApiSdk { +namespace ApiSdk +{ /// /// The main entry point of the SDK, exposes the configuration and the fluent API. /// - public class ApiClient : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ApiClient : BaseCliRequestBuilder + { /// - /// Instantiates a new ApiClient and sets the default values. + /// Instantiates a new and sets the default values. /// - public Command BuildRootCommand() { + /// A + public Command BuildRootCommand() + { var command = new RootCommand(); command.Description = "Instantiates a new ApiClient and sets the default values."; command.AddCommand(BuildUsersNavCommand()); @@ -32,10 +38,12 @@ public Command BuildRootCommand() { /// /// The users property /// - public Command BuildUsersNavCommand() { + /// A + public Command BuildUsersNavCommand() + { var command = new Command("users"); command.Description = "The users property"; - var builder = new UsersRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.UsersRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -55,9 +63,11 @@ public Command BuildUsersNavCommand() { return command; } /// - /// Instantiates a new ApiClient and sets the default values. + /// Instantiates a new and sets the default values. /// - public ApiClient() : base("{+baseurl}", new Dictionary()) { + public ApiClient() : base("{+baseurl}", new Dictionary()) + { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AccessAction.cs b/src/sample/generated/Models/AccessAction.cs index a8281d75..b42b476c 100644 --- a/src/sample/generated/Models/AccessAction.cs +++ b/src/sample/generated/Models/AccessAction.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AccessAction : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AccessAction : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new accessAction and sets the default values. + /// Instantiates a new and sets the default values. /// - public AccessAction() { + public AccessAction() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AccessAction CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AccessAction CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AccessAction(); + return new global::ApiSdk.Models.AccessAction(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ActionState.cs b/src/sample/generated/Models/ActionState.cs index 77c82821..f6186a2f 100644 --- a/src/sample/generated/Models/ActionState.cs +++ b/src/sample/generated/Models/ActionState.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// State of the action on the device - public enum ActionState { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ActionState + { /// Not a valid action state [EnumMember(Value = "none")] None, diff --git a/src/sample/generated/Models/ActivityHistoryItem.cs b/src/sample/generated/Models/ActivityHistoryItem.cs index 328db0a4..d48b4d36 100644 --- a/src/sample/generated/Models/ActivityHistoryItem.cs +++ b/src/sample/generated/Models/ActivityHistoryItem.cs @@ -1,33 +1,39 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ActivityHistoryItem : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActivityHistoryItem : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Optional. The duration of active user engagement. if not supplied, this is calculated from the startedDateTime and lastActiveDateTime. public int? ActiveDurationSeconds { get; set; } /// The activity property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public UserActivity? Activity { get; set; } + public global::ApiSdk.Models.UserActivity? Activity { get; set; } #nullable restore #else - public UserActivity Activity { get; set; } + public global::ApiSdk.Models.UserActivity Activity { get; set; } #endif /// Set by the server. DateTime in UTC when the object was created on the server. public DateTimeOffset? CreatedDateTime { get; set; } - /// Optional. UTC DateTime when the historyItem will undergo hard-delete. Can be set by the client. + /// Optional. UTC DateTime when the activityHistoryItem will undergo hard-delete. Can be set by the client. public DateTimeOffset? ExpirationDateTime { get; set; } - /// Optional. UTC DateTime when the historyItem (activity session) was last understood as active or finished - if null, historyItem status should be Ongoing. + /// Optional. UTC DateTime when the activityHistoryItem (activity session) was last understood as active or finished - if null, activityHistoryItem status should be Ongoing. public DateTimeOffset? LastActiveDateTime { get; set; } /// Set by the server. DateTime in UTC when the object was modified on the server. public DateTimeOffset? LastModifiedDateTime { get; set; } - /// Required. UTC DateTime when the historyItem (activity session) was started. Required for timeline history. + /// Required. UTC DateTime when the activityHistoryItem (activity session) was started. Required for timeline history. public DateTimeOffset? StartedDateTime { get; set; } /// The status property - public ApiSdk.Models.Status? Status { get; set; } + public global::ApiSdk.Models.Status? Status { get; set; } /// Optional. The timezone in which the user's device used to generate the activity was located at activity creation time. Values supplied as Olson IDs in order to support cross-platform representation. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -39,43 +45,50 @@ public class ActivityHistoryItem : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ActivityHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ActivityHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ActivityHistoryItem(); + return new global::ApiSdk.Models.ActivityHistoryItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"activeDurationSeconds", n => { ActiveDurationSeconds = n.GetIntValue(); } }, - {"activity", n => { Activity = n.GetObjectValue(UserActivity.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastActiveDateTime", n => { LastActiveDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"startedDateTime", n => { StartedDateTime = n.GetDateTimeOffsetValue(); } }, - {"status", n => { Status = n.GetEnumValue(); } }, - {"userTimezone", n => { UserTimezone = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "activeDurationSeconds", n => { ActiveDurationSeconds = n.GetIntValue(); } }, + { "activity", n => { Activity = n.GetObjectValue(global::ApiSdk.Models.UserActivity.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastActiveDateTime", n => { LastActiveDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "startedDateTime", n => { StartedDateTime = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "userTimezone", n => { UserTimezone = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDurationSeconds", ActiveDurationSeconds); - writer.WriteObjectValue("activity", Activity); + writer.WriteObjectValue("activity", Activity); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteDateTimeOffsetValue("lastActiveDateTime", LastActiveDateTime); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteDateTimeOffsetValue("startedDateTime", StartedDateTime); - writer.WriteEnumValue("status", Status); + writer.WriteEnumValue("status", Status); writer.WriteStringValue("userTimezone", UserTimezone); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AddIn.cs b/src/sample/generated/Models/AddIn.cs index e4e6e2f4..d7f5b768 100644 --- a/src/sample/generated/Models/AddIn.cs +++ b/src/sample/generated/Models/AddIn.cs @@ -1,24 +1,30 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AddIn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AddIn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The id property + /// The unique identifier for the addIn object. public Guid? Id { get; set; } - /// The properties property + /// The collection of key-value pairs that define parameters that the consuming service can use or call. You must specify this property when performing a POST or a PATCH operation on the addIns collection. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Properties { get; set; } + public List? Properties { get; set; } #nullable restore #else - public List Properties { get; set; } + public List Properties { get; set; } #endif - /// The type property + /// The unique name for the functionality exposed by the app. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Type { get; set; } @@ -27,39 +33,47 @@ public class AddIn : IAdditionalDataHolder, IParsable { public string Type { get; set; } #endif /// - /// Instantiates a new addIn and sets the default values. + /// Instantiates a new and sets the default values. /// - public AddIn() { + public AddIn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AddIn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AddIn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AddIn(); + return new global::ApiSdk.Models.AddIn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"id", n => { Id = n.GetGuidValue(); } }, - {"properties", n => { Properties = n.GetCollectionOfObjectValues(KeyValue.CreateFromDiscriminatorValue)?.ToList(); } }, - {"type", n => { Type = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetGuidValue(); } }, + { "properties", n => { Properties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.KeyValue.CreateFromDiscriminatorValue)?.AsList(); } }, + { "type", n => { Type = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteGuidValue("id", Id); - writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteCollectionOfObjectValues("properties", Properties); writer.WriteStringValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AdministrativeUnit.cs b/src/sample/generated/Models/AdministrativeUnit.cs index 511c7ec6..0ca47e41 100644 --- a/src/sample/generated/Models/AdministrativeUnit.cs +++ b/src/sample/generated/Models/AdministrativeUnit.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AdministrativeUnit : DirectoryObject, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AdministrativeUnit : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { /// An optional description for the administrative unit. Supports $filter (eq, ne, in, startsWith), $search. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -25,26 +31,52 @@ public class AdministrativeUnit : DirectoryObject, IParsable { /// The collection of open extensions defined for this administrative unit. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif + /// The isMemberManagementRestricted property + public bool? IsMemberManagementRestricted { get; set; } /// Users and groups that are members of this administrative unit. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Members { get; set; } + public List? Members { get; set; } #nullable restore #else - public List Members { get; set; } + public List Members { get; set; } +#endif + /// The membershipRule property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembershipRule { get; set; } +#nullable restore +#else + public string MembershipRule { get; set; } +#endif + /// The membershipRuleProcessingState property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembershipRuleProcessingState { get; set; } +#nullable restore +#else + public string MembershipRuleProcessingState { get; set; } +#endif + /// The membershipType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembershipType { get; set; } +#nullable restore +#else + public string MembershipType { get; set; } #endif /// Scoped-role members of this administrative unit. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ScopedRoleMembers { get; set; } + public List? ScopedRoleMembers { get; set; } #nullable restore #else - public List ScopedRoleMembers { get; set; } + public List ScopedRoleMembers { get; set; } #endif /// Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership. If not set (value is null), the default behavior is public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -57,37 +89,52 @@ public class AdministrativeUnit : DirectoryObject, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AdministrativeUnit CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AdministrativeUnit CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AdministrativeUnit(); + return new global::ApiSdk.Models.AdministrativeUnit(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"members", n => { Members = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"scopedRoleMembers", n => { ScopedRoleMembers = n.GetCollectionOfObjectValues(ScopedRoleMembership.CreateFromDiscriminatorValue)?.ToList(); } }, - {"visibility", n => { Visibility = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "isMemberManagementRestricted", n => { IsMemberManagementRestricted = n.GetBoolValue(); } }, + { "members", n => { Members = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "membershipRule", n => { MembershipRule = n.GetStringValue(); } }, + { "membershipRuleProcessingState", n => { MembershipRuleProcessingState = n.GetStringValue(); } }, + { "membershipType", n => { MembershipType = n.GetStringValue(); } }, + { "scopedRoleMembers", n => { ScopedRoleMembers = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ScopedRoleMembership.CreateFromDiscriminatorValue)?.AsList(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); - writer.WriteCollectionOfObjectValues("extensions", Extensions); - writer.WriteCollectionOfObjectValues("members", Members); - writer.WriteCollectionOfObjectValues("scopedRoleMembers", ScopedRoleMembers); + writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteBoolValue("isMemberManagementRestricted", IsMemberManagementRestricted); + writer.WriteCollectionOfObjectValues("members", Members); + writer.WriteStringValue("membershipRule", MembershipRule); + writer.WriteStringValue("membershipRuleProcessingState", MembershipRuleProcessingState); + writer.WriteStringValue("membershipType", MembershipType); + writer.WriteCollectionOfObjectValues("scopedRoleMembers", ScopedRoleMembers); writer.WriteStringValue("visibility", Visibility); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AdministrativeUnitCollectionResponse.cs b/src/sample/generated/Models/AdministrativeUnitCollectionResponse.cs index e0a9a83c..5e4e5d91 100644 --- a/src/sample/generated/Models/AdministrativeUnitCollectionResponse.cs +++ b/src/sample/generated/Models/AdministrativeUnitCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AdministrativeUnitCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AdministrativeUnitCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class AdministrativeUnitCollectionResponse : IAdditionalDataHolder, IPars /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new administrativeUnitCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public AdministrativeUnitCollectionResponse() { + public AdministrativeUnitCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AdministrativeUnitCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AdministrativeUnitCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AdministrativeUnitCollectionResponse(); + return new global::ApiSdk.Models.AdministrativeUnitCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(AdministrativeUnit.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AdministrativeUnit.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AgreementAcceptance.cs b/src/sample/generated/Models/AgreementAcceptance.cs index f421c8fd..719a2a03 100644 --- a/src/sample/generated/Models/AgreementAcceptance.cs +++ b/src/sample/generated/Models/AgreementAcceptance.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AgreementAcceptance : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AgreementAcceptance : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The identifier of the agreement file accepted by the user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -59,7 +65,7 @@ public class AgreementAcceptance : Entity, IParsable { /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? RecordedDateTime { get; set; } /// The state property - public AgreementAcceptanceState? State { get; set; } + public global::ApiSdk.Models.AgreementAcceptanceState? State { get; set; } /// Display name of the user when the acceptance was recorded. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -95,36 +101,42 @@ public class AgreementAcceptance : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AgreementAcceptance CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AgreementAcceptance CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AgreementAcceptance(); + return new global::ApiSdk.Models.AgreementAcceptance(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"agreementFileId", n => { AgreementFileId = n.GetStringValue(); } }, - {"agreementId", n => { AgreementId = n.GetStringValue(); } }, - {"deviceDisplayName", n => { DeviceDisplayName = n.GetStringValue(); } }, - {"deviceId", n => { DeviceId = n.GetStringValue(); } }, - {"deviceOSType", n => { DeviceOSType = n.GetStringValue(); } }, - {"deviceOSVersion", n => { DeviceOSVersion = n.GetStringValue(); } }, - {"expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"recordedDateTime", n => { RecordedDateTime = n.GetDateTimeOffsetValue(); } }, - {"state", n => { State = n.GetEnumValue(); } }, - {"userDisplayName", n => { UserDisplayName = n.GetStringValue(); } }, - {"userEmail", n => { UserEmail = n.GetStringValue(); } }, - {"userId", n => { UserId = n.GetStringValue(); } }, - {"userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "agreementFileId", n => { AgreementFileId = n.GetStringValue(); } }, + { "agreementId", n => { AgreementId = n.GetStringValue(); } }, + { "deviceDisplayName", n => { DeviceDisplayName = n.GetStringValue(); } }, + { "deviceId", n => { DeviceId = n.GetStringValue(); } }, + { "deviceOSType", n => { DeviceOSType = n.GetStringValue(); } }, + { "deviceOSVersion", n => { DeviceOSVersion = n.GetStringValue(); } }, + { "expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "recordedDateTime", n => { RecordedDateTime = n.GetDateTimeOffsetValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "userDisplayName", n => { UserDisplayName = n.GetStringValue(); } }, + { "userEmail", n => { UserEmail = n.GetStringValue(); } }, + { "userId", n => { UserId = n.GetStringValue(); } }, + { "userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("agreementFileId", AgreementFileId); @@ -135,7 +147,7 @@ public class AgreementAcceptance : Entity, IParsable { writer.WriteStringValue("deviceOSVersion", DeviceOSVersion); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteDateTimeOffsetValue("recordedDateTime", RecordedDateTime); - writer.WriteEnumValue("state", State); + writer.WriteEnumValue("state", State); writer.WriteStringValue("userDisplayName", UserDisplayName); writer.WriteStringValue("userEmail", UserEmail); writer.WriteStringValue("userId", UserId); @@ -143,3 +155,4 @@ public class AgreementAcceptance : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AgreementAcceptanceState.cs b/src/sample/generated/Models/AgreementAcceptanceState.cs index 1f1d7e55..f835d926 100644 --- a/src/sample/generated/Models/AgreementAcceptanceState.cs +++ b/src/sample/generated/Models/AgreementAcceptanceState.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AgreementAcceptanceState { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AgreementAcceptanceState + #pragma warning restore CS1591 + { [EnumMember(Value = "accepted")] + #pragma warning disable CS1591 Accepted, + #pragma warning restore CS1591 [EnumMember(Value = "declined")] + #pragma warning disable CS1591 Declined, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/Album.cs b/src/sample/generated/Models/Album.cs index db2b0b0d..3e0571a7 100644 --- a/src/sample/generated/Models/Album.cs +++ b/src/sample/generated/Models/Album.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Album : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Album : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// Unique identifier of the [driveItem][] that is the cover of the album. + /// Unique identifier of the driveItem that is the cover of the album. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CoverImageItemId { get; set; } @@ -17,35 +23,43 @@ public class Album : IAdditionalDataHolder, IParsable { public string CoverImageItemId { get; set; } #endif /// - /// Instantiates a new album and sets the default values. + /// Instantiates a new and sets the default values. /// - public Album() { + public Album() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Album CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Album CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Album(); + return new global::ApiSdk.Models.Album(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"coverImageItemId", n => { CoverImageItemId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "coverImageItemId", n => { CoverImageItemId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("coverImageItemId", CoverImageItemId); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AlternativeSecurityId.cs b/src/sample/generated/Models/AlternativeSecurityId.cs index 13242ee9..0d6a10f8 100644 --- a/src/sample/generated/Models/AlternativeSecurityId.cs +++ b/src/sample/generated/Models/AlternativeSecurityId.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AlternativeSecurityId : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AlternativeSecurityId : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// For internal use only. @@ -27,34 +33,41 @@ public class AlternativeSecurityId : IAdditionalDataHolder, IParsable { /// For internal use only. public int? Type { get; set; } /// - /// Instantiates a new alternativeSecurityId and sets the default values. + /// Instantiates a new and sets the default values. /// - public AlternativeSecurityId() { + public AlternativeSecurityId() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AlternativeSecurityId CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AlternativeSecurityId CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AlternativeSecurityId(); + return new global::ApiSdk.Models.AlternativeSecurityId(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"identityProvider", n => { IdentityProvider = n.GetStringValue(); } }, - {"key", n => { Key = n.GetByteArrayValue(); } }, - {"type", n => { Type = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "identityProvider", n => { IdentityProvider = n.GetStringValue(); } }, + { "key", n => { Key = n.GetByteArrayValue(); } }, + { "type", n => { Type = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("identityProvider", IdentityProvider); writer.WriteByteArrayValue("key", Key); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ApiApplication.cs b/src/sample/generated/Models/ApiApplication.cs index f6a29964..d3da23c8 100644 --- a/src/sample/generated/Models/ApiApplication.cs +++ b/src/sample/generated/Models/ApiApplication.cs @@ -1,16 +1,22 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ApiApplication : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApiApplication : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// When true, allows an application to use claims mapping without specifying a custom signing key. public bool? AcceptMappedClaims { get; set; } /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// Used for bundling consent if you have a solution that contains two parts: a client app and a custom web API app. If you set the appID of the client app to this value, the user only consents once to the client app. Azure AD knows that consenting to the client means implicitly consenting to the web API and automatically provisions service principals for both APIs at the same time. Both the client and the web API app must be registered in the same tenant. + /// Used for bundling consent if you have a solution that contains two parts: a client app and a custom web API app. If you set the appID of the client app to this value, the user only consents once to the client app. Microsoft Entra ID knows that consenting to the client means implicitly consenting to the web API and automatically provisions service principals for both APIs at the same time. Both the client and the web API app must be registered in the same tenant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? KnownClientApplications { get; set; } @@ -21,59 +27,67 @@ public class ApiApplication : IAdditionalDataHolder, IParsable { /// The definition of the delegated permissions exposed by the web API represented by this application registration. These delegated permissions may be requested by a client application, and may be granted by users or administrators during consent. Delegated permissions are sometimes referred to as OAuth 2.0 scopes. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Oauth2PermissionScopes { get; set; } + public List? Oauth2PermissionScopes { get; set; } #nullable restore #else - public List Oauth2PermissionScopes { get; set; } + public List Oauth2PermissionScopes { get; set; } #endif /// Lists the client applications that are preauthorized with the specified delegated permissions to access this application's APIs. Users aren't required to consent to any preauthorized application (for the permissions specified). However, any other permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PreAuthorizedApplications { get; set; } + public List? PreAuthorizedApplications { get; set; } #nullable restore #else - public List PreAuthorizedApplications { get; set; } + public List PreAuthorizedApplications { get; set; } #endif /// Specifies the access token version expected by this resource. This changes the version and format of the JWT produced independent of the endpoint or client used to request the access token. The endpoint used, v1.0 or v2.0, is chosen by the client and only impacts the version of id_tokens. Resources need to explicitly configure requestedAccessTokenVersion to indicate the supported access token format. Possible values for requestedAccessTokenVersion are 1, 2, or null. If the value is null, this defaults to 1, which corresponds to the v1.0 endpoint. If signInAudience on the application is configured as AzureADandPersonalMicrosoftAccount or PersonalMicrosoftAccount, the value for this property must be 2. public int? RequestedAccessTokenVersion { get; set; } /// - /// Instantiates a new apiApplication and sets the default values. + /// Instantiates a new and sets the default values. /// - public ApiApplication() { + public ApiApplication() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ApiApplication CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ApiApplication CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ApiApplication(); + return new global::ApiSdk.Models.ApiApplication(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"acceptMappedClaims", n => { AcceptMappedClaims = n.GetBoolValue(); } }, - {"knownClientApplications", n => { KnownClientApplications = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"oauth2PermissionScopes", n => { Oauth2PermissionScopes = n.GetCollectionOfObjectValues(PermissionScope.CreateFromDiscriminatorValue)?.ToList(); } }, - {"preAuthorizedApplications", n => { PreAuthorizedApplications = n.GetCollectionOfObjectValues(PreAuthorizedApplication.CreateFromDiscriminatorValue)?.ToList(); } }, - {"requestedAccessTokenVersion", n => { RequestedAccessTokenVersion = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "acceptMappedClaims", n => { AcceptMappedClaims = n.GetBoolValue(); } }, + { "knownClientApplications", n => { KnownClientApplications = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "oauth2PermissionScopes", n => { Oauth2PermissionScopes = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PermissionScope.CreateFromDiscriminatorValue)?.AsList(); } }, + { "preAuthorizedApplications", n => { PreAuthorizedApplications = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PreAuthorizedApplication.CreateFromDiscriminatorValue)?.AsList(); } }, + { "requestedAccessTokenVersion", n => { RequestedAccessTokenVersion = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("acceptMappedClaims", AcceptMappedClaims); writer.WriteCollectionOfPrimitiveValues("knownClientApplications", KnownClientApplications); - writer.WriteCollectionOfObjectValues("oauth2PermissionScopes", Oauth2PermissionScopes); - writer.WriteCollectionOfObjectValues("preAuthorizedApplications", PreAuthorizedApplications); + writer.WriteCollectionOfObjectValues("oauth2PermissionScopes", Oauth2PermissionScopes); + writer.WriteCollectionOfObjectValues("preAuthorizedApplications", PreAuthorizedApplications); writer.WriteIntValue("requestedAccessTokenVersion", RequestedAccessTokenVersion); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AppCredentialRestrictionType.cs b/src/sample/generated/Models/AppCredentialRestrictionType.cs index 701558f2..e63f2052 100644 --- a/src/sample/generated/Models/AppCredentialRestrictionType.cs +++ b/src/sample/generated/Models/AppCredentialRestrictionType.cs @@ -1,19 +1,36 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AppCredentialRestrictionType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AppCredentialRestrictionType + #pragma warning restore CS1591 + { [EnumMember(Value = "passwordAddition")] + #pragma warning disable CS1591 PasswordAddition, + #pragma warning restore CS1591 [EnumMember(Value = "passwordLifetime")] + #pragma warning disable CS1591 PasswordLifetime, + #pragma warning restore CS1591 [EnumMember(Value = "symmetricKeyAddition")] + #pragma warning disable CS1591 SymmetricKeyAddition, + #pragma warning restore CS1591 [EnumMember(Value = "symmetricKeyLifetime")] + #pragma warning disable CS1591 SymmetricKeyLifetime, + #pragma warning restore CS1591 [EnumMember(Value = "customPasswordAddition")] + #pragma warning disable CS1591 CustomPasswordAddition, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AppIdentity.cs b/src/sample/generated/Models/AppIdentity.cs index a9a8188c..e517f590 100644 --- a/src/sample/generated/Models/AppIdentity.cs +++ b/src/sample/generated/Models/AppIdentity.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AppIdentity : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppIdentity : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// Refers to the Unique GUID representing Application Id in the Azure Active Directory. + /// Refers to the unique ID representing application in Microsoft Entra ID. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AppId { get; set; } @@ -24,7 +30,7 @@ public class AppIdentity : IAdditionalDataHolder, IParsable { #else public string DisplayName { get; set; } #endif - /// Refers to the Unique GUID indicating Service Principal Id in Azure Active Directory for the corresponding App. + /// Refers to the unique ID for the service principal in Microsoft Entra ID. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ServicePrincipalId { get; set; } @@ -41,35 +47,42 @@ public class AppIdentity : IAdditionalDataHolder, IParsable { public string ServicePrincipalName { get; set; } #endif /// - /// Instantiates a new appIdentity and sets the default values. + /// Instantiates a new and sets the default values. /// - public AppIdentity() { + public AppIdentity() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AppIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AppIdentity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AppIdentity(); + return new global::ApiSdk.Models.AppIdentity(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"appId", n => { AppId = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"servicePrincipalId", n => { ServicePrincipalId = n.GetStringValue(); } }, - {"servicePrincipalName", n => { ServicePrincipalName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "appId", n => { AppId = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "servicePrincipalId", n => { ServicePrincipalId = n.GetStringValue(); } }, + { "servicePrincipalName", n => { ServicePrincipalName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("displayName", DisplayName); @@ -79,3 +92,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AppKeyCredentialRestrictionType.cs b/src/sample/generated/Models/AppKeyCredentialRestrictionType.cs index dee88351..8c4fb01c 100644 --- a/src/sample/generated/Models/AppKeyCredentialRestrictionType.cs +++ b/src/sample/generated/Models/AppKeyCredentialRestrictionType.cs @@ -1,11 +1,20 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AppKeyCredentialRestrictionType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AppKeyCredentialRestrictionType + #pragma warning restore CS1591 + { [EnumMember(Value = "asymmetricKeyLifetime")] + #pragma warning disable CS1591 AsymmetricKeyLifetime, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AppLogUploadState.cs b/src/sample/generated/Models/AppLogUploadState.cs index 5d7253ca..780e8ea0 100644 --- a/src/sample/generated/Models/AppLogUploadState.cs +++ b/src/sample/generated/Models/AppLogUploadState.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// AppLogUploadStatus - public enum AppLogUploadState { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum AppLogUploadState + { /// Default. Indicates that request is waiting to be processed or under processing. [EnumMember(Value = "pending")] Pending, diff --git a/src/sample/generated/Models/AppManagementConfiguration.cs b/src/sample/generated/Models/AppManagementConfiguration.cs index a2a0eb6b..13cd0aea 100644 --- a/src/sample/generated/Models/AppManagementConfiguration.cs +++ b/src/sample/generated/Models/AppManagementConfiguration.cs @@ -1,61 +1,75 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AppManagementConfiguration : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppManagementConfiguration : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Collection of keyCredential restrictions settings to be applied to an application or service principal. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? KeyCredentials { get; set; } + public List? KeyCredentials { get; set; } #nullable restore #else - public List KeyCredentials { get; set; } + public List KeyCredentials { get; set; } #endif /// Collection of password restrictions settings to be applied to an application or service principal. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PasswordCredentials { get; set; } + public List? PasswordCredentials { get; set; } #nullable restore #else - public List PasswordCredentials { get; set; } + public List PasswordCredentials { get; set; } #endif /// - /// Instantiates a new appManagementConfiguration and sets the default values. + /// Instantiates a new and sets the default values. /// - public AppManagementConfiguration() { + public AppManagementConfiguration() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AppManagementConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AppManagementConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AppManagementConfiguration(); + return new global::ApiSdk.Models.AppManagementConfiguration(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"keyCredentials", n => { KeyCredentials = n.GetCollectionOfObjectValues(KeyCredentialConfiguration.CreateFromDiscriminatorValue)?.ToList(); } }, - {"passwordCredentials", n => { PasswordCredentials = n.GetCollectionOfObjectValues(PasswordCredentialConfiguration.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "keyCredentials", n => { KeyCredentials = n.GetCollectionOfObjectValues(global::ApiSdk.Models.KeyCredentialConfiguration.CreateFromDiscriminatorValue)?.AsList(); } }, + { "passwordCredentials", n => { PasswordCredentials = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PasswordCredentialConfiguration.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("keyCredentials", KeyCredentials); - writer.WriteCollectionOfObjectValues("passwordCredentials", PasswordCredentials); + writer.WriteCollectionOfObjectValues("keyCredentials", KeyCredentials); + writer.WriteCollectionOfObjectValues("passwordCredentials", PasswordCredentials); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AppManagementPolicy.cs b/src/sample/generated/Models/AppManagementPolicy.cs index adf1e3ac..56f57445 100644 --- a/src/sample/generated/Models/AppManagementPolicy.cs +++ b/src/sample/generated/Models/AppManagementPolicy.cs @@ -1,57 +1,70 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AppManagementPolicy : PolicyBase, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppManagementPolicy : global::ApiSdk.Models.PolicyBase, IParsable + #pragma warning restore CS1591 + { /// Collection of applications and service principals to which the policy is applied. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppliesTo { get; set; } + public List? AppliesTo { get; set; } #nullable restore #else - public List AppliesTo { get; set; } + public List AppliesTo { get; set; } #endif /// Denotes whether the policy is enabled. public bool? IsEnabled { get; set; } /// The restrictions property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public AppManagementConfiguration? Restrictions { get; set; } + public global::ApiSdk.Models.CustomAppManagementConfiguration? Restrictions { get; set; } #nullable restore #else - public AppManagementConfiguration Restrictions { get; set; } + public global::ApiSdk.Models.CustomAppManagementConfiguration Restrictions { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AppManagementPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AppManagementPolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AppManagementPolicy(); + return new global::ApiSdk.Models.AppManagementPolicy(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"appliesTo", n => { AppliesTo = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, - {"restrictions", n => { Restrictions = n.GetObjectValue(AppManagementConfiguration.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "appliesTo", n => { AppliesTo = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, + { "restrictions", n => { Restrictions = n.GetObjectValue(global::ApiSdk.Models.CustomAppManagementConfiguration.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("appliesTo", AppliesTo); + writer.WriteCollectionOfObjectValues("appliesTo", AppliesTo); writer.WriteBoolValue("isEnabled", IsEnabled); - writer.WriteObjectValue("restrictions", Restrictions); + writer.WriteObjectValue("restrictions", Restrictions); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AppRole.cs b/src/sample/generated/Models/AppRole.cs index a0abe0d9..fd2e52ba 100644 --- a/src/sample/generated/Models/AppRole.cs +++ b/src/sample/generated/Models/AppRole.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AppRole : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppRole : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Specifies whether this app role can be assigned to users and groups (by setting to ['User']), to other application's (by setting to ['Application'], or both (by setting to ['User', 'Application']). App roles supporting assignment to other applications' service principals are also known as application permissions. The 'Application' value is only supported for app roles defined on application entities. @@ -53,38 +59,45 @@ public class AppRole : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new appRole and sets the default values. + /// Instantiates a new and sets the default values. /// - public AppRole() { + public AppRole() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AppRole CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AppRole CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AppRole(); + return new global::ApiSdk.Models.AppRole(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowedMemberTypes", n => { AllowedMemberTypes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"id", n => { Id = n.GetGuidValue(); } }, - {"isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, - {"origin", n => { Origin = n.GetStringValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowedMemberTypes", n => { AllowedMemberTypes = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetGuidValue(); } }, + { "isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, + { "origin", n => { Origin = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("allowedMemberTypes", AllowedMemberTypes); writer.WriteStringValue("description", Description); @@ -97,3 +110,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AppRoleAssignment.cs b/src/sample/generated/Models/AppRoleAssignment.cs index 234d10e5..058e4612 100644 --- a/src/sample/generated/Models/AppRoleAssignment.cs +++ b/src/sample/generated/Models/AppRoleAssignment.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AppRoleAssignment : DirectoryObject, IParsable { - /// The identifier (id) for the app role which is assigned to the principal. This app role must be exposed in the appRoles property on the resource application's service principal (resourceId). If the resource application has not declared any app roles, a default app role ID of 00000000-0000-0000-0000-000000000000 can be specified to signal that the principal is assigned to the resource app without any specific app roles. Required on create. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppRoleAssignment : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { + /// The identifier (id) for the app role that's assigned to the principal. This app role must be exposed in the appRoles property on the resource application's service principal (resourceId). If the resource application hasn't declared any app roles, a default app role ID of 00000000-0000-0000-0000-000000000000 can be specified to signal that the principal is assigned to the resource app without any specific app roles. Required on create. public Guid? AppRoleId { get; set; } /// The time when the app role assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } @@ -41,30 +47,36 @@ public class AppRoleAssignment : DirectoryObject, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AppRoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AppRoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AppRoleAssignment(); + return new global::ApiSdk.Models.AppRoleAssignment(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"appRoleId", n => { AppRoleId = n.GetGuidValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"principalDisplayName", n => { PrincipalDisplayName = n.GetStringValue(); } }, - {"principalId", n => { PrincipalId = n.GetGuidValue(); } }, - {"principalType", n => { PrincipalType = n.GetStringValue(); } }, - {"resourceDisplayName", n => { ResourceDisplayName = n.GetStringValue(); } }, - {"resourceId", n => { ResourceId = n.GetGuidValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "appRoleId", n => { AppRoleId = n.GetGuidValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "principalDisplayName", n => { PrincipalDisplayName = n.GetStringValue(); } }, + { "principalId", n => { PrincipalId = n.GetGuidValue(); } }, + { "principalType", n => { PrincipalType = n.GetStringValue(); } }, + { "resourceDisplayName", n => { ResourceDisplayName = n.GetStringValue(); } }, + { "resourceId", n => { ResourceId = n.GetGuidValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteGuidValue("appRoleId", AppRoleId); @@ -77,3 +89,4 @@ public class AppRoleAssignment : DirectoryObject, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AppRoleAssignmentCollectionResponse.cs b/src/sample/generated/Models/AppRoleAssignmentCollectionResponse.cs index bb5b0462..bf425cbb 100644 --- a/src/sample/generated/Models/AppRoleAssignmentCollectionResponse.cs +++ b/src/sample/generated/Models/AppRoleAssignmentCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AppRoleAssignmentCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AppRoleAssignmentCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class AppRoleAssignmentCollectionResponse : IAdditionalDataHolder, IParsa /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new appRoleAssignmentCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public AppRoleAssignmentCollectionResponse() { + public AppRoleAssignmentCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AppRoleAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AppRoleAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AppRoleAssignmentCollectionResponse(); + return new global::ApiSdk.Models.AppRoleAssignmentCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(AppRoleAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AppRoleAssignment.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Application.cs b/src/sample/generated/Models/Application.cs index e760a0aa..c223a34d 100644 --- a/src/sample/generated/Models/Application.cs +++ b/src/sample/generated/Models/Application.cs @@ -1,28 +1,34 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Application : DirectoryObject, IParsable { - /// Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its 'FileHandler' functionality. This will let services like Office 365 call the application in the context of a document the user is working on. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Application : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { + /// Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams can set the addIns property for its 'FileHandler' functionality. This lets services like Microsoft 365 call the application in the context of a document the user is working on. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AddIns { get; set; } + public List? AddIns { get; set; } #nullable restore #else - public List AddIns { get; set; } + public List AddIns { get; set; } #endif /// The api property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiApplication? Api { get; set; } + public global::ApiSdk.Models.ApiApplication? Api { get; set; } #nullable restore #else - public ApiApplication Api { get; set; } + public global::ApiSdk.Models.ApiApplication Api { get; set; } #endif - /// The unique identifier for the application that is assigned to an application by Azure AD. Not nullable. Read-only. Supports $filter (eq). + /// The unique identifier for the application that is assigned to an application by Microsoft Entra ID. Not nullable. Read-only. Alternate key. Supports $filter (eq). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AppId { get; set; } @@ -30,7 +36,7 @@ public class Application : DirectoryObject, IParsable { #else public string AppId { get; set; } #endif - /// Unique identifier of the applicationTemplate. Supports $filter (eq, not, ne). + /// Unique identifier of the applicationTemplate. Supports $filter (eq, not, ne). Read-only. null if the app wasn't created from an application template. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ApplicationTemplateId { get; set; } @@ -41,36 +47,36 @@ public class Application : DirectoryObject, IParsable { /// The appManagementPolicy applied to this application. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppManagementPolicies { get; set; } + public List? AppManagementPolicies { get; set; } #nullable restore #else - public List AppManagementPolicies { get; set; } + public List AppManagementPolicies { get; set; } #endif /// The collection of roles defined for the application. With app role assignments, these roles can be assigned to users, groups, or service principals associated with other applications. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppRoles { get; set; } + public List? AppRoles { get; set; } #nullable restore #else - public List AppRoles { get; set; } + public List AppRoles { get; set; } #endif /// The certification property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Certification? Certification { get; set; } + public global::ApiSdk.Models.Certification? Certification { get; set; } #nullable restore #else - public ApiSdk.Models.Certification Certification { get; set; } + public global::ApiSdk.Models.Certification Certification { get; set; } #endif /// The date and time the application was registered. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, in, and eq on null values) and $orderby. public DateTimeOffset? CreatedDateTime { get; set; } /// The createdOnBehalfOf property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DirectoryObject? CreatedOnBehalfOf { get; set; } + public global::ApiSdk.Models.DirectoryObject? CreatedOnBehalfOf { get; set; } #nullable restore #else - public DirectoryObject CreatedOnBehalfOf { get; set; } + public global::ApiSdk.Models.DirectoryObject CreatedOnBehalfOf { get; set; } #endif /// The defaultRedirectUri property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -80,7 +86,7 @@ public class Application : DirectoryObject, IParsable { #else public string DefaultRedirectUri { get; set; } #endif - /// Free text field to provide a description of the application object to end users. The maximum allowed size is 1024 characters. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. + /// Free text field to provide a description of the application object to end users. The maximum allowed size is 1,024 characters. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Description { get; set; } @@ -88,7 +94,7 @@ public class Application : DirectoryObject, IParsable { #else public string Description { get; set; } #endif - /// Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). + /// Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisabledByMicrosoftStatus { get; set; } @@ -107,20 +113,20 @@ public class Application : DirectoryObject, IParsable { /// Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ExtensionProperties { get; set; } + public List? ExtensionProperties { get; set; } #nullable restore #else - public List ExtensionProperties { get; set; } + public List ExtensionProperties { get; set; } #endif /// Federated identities for applications. Supports $expand and $filter (startsWith, /$count eq 0, /$count ne 0). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? FederatedIdentityCredentials { get; set; } + public List? FederatedIdentityCredentials { get; set; } #nullable restore #else - public List FederatedIdentityCredentials { get; set; } + public List FederatedIdentityCredentials { get; set; } #endif - /// Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following valid string values: None, SecurityGroup (for security groups and Azure AD roles), All (this gets all of the security groups, distribution groups, and Azure AD directory roles that the signed-in user is a member of). + /// Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following valid string values: None, SecurityGroup (for security groups and Microsoft Entra roles), All (this gets all of the security groups, distribution groups, and Microsoft Entra directory roles that the signed-in user is a member of). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? GroupMembershipClaims { get; set; } @@ -131,12 +137,12 @@ public class Application : DirectoryObject, IParsable { /// The homeRealmDiscoveryPolicies property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? HomeRealmDiscoveryPolicies { get; set; } + public List? HomeRealmDiscoveryPolicies { get; set; } #nullable restore #else - public List HomeRealmDiscoveryPolicies { get; set; } + public List HomeRealmDiscoveryPolicies { get; set; } #endif - /// Also known as App ID URI, this value is set when an application is used as a resource app. The identifierUris acts as the prefix for the scopes you'll reference in your API's code, and it must be globally unique. You can use the default value provided, which is in the form api://<application-client-id>, or specify a more readable URI like https://contoso.com/api. For more information on valid identifierUris patterns and best practices, see Azure AD application registration security best practices. Not nullable. Supports $filter (eq, ne, ge, le, startsWith). + /// Also known as App ID URI, this value is set when an application is used as a resource app. The identifierUris acts as the prefix for the scopes you reference in your API's code, and it must be globally unique. You can use the default value provided, which is in the form api://<appId>, or specify a more readable URI like https://contoso.com/api. For more information on valid identifierUris patterns and best practices, see Microsoft Entra application registration security best practices. Not nullable. Supports $filter (eq, ne, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? IdentifierUris { get; set; } @@ -147,22 +153,22 @@ public class Application : DirectoryObject, IParsable { /// The info property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public InformationalUrl? Info { get; set; } + public global::ApiSdk.Models.InformationalUrl? Info { get; set; } #nullable restore #else - public InformationalUrl Info { get; set; } + public global::ApiSdk.Models.InformationalUrl Info { get; set; } #endif /// Specifies whether this application supports device authentication without a user. The default is false. public bool? IsDeviceOnlyAuthSupported { get; set; } - /// Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false which means the fallback application type is confidential client such as a web app. There are certain scenarios where Azure AD cannot determine the client application type. For example, the ROPC flow where it is configured without specifying a redirect URI. In those cases Azure AD interprets the application type based on the value of this property. + /// Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false, which means the fallback application type is confidential client such as a web app. There are certain scenarios where Microsoft Entra ID can't determine the client application type. For example, the ROPC flow where it's configured without specifying a redirect URI. In those cases, Microsoft Entra ID interprets the application type based on the value of this property. public bool? IsFallbackPublicClient { get; set; } /// The collection of key credentials associated with the application. Not nullable. Supports $filter (eq, not, ge, le). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? KeyCredentials { get; set; } + public List? KeyCredentials { get; set; } #nullable restore #else - public List KeyCredentials { get; set; } + public List KeyCredentials { get; set; } #endif /// The main logo for the application. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -172,6 +178,8 @@ public class Application : DirectoryObject, IParsable { #else public byte[] Logo { get; set; } #endif + /// The nativeAuthenticationApisEnabled property + public global::ApiSdk.Models.NativeAuthenticationApisEnabled? NativeAuthenticationApisEnabled { get; set; } /// Notes relevant for the management of the application. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -185,42 +193,42 @@ public class Application : DirectoryObject, IParsable { /// The optionalClaims property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.OptionalClaims? OptionalClaims { get; set; } + public global::ApiSdk.Models.OptionalClaims? OptionalClaims { get; set; } #nullable restore #else - public ApiSdk.Models.OptionalClaims OptionalClaims { get; set; } + public global::ApiSdk.Models.OptionalClaims OptionalClaims { get; set; } #endif /// Directory objects that are owners of the application. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Owners { get; set; } + public List? Owners { get; set; } #nullable restore #else - public List Owners { get; set; } + public List Owners { get; set; } #endif /// The parentalControlSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ParentalControlSettings? ParentalControlSettings { get; set; } + public global::ApiSdk.Models.ParentalControlSettings? ParentalControlSettings { get; set; } #nullable restore #else - public ApiSdk.Models.ParentalControlSettings ParentalControlSettings { get; set; } + public global::ApiSdk.Models.ParentalControlSettings ParentalControlSettings { get; set; } #endif /// The collection of password credentials associated with the application. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PasswordCredentials { get; set; } + public List? PasswordCredentials { get; set; } #nullable restore #else - public List PasswordCredentials { get; set; } + public List PasswordCredentials { get; set; } #endif /// The publicClient property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PublicClientApplication? PublicClient { get; set; } + public global::ApiSdk.Models.PublicClientApplication? PublicClient { get; set; } #nullable restore #else - public PublicClientApplication PublicClient { get; set; } + public global::ApiSdk.Models.PublicClientApplication PublicClient { get; set; } #endif /// The verified publisher domain for the application. Read-only. For more information, see How to: Configure an application's publisher domain. Supports $filter (eq, ne, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -233,18 +241,18 @@ public class Application : DirectoryObject, IParsable { /// The requestSignatureVerification property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.RequestSignatureVerification? RequestSignatureVerification { get; set; } + public global::ApiSdk.Models.RequestSignatureVerification? RequestSignatureVerification { get; set; } #nullable restore #else - public ApiSdk.Models.RequestSignatureVerification RequestSignatureVerification { get; set; } + public global::ApiSdk.Models.RequestSignatureVerification RequestSignatureVerification { get; set; } #endif /// Specifies the resources that the application needs to access. This property also specifies the set of delegated permissions and application roles that it needs for each of those resources. This configuration of access to the required resources drives the consent experience. No more than 50 resource services (APIs) can be configured. Beginning mid-October 2021, the total number of required permissions must not exceed 400. For more information, see Limits on requested permissions per app. Not nullable. Supports $filter (eq, not, ge, le). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? RequiredResourceAccess { get; set; } + public List? RequiredResourceAccess { get; set; } #nullable restore #else - public List RequiredResourceAccess { get; set; } + public List RequiredResourceAccess { get; set; } #endif /// The URL where the service exposes SAML metadata for federation. This property is valid only for single-tenant applications. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -265,12 +273,12 @@ public class Application : DirectoryObject, IParsable { /// The servicePrincipalLockConfiguration property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ServicePrincipalLockConfiguration? ServicePrincipalLockConfiguration { get; set; } + public global::ApiSdk.Models.ServicePrincipalLockConfiguration? ServicePrincipalLockConfiguration { get; set; } #nullable restore #else - public ApiSdk.Models.ServicePrincipalLockConfiguration ServicePrincipalLockConfiguration { get; set; } + public global::ApiSdk.Models.ServicePrincipalLockConfiguration ServicePrincipalLockConfiguration { get; set; } #endif - /// Specifies the Microsoft accounts that are supported for the current application. The possible values are: AzureADMyOrg, AzureADMultipleOrgs, AzureADandPersonalMicrosoftAccount (default), and PersonalMicrosoftAccount. See more in the table. The value of this object also limits the number of permissions an app can request. For more information, see Limits on requested permissions per app. The value for this property has implications on other app object properties. As a result, if you change this property, you may need to change other properties first. For more information, see Validation differences for signInAudience.Supports $filter (eq, ne, not). + /// Specifies the Microsoft accounts that are supported for the current application. The possible values are: AzureADMyOrg (default), AzureADMultipleOrgs, AzureADandPersonalMicrosoftAccount, and PersonalMicrosoftAccount. See more in the table. The value of this object also limits the number of permissions an app can request. For more information, see Limits on requested permissions per app. The value for this property has implications on other app object properties. As a result, if you change this property, you might need to change other properties first. For more information, see Validation differences for signInAudience.Supports $filter (eq, ne, not). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SignInAudience { get; set; } @@ -281,18 +289,18 @@ public class Application : DirectoryObject, IParsable { /// The spa property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SpaApplication? Spa { get; set; } + public global::ApiSdk.Models.SpaApplication? Spa { get; set; } #nullable restore #else - public SpaApplication Spa { get; set; } + public global::ApiSdk.Models.SpaApplication Spa { get; set; } #endif /// The synchronization property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Synchronization? Synchronization { get; set; } + public global::ApiSdk.Models.Synchronization? Synchronization { get; set; } #nullable restore #else - public ApiSdk.Models.Synchronization Synchronization { get; set; } + public global::ApiSdk.Models.Synchronization Synchronization { get; set; } #endif /// Custom strings that can be used to categorize and identify the application. Not nullable. Strings added here will also appear in the tags property of any associated service principals.Supports $filter (eq, not, ge, le, startsWith) and $search. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -302,152 +310,171 @@ public class Application : DirectoryObject, IParsable { #else public List Tags { get; set; } #endif - /// Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD encrypts all the tokens it emits by using the key this property points to. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + /// Specifies the keyId of a public key from the keyCredentials collection. When configured, Microsoft Entra ID encrypts all the tokens it emits by using the key this property points to. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. public Guid? TokenEncryptionKeyId { get; set; } /// The tokenIssuancePolicies property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TokenIssuancePolicies { get; set; } + public List? TokenIssuancePolicies { get; set; } #nullable restore #else - public List TokenIssuancePolicies { get; set; } + public List TokenIssuancePolicies { get; set; } #endif /// The tokenLifetimePolicies property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TokenLifetimePolicies { get; set; } + public List? TokenLifetimePolicies { get; set; } #nullable restore #else - public List TokenLifetimePolicies { get; set; } + public List TokenLifetimePolicies { get; set; } +#endif + /// The unique identifier that can be assigned to an application and used as an alternate key. Immutable. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UniqueName { get; set; } +#nullable restore +#else + public string UniqueName { get; set; } #endif /// The verifiedPublisher property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.VerifiedPublisher? VerifiedPublisher { get; set; } + public global::ApiSdk.Models.VerifiedPublisher? VerifiedPublisher { get; set; } #nullable restore #else - public ApiSdk.Models.VerifiedPublisher VerifiedPublisher { get; set; } + public global::ApiSdk.Models.VerifiedPublisher VerifiedPublisher { get; set; } #endif /// The web property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WebApplication? Web { get; set; } + public global::ApiSdk.Models.WebApplication? Web { get; set; } #nullable restore #else - public WebApplication Web { get; set; } + public global::ApiSdk.Models.WebApplication Web { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Application CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Application CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Application(); + return new global::ApiSdk.Models.Application(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"addIns", n => { AddIns = n.GetCollectionOfObjectValues(AddIn.CreateFromDiscriminatorValue)?.ToList(); } }, - {"api", n => { Api = n.GetObjectValue(ApiApplication.CreateFromDiscriminatorValue); } }, - {"appId", n => { AppId = n.GetStringValue(); } }, - {"appManagementPolicies", n => { AppManagementPolicies = n.GetCollectionOfObjectValues(AppManagementPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"appRoles", n => { AppRoles = n.GetCollectionOfObjectValues(AppRole.CreateFromDiscriminatorValue)?.ToList(); } }, - {"applicationTemplateId", n => { ApplicationTemplateId = n.GetStringValue(); } }, - {"certification", n => { Certification = n.GetObjectValue(ApiSdk.Models.Certification.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"createdOnBehalfOf", n => { CreatedOnBehalfOf = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, - {"defaultRedirectUri", n => { DefaultRedirectUri = n.GetStringValue(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"disabledByMicrosoftStatus", n => { DisabledByMicrosoftStatus = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"extensionProperties", n => { ExtensionProperties = n.GetCollectionOfObjectValues(ExtensionProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"federatedIdentityCredentials", n => { FederatedIdentityCredentials = n.GetCollectionOfObjectValues(FederatedIdentityCredential.CreateFromDiscriminatorValue)?.ToList(); } }, - {"groupMembershipClaims", n => { GroupMembershipClaims = n.GetStringValue(); } }, - {"homeRealmDiscoveryPolicies", n => { HomeRealmDiscoveryPolicies = n.GetCollectionOfObjectValues(HomeRealmDiscoveryPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"identifierUris", n => { IdentifierUris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"info", n => { Info = n.GetObjectValue(InformationalUrl.CreateFromDiscriminatorValue); } }, - {"isDeviceOnlyAuthSupported", n => { IsDeviceOnlyAuthSupported = n.GetBoolValue(); } }, - {"isFallbackPublicClient", n => { IsFallbackPublicClient = n.GetBoolValue(); } }, - {"keyCredentials", n => { KeyCredentials = n.GetCollectionOfObjectValues(KeyCredential.CreateFromDiscriminatorValue)?.ToList(); } }, - {"logo", n => { Logo = n.GetByteArrayValue(); } }, - {"notes", n => { Notes = n.GetStringValue(); } }, - {"oauth2RequirePostResponse", n => { Oauth2RequirePostResponse = n.GetBoolValue(); } }, - {"optionalClaims", n => { OptionalClaims = n.GetObjectValue(ApiSdk.Models.OptionalClaims.CreateFromDiscriminatorValue); } }, - {"owners", n => { Owners = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"parentalControlSettings", n => { ParentalControlSettings = n.GetObjectValue(ApiSdk.Models.ParentalControlSettings.CreateFromDiscriminatorValue); } }, - {"passwordCredentials", n => { PasswordCredentials = n.GetCollectionOfObjectValues(PasswordCredential.CreateFromDiscriminatorValue)?.ToList(); } }, - {"publicClient", n => { PublicClient = n.GetObjectValue(PublicClientApplication.CreateFromDiscriminatorValue); } }, - {"publisherDomain", n => { PublisherDomain = n.GetStringValue(); } }, - {"requestSignatureVerification", n => { RequestSignatureVerification = n.GetObjectValue(ApiSdk.Models.RequestSignatureVerification.CreateFromDiscriminatorValue); } }, - {"requiredResourceAccess", n => { RequiredResourceAccess = n.GetCollectionOfObjectValues(ApiSdk.Models.RequiredResourceAccess.CreateFromDiscriminatorValue)?.ToList(); } }, - {"samlMetadataUrl", n => { SamlMetadataUrl = n.GetStringValue(); } }, - {"serviceManagementReference", n => { ServiceManagementReference = n.GetStringValue(); } }, - {"servicePrincipalLockConfiguration", n => { ServicePrincipalLockConfiguration = n.GetObjectValue(ApiSdk.Models.ServicePrincipalLockConfiguration.CreateFromDiscriminatorValue); } }, - {"signInAudience", n => { SignInAudience = n.GetStringValue(); } }, - {"spa", n => { Spa = n.GetObjectValue(SpaApplication.CreateFromDiscriminatorValue); } }, - {"synchronization", n => { Synchronization = n.GetObjectValue(ApiSdk.Models.Synchronization.CreateFromDiscriminatorValue); } }, - {"tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"tokenEncryptionKeyId", n => { TokenEncryptionKeyId = n.GetGuidValue(); } }, - {"tokenIssuancePolicies", n => { TokenIssuancePolicies = n.GetCollectionOfObjectValues(TokenIssuancePolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"tokenLifetimePolicies", n => { TokenLifetimePolicies = n.GetCollectionOfObjectValues(TokenLifetimePolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"verifiedPublisher", n => { VerifiedPublisher = n.GetObjectValue(ApiSdk.Models.VerifiedPublisher.CreateFromDiscriminatorValue); } }, - {"web", n => { Web = n.GetObjectValue(WebApplication.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "addIns", n => { AddIns = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AddIn.CreateFromDiscriminatorValue)?.AsList(); } }, + { "api", n => { Api = n.GetObjectValue(global::ApiSdk.Models.ApiApplication.CreateFromDiscriminatorValue); } }, + { "appId", n => { AppId = n.GetStringValue(); } }, + { "appManagementPolicies", n => { AppManagementPolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AppManagementPolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "appRoles", n => { AppRoles = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AppRole.CreateFromDiscriminatorValue)?.AsList(); } }, + { "applicationTemplateId", n => { ApplicationTemplateId = n.GetStringValue(); } }, + { "certification", n => { Certification = n.GetObjectValue(global::ApiSdk.Models.Certification.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "createdOnBehalfOf", n => { CreatedOnBehalfOf = n.GetObjectValue(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue); } }, + { "defaultRedirectUri", n => { DefaultRedirectUri = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disabledByMicrosoftStatus", n => { DisabledByMicrosoftStatus = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "extensionProperties", n => { ExtensionProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ExtensionProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "federatedIdentityCredentials", n => { FederatedIdentityCredentials = n.GetCollectionOfObjectValues(global::ApiSdk.Models.FederatedIdentityCredential.CreateFromDiscriminatorValue)?.AsList(); } }, + { "groupMembershipClaims", n => { GroupMembershipClaims = n.GetStringValue(); } }, + { "homeRealmDiscoveryPolicies", n => { HomeRealmDiscoveryPolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.HomeRealmDiscoveryPolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "identifierUris", n => { IdentifierUris = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "info", n => { Info = n.GetObjectValue(global::ApiSdk.Models.InformationalUrl.CreateFromDiscriminatorValue); } }, + { "isDeviceOnlyAuthSupported", n => { IsDeviceOnlyAuthSupported = n.GetBoolValue(); } }, + { "isFallbackPublicClient", n => { IsFallbackPublicClient = n.GetBoolValue(); } }, + { "keyCredentials", n => { KeyCredentials = n.GetCollectionOfObjectValues(global::ApiSdk.Models.KeyCredential.CreateFromDiscriminatorValue)?.AsList(); } }, + { "logo", n => { Logo = n.GetByteArrayValue(); } }, + { "nativeAuthenticationApisEnabled", n => { NativeAuthenticationApisEnabled = n.GetEnumValue(); } }, + { "notes", n => { Notes = n.GetStringValue(); } }, + { "oauth2RequirePostResponse", n => { Oauth2RequirePostResponse = n.GetBoolValue(); } }, + { "optionalClaims", n => { OptionalClaims = n.GetObjectValue(global::ApiSdk.Models.OptionalClaims.CreateFromDiscriminatorValue); } }, + { "owners", n => { Owners = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "parentalControlSettings", n => { ParentalControlSettings = n.GetObjectValue(global::ApiSdk.Models.ParentalControlSettings.CreateFromDiscriminatorValue); } }, + { "passwordCredentials", n => { PasswordCredentials = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PasswordCredential.CreateFromDiscriminatorValue)?.AsList(); } }, + { "publicClient", n => { PublicClient = n.GetObjectValue(global::ApiSdk.Models.PublicClientApplication.CreateFromDiscriminatorValue); } }, + { "publisherDomain", n => { PublisherDomain = n.GetStringValue(); } }, + { "requestSignatureVerification", n => { RequestSignatureVerification = n.GetObjectValue(global::ApiSdk.Models.RequestSignatureVerification.CreateFromDiscriminatorValue); } }, + { "requiredResourceAccess", n => { RequiredResourceAccess = n.GetCollectionOfObjectValues(global::ApiSdk.Models.RequiredResourceAccess.CreateFromDiscriminatorValue)?.AsList(); } }, + { "samlMetadataUrl", n => { SamlMetadataUrl = n.GetStringValue(); } }, + { "serviceManagementReference", n => { ServiceManagementReference = n.GetStringValue(); } }, + { "servicePrincipalLockConfiguration", n => { ServicePrincipalLockConfiguration = n.GetObjectValue(global::ApiSdk.Models.ServicePrincipalLockConfiguration.CreateFromDiscriminatorValue); } }, + { "signInAudience", n => { SignInAudience = n.GetStringValue(); } }, + { "spa", n => { Spa = n.GetObjectValue(global::ApiSdk.Models.SpaApplication.CreateFromDiscriminatorValue); } }, + { "synchronization", n => { Synchronization = n.GetObjectValue(global::ApiSdk.Models.Synchronization.CreateFromDiscriminatorValue); } }, + { "tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "tokenEncryptionKeyId", n => { TokenEncryptionKeyId = n.GetGuidValue(); } }, + { "tokenIssuancePolicies", n => { TokenIssuancePolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TokenIssuancePolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "tokenLifetimePolicies", n => { TokenLifetimePolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TokenLifetimePolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "uniqueName", n => { UniqueName = n.GetStringValue(); } }, + { "verifiedPublisher", n => { VerifiedPublisher = n.GetObjectValue(global::ApiSdk.Models.VerifiedPublisher.CreateFromDiscriminatorValue); } }, + { "web", n => { Web = n.GetObjectValue(global::ApiSdk.Models.WebApplication.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("addIns", AddIns); - writer.WriteObjectValue("api", Api); + writer.WriteCollectionOfObjectValues("addIns", AddIns); + writer.WriteObjectValue("api", Api); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("applicationTemplateId", ApplicationTemplateId); - writer.WriteCollectionOfObjectValues("appManagementPolicies", AppManagementPolicies); - writer.WriteCollectionOfObjectValues("appRoles", AppRoles); - writer.WriteObjectValue("certification", Certification); + writer.WriteCollectionOfObjectValues("appManagementPolicies", AppManagementPolicies); + writer.WriteCollectionOfObjectValues("appRoles", AppRoles); + writer.WriteObjectValue("certification", Certification); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("createdOnBehalfOf", CreatedOnBehalfOf); + writer.WriteObjectValue("createdOnBehalfOf", CreatedOnBehalfOf); writer.WriteStringValue("defaultRedirectUri", DefaultRedirectUri); writer.WriteStringValue("description", Description); writer.WriteStringValue("disabledByMicrosoftStatus", DisabledByMicrosoftStatus); writer.WriteStringValue("displayName", DisplayName); - writer.WriteCollectionOfObjectValues("extensionProperties", ExtensionProperties); - writer.WriteCollectionOfObjectValues("federatedIdentityCredentials", FederatedIdentityCredentials); + writer.WriteCollectionOfObjectValues("extensionProperties", ExtensionProperties); + writer.WriteCollectionOfObjectValues("federatedIdentityCredentials", FederatedIdentityCredentials); writer.WriteStringValue("groupMembershipClaims", GroupMembershipClaims); - writer.WriteCollectionOfObjectValues("homeRealmDiscoveryPolicies", HomeRealmDiscoveryPolicies); + writer.WriteCollectionOfObjectValues("homeRealmDiscoveryPolicies", HomeRealmDiscoveryPolicies); writer.WriteCollectionOfPrimitiveValues("identifierUris", IdentifierUris); - writer.WriteObjectValue("info", Info); + writer.WriteObjectValue("info", Info); writer.WriteBoolValue("isDeviceOnlyAuthSupported", IsDeviceOnlyAuthSupported); writer.WriteBoolValue("isFallbackPublicClient", IsFallbackPublicClient); - writer.WriteCollectionOfObjectValues("keyCredentials", KeyCredentials); + writer.WriteCollectionOfObjectValues("keyCredentials", KeyCredentials); writer.WriteByteArrayValue("logo", Logo); + writer.WriteEnumValue("nativeAuthenticationApisEnabled", NativeAuthenticationApisEnabled); writer.WriteStringValue("notes", Notes); writer.WriteBoolValue("oauth2RequirePostResponse", Oauth2RequirePostResponse); - writer.WriteObjectValue("optionalClaims", OptionalClaims); - writer.WriteCollectionOfObjectValues("owners", Owners); - writer.WriteObjectValue("parentalControlSettings", ParentalControlSettings); - writer.WriteCollectionOfObjectValues("passwordCredentials", PasswordCredentials); - writer.WriteObjectValue("publicClient", PublicClient); + writer.WriteObjectValue("optionalClaims", OptionalClaims); + writer.WriteCollectionOfObjectValues("owners", Owners); + writer.WriteObjectValue("parentalControlSettings", ParentalControlSettings); + writer.WriteCollectionOfObjectValues("passwordCredentials", PasswordCredentials); + writer.WriteObjectValue("publicClient", PublicClient); writer.WriteStringValue("publisherDomain", PublisherDomain); - writer.WriteObjectValue("requestSignatureVerification", RequestSignatureVerification); - writer.WriteCollectionOfObjectValues("requiredResourceAccess", RequiredResourceAccess); + writer.WriteObjectValue("requestSignatureVerification", RequestSignatureVerification); + writer.WriteCollectionOfObjectValues("requiredResourceAccess", RequiredResourceAccess); writer.WriteStringValue("samlMetadataUrl", SamlMetadataUrl); writer.WriteStringValue("serviceManagementReference", ServiceManagementReference); - writer.WriteObjectValue("servicePrincipalLockConfiguration", ServicePrincipalLockConfiguration); + writer.WriteObjectValue("servicePrincipalLockConfiguration", ServicePrincipalLockConfiguration); writer.WriteStringValue("signInAudience", SignInAudience); - writer.WriteObjectValue("spa", Spa); - writer.WriteObjectValue("synchronization", Synchronization); + writer.WriteObjectValue("spa", Spa); + writer.WriteObjectValue("synchronization", Synchronization); writer.WriteCollectionOfPrimitiveValues("tags", Tags); writer.WriteGuidValue("tokenEncryptionKeyId", TokenEncryptionKeyId); - writer.WriteCollectionOfObjectValues("tokenIssuancePolicies", TokenIssuancePolicies); - writer.WriteCollectionOfObjectValues("tokenLifetimePolicies", TokenLifetimePolicies); - writer.WriteObjectValue("verifiedPublisher", VerifiedPublisher); - writer.WriteObjectValue("web", Web); + writer.WriteCollectionOfObjectValues("tokenIssuancePolicies", TokenIssuancePolicies); + writer.WriteCollectionOfObjectValues("tokenLifetimePolicies", TokenLifetimePolicies); + writer.WriteStringValue("uniqueName", UniqueName); + writer.WriteObjectValue("verifiedPublisher", VerifiedPublisher); + writer.WriteObjectValue("web", Web); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ApplicationCollectionResponse.cs b/src/sample/generated/Models/ApplicationCollectionResponse.cs index 92e5a66d..c38e49a3 100644 --- a/src/sample/generated/Models/ApplicationCollectionResponse.cs +++ b/src/sample/generated/Models/ApplicationCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ApplicationCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ApplicationCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class ApplicationCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new applicationCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public ApplicationCollectionResponse() { + public ApplicationCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ApplicationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ApplicationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ApplicationCollectionResponse(); + return new global::ApiSdk.Models.ApplicationCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(Application.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Application.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AssignedLabel.cs b/src/sample/generated/Models/AssignedLabel.cs index 689bf59a..854f9705 100644 --- a/src/sample/generated/Models/AssignedLabel.cs +++ b/src/sample/generated/Models/AssignedLabel.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AssignedLabel : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AssignedLabel : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The display name of the label. Read-only. @@ -25,33 +31,40 @@ public class AssignedLabel : IAdditionalDataHolder, IParsable { public string LabelId { get; set; } #endif /// - /// Instantiates a new assignedLabel and sets the default values. + /// Instantiates a new and sets the default values. /// - public AssignedLabel() { + public AssignedLabel() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AssignedLabel CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AssignedLabel CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AssignedLabel(); + return new global::ApiSdk.Models.AssignedLabel(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"labelId", n => { LabelId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "labelId", n => { LabelId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("labelId", LabelId); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AssignedLicense.cs b/src/sample/generated/Models/AssignedLicense.cs index 63dee626..7773ac50 100644 --- a/src/sample/generated/Models/AssignedLicense.cs +++ b/src/sample/generated/Models/AssignedLicense.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AssignedLicense : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AssignedLicense : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// A collection of the unique identifiers for plans that have been disabled. + /// A collection of the unique identifiers for plans that have been disabled. IDs are available in servicePlans > servicePlanId in the tenant's subscribedSkus or serviceStatus > servicePlanId in the tenant's companySubscription. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? DisabledPlans { get; set; } @@ -16,36 +22,43 @@ public class AssignedLicense : IAdditionalDataHolder, IParsable { #else public List DisabledPlans { get; set; } #endif - /// The unique identifier for the SKU. + /// The unique identifier for the SKU. Corresponds to the skuId from subscribedSkus or companySubscription. public Guid? SkuId { get; set; } /// - /// Instantiates a new assignedLicense and sets the default values. + /// Instantiates a new and sets the default values. /// - public AssignedLicense() { + public AssignedLicense() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AssignedLicense CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AssignedLicense CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AssignedLicense(); + return new global::ApiSdk.Models.AssignedLicense(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"disabledPlans", n => { DisabledPlans = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"skuId", n => { SkuId = n.GetGuidValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "disabledPlans", n => { DisabledPlans = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "skuId", n => { SkuId = n.GetGuidValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("disabledPlans", DisabledPlans); writer.WriteGuidValue("skuId", SkuId); @@ -53,3 +66,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AssignedPlan.cs b/src/sample/generated/Models/AssignedPlan.cs index 2df1df80..b8ff3b24 100644 --- a/src/sample/generated/Models/AssignedPlan.cs +++ b/src/sample/generated/Models/AssignedPlan.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AssignedPlan : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AssignedPlan : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The date and time at which the plan was assigned. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. @@ -29,35 +35,42 @@ public class AssignedPlan : IAdditionalDataHolder, IParsable { /// A GUID that identifies the service plan. For a complete list of GUIDs and their equivalent friendly service names, see Product names and service plan identifiers for licensing. public Guid? ServicePlanId { get; set; } /// - /// Instantiates a new assignedPlan and sets the default values. + /// Instantiates a new and sets the default values. /// - public AssignedPlan() { + public AssignedPlan() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AssignedPlan CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AssignedPlan CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AssignedPlan(); + return new global::ApiSdk.Models.AssignedPlan(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"assignedDateTime", n => { AssignedDateTime = n.GetDateTimeOffsetValue(); } }, - {"capabilityStatus", n => { CapabilityStatus = n.GetStringValue(); } }, - {"service", n => { Service = n.GetStringValue(); } }, - {"servicePlanId", n => { ServicePlanId = n.GetGuidValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignedDateTime", n => { AssignedDateTime = n.GetDateTimeOffsetValue(); } }, + { "capabilityStatus", n => { CapabilityStatus = n.GetStringValue(); } }, + { "service", n => { Service = n.GetStringValue(); } }, + { "servicePlanId", n => { ServicePlanId = n.GetGuidValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("assignedDateTime", AssignedDateTime); writer.WriteStringValue("capabilityStatus", CapabilityStatus); @@ -67,3 +80,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AssociatedTeamInfo.cs b/src/sample/generated/Models/AssociatedTeamInfo.cs index ca633194..828db2ac 100644 --- a/src/sample/generated/Models/AssociatedTeamInfo.cs +++ b/src/sample/generated/Models/AssociatedTeamInfo.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AssociatedTeamInfo : TeamInfo, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AssociatedTeamInfo : global::ApiSdk.Models.TeamInfo, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AssociatedTeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AssociatedTeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AssociatedTeamInfo(); + return new global::ApiSdk.Models.AssociatedTeamInfo(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Attachment.cs b/src/sample/generated/Models/Attachment.cs index 26f47b0b..32bd0eea 100644 --- a/src/sample/generated/Models/Attachment.cs +++ b/src/sample/generated/Models/Attachment.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Attachment : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attachment : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The MIME type. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -31,28 +37,34 @@ public class Attachment : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Attachment CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Attachment CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Attachment(); + return new global::ApiSdk.Models.Attachment(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"contentType", n => { ContentType = n.GetStringValue(); } }, - {"isInline", n => { IsInline = n.GetBoolValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"size", n => { Size = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "contentType", n => { ContentType = n.GetStringValue(); } }, + { "isInline", n => { IsInline = n.GetBoolValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentType", ContentType); @@ -63,3 +75,4 @@ public class Attachment : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttachmentBase.cs b/src/sample/generated/Models/AttachmentBase.cs index f1d5eda0..f9e90153 100644 --- a/src/sample/generated/Models/AttachmentBase.cs +++ b/src/sample/generated/Models/AttachmentBase.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttachmentBase : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachmentBase : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The MIME type. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -29,27 +35,33 @@ public class AttachmentBase : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AttachmentBase CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AttachmentBase CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttachmentBase(); + return new global::ApiSdk.Models.AttachmentBase(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"contentType", n => { ContentType = n.GetStringValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"size", n => { Size = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "contentType", n => { ContentType = n.GetStringValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "size", n => { Size = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentType", ContentType); @@ -59,3 +71,4 @@ public class AttachmentBase : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttachmentBaseCollectionResponse.cs b/src/sample/generated/Models/AttachmentBaseCollectionResponse.cs index eeb62867..36131e18 100644 --- a/src/sample/generated/Models/AttachmentBaseCollectionResponse.cs +++ b/src/sample/generated/Models/AttachmentBaseCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttachmentBaseCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachmentBaseCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class AttachmentBaseCollectionResponse : IAdditionalDataHolder, IParsable /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new attachmentBaseCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public AttachmentBaseCollectionResponse() { + public AttachmentBaseCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AttachmentBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AttachmentBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttachmentBaseCollectionResponse(); + return new global::ApiSdk.Models.AttachmentBaseCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(AttachmentBase.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AttachmentBase.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttachmentSession.cs b/src/sample/generated/Models/AttachmentSession.cs index e3a58965..5f1e9572 100644 --- a/src/sample/generated/Models/AttachmentSession.cs +++ b/src/sample/generated/Models/AttachmentSession.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttachmentSession : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachmentSession : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The content streams that are uploaded. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -27,26 +33,32 @@ public class AttachmentSession : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AttachmentSession CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AttachmentSession CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttachmentSession(); + return new global::ApiSdk.Models.AttachmentSession(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"content", n => { Content = n.GetByteArrayValue(); } }, - {"expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"nextExpectedRanges", n => { NextExpectedRanges = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "content", n => { Content = n.GetByteArrayValue(); } }, + { "expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "nextExpectedRanges", n => { NextExpectedRanges = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); @@ -55,3 +67,4 @@ public class AttachmentSession : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttachmentSessionCollectionResponse.cs b/src/sample/generated/Models/AttachmentSessionCollectionResponse.cs index 5a8f57da..fa87f7ae 100644 --- a/src/sample/generated/Models/AttachmentSessionCollectionResponse.cs +++ b/src/sample/generated/Models/AttachmentSessionCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttachmentSessionCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttachmentSessionCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class AttachmentSessionCollectionResponse : IAdditionalDataHolder, IParsa /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new attachmentSessionCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public AttachmentSessionCollectionResponse() { + public AttachmentSessionCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AttachmentSessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AttachmentSessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttachmentSessionCollectionResponse(); + return new global::ApiSdk.Models.AttachmentSessionCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(AttachmentSession.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AttachmentSession.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttendanceInterval.cs b/src/sample/generated/Models/AttendanceInterval.cs index 7a4f7aaa..1917d2c3 100644 --- a/src/sample/generated/Models/AttendanceInterval.cs +++ b/src/sample/generated/Models/AttendanceInterval.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttendanceInterval : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttendanceInterval : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Duration of the meeting interval in seconds; that is, the difference between joinDateTime and leaveDateTime. @@ -15,34 +21,41 @@ public class AttendanceInterval : IAdditionalDataHolder, IParsable { /// The time the attendee left in UTC. public DateTimeOffset? LeaveDateTime { get; set; } /// - /// Instantiates a new attendanceInterval and sets the default values. + /// Instantiates a new and sets the default values. /// - public AttendanceInterval() { + public AttendanceInterval() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AttendanceInterval CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AttendanceInterval CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttendanceInterval(); + return new global::ApiSdk.Models.AttendanceInterval(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"durationInSeconds", n => { DurationInSeconds = n.GetIntValue(); } }, - {"joinDateTime", n => { JoinDateTime = n.GetDateTimeOffsetValue(); } }, - {"leaveDateTime", n => { LeaveDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "durationInSeconds", n => { DurationInSeconds = n.GetIntValue(); } }, + { "joinDateTime", n => { JoinDateTime = n.GetDateTimeOffsetValue(); } }, + { "leaveDateTime", n => { LeaveDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("durationInSeconds", DurationInSeconds); writer.WriteDateTimeOffsetValue("joinDateTime", JoinDateTime); @@ -51,3 +64,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttendanceRecord.cs b/src/sample/generated/Models/AttendanceRecord.cs index 0060a72e..a8fb3924 100644 --- a/src/sample/generated/Models/AttendanceRecord.cs +++ b/src/sample/generated/Models/AttendanceRecord.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttendanceRecord : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttendanceRecord : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// List of time periods between joining and leaving a meeting. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AttendanceIntervals { get; set; } + public List? AttendanceIntervals { get; set; } #nullable restore #else - public List AttendanceIntervals { get; set; } + public List AttendanceIntervals { get; set; } #endif /// Email address of the user associated with this attendance record. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,10 +31,10 @@ public class AttendanceRecord : Entity, IParsable { /// The identity property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Identity? Identity { get; set; } + public global::ApiSdk.Models.Identity? Identity { get; set; } #nullable restore #else - public ApiSdk.Models.Identity Identity { get; set; } + public global::ApiSdk.Models.Identity Identity { get; set; } #endif /// Role of the attendee. Possible values are: None, Attendee, Presenter, and Organizer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -43,35 +49,42 @@ public class AttendanceRecord : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AttendanceRecord CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AttendanceRecord CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttendanceRecord(); + return new global::ApiSdk.Models.AttendanceRecord(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"attendanceIntervals", n => { AttendanceIntervals = n.GetCollectionOfObjectValues(AttendanceInterval.CreateFromDiscriminatorValue)?.ToList(); } }, - {"emailAddress", n => { EmailAddress = n.GetStringValue(); } }, - {"identity", n => { Identity = n.GetObjectValue(ApiSdk.Models.Identity.CreateFromDiscriminatorValue); } }, - {"role", n => { Role = n.GetStringValue(); } }, - {"totalAttendanceInSeconds", n => { TotalAttendanceInSeconds = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "attendanceIntervals", n => { AttendanceIntervals = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AttendanceInterval.CreateFromDiscriminatorValue)?.AsList(); } }, + { "emailAddress", n => { EmailAddress = n.GetStringValue(); } }, + { "identity", n => { Identity = n.GetObjectValue(global::ApiSdk.Models.Identity.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetStringValue(); } }, + { "totalAttendanceInSeconds", n => { TotalAttendanceInSeconds = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("attendanceIntervals", AttendanceIntervals); + writer.WriteCollectionOfObjectValues("attendanceIntervals", AttendanceIntervals); writer.WriteStringValue("emailAddress", EmailAddress); - writer.WriteObjectValue("identity", Identity); + writer.WriteObjectValue("identity", Identity); writer.WriteStringValue("role", Role); writer.WriteIntValue("totalAttendanceInSeconds", TotalAttendanceInSeconds); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Attendee.cs b/src/sample/generated/Models/Attendee.cs index a0208676..356a6524 100644 --- a/src/sample/generated/Models/Attendee.cs +++ b/src/sample/generated/Models/Attendee.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Attendee : AttendeeBase, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Attendee : global::ApiSdk.Models.AttendeeBase, IParsable + #pragma warning restore CS1591 + { /// The proposedNewTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TimeSlot? ProposedNewTime { get; set; } + public global::ApiSdk.Models.TimeSlot? ProposedNewTime { get; set; } #nullable restore #else - public TimeSlot ProposedNewTime { get; set; } + public global::ApiSdk.Models.TimeSlot ProposedNewTime { get; set; } #endif /// The status property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ResponseStatus? Status { get; set; } + public global::ApiSdk.Models.ResponseStatus? Status { get; set; } #nullable restore #else - public ResponseStatus Status { get; set; } + public global::ApiSdk.Models.ResponseStatus Status { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Attendee CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Attendee CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Attendee(); + return new global::ApiSdk.Models.Attendee(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"proposedNewTime", n => { ProposedNewTime = n.GetObjectValue(TimeSlot.CreateFromDiscriminatorValue); } }, - {"status", n => { Status = n.GetObjectValue(ResponseStatus.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "proposedNewTime", n => { ProposedNewTime = n.GetObjectValue(global::ApiSdk.Models.TimeSlot.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetObjectValue(global::ApiSdk.Models.ResponseStatus.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("proposedNewTime", ProposedNewTime); - writer.WriteObjectValue("status", Status); + writer.WriteObjectValue("proposedNewTime", ProposedNewTime); + writer.WriteObjectValue("status", Status); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttendeeBase.cs b/src/sample/generated/Models/AttendeeBase.cs index f178c6d8..88916137 100644 --- a/src/sample/generated/Models/AttendeeBase.cs +++ b/src/sample/generated/Models/AttendeeBase.cs @@ -1,37 +1,50 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttendeeBase : Recipient, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttendeeBase : global::ApiSdk.Models.Recipient, IParsable + #pragma warning restore CS1591 + { /// The type property - public AttendeeType? Type { get; set; } + public global::ApiSdk.Models.AttendeeType? Type { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AttendeeBase CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AttendeeBase CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttendeeBase(); + return new global::ApiSdk.Models.AttendeeBase(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"type", n => { Type = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "type", n => { Type = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("type", Type); + writer.WriteEnumValue("type", Type); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttendeeType.cs b/src/sample/generated/Models/AttendeeType.cs index 1f86eda3..4374cdf8 100644 --- a/src/sample/generated/Models/AttendeeType.cs +++ b/src/sample/generated/Models/AttendeeType.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AttendeeType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AttendeeType + #pragma warning restore CS1591 + { [EnumMember(Value = "required")] + #pragma warning disable CS1591 Required, + #pragma warning restore CS1591 [EnumMember(Value = "optional")] + #pragma warning disable CS1591 Optional, + #pragma warning restore CS1591 [EnumMember(Value = "resource")] + #pragma warning disable CS1591 Resource, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AttestationLevel.cs b/src/sample/generated/Models/AttestationLevel.cs index 166360ef..74196592 100644 --- a/src/sample/generated/Models/AttestationLevel.cs +++ b/src/sample/generated/Models/AttestationLevel.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AttestationLevel { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AttestationLevel + #pragma warning restore CS1591 + { [EnumMember(Value = "attested")] + #pragma warning disable CS1591 Attested, + #pragma warning restore CS1591 [EnumMember(Value = "notAttested")] + #pragma warning disable CS1591 NotAttested, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AttributeDefinition.cs b/src/sample/generated/Models/AttributeDefinition.cs index 600b2ec1..522a37e7 100644 --- a/src/sample/generated/Models/AttributeDefinition.cs +++ b/src/sample/generated/Models/AttributeDefinition.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttributeDefinition : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttributeDefinition : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// true if the attribute should be used as the anchor for the object. Anchor attributes must have a unique value identifying an object, and must be immutable. Default is false. One, and only one, of the object's attributes must be designated as the anchor to support synchronization. @@ -13,14 +19,14 @@ public class AttributeDefinition : IAdditionalDataHolder, IParsable { /// The apiExpressions property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ApiExpressions { get; set; } + public List? ApiExpressions { get; set; } #nullable restore #else - public List ApiExpressions { get; set; } + public List ApiExpressions { get; set; } #endif /// true if value of this attribute should be treated as case-sensitive. This setting affects how the synchronization engine detects changes for the attribute. public bool? CaseExact { get; set; } - /// The defaultValue property + /// The default value of the attribute. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DefaultValue { get; set; } @@ -33,15 +39,15 @@ public class AttributeDefinition : IAdditionalDataHolder, IParsable { /// Metadata for the given object. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Metadata { get; set; } + public List? Metadata { get; set; } #nullable restore #else - public List Metadata { get; set; } + public List Metadata { get; set; } #endif /// true if an attribute can have multiple values. Default is false. public bool? Multivalued { get; set; } /// The mutability property - public ApiSdk.Models.Mutability? Mutability { get; set; } + public global::ApiSdk.Models.Mutability? Mutability { get; set; } /// Name of the attribute. Must be unique within the object definition. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -53,67 +59,75 @@ public class AttributeDefinition : IAdditionalDataHolder, IParsable { /// For attributes with reference type, lists referenced objects (for example, the manager attribute would list User as the referenced object). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ReferencedObjects { get; set; } + public List? ReferencedObjects { get; set; } #nullable restore #else - public List ReferencedObjects { get; set; } + public List ReferencedObjects { get; set; } #endif /// true if attribute is required. Object can not be created if any of the required attributes are missing. If during synchronization, the required attribute has no value, the default value will be used. If default the value was not set, synchronization will record an error. public bool? Required { get; set; } /// The type property - public AttributeType? Type { get; set; } + public global::ApiSdk.Models.AttributeType? Type { get; set; } /// - /// Instantiates a new attributeDefinition and sets the default values. + /// Instantiates a new and sets the default values. /// - public AttributeDefinition() { + public AttributeDefinition() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AttributeDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AttributeDefinition CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttributeDefinition(); + return new global::ApiSdk.Models.AttributeDefinition(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"anchor", n => { Anchor = n.GetBoolValue(); } }, - {"apiExpressions", n => { ApiExpressions = n.GetCollectionOfObjectValues(StringKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, - {"caseExact", n => { CaseExact = n.GetBoolValue(); } }, - {"defaultValue", n => { DefaultValue = n.GetStringValue(); } }, - {"flowNullValues", n => { FlowNullValues = n.GetBoolValue(); } }, - {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(AttributeDefinitionMetadataEntry.CreateFromDiscriminatorValue)?.ToList(); } }, - {"multivalued", n => { Multivalued = n.GetBoolValue(); } }, - {"mutability", n => { Mutability = n.GetEnumValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"referencedObjects", n => { ReferencedObjects = n.GetCollectionOfObjectValues(ReferencedObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"required", n => { Required = n.GetBoolValue(); } }, - {"type", n => { Type = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "anchor", n => { Anchor = n.GetBoolValue(); } }, + { "apiExpressions", n => { ApiExpressions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.StringKeyStringValuePair.CreateFromDiscriminatorValue)?.AsList(); } }, + { "caseExact", n => { CaseExact = n.GetBoolValue(); } }, + { "defaultValue", n => { DefaultValue = n.GetStringValue(); } }, + { "flowNullValues", n => { FlowNullValues = n.GetBoolValue(); } }, + { "metadata", n => { Metadata = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AttributeDefinitionMetadataEntry.CreateFromDiscriminatorValue)?.AsList(); } }, + { "multivalued", n => { Multivalued = n.GetBoolValue(); } }, + { "mutability", n => { Mutability = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "referencedObjects", n => { ReferencedObjects = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ReferencedObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "required", n => { Required = n.GetBoolValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("anchor", Anchor); - writer.WriteCollectionOfObjectValues("apiExpressions", ApiExpressions); + writer.WriteCollectionOfObjectValues("apiExpressions", ApiExpressions); writer.WriteBoolValue("caseExact", CaseExact); writer.WriteStringValue("defaultValue", DefaultValue); writer.WriteBoolValue("flowNullValues", FlowNullValues); - writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteCollectionOfObjectValues("metadata", Metadata); writer.WriteBoolValue("multivalued", Multivalued); - writer.WriteEnumValue("mutability", Mutability); + writer.WriteEnumValue("mutability", Mutability); writer.WriteStringValue("name", Name); - writer.WriteCollectionOfObjectValues("referencedObjects", ReferencedObjects); + writer.WriteCollectionOfObjectValues("referencedObjects", ReferencedObjects); writer.WriteBoolValue("required", Required); - writer.WriteEnumValue("type", Type); + writer.WriteEnumValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttributeDefinitionMetadata.cs b/src/sample/generated/Models/AttributeDefinitionMetadata.cs index 60b6023a..ed3d3209 100644 --- a/src/sample/generated/Models/AttributeDefinitionMetadata.cs +++ b/src/sample/generated/Models/AttributeDefinitionMetadata.cs @@ -1,25 +1,48 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AttributeDefinitionMetadata { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AttributeDefinitionMetadata + #pragma warning restore CS1591 + { [EnumMember(Value = "BaseAttributeName")] + #pragma warning disable CS1591 BaseAttributeName, + #pragma warning restore CS1591 [EnumMember(Value = "ComplexObjectDefinition")] + #pragma warning disable CS1591 ComplexObjectDefinition, + #pragma warning restore CS1591 [EnumMember(Value = "IsContainer")] + #pragma warning disable CS1591 IsContainer, + #pragma warning restore CS1591 [EnumMember(Value = "IsCustomerDefined")] + #pragma warning disable CS1591 IsCustomerDefined, + #pragma warning restore CS1591 [EnumMember(Value = "IsDomainQualified")] + #pragma warning disable CS1591 IsDomainQualified, + #pragma warning restore CS1591 [EnumMember(Value = "LinkPropertyNames")] + #pragma warning disable CS1591 LinkPropertyNames, + #pragma warning restore CS1591 [EnumMember(Value = "LinkTypeName")] + #pragma warning disable CS1591 LinkTypeName, + #pragma warning restore CS1591 [EnumMember(Value = "MaximumLength")] + #pragma warning disable CS1591 MaximumLength, + #pragma warning restore CS1591 [EnumMember(Value = "ReferencedProperty")] + #pragma warning disable CS1591 ReferencedProperty, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AttributeDefinitionMetadataEntry.cs b/src/sample/generated/Models/AttributeDefinitionMetadataEntry.cs index f3409824..2ccefef9 100644 --- a/src/sample/generated/Models/AttributeDefinitionMetadataEntry.cs +++ b/src/sample/generated/Models/AttributeDefinitionMetadataEntry.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttributeDefinitionMetadataEntry : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttributeDefinitionMetadataEntry : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The key property - public AttributeDefinitionMetadata? Key { get; set; } + public global::ApiSdk.Models.AttributeDefinitionMetadata? Key { get; set; } /// Value of the metadata property. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,37 +25,45 @@ public class AttributeDefinitionMetadataEntry : IAdditionalDataHolder, IParsable public string Value { get; set; } #endif /// - /// Instantiates a new attributeDefinitionMetadataEntry and sets the default values. + /// Instantiates a new and sets the default values. /// - public AttributeDefinitionMetadataEntry() { + public AttributeDefinitionMetadataEntry() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AttributeDefinitionMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AttributeDefinitionMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttributeDefinitionMetadataEntry(); + return new global::ApiSdk.Models.AttributeDefinitionMetadataEntry(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"key", n => { Key = n.GetEnumValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetEnumValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("key", Key); + writer.WriteEnumValue("key", Key); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttributeFlowBehavior.cs b/src/sample/generated/Models/AttributeFlowBehavior.cs index 3920a98c..6fe0b1df 100644 --- a/src/sample/generated/Models/AttributeFlowBehavior.cs +++ b/src/sample/generated/Models/AttributeFlowBehavior.cs @@ -1,11 +1,20 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AttributeFlowBehavior { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AttributeFlowBehavior + #pragma warning restore CS1591 + { [EnumMember(Value = "FlowWhenChanged")] + #pragma warning disable CS1591 FlowWhenChanged, + #pragma warning restore CS1591 [EnumMember(Value = "FlowAlways")] + #pragma warning disable CS1591 FlowAlways, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AttributeFlowType.cs b/src/sample/generated/Models/AttributeFlowType.cs index d41ee4a6..c6a7105b 100644 --- a/src/sample/generated/Models/AttributeFlowType.cs +++ b/src/sample/generated/Models/AttributeFlowType.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AttributeFlowType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AttributeFlowType + #pragma warning restore CS1591 + { [EnumMember(Value = "Always")] + #pragma warning disable CS1591 Always, + #pragma warning restore CS1591 [EnumMember(Value = "ObjectAddOnly")] + #pragma warning disable CS1591 ObjectAddOnly, + #pragma warning restore CS1591 [EnumMember(Value = "MultiValueAddOnly")] + #pragma warning disable CS1591 MultiValueAddOnly, + #pragma warning restore CS1591 [EnumMember(Value = "ValueAddOnly")] + #pragma warning disable CS1591 ValueAddOnly, + #pragma warning restore CS1591 [EnumMember(Value = "AttributeAddOnly")] + #pragma warning disable CS1591 AttributeAddOnly, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AttributeMapping.cs b/src/sample/generated/Models/AttributeMapping.cs index ceaf1ddb..b2af3c76 100644 --- a/src/sample/generated/Models/AttributeMapping.cs +++ b/src/sample/generated/Models/AttributeMapping.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttributeMapping : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttributeMapping : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Default value to be used in case the source property was evaluated to null. Optional. @@ -19,18 +25,18 @@ public class AttributeMapping : IAdditionalDataHolder, IParsable { /// For internal use only. public bool? ExportMissingReferences { get; set; } /// The flowBehavior property - public AttributeFlowBehavior? FlowBehavior { get; set; } + public global::ApiSdk.Models.AttributeFlowBehavior? FlowBehavior { get; set; } /// The flowType property - public AttributeFlowType? FlowType { get; set; } + public global::ApiSdk.Models.AttributeFlowType? FlowType { get; set; } /// If higher than 0, this attribute will be used to perform an initial match of the objects between source and target directories. The synchronization engine will try to find the matching object using attribute with lowest value of matching priority first. If not found, the attribute with the next matching priority will be used, and so on a until match is found or no more matching attributes are left. Only attributes that are expected to have unique values, such as email, should be used as matching attributes. public int? MatchingPriority { get; set; } /// The source property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public AttributeMappingSource? Source { get; set; } + public global::ApiSdk.Models.AttributeMappingSource? Source { get; set; } #nullable restore #else - public AttributeMappingSource Source { get; set; } + public global::ApiSdk.Models.AttributeMappingSource Source { get; set; } #endif /// Name of the attribute on the target object. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,47 +47,55 @@ public class AttributeMapping : IAdditionalDataHolder, IParsable { public string TargetAttributeName { get; set; } #endif /// - /// Instantiates a new attributeMapping and sets the default values. + /// Instantiates a new and sets the default values. /// - public AttributeMapping() { + public AttributeMapping() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AttributeMapping CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AttributeMapping CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttributeMapping(); + return new global::ApiSdk.Models.AttributeMapping(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"defaultValue", n => { DefaultValue = n.GetStringValue(); } }, - {"exportMissingReferences", n => { ExportMissingReferences = n.GetBoolValue(); } }, - {"flowBehavior", n => { FlowBehavior = n.GetEnumValue(); } }, - {"flowType", n => { FlowType = n.GetEnumValue(); } }, - {"matchingPriority", n => { MatchingPriority = n.GetIntValue(); } }, - {"source", n => { Source = n.GetObjectValue(AttributeMappingSource.CreateFromDiscriminatorValue); } }, - {"targetAttributeName", n => { TargetAttributeName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "defaultValue", n => { DefaultValue = n.GetStringValue(); } }, + { "exportMissingReferences", n => { ExportMissingReferences = n.GetBoolValue(); } }, + { "flowBehavior", n => { FlowBehavior = n.GetEnumValue(); } }, + { "flowType", n => { FlowType = n.GetEnumValue(); } }, + { "matchingPriority", n => { MatchingPriority = n.GetIntValue(); } }, + { "source", n => { Source = n.GetObjectValue(global::ApiSdk.Models.AttributeMappingSource.CreateFromDiscriminatorValue); } }, + { "targetAttributeName", n => { TargetAttributeName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultValue", DefaultValue); writer.WriteBoolValue("exportMissingReferences", ExportMissingReferences); - writer.WriteEnumValue("flowBehavior", FlowBehavior); - writer.WriteEnumValue("flowType", FlowType); + writer.WriteEnumValue("flowBehavior", FlowBehavior); + writer.WriteEnumValue("flowType", FlowType); writer.WriteIntValue("matchingPriority", MatchingPriority); - writer.WriteObjectValue("source", Source); + writer.WriteObjectValue("source", Source); writer.WriteStringValue("targetAttributeName", TargetAttributeName); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttributeMappingSource.cs b/src/sample/generated/Models/AttributeMappingSource.cs index c05f6d18..8ae971cf 100644 --- a/src/sample/generated/Models/AttributeMappingSource.cs +++ b/src/sample/generated/Models/AttributeMappingSource.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AttributeMappingSource : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AttributeMappingSource : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Equivalent expression representation of this attributeMappingSource object. @@ -27,49 +33,57 @@ public class AttributeMappingSource : IAdditionalDataHolder, IParsable { /// If this object represents a function, lists function parameters. Parameters consist of attributeMappingSource objects themselves, allowing for complex expressions. If type isn't Function, this property is null/empty array. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Parameters { get; set; } + public List? Parameters { get; set; } #nullable restore #else - public List Parameters { get; set; } + public List Parameters { get; set; } #endif /// The type property - public AttributeMappingSourceType? Type { get; set; } + public global::ApiSdk.Models.AttributeMappingSourceType? Type { get; set; } /// - /// Instantiates a new attributeMappingSource and sets the default values. + /// Instantiates a new and sets the default values. /// - public AttributeMappingSource() { + public AttributeMappingSource() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AttributeMappingSource CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AttributeMappingSource CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AttributeMappingSource(); + return new global::ApiSdk.Models.AttributeMappingSource(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"expression", n => { Expression = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"parameters", n => { Parameters = n.GetCollectionOfObjectValues(StringKeyAttributeMappingSourceValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, - {"type", n => { Type = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "expression", n => { Expression = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "parameters", n => { Parameters = n.GetCollectionOfObjectValues(global::ApiSdk.Models.StringKeyAttributeMappingSourceValuePair.CreateFromDiscriminatorValue)?.AsList(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("expression", Expression); writer.WriteStringValue("name", Name); - writer.WriteCollectionOfObjectValues("parameters", Parameters); - writer.WriteEnumValue("type", Type); + writer.WriteCollectionOfObjectValues("parameters", Parameters); + writer.WriteEnumValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AttributeMappingSourceType.cs b/src/sample/generated/Models/AttributeMappingSourceType.cs index 3fc47ecf..de07f3e8 100644 --- a/src/sample/generated/Models/AttributeMappingSourceType.cs +++ b/src/sample/generated/Models/AttributeMappingSourceType.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AttributeMappingSourceType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AttributeMappingSourceType + #pragma warning restore CS1591 + { [EnumMember(Value = "Attribute")] + #pragma warning disable CS1591 Attribute, + #pragma warning restore CS1591 [EnumMember(Value = "Constant")] + #pragma warning disable CS1591 Constant, + #pragma warning restore CS1591 [EnumMember(Value = "Function")] + #pragma warning disable CS1591 Function, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AttributeType.cs b/src/sample/generated/Models/AttributeType.cs index 6e797da7..cdb0d062 100644 --- a/src/sample/generated/Models/AttributeType.cs +++ b/src/sample/generated/Models/AttributeType.cs @@ -1,19 +1,36 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AttributeType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AttributeType + #pragma warning restore CS1591 + { [EnumMember(Value = "String")] + #pragma warning disable CS1591 String, + #pragma warning restore CS1591 [EnumMember(Value = "Integer")] + #pragma warning disable CS1591 Integer, + #pragma warning restore CS1591 [EnumMember(Value = "Reference")] + #pragma warning disable CS1591 Reference, + #pragma warning restore CS1591 [EnumMember(Value = "Binary")] + #pragma warning disable CS1591 Binary, + #pragma warning restore CS1591 [EnumMember(Value = "Boolean")] + #pragma warning disable CS1591 Boolean, + #pragma warning restore CS1591 [EnumMember(Value = "DateTime")] + #pragma warning disable CS1591 DateTime, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/Audio.cs b/src/sample/generated/Models/Audio.cs index 95a6023a..4d5eb3fa 100644 --- a/src/sample/generated/Models/Audio.cs +++ b/src/sample/generated/Models/Audio.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Audio : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Audio : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The title of the album for this audio file. @@ -83,47 +89,54 @@ public class Audio : IAdditionalDataHolder, IParsable { /// The year the audio file was recorded. public int? Year { get; set; } /// - /// Instantiates a new audio and sets the default values. + /// Instantiates a new and sets the default values. /// - public Audio() { + public Audio() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Audio CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Audio CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Audio(); + return new global::ApiSdk.Models.Audio(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"album", n => { Album = n.GetStringValue(); } }, - {"albumArtist", n => { AlbumArtist = n.GetStringValue(); } }, - {"artist", n => { Artist = n.GetStringValue(); } }, - {"bitrate", n => { Bitrate = n.GetLongValue(); } }, - {"composers", n => { Composers = n.GetStringValue(); } }, - {"copyright", n => { Copyright = n.GetStringValue(); } }, - {"disc", n => { Disc = n.GetIntValue(); } }, - {"discCount", n => { DiscCount = n.GetIntValue(); } }, - {"duration", n => { Duration = n.GetLongValue(); } }, - {"genre", n => { Genre = n.GetStringValue(); } }, - {"hasDrm", n => { HasDrm = n.GetBoolValue(); } }, - {"isVariableBitrate", n => { IsVariableBitrate = n.GetBoolValue(); } }, - {"title", n => { Title = n.GetStringValue(); } }, - {"track", n => { Track = n.GetIntValue(); } }, - {"trackCount", n => { TrackCount = n.GetIntValue(); } }, - {"year", n => { Year = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "album", n => { Album = n.GetStringValue(); } }, + { "albumArtist", n => { AlbumArtist = n.GetStringValue(); } }, + { "artist", n => { Artist = n.GetStringValue(); } }, + { "bitrate", n => { Bitrate = n.GetLongValue(); } }, + { "composers", n => { Composers = n.GetStringValue(); } }, + { "copyright", n => { Copyright = n.GetStringValue(); } }, + { "disc", n => { Disc = n.GetIntValue(); } }, + { "discCount", n => { DiscCount = n.GetIntValue(); } }, + { "duration", n => { Duration = n.GetLongValue(); } }, + { "genre", n => { Genre = n.GetStringValue(); } }, + { "hasDrm", n => { HasDrm = n.GetBoolValue(); } }, + { "isVariableBitrate", n => { IsVariableBitrate = n.GetBoolValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "track", n => { Track = n.GetIntValue(); } }, + { "trackCount", n => { TrackCount = n.GetIntValue(); } }, + { "year", n => { Year = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("album", Album); writer.WriteStringValue("albumArtist", AlbumArtist); @@ -145,3 +158,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AudioConferencing.cs b/src/sample/generated/Models/AudioConferencing.cs index 1ca1ebc3..10c756ed 100644 --- a/src/sample/generated/Models/AudioConferencing.cs +++ b/src/sample/generated/Models/AudioConferencing.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AudioConferencing : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AudioConferencing : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The conference id of the online meeting. @@ -24,7 +30,7 @@ public class AudioConferencing : IAdditionalDataHolder, IParsable { #else public string DialinUrl { get; set; } #endif - /// The tollFreeNumber property + /// The toll-free number that connects to the Audio Conference Provider. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TollFreeNumber { get; set; } @@ -40,7 +46,7 @@ public class AudioConferencing : IAdditionalDataHolder, IParsable { #else public List TollFreeNumbers { get; set; } #endif - /// The tollNumber property + /// The toll number that connects to the Audio Conference Provider. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TollNumber { get; set; } @@ -57,37 +63,44 @@ public class AudioConferencing : IAdditionalDataHolder, IParsable { public List TollNumbers { get; set; } #endif /// - /// Instantiates a new audioConferencing and sets the default values. + /// Instantiates a new and sets the default values. /// - public AudioConferencing() { + public AudioConferencing() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AudioConferencing CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AudioConferencing CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AudioConferencing(); + return new global::ApiSdk.Models.AudioConferencing(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"conferenceId", n => { ConferenceId = n.GetStringValue(); } }, - {"dialinUrl", n => { DialinUrl = n.GetStringValue(); } }, - {"tollFreeNumber", n => { TollFreeNumber = n.GetStringValue(); } }, - {"tollFreeNumbers", n => { TollFreeNumbers = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"tollNumber", n => { TollNumber = n.GetStringValue(); } }, - {"tollNumbers", n => { TollNumbers = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "conferenceId", n => { ConferenceId = n.GetStringValue(); } }, + { "dialinUrl", n => { DialinUrl = n.GetStringValue(); } }, + { "tollFreeNumber", n => { TollFreeNumber = n.GetStringValue(); } }, + { "tollFreeNumbers", n => { TollFreeNumbers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "tollNumber", n => { TollNumber = n.GetStringValue(); } }, + { "tollNumbers", n => { TollNumbers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("conferenceId", ConferenceId); writer.WriteStringValue("dialinUrl", DialinUrl); @@ -99,3 +112,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Authentication.cs b/src/sample/generated/Models/Authentication.cs index 613b4fd0..67a7543c 100644 --- a/src/sample/generated/Models/Authentication.cs +++ b/src/sample/generated/Models/Authentication.cs @@ -1,133 +1,146 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Authentication : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Authentication : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The email address registered to a user for authentication. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? EmailMethods { get; set; } + public List? EmailMethods { get; set; } #nullable restore #else - public List EmailMethods { get; set; } + public List EmailMethods { get; set; } #endif /// Represents the FIDO2 security keys registered to a user for authentication. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Fido2Methods { get; set; } + public List? Fido2Methods { get; set; } #nullable restore #else - public List Fido2Methods { get; set; } + public List Fido2Methods { get; set; } #endif /// Represents all authentication methods registered to a user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Methods { get; set; } + public List? Methods { get; set; } #nullable restore #else - public List Methods { get; set; } + public List Methods { get; set; } #endif /// The details of the Microsoft Authenticator app registered to a user for authentication. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MicrosoftAuthenticatorMethods { get; set; } + public List? MicrosoftAuthenticatorMethods { get; set; } #nullable restore #else - public List MicrosoftAuthenticatorMethods { get; set; } + public List MicrosoftAuthenticatorMethods { get; set; } #endif - /// Represents the status of a long-running operation. + /// Represents the status of a long-running operation, such as a password reset operation. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Operations { get; set; } + public List? Operations { get; set; } #nullable restore #else - public List Operations { get; set; } + public List Operations { get; set; } #endif - /// Represents the password that's registered to a user for authentication. For security, the password itself will never be returned in the object, but action can be taken to reset a password. + /// Represents the password registered to a user for authentication. For security, the password itself is never returned in the object, but action can be taken to reset a password. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PasswordMethods { get; set; } + public List? PasswordMethods { get; set; } #nullable restore #else - public List PasswordMethods { get; set; } + public List PasswordMethods { get; set; } #endif /// The phone numbers registered to a user for authentication. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PhoneMethods { get; set; } + public List? PhoneMethods { get; set; } #nullable restore #else - public List PhoneMethods { get; set; } + public List PhoneMethods { get; set; } #endif - /// The software OATH TOTP applications registered to a user for authentication. + /// The software OATH time-based one-time password (TOTP) applications registered to a user for authentication. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SoftwareOathMethods { get; set; } + public List? SoftwareOathMethods { get; set; } #nullable restore #else - public List SoftwareOathMethods { get; set; } + public List SoftwareOathMethods { get; set; } #endif /// Represents a Temporary Access Pass registered to a user for authentication through time-limited passcodes. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TemporaryAccessPassMethods { get; set; } + public List? TemporaryAccessPassMethods { get; set; } #nullable restore #else - public List TemporaryAccessPassMethods { get; set; } + public List TemporaryAccessPassMethods { get; set; } #endif /// Represents the Windows Hello for Business authentication method registered to a user for authentication. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? WindowsHelloForBusinessMethods { get; set; } + public List? WindowsHelloForBusinessMethods { get; set; } #nullable restore #else - public List WindowsHelloForBusinessMethods { get; set; } + public List WindowsHelloForBusinessMethods { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Authentication CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Authentication CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Authentication(); + return new global::ApiSdk.Models.Authentication(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"emailMethods", n => { EmailMethods = n.GetCollectionOfObjectValues(EmailAuthenticationMethod.CreateFromDiscriminatorValue)?.ToList(); } }, - {"fido2Methods", n => { Fido2Methods = n.GetCollectionOfObjectValues(Fido2AuthenticationMethod.CreateFromDiscriminatorValue)?.ToList(); } }, - {"methods", n => { Methods = n.GetCollectionOfObjectValues(AuthenticationMethod.CreateFromDiscriminatorValue)?.ToList(); } }, - {"microsoftAuthenticatorMethods", n => { MicrosoftAuthenticatorMethods = n.GetCollectionOfObjectValues(MicrosoftAuthenticatorAuthenticationMethod.CreateFromDiscriminatorValue)?.ToList(); } }, - {"operations", n => { Operations = n.GetCollectionOfObjectValues(LongRunningOperation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"passwordMethods", n => { PasswordMethods = n.GetCollectionOfObjectValues(PasswordAuthenticationMethod.CreateFromDiscriminatorValue)?.ToList(); } }, - {"phoneMethods", n => { PhoneMethods = n.GetCollectionOfObjectValues(PhoneAuthenticationMethod.CreateFromDiscriminatorValue)?.ToList(); } }, - {"softwareOathMethods", n => { SoftwareOathMethods = n.GetCollectionOfObjectValues(SoftwareOathAuthenticationMethod.CreateFromDiscriminatorValue)?.ToList(); } }, - {"temporaryAccessPassMethods", n => { TemporaryAccessPassMethods = n.GetCollectionOfObjectValues(TemporaryAccessPassAuthenticationMethod.CreateFromDiscriminatorValue)?.ToList(); } }, - {"windowsHelloForBusinessMethods", n => { WindowsHelloForBusinessMethods = n.GetCollectionOfObjectValues(WindowsHelloForBusinessAuthenticationMethod.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "emailMethods", n => { EmailMethods = n.GetCollectionOfObjectValues(global::ApiSdk.Models.EmailAuthenticationMethod.CreateFromDiscriminatorValue)?.AsList(); } }, + { "fido2Methods", n => { Fido2Methods = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Fido2AuthenticationMethod.CreateFromDiscriminatorValue)?.AsList(); } }, + { "methods", n => { Methods = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AuthenticationMethod.CreateFromDiscriminatorValue)?.AsList(); } }, + { "microsoftAuthenticatorMethods", n => { MicrosoftAuthenticatorMethods = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MicrosoftAuthenticatorAuthenticationMethod.CreateFromDiscriminatorValue)?.AsList(); } }, + { "operations", n => { Operations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.LongRunningOperation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "passwordMethods", n => { PasswordMethods = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PasswordAuthenticationMethod.CreateFromDiscriminatorValue)?.AsList(); } }, + { "phoneMethods", n => { PhoneMethods = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PhoneAuthenticationMethod.CreateFromDiscriminatorValue)?.AsList(); } }, + { "softwareOathMethods", n => { SoftwareOathMethods = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SoftwareOathAuthenticationMethod.CreateFromDiscriminatorValue)?.AsList(); } }, + { "temporaryAccessPassMethods", n => { TemporaryAccessPassMethods = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TemporaryAccessPassAuthenticationMethod.CreateFromDiscriminatorValue)?.AsList(); } }, + { "windowsHelloForBusinessMethods", n => { WindowsHelloForBusinessMethods = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WindowsHelloForBusinessAuthenticationMethod.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("emailMethods", EmailMethods); - writer.WriteCollectionOfObjectValues("fido2Methods", Fido2Methods); - writer.WriteCollectionOfObjectValues("methods", Methods); - writer.WriteCollectionOfObjectValues("microsoftAuthenticatorMethods", MicrosoftAuthenticatorMethods); - writer.WriteCollectionOfObjectValues("operations", Operations); - writer.WriteCollectionOfObjectValues("passwordMethods", PasswordMethods); - writer.WriteCollectionOfObjectValues("phoneMethods", PhoneMethods); - writer.WriteCollectionOfObjectValues("softwareOathMethods", SoftwareOathMethods); - writer.WriteCollectionOfObjectValues("temporaryAccessPassMethods", TemporaryAccessPassMethods); - writer.WriteCollectionOfObjectValues("windowsHelloForBusinessMethods", WindowsHelloForBusinessMethods); + writer.WriteCollectionOfObjectValues("emailMethods", EmailMethods); + writer.WriteCollectionOfObjectValues("fido2Methods", Fido2Methods); + writer.WriteCollectionOfObjectValues("methods", Methods); + writer.WriteCollectionOfObjectValues("microsoftAuthenticatorMethods", MicrosoftAuthenticatorMethods); + writer.WriteCollectionOfObjectValues("operations", Operations); + writer.WriteCollectionOfObjectValues("passwordMethods", PasswordMethods); + writer.WriteCollectionOfObjectValues("phoneMethods", PhoneMethods); + writer.WriteCollectionOfObjectValues("softwareOathMethods", SoftwareOathMethods); + writer.WriteCollectionOfObjectValues("temporaryAccessPassMethods", TemporaryAccessPassMethods); + writer.WriteCollectionOfObjectValues("windowsHelloForBusinessMethods", WindowsHelloForBusinessMethods); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AuthenticationMethod.cs b/src/sample/generated/Models/AuthenticationMethod.cs index dcb4e318..37c8ca03 100644 --- a/src/sample/generated/Models/AuthenticationMethod.cs +++ b/src/sample/generated/Models/AuthenticationMethod.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AuthenticationMethod : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AuthenticationMethod : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new AuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.AuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AuthenticationMethod(); + return new global::ApiSdk.Models.AuthenticationMethod(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AuthenticationMethodKeyStrength.cs b/src/sample/generated/Models/AuthenticationMethodKeyStrength.cs index 4363b506..442326ae 100644 --- a/src/sample/generated/Models/AuthenticationMethodKeyStrength.cs +++ b/src/sample/generated/Models/AuthenticationMethodKeyStrength.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AuthenticationMethodKeyStrength { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AuthenticationMethodKeyStrength + #pragma warning restore CS1591 + { [EnumMember(Value = "normal")] + #pragma warning disable CS1591 Normal, + #pragma warning restore CS1591 [EnumMember(Value = "weak")] + #pragma warning disable CS1591 Weak, + #pragma warning restore CS1591 [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 Unknown, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AuthenticationMethodSignInState.cs b/src/sample/generated/Models/AuthenticationMethodSignInState.cs index a96ea719..63d61042 100644 --- a/src/sample/generated/Models/AuthenticationMethodSignInState.cs +++ b/src/sample/generated/Models/AuthenticationMethodSignInState.cs @@ -1,21 +1,40 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AuthenticationMethodSignInState { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AuthenticationMethodSignInState + #pragma warning restore CS1591 + { [EnumMember(Value = "notSupported")] + #pragma warning disable CS1591 NotSupported, + #pragma warning restore CS1591 [EnumMember(Value = "notAllowedByPolicy")] + #pragma warning disable CS1591 NotAllowedByPolicy, + #pragma warning restore CS1591 [EnumMember(Value = "notEnabled")] + #pragma warning disable CS1591 NotEnabled, + #pragma warning restore CS1591 [EnumMember(Value = "phoneNumberNotUnique")] + #pragma warning disable CS1591 PhoneNumberNotUnique, + #pragma warning restore CS1591 [EnumMember(Value = "ready")] + #pragma warning disable CS1591 Ready, + #pragma warning restore CS1591 [EnumMember(Value = "notConfigured")] + #pragma warning disable CS1591 NotConfigured, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AuthenticationPhoneType.cs b/src/sample/generated/Models/AuthenticationPhoneType.cs index 92e84178..4e82d1b8 100644 --- a/src/sample/generated/Models/AuthenticationPhoneType.cs +++ b/src/sample/generated/Models/AuthenticationPhoneType.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AuthenticationPhoneType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AuthenticationPhoneType + #pragma warning restore CS1591 + { [EnumMember(Value = "mobile")] + #pragma warning disable CS1591 Mobile, + #pragma warning restore CS1591 [EnumMember(Value = "alternateMobile")] + #pragma warning disable CS1591 AlternateMobile, + #pragma warning restore CS1591 [EnumMember(Value = "office")] + #pragma warning disable CS1591 Office, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/AuthorizationInfo.cs b/src/sample/generated/Models/AuthorizationInfo.cs index 6bde828c..870a017c 100644 --- a/src/sample/generated/Models/AuthorizationInfo.cs +++ b/src/sample/generated/Models/AuthorizationInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AuthorizationInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AuthorizationInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The certificateUserIds property @@ -17,35 +23,43 @@ public class AuthorizationInfo : IAdditionalDataHolder, IParsable { public List CertificateUserIds { get; set; } #endif /// - /// Instantiates a new authorizationInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public AuthorizationInfo() { + public AuthorizationInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AuthorizationInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AuthorizationInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AuthorizationInfo(); + return new global::ApiSdk.Models.AuthorizationInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"certificateUserIds", n => { CertificateUserIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "certificateUserIds", n => { CertificateUserIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("certificateUserIds", CertificateUserIds); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AutomaticRepliesSetting.cs b/src/sample/generated/Models/AutomaticRepliesSetting.cs index 6e4b5c25..7c98cdc5 100644 --- a/src/sample/generated/Models/AutomaticRepliesSetting.cs +++ b/src/sample/generated/Models/AutomaticRepliesSetting.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class AutomaticRepliesSetting : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class AutomaticRepliesSetting : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The externalAudience property - public ExternalAudienceScope? ExternalAudience { get; set; } + public global::ApiSdk.Models.ExternalAudienceScope? ExternalAudience { get; set; } /// The automatic reply to send to the specified external audience, if Status is AlwaysEnabled or Scheduled. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -29,61 +35,69 @@ public class AutomaticRepliesSetting : IAdditionalDataHolder, IParsable { /// The scheduledEndDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? ScheduledEndDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? ScheduledEndDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone ScheduledEndDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone ScheduledEndDateTime { get; set; } #endif /// The scheduledStartDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? ScheduledStartDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? ScheduledStartDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone ScheduledStartDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone ScheduledStartDateTime { get; set; } #endif /// The status property - public AutomaticRepliesStatus? Status { get; set; } + public global::ApiSdk.Models.AutomaticRepliesStatus? Status { get; set; } /// - /// Instantiates a new automaticRepliesSetting and sets the default values. + /// Instantiates a new and sets the default values. /// - public AutomaticRepliesSetting() { + public AutomaticRepliesSetting() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static AutomaticRepliesSetting CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.AutomaticRepliesSetting CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new AutomaticRepliesSetting(); + return new global::ApiSdk.Models.AutomaticRepliesSetting(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"externalAudience", n => { ExternalAudience = n.GetEnumValue(); } }, - {"externalReplyMessage", n => { ExternalReplyMessage = n.GetStringValue(); } }, - {"internalReplyMessage", n => { InternalReplyMessage = n.GetStringValue(); } }, - {"scheduledEndDateTime", n => { ScheduledEndDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"scheduledStartDateTime", n => { ScheduledStartDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"status", n => { Status = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "externalAudience", n => { ExternalAudience = n.GetEnumValue(); } }, + { "externalReplyMessage", n => { ExternalReplyMessage = n.GetStringValue(); } }, + { "internalReplyMessage", n => { InternalReplyMessage = n.GetStringValue(); } }, + { "scheduledEndDateTime", n => { ScheduledEndDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "scheduledStartDateTime", n => { ScheduledStartDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("externalAudience", ExternalAudience); + writer.WriteEnumValue("externalAudience", ExternalAudience); writer.WriteStringValue("externalReplyMessage", ExternalReplyMessage); writer.WriteStringValue("internalReplyMessage", InternalReplyMessage); - writer.WriteObjectValue("scheduledEndDateTime", ScheduledEndDateTime); - writer.WriteObjectValue("scheduledStartDateTime", ScheduledStartDateTime); - writer.WriteEnumValue("status", Status); + writer.WriteObjectValue("scheduledEndDateTime", ScheduledEndDateTime); + writer.WriteObjectValue("scheduledStartDateTime", ScheduledStartDateTime); + writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/AutomaticRepliesStatus.cs b/src/sample/generated/Models/AutomaticRepliesStatus.cs index f9fc8158..c6942935 100644 --- a/src/sample/generated/Models/AutomaticRepliesStatus.cs +++ b/src/sample/generated/Models/AutomaticRepliesStatus.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum AutomaticRepliesStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum AutomaticRepliesStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 Disabled, + #pragma warning restore CS1591 [EnumMember(Value = "alwaysEnabled")] + #pragma warning disable CS1591 AlwaysEnabled, + #pragma warning restore CS1591 [EnumMember(Value = "scheduled")] + #pragma warning disable CS1591 Scheduled, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/BaseItem.cs b/src/sample/generated/Models/BaseItem.cs index 57309700..0e4bdfb4 100644 --- a/src/sample/generated/Models/BaseItem.cs +++ b/src/sample/generated/Models/BaseItem.cs @@ -1,26 +1,32 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class BaseItem : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BaseItem : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The createdBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? CreatedBy { get; set; } #nullable restore #else - public IdentitySet CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet CreatedBy { get; set; } #endif /// The createdByUser property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public User? CreatedByUser { get; set; } + public global::ApiSdk.Models.User? CreatedByUser { get; set; } #nullable restore #else - public User CreatedByUser { get; set; } + public global::ApiSdk.Models.User CreatedByUser { get; set; } #endif /// Date and time of item creation. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } @@ -43,18 +49,18 @@ public class BaseItem : Entity, IParsable { /// The lastModifiedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? LastModifiedBy { get; set; } #nullable restore #else - public IdentitySet LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet LastModifiedBy { get; set; } #endif /// The lastModifiedByUser property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public User? LastModifiedByUser { get; set; } + public global::ApiSdk.Models.User? LastModifiedByUser { get; set; } #nullable restore #else - public User LastModifiedByUser { get; set; } + public global::ApiSdk.Models.User LastModifiedByUser { get; set; } #endif /// Date and time the item was last modified. Read-only. public DateTimeOffset? LastModifiedDateTime { get; set; } @@ -69,10 +75,10 @@ public class BaseItem : Entity, IParsable { /// The parentReference property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemReference? ParentReference { get; set; } + public global::ApiSdk.Models.ItemReference? ParentReference { get; set; } #nullable restore #else - public ItemReference ParentReference { get; set; } + public global::ApiSdk.Models.ItemReference ParentReference { get; set; } #endif /// URL that either displays the resource in the browser (for Office file formats), or is a direct link to the file (for other formats). Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -85,47 +91,54 @@ public class BaseItem : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new BaseItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.BaseItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new BaseItem(); + return new global::ApiSdk.Models.BaseItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdBy", n => { CreatedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"createdByUser", n => { CreatedByUser = n.GetObjectValue(User.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"eTag", n => { ETag = n.GetStringValue(); } }, - {"lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"lastModifiedByUser", n => { LastModifiedByUser = n.GetObjectValue(User.CreateFromDiscriminatorValue); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"parentReference", n => { ParentReference = n.GetObjectValue(ItemReference.CreateFromDiscriminatorValue); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdBy", n => { CreatedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "createdByUser", n => { CreatedByUser = n.GetObjectValue(global::ApiSdk.Models.User.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "eTag", n => { ETag = n.GetStringValue(); } }, + { "lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "lastModifiedByUser", n => { LastModifiedByUser = n.GetObjectValue(global::ApiSdk.Models.User.CreateFromDiscriminatorValue); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "parentReference", n => { ParentReference = n.GetObjectValue(global::ApiSdk.Models.ItemReference.CreateFromDiscriminatorValue); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("createdBy", CreatedBy); - writer.WriteObjectValue("createdByUser", CreatedByUser); + writer.WriteObjectValue("createdBy", CreatedBy); + writer.WriteObjectValue("createdByUser", CreatedByUser); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); writer.WriteStringValue("eTag", ETag); - writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); - writer.WriteObjectValue("lastModifiedByUser", LastModifiedByUser); + writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); + writer.WriteObjectValue("lastModifiedByUser", LastModifiedByUser); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("name", Name); - writer.WriteObjectValue("parentReference", ParentReference); + writer.WriteObjectValue("parentReference", ParentReference); writer.WriteStringValue("webUrl", WebUrl); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/BaseItemVersion.cs b/src/sample/generated/Models/BaseItemVersion.cs index f9c0bb3c..968a03ce 100644 --- a/src/sample/generated/Models/BaseItemVersion.cs +++ b/src/sample/generated/Models/BaseItemVersion.cs @@ -1,57 +1,70 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class BaseItemVersion : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BaseItemVersion : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The lastModifiedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? LastModifiedBy { get; set; } #nullable restore #else - public IdentitySet LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet LastModifiedBy { get; set; } #endif /// Date and time the version was last modified. Read-only. public DateTimeOffset? LastModifiedDateTime { get; set; } /// The publication property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PublicationFacet? Publication { get; set; } + public global::ApiSdk.Models.PublicationFacet? Publication { get; set; } #nullable restore #else - public PublicationFacet Publication { get; set; } + public global::ApiSdk.Models.PublicationFacet Publication { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new BaseItemVersion CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.BaseItemVersion CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new BaseItemVersion(); + return new global::ApiSdk.Models.BaseItemVersion(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"publication", n => { Publication = n.GetObjectValue(PublicationFacet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "publication", n => { Publication = n.GetObjectValue(global::ApiSdk.Models.PublicationFacet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); + writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); - writer.WriteObjectValue("publication", Publication); + writer.WriteObjectValue("publication", Publication); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/BaseSitePage.cs b/src/sample/generated/Models/BaseSitePage.cs new file mode 100644 index 00000000..2e67f44b --- /dev/null +++ b/src/sample/generated/Models/BaseSitePage.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BaseSitePage : global::ApiSdk.Models.BaseItem, IParsable + #pragma warning restore CS1591 + { + /// The pageLayout property + public global::ApiSdk.Models.PageLayoutType? PageLayout { get; set; } + /// The publishingState property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.PublicationFacet? PublishingState { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.PublicationFacet PublishingState { get; set; } +#endif + /// Title of the sitePage. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Title { get; set; } +#nullable restore +#else + public string Title { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.BaseSitePage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.BaseSitePage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "pageLayout", n => { PageLayout = n.GetEnumValue(); } }, + { "publishingState", n => { PublishingState = n.GetObjectValue(global::ApiSdk.Models.PublicationFacet.CreateFromDiscriminatorValue); } }, + { "title", n => { Title = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteEnumValue("pageLayout", PageLayout); + writer.WriteObjectValue("publishingState", PublishingState); + writer.WriteStringValue("title", Title); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/BodyType.cs b/src/sample/generated/Models/BodyType.cs index 9fd01a09..7f0bb040 100644 --- a/src/sample/generated/Models/BodyType.cs +++ b/src/sample/generated/Models/BodyType.cs @@ -1,11 +1,20 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum BodyType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum BodyType + #pragma warning restore CS1591 + { [EnumMember(Value = "text")] + #pragma warning disable CS1591 Text, + #pragma warning restore CS1591 [EnumMember(Value = "html")] + #pragma warning disable CS1591 Html, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/BooleanColumn.cs b/src/sample/generated/Models/BooleanColumn.cs index bf7671ed..e5442701 100644 --- a/src/sample/generated/Models/BooleanColumn.cs +++ b/src/sample/generated/Models/BooleanColumn.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class BooleanColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BooleanColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new booleanColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public BooleanColumn() { + public BooleanColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static BooleanColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.BooleanColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new BooleanColumn(); + return new global::ApiSdk.Models.BooleanColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/BroadcastMeetingAudience.cs b/src/sample/generated/Models/BroadcastMeetingAudience.cs index 0e3eb818..91682741 100644 --- a/src/sample/generated/Models/BroadcastMeetingAudience.cs +++ b/src/sample/generated/Models/BroadcastMeetingAudience.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum BroadcastMeetingAudience { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum BroadcastMeetingAudience + #pragma warning restore CS1591 + { [EnumMember(Value = "roleIsAttendee")] + #pragma warning disable CS1591 RoleIsAttendee, + #pragma warning restore CS1591 [EnumMember(Value = "organization")] + #pragma warning disable CS1591 Organization, + #pragma warning restore CS1591 [EnumMember(Value = "everyone")] + #pragma warning disable CS1591 Everyone, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/BroadcastMeetingCaptionSettings.cs b/src/sample/generated/Models/BroadcastMeetingCaptionSettings.cs index 41b779d9..a566fa54 100644 --- a/src/sample/generated/Models/BroadcastMeetingCaptionSettings.cs +++ b/src/sample/generated/Models/BroadcastMeetingCaptionSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class BroadcastMeetingCaptionSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BroadcastMeetingCaptionSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Indicates whether captions are enabled for this Teams live event. @@ -27,34 +33,41 @@ public class BroadcastMeetingCaptionSettings : IAdditionalDataHolder, IParsable public List TranslationLanguages { get; set; } #endif /// - /// Instantiates a new broadcastMeetingCaptionSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public BroadcastMeetingCaptionSettings() { + public BroadcastMeetingCaptionSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static BroadcastMeetingCaptionSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.BroadcastMeetingCaptionSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new BroadcastMeetingCaptionSettings(); + return new global::ApiSdk.Models.BroadcastMeetingCaptionSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"isCaptionEnabled", n => { IsCaptionEnabled = n.GetBoolValue(); } }, - {"spokenLanguage", n => { SpokenLanguage = n.GetStringValue(); } }, - {"translationLanguages", n => { TranslationLanguages = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "isCaptionEnabled", n => { IsCaptionEnabled = n.GetBoolValue(); } }, + { "spokenLanguage", n => { SpokenLanguage = n.GetStringValue(); } }, + { "translationLanguages", n => { TranslationLanguages = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isCaptionEnabled", IsCaptionEnabled); writer.WriteStringValue("spokenLanguage", SpokenLanguage); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/BroadcastMeetingSettings.cs b/src/sample/generated/Models/BroadcastMeetingSettings.cs index 37dc9a0c..76b850e7 100644 --- a/src/sample/generated/Models/BroadcastMeetingSettings.cs +++ b/src/sample/generated/Models/BroadcastMeetingSettings.cs @@ -1,22 +1,28 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class BroadcastMeetingSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BroadcastMeetingSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The allowedAudience property - public BroadcastMeetingAudience? AllowedAudience { get; set; } + public global::ApiSdk.Models.BroadcastMeetingAudience? AllowedAudience { get; set; } /// The captions property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public BroadcastMeetingCaptionSettings? Captions { get; set; } + public global::ApiSdk.Models.BroadcastMeetingCaptionSettings? Captions { get; set; } #nullable restore #else - public BroadcastMeetingCaptionSettings Captions { get; set; } + public global::ApiSdk.Models.BroadcastMeetingCaptionSettings Captions { get; set; } #endif /// Indicates whether attendee report is enabled for this Teams live event. Default value is false. public bool? IsAttendeeReportEnabled { get; set; } @@ -27,40 +33,47 @@ public class BroadcastMeetingSettings : IAdditionalDataHolder, IParsable { /// Indicates whether video on demand is enabled for this Teams live event. Default value is false. public bool? IsVideoOnDemandEnabled { get; set; } /// - /// Instantiates a new broadcastMeetingSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public BroadcastMeetingSettings() { + public BroadcastMeetingSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static BroadcastMeetingSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.BroadcastMeetingSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new BroadcastMeetingSettings(); + return new global::ApiSdk.Models.BroadcastMeetingSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowedAudience", n => { AllowedAudience = n.GetEnumValue(); } }, - {"captions", n => { Captions = n.GetObjectValue(BroadcastMeetingCaptionSettings.CreateFromDiscriminatorValue); } }, - {"isAttendeeReportEnabled", n => { IsAttendeeReportEnabled = n.GetBoolValue(); } }, - {"isQuestionAndAnswerEnabled", n => { IsQuestionAndAnswerEnabled = n.GetBoolValue(); } }, - {"isRecordingEnabled", n => { IsRecordingEnabled = n.GetBoolValue(); } }, - {"isVideoOnDemandEnabled", n => { IsVideoOnDemandEnabled = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowedAudience", n => { AllowedAudience = n.GetEnumValue(); } }, + { "captions", n => { Captions = n.GetObjectValue(global::ApiSdk.Models.BroadcastMeetingCaptionSettings.CreateFromDiscriminatorValue); } }, + { "isAttendeeReportEnabled", n => { IsAttendeeReportEnabled = n.GetBoolValue(); } }, + { "isQuestionAndAnswerEnabled", n => { IsQuestionAndAnswerEnabled = n.GetBoolValue(); } }, + { "isRecordingEnabled", n => { IsRecordingEnabled = n.GetBoolValue(); } }, + { "isVideoOnDemandEnabled", n => { IsVideoOnDemandEnabled = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("allowedAudience", AllowedAudience); - writer.WriteObjectValue("captions", Captions); + writer.WriteEnumValue("allowedAudience", AllowedAudience); + writer.WriteObjectValue("captions", Captions); writer.WriteBoolValue("isAttendeeReportEnabled", IsAttendeeReportEnabled); writer.WriteBoolValue("isQuestionAndAnswerEnabled", IsQuestionAndAnswerEnabled); writer.WriteBoolValue("isRecordingEnabled", IsRecordingEnabled); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/BulkUpload.cs b/src/sample/generated/Models/BulkUpload.cs new file mode 100644 index 00000000..27aee19b --- /dev/null +++ b/src/sample/generated/Models/BulkUpload.cs @@ -0,0 +1,46 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BulkUpload : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.BulkUpload CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.BulkUpload(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Bundle.cs b/src/sample/generated/Models/Bundle.cs index b029cd6c..2d3069d9 100644 --- a/src/sample/generated/Models/Bundle.cs +++ b/src/sample/generated/Models/Bundle.cs @@ -1,55 +1,69 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Bundle : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Bundle : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The album property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Album? Album { get; set; } + public global::ApiSdk.Models.Album? Album { get; set; } #nullable restore #else - public ApiSdk.Models.Album Album { get; set; } + public global::ApiSdk.Models.Album Album { get; set; } #endif /// Number of children contained immediately within this container. public int? ChildCount { get; set; } /// - /// Instantiates a new bundle and sets the default values. + /// Instantiates a new and sets the default values. /// - public Bundle() { + public Bundle() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Bundle CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Bundle CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Bundle(); + return new global::ApiSdk.Models.Bundle(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"album", n => { Album = n.GetObjectValue(ApiSdk.Models.Album.CreateFromDiscriminatorValue); } }, - {"childCount", n => { ChildCount = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "album", n => { Album = n.GetObjectValue(global::ApiSdk.Models.Album.CreateFromDiscriminatorValue); } }, + { "childCount", n => { ChildCount = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("album", Album); + writer.WriteObjectValue("album", Album); writer.WriteIntValue("childCount", ChildCount); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CalculatedColumn.cs b/src/sample/generated/Models/CalculatedColumn.cs index 45eb8d18..bd1526b7 100644 --- a/src/sample/generated/Models/CalculatedColumn.cs +++ b/src/sample/generated/Models/CalculatedColumn.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class CalculatedColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CalculatedColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// For dateTime output types, the format of the value. Possible values are: dateOnly or dateTime. @@ -33,34 +39,41 @@ public class CalculatedColumn : IAdditionalDataHolder, IParsable { public string OutputType { get; set; } #endif /// - /// Instantiates a new calculatedColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public CalculatedColumn() { + public CalculatedColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static CalculatedColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.CalculatedColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CalculatedColumn(); + return new global::ApiSdk.Models.CalculatedColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"format", n => { Format = n.GetStringValue(); } }, - {"formula", n => { Formula = n.GetStringValue(); } }, - {"outputType", n => { OutputType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "format", n => { Format = n.GetStringValue(); } }, + { "formula", n => { Formula = n.GetStringValue(); } }, + { "outputType", n => { OutputType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("format", Format); writer.WriteStringValue("formula", Formula); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Calendar.cs b/src/sample/generated/Models/Calendar.cs index a7b31f1f..8f6c68a9 100644 --- a/src/sample/generated/Models/Calendar.cs +++ b/src/sample/generated/Models/Calendar.cs @@ -1,34 +1,40 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Calendar : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Calendar : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Represent the online meeting service providers that can be used to create online meetings in this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AllowedOnlineMeetingProviders { get; set; } + public List? AllowedOnlineMeetingProviders { get; set; } #nullable restore #else - public List AllowedOnlineMeetingProviders { get; set; } + public List AllowedOnlineMeetingProviders { get; set; } #endif /// The permissions of the users with whom the calendar is shared. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CalendarPermissions { get; set; } + public List? CalendarPermissions { get; set; } #nullable restore #else - public List CalendarPermissions { get; set; } + public List CalendarPermissions { get; set; } #endif /// The calendar view for the calendar. Navigation property. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CalendarView { get; set; } + public List? CalendarView { get; set; } #nullable restore #else - public List CalendarView { get; set; } + public List CalendarView { get; set; } #endif /// true if the user can write to the calendar, false otherwise. This property is true for the user who created the calendar. This property is also true for a user who has been shared a calendar and granted write access. public bool? CanEdit { get; set; } @@ -45,16 +51,16 @@ public class Calendar : Entity, IParsable { public string ChangeKey { get; set; } #endif /// The color property - public CalendarColor? Color { get; set; } + public global::ApiSdk.Models.CalendarColor? Color { get; set; } /// The defaultOnlineMeetingProvider property - public OnlineMeetingProviderType? DefaultOnlineMeetingProvider { get; set; } + public global::ApiSdk.Models.OnlineMeetingProviderType? DefaultOnlineMeetingProvider { get; set; } /// The events in the calendar. Navigation property. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Events { get; set; } + public List? Events { get; set; } #nullable restore #else - public List Events { get; set; } + public List Events { get; set; } #endif /// The calendar color, expressed in a hex color code of three hexadecimal values, each ranging from 00 to FF and representing the red, green, or blue components of the color in the RGB color space. If the user has never explicitly set a color for the calendar, this property is empty. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -73,10 +79,10 @@ public class Calendar : Entity, IParsable { /// The collection of multi-value extended properties defined for the calendar. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MultiValueExtendedProperties { get; set; } + public List? MultiValueExtendedProperties { get; set; } #nullable restore #else - public List MultiValueExtendedProperties { get; set; } + public List MultiValueExtendedProperties { get; set; } #endif /// The calendar name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -89,77 +95,84 @@ public class Calendar : Entity, IParsable { /// The owner property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public EmailAddress? Owner { get; set; } + public global::ApiSdk.Models.EmailAddress? Owner { get; set; } #nullable restore #else - public EmailAddress Owner { get; set; } + public global::ApiSdk.Models.EmailAddress Owner { get; set; } #endif /// The collection of single-value extended properties defined for the calendar. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SingleValueExtendedProperties { get; set; } + public List? SingleValueExtendedProperties { get; set; } #nullable restore #else - public List SingleValueExtendedProperties { get; set; } + public List SingleValueExtendedProperties { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Calendar CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Calendar CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Calendar(); + return new global::ApiSdk.Models.Calendar(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"allowedOnlineMeetingProviders", n => { AllowedOnlineMeetingProviders = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"calendarPermissions", n => { CalendarPermissions = n.GetCollectionOfObjectValues(CalendarPermission.CreateFromDiscriminatorValue)?.ToList(); } }, - {"calendarView", n => { CalendarView = n.GetCollectionOfObjectValues(Event.CreateFromDiscriminatorValue)?.ToList(); } }, - {"canEdit", n => { CanEdit = n.GetBoolValue(); } }, - {"canShare", n => { CanShare = n.GetBoolValue(); } }, - {"canViewPrivateItems", n => { CanViewPrivateItems = n.GetBoolValue(); } }, - {"changeKey", n => { ChangeKey = n.GetStringValue(); } }, - {"color", n => { Color = n.GetEnumValue(); } }, - {"defaultOnlineMeetingProvider", n => { DefaultOnlineMeetingProvider = n.GetEnumValue(); } }, - {"events", n => { Events = n.GetCollectionOfObjectValues(Event.CreateFromDiscriminatorValue)?.ToList(); } }, - {"hexColor", n => { HexColor = n.GetStringValue(); } }, - {"isDefaultCalendar", n => { IsDefaultCalendar = n.GetBoolValue(); } }, - {"isRemovable", n => { IsRemovable = n.GetBoolValue(); } }, - {"isTallyingResponses", n => { IsTallyingResponses = n.GetBoolValue(); } }, - {"multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"owner", n => { Owner = n.GetObjectValue(EmailAddress.CreateFromDiscriminatorValue); } }, - {"singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "allowedOnlineMeetingProviders", n => { AllowedOnlineMeetingProviders = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "calendarPermissions", n => { CalendarPermissions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.CalendarPermission.CreateFromDiscriminatorValue)?.AsList(); } }, + { "calendarView", n => { CalendarView = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Event.CreateFromDiscriminatorValue)?.AsList(); } }, + { "canEdit", n => { CanEdit = n.GetBoolValue(); } }, + { "canShare", n => { CanShare = n.GetBoolValue(); } }, + { "canViewPrivateItems", n => { CanViewPrivateItems = n.GetBoolValue(); } }, + { "changeKey", n => { ChangeKey = n.GetStringValue(); } }, + { "color", n => { Color = n.GetEnumValue(); } }, + { "defaultOnlineMeetingProvider", n => { DefaultOnlineMeetingProvider = n.GetEnumValue(); } }, + { "events", n => { Events = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Event.CreateFromDiscriminatorValue)?.AsList(); } }, + { "hexColor", n => { HexColor = n.GetStringValue(); } }, + { "isDefaultCalendar", n => { IsDefaultCalendar = n.GetBoolValue(); } }, + { "isRemovable", n => { IsRemovable = n.GetBoolValue(); } }, + { "isTallyingResponses", n => { IsTallyingResponses = n.GetBoolValue(); } }, + { "multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "owner", n => { Owner = n.GetObjectValue(global::ApiSdk.Models.EmailAddress.CreateFromDiscriminatorValue); } }, + { "singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfEnumValues("allowedOnlineMeetingProviders", AllowedOnlineMeetingProviders); - writer.WriteCollectionOfObjectValues("calendarPermissions", CalendarPermissions); - writer.WriteCollectionOfObjectValues("calendarView", CalendarView); + writer.WriteCollectionOfEnumValues("allowedOnlineMeetingProviders", AllowedOnlineMeetingProviders); + writer.WriteCollectionOfObjectValues("calendarPermissions", CalendarPermissions); + writer.WriteCollectionOfObjectValues("calendarView", CalendarView); writer.WriteBoolValue("canEdit", CanEdit); writer.WriteBoolValue("canShare", CanShare); writer.WriteBoolValue("canViewPrivateItems", CanViewPrivateItems); writer.WriteStringValue("changeKey", ChangeKey); - writer.WriteEnumValue("color", Color); - writer.WriteEnumValue("defaultOnlineMeetingProvider", DefaultOnlineMeetingProvider); - writer.WriteCollectionOfObjectValues("events", Events); + writer.WriteEnumValue("color", Color); + writer.WriteEnumValue("defaultOnlineMeetingProvider", DefaultOnlineMeetingProvider); + writer.WriteCollectionOfObjectValues("events", Events); writer.WriteStringValue("hexColor", HexColor); writer.WriteBoolValue("isDefaultCalendar", IsDefaultCalendar); writer.WriteBoolValue("isRemovable", IsRemovable); writer.WriteBoolValue("isTallyingResponses", IsTallyingResponses); - writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); + writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); writer.WriteStringValue("name", Name); - writer.WriteObjectValue("owner", Owner); - writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); + writer.WriteObjectValue("owner", Owner); + writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CalendarColor.cs b/src/sample/generated/Models/CalendarColor.cs index 8fc76976..f9829802 100644 --- a/src/sample/generated/Models/CalendarColor.cs +++ b/src/sample/generated/Models/CalendarColor.cs @@ -1,29 +1,56 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum CalendarColor { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CalendarColor + #pragma warning restore CS1591 + { [EnumMember(Value = "auto")] + #pragma warning disable CS1591 Auto, + #pragma warning restore CS1591 [EnumMember(Value = "lightBlue")] + #pragma warning disable CS1591 LightBlue, + #pragma warning restore CS1591 [EnumMember(Value = "lightGreen")] + #pragma warning disable CS1591 LightGreen, + #pragma warning restore CS1591 [EnumMember(Value = "lightOrange")] + #pragma warning disable CS1591 LightOrange, + #pragma warning restore CS1591 [EnumMember(Value = "lightGray")] + #pragma warning disable CS1591 LightGray, + #pragma warning restore CS1591 [EnumMember(Value = "lightYellow")] + #pragma warning disable CS1591 LightYellow, + #pragma warning restore CS1591 [EnumMember(Value = "lightTeal")] + #pragma warning disable CS1591 LightTeal, + #pragma warning restore CS1591 [EnumMember(Value = "lightPink")] + #pragma warning disable CS1591 LightPink, + #pragma warning restore CS1591 [EnumMember(Value = "lightBrown")] + #pragma warning disable CS1591 LightBrown, + #pragma warning restore CS1591 [EnumMember(Value = "lightRed")] + #pragma warning disable CS1591 LightRed, + #pragma warning restore CS1591 [EnumMember(Value = "maxColor")] + #pragma warning disable CS1591 MaxColor, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/CalendarGroup.cs b/src/sample/generated/Models/CalendarGroup.cs index e3022705..b198d173 100644 --- a/src/sample/generated/Models/CalendarGroup.cs +++ b/src/sample/generated/Models/CalendarGroup.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class CalendarGroup : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CalendarGroup : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The calendars in the calendar group. Navigation property. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Calendars { get; set; } + public List? Calendars { get; set; } #nullable restore #else - public List Calendars { get; set; } + public List Calendars { get; set; } #endif /// Identifies the version of the calendar group. Every time the calendar group is changed, ChangeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -35,33 +41,40 @@ public class CalendarGroup : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new CalendarGroup CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.CalendarGroup CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CalendarGroup(); + return new global::ApiSdk.Models.CalendarGroup(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"calendars", n => { Calendars = n.GetCollectionOfObjectValues(Calendar.CreateFromDiscriminatorValue)?.ToList(); } }, - {"changeKey", n => { ChangeKey = n.GetStringValue(); } }, - {"classId", n => { ClassId = n.GetGuidValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "calendars", n => { Calendars = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Calendar.CreateFromDiscriminatorValue)?.AsList(); } }, + { "changeKey", n => { ChangeKey = n.GetStringValue(); } }, + { "classId", n => { ClassId = n.GetGuidValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("calendars", Calendars); + writer.WriteCollectionOfObjectValues("calendars", Calendars); writer.WriteStringValue("changeKey", ChangeKey); writer.WriteGuidValue("classId", ClassId); writer.WriteStringValue("name", Name); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CalendarPermission.cs b/src/sample/generated/Models/CalendarPermission.cs index 6b60a8c6..9b810f04 100644 --- a/src/sample/generated/Models/CalendarPermission.cs +++ b/src/sample/generated/Models/CalendarPermission.cs @@ -1,65 +1,78 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class CalendarPermission : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CalendarPermission : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// List of allowed sharing or delegating permission levels for the calendar. Possible values are: none, freeBusyRead, limitedRead, read, write, delegateWithoutPrivateEventAccess, delegateWithPrivateEventAccess, custom. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AllowedRoles { get; set; } + public List? AllowedRoles { get; set; } #nullable restore #else - public List AllowedRoles { get; set; } + public List AllowedRoles { get; set; } #endif /// The emailAddress property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.EmailAddress? EmailAddress { get; set; } + public global::ApiSdk.Models.EmailAddress? EmailAddress { get; set; } #nullable restore #else - public ApiSdk.Models.EmailAddress EmailAddress { get; set; } + public global::ApiSdk.Models.EmailAddress EmailAddress { get; set; } #endif /// True if the user in context (recipient or delegate) is inside the same organization as the calendar owner. public bool? IsInsideOrganization { get; set; } /// True if the user can be removed from the list of recipients or delegates for the specified calendar, false otherwise. The 'My organization' user determines the permissions other people within your organization have to the given calendar. You can't remove 'My organization' as a share recipient to a calendar. public bool? IsRemovable { get; set; } /// The role property - public CalendarRoleType? Role { get; set; } + public global::ApiSdk.Models.CalendarRoleType? Role { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new CalendarPermission CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.CalendarPermission CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CalendarPermission(); + return new global::ApiSdk.Models.CalendarPermission(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"allowedRoles", n => { AllowedRoles = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"emailAddress", n => { EmailAddress = n.GetObjectValue(ApiSdk.Models.EmailAddress.CreateFromDiscriminatorValue); } }, - {"isInsideOrganization", n => { IsInsideOrganization = n.GetBoolValue(); } }, - {"isRemovable", n => { IsRemovable = n.GetBoolValue(); } }, - {"role", n => { Role = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "allowedRoles", n => { AllowedRoles = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "emailAddress", n => { EmailAddress = n.GetObjectValue(global::ApiSdk.Models.EmailAddress.CreateFromDiscriminatorValue); } }, + { "isInsideOrganization", n => { IsInsideOrganization = n.GetBoolValue(); } }, + { "isRemovable", n => { IsRemovable = n.GetBoolValue(); } }, + { "role", n => { Role = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfEnumValues("allowedRoles", AllowedRoles); - writer.WriteObjectValue("emailAddress", EmailAddress); + writer.WriteCollectionOfEnumValues("allowedRoles", AllowedRoles); + writer.WriteObjectValue("emailAddress", EmailAddress); writer.WriteBoolValue("isInsideOrganization", IsInsideOrganization); writer.WriteBoolValue("isRemovable", IsRemovable); - writer.WriteEnumValue("role", Role); + writer.WriteEnumValue("role", Role); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CalendarRoleType.cs b/src/sample/generated/Models/CalendarRoleType.cs index c1b860db..69d9f6a5 100644 --- a/src/sample/generated/Models/CalendarRoleType.cs +++ b/src/sample/generated/Models/CalendarRoleType.cs @@ -1,23 +1,44 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum CalendarRoleType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CalendarRoleType + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "freeBusyRead")] + #pragma warning disable CS1591 FreeBusyRead, + #pragma warning restore CS1591 [EnumMember(Value = "limitedRead")] + #pragma warning disable CS1591 LimitedRead, + #pragma warning restore CS1591 [EnumMember(Value = "read")] + #pragma warning disable CS1591 Read, + #pragma warning restore CS1591 [EnumMember(Value = "write")] + #pragma warning disable CS1591 Write, + #pragma warning restore CS1591 [EnumMember(Value = "delegateWithoutPrivateEventAccess")] + #pragma warning disable CS1591 DelegateWithoutPrivateEventAccess, + #pragma warning restore CS1591 [EnumMember(Value = "delegateWithPrivateEventAccess")] + #pragma warning disable CS1591 DelegateWithPrivateEventAccess, + #pragma warning restore CS1591 [EnumMember(Value = "custom")] + #pragma warning disable CS1591 Custom, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/CallRecording.cs b/src/sample/generated/Models/CallRecording.cs new file mode 100644 index 00000000..d530c9ce --- /dev/null +++ b/src/sample/generated/Models/CallRecording.cs @@ -0,0 +1,114 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CallRecording : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The unique identifier for the call that is related to this recording. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CallId { get; set; } +#nullable restore +#else + public string CallId { get; set; } +#endif + /// The content of the recording. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public byte[]? Content { get; set; } +#nullable restore +#else + public byte[] Content { get; set; } +#endif + /// The unique identifier that links the transcript with its corresponding recording. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentCorrelationId { get; set; } +#nullable restore +#else + public string ContentCorrelationId { get; set; } +#endif + /// Date and time at which the recording was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + public DateTimeOffset? CreatedDateTime { get; set; } + /// Date and time at which the recording ends. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + public DateTimeOffset? EndDateTime { get; set; } + /// The unique identifier of the onlineMeeting related to this recording. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MeetingId { get; set; } +#nullable restore +#else + public string MeetingId { get; set; } +#endif + /// The meetingOrganizer property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.IdentitySet? MeetingOrganizer { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.IdentitySet MeetingOrganizer { get; set; } +#endif + /// The URL that can be used to access the content of the recording. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RecordingContentUrl { get; set; } +#nullable restore +#else + public string RecordingContentUrl { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.CallRecording CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.CallRecording(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "callId", n => { CallId = n.GetStringValue(); } }, + { "content", n => { Content = n.GetByteArrayValue(); } }, + { "contentCorrelationId", n => { ContentCorrelationId = n.GetStringValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + { "meetingId", n => { MeetingId = n.GetStringValue(); } }, + { "meetingOrganizer", n => { MeetingOrganizer = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "recordingContentUrl", n => { RecordingContentUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("callId", CallId); + writer.WriteByteArrayValue("content", Content); + writer.WriteStringValue("contentCorrelationId", ContentCorrelationId); + writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); + writer.WriteStringValue("meetingId", MeetingId); + writer.WriteObjectValue("meetingOrganizer", MeetingOrganizer); + writer.WriteStringValue("recordingContentUrl", RecordingContentUrl); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CallTranscript.cs b/src/sample/generated/Models/CallTranscript.cs index 32fe3503..04ea5969 100644 --- a/src/sample/generated/Models/CallTranscript.cs +++ b/src/sample/generated/Models/CallTranscript.cs @@ -1,12 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class CallTranscript : Entity, IParsable { - /// The content property +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CallTranscript : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The unique identifier for the call that is related to this transcript. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CallId { get; set; } +#nullable restore +#else + public string CallId { get; set; } +#endif + /// The content of the transcript. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public byte[]? Content { get; set; } @@ -14,9 +28,19 @@ public class CallTranscript : Entity, IParsable { #else public byte[] Content { get; set; } #endif - /// The createdDateTime property + /// The unique identifier that links the transcript with its corresponding recording. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ContentCorrelationId { get; set; } +#nullable restore +#else + public string ContentCorrelationId { get; set; } +#endif + /// Date and time at which the transcript was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } - /// The meetingId property + /// Date and time at which the transcription ends. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + public DateTimeOffset? EndDateTime { get; set; } + /// The unique identifier of the online meeting related to this transcript. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? MeetingId { get; set; } @@ -27,12 +51,12 @@ public class CallTranscript : Entity, IParsable { /// The meetingOrganizer property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? MeetingOrganizer { get; set; } + public global::ApiSdk.Models.IdentitySet? MeetingOrganizer { get; set; } #nullable restore #else - public IdentitySet MeetingOrganizer { get; set; } + public global::ApiSdk.Models.IdentitySet MeetingOrganizer { get; set; } #endif - /// The metadataContent property + /// The time-aligned metadata of the utterances in the transcript. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public byte[]? MetadataContent { get; set; } @@ -40,7 +64,7 @@ public class CallTranscript : Entity, IParsable { #else public byte[] MetadataContent { get; set; } #endif - /// The transcriptContentUrl property + /// The URL that can be used to access the content of the transcript. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TranscriptContentUrl { get; set; } @@ -51,37 +75,50 @@ public class CallTranscript : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new CallTranscript CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.CallTranscript CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CallTranscript(); + return new global::ApiSdk.Models.CallTranscript(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"content", n => { Content = n.GetByteArrayValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"meetingId", n => { MeetingId = n.GetStringValue(); } }, - {"meetingOrganizer", n => { MeetingOrganizer = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"metadataContent", n => { MetadataContent = n.GetByteArrayValue(); } }, - {"transcriptContentUrl", n => { TranscriptContentUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "callId", n => { CallId = n.GetStringValue(); } }, + { "content", n => { Content = n.GetByteArrayValue(); } }, + { "contentCorrelationId", n => { ContentCorrelationId = n.GetStringValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + { "meetingId", n => { MeetingId = n.GetStringValue(); } }, + { "meetingOrganizer", n => { MeetingOrganizer = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "metadataContent", n => { MetadataContent = n.GetByteArrayValue(); } }, + { "transcriptContentUrl", n => { TranscriptContentUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteStringValue("callId", CallId); writer.WriteByteArrayValue("content", Content); + writer.WriteStringValue("contentCorrelationId", ContentCorrelationId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("meetingId", MeetingId); - writer.WriteObjectValue("meetingOrganizer", MeetingOrganizer); + writer.WriteObjectValue("meetingOrganizer", MeetingOrganizer); writer.WriteByteArrayValue("metadataContent", MetadataContent); writer.WriteStringValue("transcriptContentUrl", TranscriptContentUrl); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CategoryColor.cs b/src/sample/generated/Models/CategoryColor.cs index ca6dcdc6..cf3416f5 100644 --- a/src/sample/generated/Models/CategoryColor.cs +++ b/src/sample/generated/Models/CategoryColor.cs @@ -1,59 +1,116 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum CategoryColor { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CategoryColor + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "preset0")] + #pragma warning disable CS1591 Preset0, + #pragma warning restore CS1591 [EnumMember(Value = "preset1")] + #pragma warning disable CS1591 Preset1, + #pragma warning restore CS1591 [EnumMember(Value = "preset2")] + #pragma warning disable CS1591 Preset2, + #pragma warning restore CS1591 [EnumMember(Value = "preset3")] + #pragma warning disable CS1591 Preset3, + #pragma warning restore CS1591 [EnumMember(Value = "preset4")] + #pragma warning disable CS1591 Preset4, + #pragma warning restore CS1591 [EnumMember(Value = "preset5")] + #pragma warning disable CS1591 Preset5, + #pragma warning restore CS1591 [EnumMember(Value = "preset6")] + #pragma warning disable CS1591 Preset6, + #pragma warning restore CS1591 [EnumMember(Value = "preset7")] + #pragma warning disable CS1591 Preset7, + #pragma warning restore CS1591 [EnumMember(Value = "preset8")] + #pragma warning disable CS1591 Preset8, + #pragma warning restore CS1591 [EnumMember(Value = "preset9")] + #pragma warning disable CS1591 Preset9, + #pragma warning restore CS1591 [EnumMember(Value = "preset10")] + #pragma warning disable CS1591 Preset10, + #pragma warning restore CS1591 [EnumMember(Value = "preset11")] + #pragma warning disable CS1591 Preset11, + #pragma warning restore CS1591 [EnumMember(Value = "preset12")] + #pragma warning disable CS1591 Preset12, + #pragma warning restore CS1591 [EnumMember(Value = "preset13")] + #pragma warning disable CS1591 Preset13, + #pragma warning restore CS1591 [EnumMember(Value = "preset14")] + #pragma warning disable CS1591 Preset14, + #pragma warning restore CS1591 [EnumMember(Value = "preset15")] + #pragma warning disable CS1591 Preset15, + #pragma warning restore CS1591 [EnumMember(Value = "preset16")] + #pragma warning disable CS1591 Preset16, + #pragma warning restore CS1591 [EnumMember(Value = "preset17")] + #pragma warning disable CS1591 Preset17, + #pragma warning restore CS1591 [EnumMember(Value = "preset18")] + #pragma warning disable CS1591 Preset18, + #pragma warning restore CS1591 [EnumMember(Value = "preset19")] + #pragma warning disable CS1591 Preset19, + #pragma warning restore CS1591 [EnumMember(Value = "preset20")] + #pragma warning disable CS1591 Preset20, + #pragma warning restore CS1591 [EnumMember(Value = "preset21")] + #pragma warning disable CS1591 Preset21, + #pragma warning restore CS1591 [EnumMember(Value = "preset22")] + #pragma warning disable CS1591 Preset22, + #pragma warning restore CS1591 [EnumMember(Value = "preset23")] + #pragma warning disable CS1591 Preset23, + #pragma warning restore CS1591 [EnumMember(Value = "preset24")] + #pragma warning disable CS1591 Preset24, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/Certification.cs b/src/sample/generated/Models/Certification.cs index 8b070625..70fe95ae 100644 --- a/src/sample/generated/Models/Certification.cs +++ b/src/sample/generated/Models/Certification.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Certification : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Certification : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// URL that shows certification details for the application. @@ -25,36 +31,43 @@ public class Certification : IAdditionalDataHolder, IParsable { /// The timestamp when the certification for the application was most recently added or updated. public DateTimeOffset? LastCertificationDateTime { get; set; } /// - /// Instantiates a new certification and sets the default values. + /// Instantiates a new and sets the default values. /// - public Certification() { + public Certification() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Certification CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Certification CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Certification(); + return new global::ApiSdk.Models.Certification(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"certificationDetailsUrl", n => { CertificationDetailsUrl = n.GetStringValue(); } }, - {"certificationExpirationDateTime", n => { CertificationExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"isCertifiedByMicrosoft", n => { IsCertifiedByMicrosoft = n.GetBoolValue(); } }, - {"isPublisherAttested", n => { IsPublisherAttested = n.GetBoolValue(); } }, - {"lastCertificationDateTime", n => { LastCertificationDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "certificationDetailsUrl", n => { CertificationDetailsUrl = n.GetStringValue(); } }, + { "certificationExpirationDateTime", n => { CertificationExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "isCertifiedByMicrosoft", n => { IsCertifiedByMicrosoft = n.GetBoolValue(); } }, + { "isPublisherAttested", n => { IsPublisherAttested = n.GetBoolValue(); } }, + { "lastCertificationDateTime", n => { LastCertificationDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("certificationExpirationDateTime", CertificationExpirationDateTime); writer.WriteBoolValue("isPublisherAttested", IsPublisherAttested); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChangeTrackedEntity.cs b/src/sample/generated/Models/ChangeTrackedEntity.cs index 5c6f7918..8a2fc76f 100644 --- a/src/sample/generated/Models/ChangeTrackedEntity.cs +++ b/src/sample/generated/Models/ChangeTrackedEntity.cs @@ -1,49 +1,62 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChangeTrackedEntity : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChangeTrackedEntity : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? CreatedDateTime { get; private set; } /// The lastModifiedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? LastModifiedBy { get; set; } #nullable restore #else - public IdentitySet LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet LastModifiedBy { get; set; } #endif /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? LastModifiedDateTime { get; private set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ChangeTrackedEntity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ChangeTrackedEntity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChangeTrackedEntity(); + return new global::ApiSdk.Models.ChangeTrackedEntity(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); + writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Channel.cs b/src/sample/generated/Models/Channel.cs index 8758b03c..923c24f9 100644 --- a/src/sample/generated/Models/Channel.cs +++ b/src/sample/generated/Models/Channel.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Channel : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Channel : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Read only. Timestamp at which the channel was created. public DateTimeOffset? CreatedDateTime { get; set; } /// Optional textual description for the channel. @@ -35,48 +41,58 @@ public class Channel : Entity, IParsable { /// The filesFolder property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DriveItem? FilesFolder { get; set; } + public global::ApiSdk.Models.DriveItem? FilesFolder { get; set; } #nullable restore #else - public DriveItem FilesFolder { get; set; } + public global::ApiSdk.Models.DriveItem FilesFolder { get; set; } #endif - /// Indicates whether the channel should automatically be marked 'favorite' for all members of the team. Can only be set programmatically with Create team. Default: false. + /// Indicates whether the channel is archived. Read-only. + public bool? IsArchived { get; set; } + /// Indicates whether the channel should be marked as recommended for all members of the team to show in their channel list. Note: All recommended channels automatically show in the channels list for education and frontline worker users. The property can only be set programmatically via the Create team method. The default value is false. public bool? IsFavoriteByDefault { get; set; } /// A collection of membership records associated with the channel. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Members { get; set; } + public List? Members { get; set; } #nullable restore #else - public List Members { get; set; } + public List Members { get; set; } #endif /// The membershipType property - public ChannelMembershipType? MembershipType { get; set; } + public global::ApiSdk.Models.ChannelMembershipType? MembershipType { get; set; } /// A collection of all the messages in the channel. A navigation property. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Messages { get; set; } + public List? Messages { get; set; } #nullable restore #else - public List Messages { get; set; } + public List Messages { get; set; } #endif /// A collection of teams with which a channel is shared. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SharedWithTeams { get; set; } + public List? SharedWithTeams { get; set; } #nullable restore #else - public List SharedWithTeams { get; set; } + public List SharedWithTeams { get; set; } +#endif + /// The summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.ChannelSummary? Summary { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.ChannelSummary Summary { get; set; } #endif /// A collection of all the tabs in the channel. A navigation property. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tabs { get; set; } + public List? Tabs { get; set; } #nullable restore #else - public List Tabs { get; set; } + public List Tabs { get; set; } #endif - /// The ID of the Azure Active Directory tenant. + /// The ID of the Microsoft Entra tenant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TenantId { get; set; } @@ -95,51 +111,62 @@ public class Channel : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Channel CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Channel CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Channel(); + return new global::ApiSdk.Models.Channel(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"email", n => { Email = n.GetStringValue(); } }, - {"filesFolder", n => { FilesFolder = n.GetObjectValue(DriveItem.CreateFromDiscriminatorValue); } }, - {"isFavoriteByDefault", n => { IsFavoriteByDefault = n.GetBoolValue(); } }, - {"members", n => { Members = n.GetCollectionOfObjectValues(ConversationMember.CreateFromDiscriminatorValue)?.ToList(); } }, - {"membershipType", n => { MembershipType = n.GetEnumValue(); } }, - {"messages", n => { Messages = n.GetCollectionOfObjectValues(ChatMessage.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sharedWithTeams", n => { SharedWithTeams = n.GetCollectionOfObjectValues(SharedWithChannelTeamInfo.CreateFromDiscriminatorValue)?.ToList(); } }, - {"tabs", n => { Tabs = n.GetCollectionOfObjectValues(TeamsTab.CreateFromDiscriminatorValue)?.ToList(); } }, - {"tenantId", n => { TenantId = n.GetStringValue(); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "email", n => { Email = n.GetStringValue(); } }, + { "filesFolder", n => { FilesFolder = n.GetObjectValue(global::ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue); } }, + { "isArchived", n => { IsArchived = n.GetBoolValue(); } }, + { "isFavoriteByDefault", n => { IsFavoriteByDefault = n.GetBoolValue(); } }, + { "members", n => { Members = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ConversationMember.CreateFromDiscriminatorValue)?.AsList(); } }, + { "membershipType", n => { MembershipType = n.GetEnumValue(); } }, + { "messages", n => { Messages = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChatMessage.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sharedWithTeams", n => { SharedWithTeams = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SharedWithChannelTeamInfo.CreateFromDiscriminatorValue)?.AsList(); } }, + { "summary", n => { Summary = n.GetObjectValue(global::ApiSdk.Models.ChannelSummary.CreateFromDiscriminatorValue); } }, + { "tabs", n => { Tabs = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TeamsTab.CreateFromDiscriminatorValue)?.AsList(); } }, + { "tenantId", n => { TenantId = n.GetStringValue(); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("email", Email); - writer.WriteObjectValue("filesFolder", FilesFolder); + writer.WriteObjectValue("filesFolder", FilesFolder); + writer.WriteBoolValue("isArchived", IsArchived); writer.WriteBoolValue("isFavoriteByDefault", IsFavoriteByDefault); - writer.WriteCollectionOfObjectValues("members", Members); - writer.WriteEnumValue("membershipType", MembershipType); - writer.WriteCollectionOfObjectValues("messages", Messages); - writer.WriteCollectionOfObjectValues("sharedWithTeams", SharedWithTeams); - writer.WriteCollectionOfObjectValues("tabs", Tabs); + writer.WriteCollectionOfObjectValues("members", Members); + writer.WriteEnumValue("membershipType", MembershipType); + writer.WriteCollectionOfObjectValues("messages", Messages); + writer.WriteCollectionOfObjectValues("sharedWithTeams", SharedWithTeams); + writer.WriteObjectValue("summary", Summary); + writer.WriteCollectionOfObjectValues("tabs", Tabs); writer.WriteStringValue("tenantId", TenantId); writer.WriteStringValue("webUrl", WebUrl); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChannelIdentity.cs b/src/sample/generated/Models/ChannelIdentity.cs index edd4ccb9..1c38d938 100644 --- a/src/sample/generated/Models/ChannelIdentity.cs +++ b/src/sample/generated/Models/ChannelIdentity.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChannelIdentity : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChannelIdentity : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The identity of the channel in which the message was posted. @@ -25,33 +31,40 @@ public class ChannelIdentity : IAdditionalDataHolder, IParsable { public string TeamId { get; set; } #endif /// - /// Instantiates a new channelIdentity and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChannelIdentity() { + public ChannelIdentity() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChannelIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChannelIdentity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChannelIdentity(); + return new global::ApiSdk.Models.ChannelIdentity(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"channelId", n => { ChannelId = n.GetStringValue(); } }, - {"teamId", n => { TeamId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "channelId", n => { ChannelId = n.GetStringValue(); } }, + { "teamId", n => { TeamId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("channelId", ChannelId); writer.WriteStringValue("teamId", TeamId); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChannelMembershipType.cs b/src/sample/generated/Models/ChannelMembershipType.cs index 3eb87ae0..88d6ac4a 100644 --- a/src/sample/generated/Models/ChannelMembershipType.cs +++ b/src/sample/generated/Models/ChannelMembershipType.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ChannelMembershipType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ChannelMembershipType + #pragma warning restore CS1591 + { [EnumMember(Value = "standard")] + #pragma warning disable CS1591 Standard, + #pragma warning restore CS1591 [EnumMember(Value = "private")] + #pragma warning disable CS1591 Private, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 [EnumMember(Value = "shared")] + #pragma warning disable CS1591 Shared, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ChannelSummary.cs b/src/sample/generated/Models/ChannelSummary.cs new file mode 100644 index 00000000..5e457dfc --- /dev/null +++ b/src/sample/generated/Models/ChannelSummary.cs @@ -0,0 +1,71 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChannelSummary : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// Count of guests in a channel. + public int? GuestsCount { get; set; } + /// Indicates whether external members are included on the channel. + public bool? HasMembersFromOtherTenants { get; set; } + /// Count of members in a channel. + public int? MembersCount { get; set; } + /// Count of owners in a channel. + public int? OwnersCount { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ChannelSummary() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.ChannelSummary CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.ChannelSummary(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "guestsCount", n => { GuestsCount = n.GetIntValue(); } }, + { "hasMembersFromOtherTenants", n => { HasMembersFromOtherTenants = n.GetBoolValue(); } }, + { "membersCount", n => { MembersCount = n.GetIntValue(); } }, + { "ownersCount", n => { OwnersCount = n.GetIntValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteIntValue("guestsCount", GuestsCount); + writer.WriteBoolValue("hasMembersFromOtherTenants", HasMembersFromOtherTenants); + writer.WriteIntValue("membersCount", MembersCount); + writer.WriteIntValue("ownersCount", OwnersCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Chat.cs b/src/sample/generated/Models/Chat.cs index 29fc1248..4169adf9 100644 --- a/src/sample/generated/Models/Chat.cs +++ b/src/sample/generated/Models/Chat.cs @@ -1,80 +1,86 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Chat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Chat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The chatType property - public ApiSdk.Models.ChatType? ChatType { get; set; } + public global::ApiSdk.Models.ChatType? ChatType { get; set; } /// Date and time at which the chat was created. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } /// A collection of all the apps in the chat. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? InstalledApps { get; set; } + public List? InstalledApps { get; set; } #nullable restore #else - public List InstalledApps { get; set; } + public List InstalledApps { get; set; } #endif /// The lastMessagePreview property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatMessageInfo? LastMessagePreview { get; set; } + public global::ApiSdk.Models.ChatMessageInfo? LastMessagePreview { get; set; } #nullable restore #else - public ChatMessageInfo LastMessagePreview { get; set; } + public global::ApiSdk.Models.ChatMessageInfo LastMessagePreview { get; set; } #endif - /// Date and time at which the chat was renamed or list of members were last changed. Read-only. + /// Date and time at which the chat was renamed or the list of members was last changed. Read-only. public DateTimeOffset? LastUpdatedDateTime { get; set; } /// A collection of all the members in the chat. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Members { get; set; } + public List? Members { get; set; } #nullable restore #else - public List Members { get; set; } + public List Members { get; set; } #endif /// A collection of all the messages in the chat. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Messages { get; set; } + public List? Messages { get; set; } #nullable restore #else - public List Messages { get; set; } + public List Messages { get; set; } #endif /// The onlineMeetingInfo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamworkOnlineMeetingInfo? OnlineMeetingInfo { get; set; } + public global::ApiSdk.Models.TeamworkOnlineMeetingInfo? OnlineMeetingInfo { get; set; } #nullable restore #else - public TeamworkOnlineMeetingInfo OnlineMeetingInfo { get; set; } + public global::ApiSdk.Models.TeamworkOnlineMeetingInfo OnlineMeetingInfo { get; set; } #endif /// A collection of permissions granted to apps for the chat. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PermissionGrants { get; set; } + public List? PermissionGrants { get; set; } #nullable restore #else - public List PermissionGrants { get; set; } + public List PermissionGrants { get; set; } #endif /// A collection of all the pinned messages in the chat. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PinnedMessages { get; set; } + public List? PinnedMessages { get; set; } #nullable restore #else - public List PinnedMessages { get; set; } + public List PinnedMessages { get; set; } #endif /// A collection of all the tabs in the chat. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tabs { get; set; } + public List? Tabs { get; set; } #nullable restore #else - public List Tabs { get; set; } + public List Tabs { get; set; } #endif /// The identifier of the tenant in which the chat was created. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -95,10 +101,10 @@ public class Chat : Entity, IParsable { /// The viewpoint property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatViewpoint? Viewpoint { get; set; } + public global::ApiSdk.Models.ChatViewpoint? Viewpoint { get; set; } #nullable restore #else - public ChatViewpoint Viewpoint { get; set; } + public global::ApiSdk.Models.ChatViewpoint Viewpoint { get; set; } #endif /// The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -111,55 +117,62 @@ public class Chat : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Chat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Chat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Chat(); + return new global::ApiSdk.Models.Chat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"chatType", n => { ChatType = n.GetEnumValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"installedApps", n => { InstalledApps = n.GetCollectionOfObjectValues(TeamsAppInstallation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"lastMessagePreview", n => { LastMessagePreview = n.GetObjectValue(ChatMessageInfo.CreateFromDiscriminatorValue); } }, - {"lastUpdatedDateTime", n => { LastUpdatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"members", n => { Members = n.GetCollectionOfObjectValues(ConversationMember.CreateFromDiscriminatorValue)?.ToList(); } }, - {"messages", n => { Messages = n.GetCollectionOfObjectValues(ChatMessage.CreateFromDiscriminatorValue)?.ToList(); } }, - {"onlineMeetingInfo", n => { OnlineMeetingInfo = n.GetObjectValue(TeamworkOnlineMeetingInfo.CreateFromDiscriminatorValue); } }, - {"permissionGrants", n => { PermissionGrants = n.GetCollectionOfObjectValues(ResourceSpecificPermissionGrant.CreateFromDiscriminatorValue)?.ToList(); } }, - {"pinnedMessages", n => { PinnedMessages = n.GetCollectionOfObjectValues(PinnedChatMessageInfo.CreateFromDiscriminatorValue)?.ToList(); } }, - {"tabs", n => { Tabs = n.GetCollectionOfObjectValues(TeamsTab.CreateFromDiscriminatorValue)?.ToList(); } }, - {"tenantId", n => { TenantId = n.GetStringValue(); } }, - {"topic", n => { Topic = n.GetStringValue(); } }, - {"viewpoint", n => { Viewpoint = n.GetObjectValue(ChatViewpoint.CreateFromDiscriminatorValue); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "chatType", n => { ChatType = n.GetEnumValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "installedApps", n => { InstalledApps = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TeamsAppInstallation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "lastMessagePreview", n => { LastMessagePreview = n.GetObjectValue(global::ApiSdk.Models.ChatMessageInfo.CreateFromDiscriminatorValue); } }, + { "lastUpdatedDateTime", n => { LastUpdatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "members", n => { Members = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ConversationMember.CreateFromDiscriminatorValue)?.AsList(); } }, + { "messages", n => { Messages = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChatMessage.CreateFromDiscriminatorValue)?.AsList(); } }, + { "onlineMeetingInfo", n => { OnlineMeetingInfo = n.GetObjectValue(global::ApiSdk.Models.TeamworkOnlineMeetingInfo.CreateFromDiscriminatorValue); } }, + { "permissionGrants", n => { PermissionGrants = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ResourceSpecificPermissionGrant.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pinnedMessages", n => { PinnedMessages = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PinnedChatMessageInfo.CreateFromDiscriminatorValue)?.AsList(); } }, + { "tabs", n => { Tabs = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TeamsTab.CreateFromDiscriminatorValue)?.AsList(); } }, + { "tenantId", n => { TenantId = n.GetStringValue(); } }, + { "topic", n => { Topic = n.GetStringValue(); } }, + { "viewpoint", n => { Viewpoint = n.GetObjectValue(global::ApiSdk.Models.ChatViewpoint.CreateFromDiscriminatorValue); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("chatType", ChatType); + writer.WriteEnumValue("chatType", ChatType); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteCollectionOfObjectValues("installedApps", InstalledApps); - writer.WriteObjectValue("lastMessagePreview", LastMessagePreview); + writer.WriteCollectionOfObjectValues("installedApps", InstalledApps); + writer.WriteObjectValue("lastMessagePreview", LastMessagePreview); writer.WriteDateTimeOffsetValue("lastUpdatedDateTime", LastUpdatedDateTime); - writer.WriteCollectionOfObjectValues("members", Members); - writer.WriteCollectionOfObjectValues("messages", Messages); - writer.WriteObjectValue("onlineMeetingInfo", OnlineMeetingInfo); - writer.WriteCollectionOfObjectValues("permissionGrants", PermissionGrants); - writer.WriteCollectionOfObjectValues("pinnedMessages", PinnedMessages); - writer.WriteCollectionOfObjectValues("tabs", Tabs); + writer.WriteCollectionOfObjectValues("members", Members); + writer.WriteCollectionOfObjectValues("messages", Messages); + writer.WriteObjectValue("onlineMeetingInfo", OnlineMeetingInfo); + writer.WriteCollectionOfObjectValues("permissionGrants", PermissionGrants); + writer.WriteCollectionOfObjectValues("pinnedMessages", PinnedMessages); + writer.WriteCollectionOfObjectValues("tabs", Tabs); writer.WriteStringValue("tenantId", TenantId); writer.WriteStringValue("topic", Topic); - writer.WriteObjectValue("viewpoint", Viewpoint); + writer.WriteObjectValue("viewpoint", Viewpoint); writer.WriteStringValue("webUrl", WebUrl); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatInfo.cs b/src/sample/generated/Models/ChatInfo.cs index c11642cf..e6be285d 100644 --- a/src/sample/generated/Models/ChatInfo.cs +++ b/src/sample/generated/Models/ChatInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The unique identifier of a message in a Microsoft Teams channel. @@ -33,34 +39,41 @@ public class ChatInfo : IAdditionalDataHolder, IParsable { public string ThreadId { get; set; } #endif /// - /// Instantiates a new chatInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChatInfo() { + public ChatInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChatInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChatInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatInfo(); + return new global::ApiSdk.Models.ChatInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"messageId", n => { MessageId = n.GetStringValue(); } }, - {"replyChainMessageId", n => { ReplyChainMessageId = n.GetStringValue(); } }, - {"threadId", n => { ThreadId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "messageId", n => { MessageId = n.GetStringValue(); } }, + { "replyChainMessageId", n => { ReplyChainMessageId = n.GetStringValue(); } }, + { "threadId", n => { ThreadId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("messageId", MessageId); writer.WriteStringValue("replyChainMessageId", ReplyChainMessageId); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessage.cs b/src/sample/generated/Models/ChatMessage.cs index 666bd2b0..b0aa1e4c 100644 --- a/src/sample/generated/Models/ChatMessage.cs +++ b/src/sample/generated/Models/ChatMessage.cs @@ -1,34 +1,40 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessage : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessage : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// References to attached objects like files, tabs, meetings etc. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Attachments { get; set; } + public List? Attachments { get; set; } #nullable restore #else - public List Attachments { get; set; } + public List Attachments { get; set; } #endif /// The body property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemBody? Body { get; set; } + public global::ApiSdk.Models.ItemBody? Body { get; set; } #nullable restore #else - public ItemBody Body { get; set; } + public global::ApiSdk.Models.ItemBody Body { get; set; } #endif /// The channelIdentity property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ChannelIdentity? ChannelIdentity { get; set; } + public global::ApiSdk.Models.ChannelIdentity? ChannelIdentity { get; set; } #nullable restore #else - public ApiSdk.Models.ChannelIdentity ChannelIdentity { get; set; } + public global::ApiSdk.Models.ChannelIdentity ChannelIdentity { get; set; } #endif /// If the message was sent in a chat, represents the identity of the chat. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -53,29 +59,29 @@ public class ChatMessage : Entity, IParsable { /// The eventDetail property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public EventMessageDetail? EventDetail { get; set; } + public global::ApiSdk.Models.EventMessageDetail? EventDetail { get; set; } #nullable restore #else - public EventMessageDetail EventDetail { get; set; } + public global::ApiSdk.Models.EventMessageDetail EventDetail { get; set; } #endif /// The from property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatMessageFromIdentitySet? From { get; set; } + public global::ApiSdk.Models.ChatMessageFromIdentitySet? From { get; set; } #nullable restore #else - public ChatMessageFromIdentitySet From { get; set; } + public global::ApiSdk.Models.ChatMessageFromIdentitySet From { get; set; } #endif /// Content in a message hosted by Microsoft Teams - for example, images or code snippets. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? HostedContents { get; set; } + public List? HostedContents { get; set; } #nullable restore #else - public List HostedContents { get; set; } + public List HostedContents { get; set; } #endif /// The importance property - public ChatMessageImportance? Importance { get; set; } + public global::ApiSdk.Models.ChatMessageImportance? Importance { get; set; } /// Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Teams UI. If no edits are made the value is null. public DateTimeOffset? LastEditedDateTime { get; set; } /// Read only. Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed. @@ -91,44 +97,44 @@ public class ChatMessage : Entity, IParsable { /// List of entities mentioned in the chat message. Supported entities are: user, bot, team, and channel. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Mentions { get; set; } + public List? Mentions { get; set; } #nullable restore #else - public List Mentions { get; set; } + public List Mentions { get; set; } #endif /// List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MessageHistory { get; set; } + public List? MessageHistory { get; set; } #nullable restore #else - public List MessageHistory { get; set; } + public List MessageHistory { get; set; } #endif /// The messageType property - public ChatMessageType? MessageType { get; set; } + public global::ApiSdk.Models.ChatMessageType? MessageType { get; set; } /// The policyViolation property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatMessagePolicyViolation? PolicyViolation { get; set; } + public global::ApiSdk.Models.ChatMessagePolicyViolation? PolicyViolation { get; set; } #nullable restore #else - public ChatMessagePolicyViolation PolicyViolation { get; set; } + public global::ApiSdk.Models.ChatMessagePolicyViolation PolicyViolation { get; set; } #endif /// Reactions for this chat message (for example, Like). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Reactions { get; set; } + public List? Reactions { get; set; } #nullable restore #else - public List Reactions { get; set; } + public List Reactions { get; set; } #endif /// Replies for a specified message. Supports $expand for channel messages. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Replies { get; set; } + public List? Replies { get; set; } #nullable restore #else - public List Replies { get; set; } + public List Replies { get; set; } #endif /// Read-only. ID of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels, not chats.) #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -165,69 +171,75 @@ public class ChatMessage : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ChatMessage CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ChatMessage CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessage(); + return new global::ApiSdk.Models.ChatMessage(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"attachments", n => { Attachments = n.GetCollectionOfObjectValues(ChatMessageAttachment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"body", n => { Body = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, - {"channelIdentity", n => { ChannelIdentity = n.GetObjectValue(ApiSdk.Models.ChannelIdentity.CreateFromDiscriminatorValue); } }, - {"chatId", n => { ChatId = n.GetStringValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"deletedDateTime", n => { DeletedDateTime = n.GetDateTimeOffsetValue(); } }, - {"etag", n => { Etag = n.GetStringValue(); } }, - {"eventDetail", n => { EventDetail = n.GetObjectValue(EventMessageDetail.CreateFromDiscriminatorValue); } }, - {"from", n => { From = n.GetObjectValue(ChatMessageFromIdentitySet.CreateFromDiscriminatorValue); } }, - {"hostedContents", n => { HostedContents = n.GetCollectionOfObjectValues(ChatMessageHostedContent.CreateFromDiscriminatorValue)?.ToList(); } }, - {"importance", n => { Importance = n.GetEnumValue(); } }, - {"lastEditedDateTime", n => { LastEditedDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"locale", n => { Locale = n.GetStringValue(); } }, - {"mentions", n => { Mentions = n.GetCollectionOfObjectValues(ChatMessageMention.CreateFromDiscriminatorValue)?.ToList(); } }, - {"messageHistory", n => { MessageHistory = n.GetCollectionOfObjectValues(ChatMessageHistoryItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"messageType", n => { MessageType = n.GetEnumValue(); } }, - {"policyViolation", n => { PolicyViolation = n.GetObjectValue(ChatMessagePolicyViolation.CreateFromDiscriminatorValue); } }, - {"reactions", n => { Reactions = n.GetCollectionOfObjectValues(ChatMessageReaction.CreateFromDiscriminatorValue)?.ToList(); } }, - {"replies", n => { Replies = n.GetCollectionOfObjectValues(ChatMessage.CreateFromDiscriminatorValue)?.ToList(); } }, - {"replyToId", n => { ReplyToId = n.GetStringValue(); } }, - {"subject", n => { Subject = n.GetStringValue(); } }, - {"summary", n => { Summary = n.GetStringValue(); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "attachments", n => { Attachments = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChatMessageAttachment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "body", n => { Body = n.GetObjectValue(global::ApiSdk.Models.ItemBody.CreateFromDiscriminatorValue); } }, + { "channelIdentity", n => { ChannelIdentity = n.GetObjectValue(global::ApiSdk.Models.ChannelIdentity.CreateFromDiscriminatorValue); } }, + { "chatId", n => { ChatId = n.GetStringValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "deletedDateTime", n => { DeletedDateTime = n.GetDateTimeOffsetValue(); } }, + { "etag", n => { Etag = n.GetStringValue(); } }, + { "eventDetail", n => { EventDetail = n.GetObjectValue(global::ApiSdk.Models.EventMessageDetail.CreateFromDiscriminatorValue); } }, + { "from", n => { From = n.GetObjectValue(global::ApiSdk.Models.ChatMessageFromIdentitySet.CreateFromDiscriminatorValue); } }, + { "hostedContents", n => { HostedContents = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChatMessageHostedContent.CreateFromDiscriminatorValue)?.AsList(); } }, + { "importance", n => { Importance = n.GetEnumValue(); } }, + { "lastEditedDateTime", n => { LastEditedDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "locale", n => { Locale = n.GetStringValue(); } }, + { "mentions", n => { Mentions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChatMessageMention.CreateFromDiscriminatorValue)?.AsList(); } }, + { "messageHistory", n => { MessageHistory = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChatMessageHistoryItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "messageType", n => { MessageType = n.GetEnumValue(); } }, + { "policyViolation", n => { PolicyViolation = n.GetObjectValue(global::ApiSdk.Models.ChatMessagePolicyViolation.CreateFromDiscriminatorValue); } }, + { "reactions", n => { Reactions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChatMessageReaction.CreateFromDiscriminatorValue)?.AsList(); } }, + { "replies", n => { Replies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChatMessage.CreateFromDiscriminatorValue)?.AsList(); } }, + { "replyToId", n => { ReplyToId = n.GetStringValue(); } }, + { "subject", n => { Subject = n.GetStringValue(); } }, + { "summary", n => { Summary = n.GetStringValue(); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("attachments", Attachments); - writer.WriteObjectValue("body", Body); - writer.WriteObjectValue("channelIdentity", ChannelIdentity); + writer.WriteCollectionOfObjectValues("attachments", Attachments); + writer.WriteObjectValue("body", Body); + writer.WriteObjectValue("channelIdentity", ChannelIdentity); writer.WriteStringValue("chatId", ChatId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("deletedDateTime", DeletedDateTime); writer.WriteStringValue("etag", Etag); - writer.WriteObjectValue("eventDetail", EventDetail); - writer.WriteObjectValue("from", From); - writer.WriteCollectionOfObjectValues("hostedContents", HostedContents); - writer.WriteEnumValue("importance", Importance); + writer.WriteObjectValue("eventDetail", EventDetail); + writer.WriteObjectValue("from", From); + writer.WriteCollectionOfObjectValues("hostedContents", HostedContents); + writer.WriteEnumValue("importance", Importance); writer.WriteDateTimeOffsetValue("lastEditedDateTime", LastEditedDateTime); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("locale", Locale); - writer.WriteCollectionOfObjectValues("mentions", Mentions); - writer.WriteCollectionOfObjectValues("messageHistory", MessageHistory); - writer.WriteEnumValue("messageType", MessageType); - writer.WriteObjectValue("policyViolation", PolicyViolation); - writer.WriteCollectionOfObjectValues("reactions", Reactions); - writer.WriteCollectionOfObjectValues("replies", Replies); + writer.WriteCollectionOfObjectValues("mentions", Mentions); + writer.WriteCollectionOfObjectValues("messageHistory", MessageHistory); + writer.WriteEnumValue("messageType", MessageType); + writer.WriteObjectValue("policyViolation", PolicyViolation); + writer.WriteCollectionOfObjectValues("reactions", Reactions); + writer.WriteCollectionOfObjectValues("replies", Replies); writer.WriteStringValue("replyToId", ReplyToId); writer.WriteStringValue("subject", Subject); writer.WriteStringValue("summary", Summary); @@ -235,3 +247,4 @@ public class ChatMessage : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessageActions.cs b/src/sample/generated/Models/ChatMessageActions.cs index 620eae93..9b5a092b 100644 --- a/src/sample/generated/Models/ChatMessageActions.cs +++ b/src/sample/generated/Models/ChatMessageActions.cs @@ -1,16 +1,29 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] [Flags] - public enum ChatMessageActions { + #pragma warning disable CS1591 + public enum ChatMessageActions + #pragma warning restore CS1591 + { [EnumMember(Value = "reactionAdded")] + #pragma warning disable CS1591 ReactionAdded = 1, + #pragma warning restore CS1591 [EnumMember(Value = "reactionRemoved")] + #pragma warning disable CS1591 ReactionRemoved = 2, + #pragma warning restore CS1591 [EnumMember(Value = "actionUndefined")] + #pragma warning disable CS1591 ActionUndefined = 4, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue = 8, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ChatMessageAttachment.cs b/src/sample/generated/Models/ChatMessageAttachment.cs index c49b6890..432a21fd 100644 --- a/src/sample/generated/Models/ChatMessageAttachment.cs +++ b/src/sample/generated/Models/ChatMessageAttachment.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessageAttachment : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessageAttachment : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The content of the attachment. If the attachment is a rich card, set the property to the rich card object. This property and contentUrl are mutually exclusive. @@ -16,7 +22,7 @@ public class ChatMessageAttachment : IAdditionalDataHolder, IParsable { #else public string Content { get; set; } #endif - /// The media type of the content attachment. It can have the following values: reference: Attachment is a link to another file. Populate the contentURL with the link to the object.Any contentTypes supported by the Bot Framework's Attachment objectapplication/vnd.microsoft.card.codesnippet: A code snippet. application/vnd.microsoft.card.announcement: An announcement header. + /// The media type of the content attachment. It can have the following values: reference: Attachment is a link to another file. Populate the contentURL with the link to the object.Any contentType that is supported by the Bot Framework's Attachment objectapplication/vnd.microsoft.card.codesnippet: A code snippet. application/vnd.microsoft.card.announcement: An announcement header. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ContentType { get; set; } @@ -24,7 +30,7 @@ public class ChatMessageAttachment : IAdditionalDataHolder, IParsable { #else public string ContentType { get; set; } #endif - /// URL for the content of the attachment. Supported protocols: http, https, file and data. + /// The URL for the content of the attachment. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ContentUrl { get; set; } @@ -32,7 +38,7 @@ public class ChatMessageAttachment : IAdditionalDataHolder, IParsable { #else public string ContentUrl { get; set; } #endif - /// Read-only. Unique id of the attachment. + /// Read-only. The unique id of the attachment. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Id { get; set; } @@ -40,7 +46,7 @@ public class ChatMessageAttachment : IAdditionalDataHolder, IParsable { #else public string Id { get; set; } #endif - /// Name of the attachment. + /// The name of the attachment. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } @@ -48,7 +54,7 @@ public class ChatMessageAttachment : IAdditionalDataHolder, IParsable { #else public string Name { get; set; } #endif - /// The ID of the Teams app that is associated with the attachment. The property is specifically used to attribute a Teams message card to the specified app. + /// The ID of the Teams app that is associated with the attachment. The property is used to attribute a Teams message card to the specified app. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TeamsAppId { get; set; } @@ -56,7 +62,7 @@ public class ChatMessageAttachment : IAdditionalDataHolder, IParsable { #else public string TeamsAppId { get; set; } #endif - /// URL to a thumbnail image that the channel can use if it supports using an alternative, smaller form of content or contentUrl. For example, if you set contentType to application/word and set contentUrl to the location of the Word document, you might include a thumbnail image that represents the document. The channel could display the thumbnail image instead of the document. When the user clicks the image, the channel would open the document. + /// The URL to a thumbnail image that the channel can use if it supports using an alternative, smaller form of content or contentUrl. For example, if you set contentType to application/word and set contentUrl to the location of the Word document, you might include a thumbnail image that represents the document. The channel could display the thumbnail image instead of the document. When the user selects the image, the channel would open the document. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ThumbnailUrl { get; set; } @@ -65,38 +71,45 @@ public class ChatMessageAttachment : IAdditionalDataHolder, IParsable { public string ThumbnailUrl { get; set; } #endif /// - /// Instantiates a new chatMessageAttachment and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChatMessageAttachment() { + public ChatMessageAttachment() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChatMessageAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChatMessageAttachment CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessageAttachment(); + return new global::ApiSdk.Models.ChatMessageAttachment(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"content", n => { Content = n.GetStringValue(); } }, - {"contentType", n => { ContentType = n.GetStringValue(); } }, - {"contentUrl", n => { ContentUrl = n.GetStringValue(); } }, - {"id", n => { Id = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"teamsAppId", n => { TeamsAppId = n.GetStringValue(); } }, - {"thumbnailUrl", n => { ThumbnailUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetStringValue(); } }, + { "contentType", n => { ContentType = n.GetStringValue(); } }, + { "contentUrl", n => { ContentUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "teamsAppId", n => { TeamsAppId = n.GetStringValue(); } }, + { "thumbnailUrl", n => { ThumbnailUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("content", Content); writer.WriteStringValue("contentType", ContentType); @@ -109,3 +122,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessageFromIdentitySet.cs b/src/sample/generated/Models/ChatMessageFromIdentitySet.cs index 074eb051..59fa9ad1 100644 --- a/src/sample/generated/Models/ChatMessageFromIdentitySet.cs +++ b/src/sample/generated/Models/ChatMessageFromIdentitySet.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessageFromIdentitySet : IdentitySet, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessageFromIdentitySet : global::ApiSdk.Models.IdentitySet, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ChatMessageFromIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ChatMessageFromIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessageFromIdentitySet(); + return new global::ApiSdk.Models.ChatMessageFromIdentitySet(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessageHistoryItem.cs b/src/sample/generated/Models/ChatMessageHistoryItem.cs index 15f6d45a..736402f5 100644 --- a/src/sample/generated/Models/ChatMessageHistoryItem.cs +++ b/src/sample/generated/Models/ChatMessageHistoryItem.cs @@ -1,13 +1,19 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessageHistoryItem : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessageHistoryItem : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// The actions property - public ChatMessageActions? Actions { get; set; } + public global::ApiSdk.Models.ChatMessageActions? Actions { get; set; } /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The date and time when the message was modified. @@ -15,45 +21,53 @@ public class ChatMessageHistoryItem : IAdditionalDataHolder, IParsable { /// The reaction property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatMessageReaction? Reaction { get; set; } + public global::ApiSdk.Models.ChatMessageReaction? Reaction { get; set; } #nullable restore #else - public ChatMessageReaction Reaction { get; set; } + public global::ApiSdk.Models.ChatMessageReaction Reaction { get; set; } #endif /// - /// Instantiates a new chatMessageHistoryItem and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChatMessageHistoryItem() { + public ChatMessageHistoryItem() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChatMessageHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChatMessageHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessageHistoryItem(); + return new global::ApiSdk.Models.ChatMessageHistoryItem(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"actions", n => { Actions = n.GetEnumValue(); } }, - {"modifiedDateTime", n => { ModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"reaction", n => { Reaction = n.GetObjectValue(ChatMessageReaction.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actions", n => { Actions = n.GetEnumValue(); } }, + { "modifiedDateTime", n => { ModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "reaction", n => { Reaction = n.GetObjectValue(global::ApiSdk.Models.ChatMessageReaction.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("actions", Actions); + writer.WriteEnumValue("actions", Actions); writer.WriteDateTimeOffsetValue("modifiedDateTime", ModifiedDateTime); - writer.WriteObjectValue("reaction", Reaction); + writer.WriteObjectValue("reaction", Reaction); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessageHostedContent.cs b/src/sample/generated/Models/ChatMessageHostedContent.cs index e4303d24..6ae7c725 100644 --- a/src/sample/generated/Models/ChatMessageHostedContent.cs +++ b/src/sample/generated/Models/ChatMessageHostedContent.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessageHostedContent : TeamworkHostedContent, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessageHostedContent : global::ApiSdk.Models.TeamworkHostedContent, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ChatMessageHostedContent CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ChatMessageHostedContent CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessageHostedContent(); + return new global::ApiSdk.Models.ChatMessageHostedContent(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessageImportance.cs b/src/sample/generated/Models/ChatMessageImportance.cs index 52393068..f3f2402a 100644 --- a/src/sample/generated/Models/ChatMessageImportance.cs +++ b/src/sample/generated/Models/ChatMessageImportance.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ChatMessageImportance { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ChatMessageImportance + #pragma warning restore CS1591 + { [EnumMember(Value = "normal")] + #pragma warning disable CS1591 Normal, + #pragma warning restore CS1591 [EnumMember(Value = "high")] + #pragma warning disable CS1591 High, + #pragma warning restore CS1591 [EnumMember(Value = "urgent")] + #pragma warning disable CS1591 Urgent, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ChatMessageInfo.cs b/src/sample/generated/Models/ChatMessageInfo.cs index 07ad8df4..4cd5422a 100644 --- a/src/sample/generated/Models/ChatMessageInfo.cs +++ b/src/sample/generated/Models/ChatMessageInfo.cs @@ -1,75 +1,88 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessageInfo : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessageInfo : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The body property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemBody? Body { get; set; } + public global::ApiSdk.Models.ItemBody? Body { get; set; } #nullable restore #else - public ItemBody Body { get; set; } + public global::ApiSdk.Models.ItemBody Body { get; set; } #endif /// Date time object representing the time at which message was created. public DateTimeOffset? CreatedDateTime { get; set; } /// The eventDetail property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public EventMessageDetail? EventDetail { get; set; } + public global::ApiSdk.Models.EventMessageDetail? EventDetail { get; set; } #nullable restore #else - public EventMessageDetail EventDetail { get; set; } + public global::ApiSdk.Models.EventMessageDetail EventDetail { get; set; } #endif /// The from property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatMessageFromIdentitySet? From { get; set; } + public global::ApiSdk.Models.ChatMessageFromIdentitySet? From { get; set; } #nullable restore #else - public ChatMessageFromIdentitySet From { get; set; } + public global::ApiSdk.Models.ChatMessageFromIdentitySet From { get; set; } #endif /// If set to true, the original message has been deleted. public bool? IsDeleted { get; set; } /// The messageType property - public ChatMessageType? MessageType { get; set; } + public global::ApiSdk.Models.ChatMessageType? MessageType { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ChatMessageInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ChatMessageInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessageInfo(); + return new global::ApiSdk.Models.ChatMessageInfo(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"body", n => { Body = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"eventDetail", n => { EventDetail = n.GetObjectValue(EventMessageDetail.CreateFromDiscriminatorValue); } }, - {"from", n => { From = n.GetObjectValue(ChatMessageFromIdentitySet.CreateFromDiscriminatorValue); } }, - {"isDeleted", n => { IsDeleted = n.GetBoolValue(); } }, - {"messageType", n => { MessageType = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "body", n => { Body = n.GetObjectValue(global::ApiSdk.Models.ItemBody.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "eventDetail", n => { EventDetail = n.GetObjectValue(global::ApiSdk.Models.EventMessageDetail.CreateFromDiscriminatorValue); } }, + { "from", n => { From = n.GetObjectValue(global::ApiSdk.Models.ChatMessageFromIdentitySet.CreateFromDiscriminatorValue); } }, + { "isDeleted", n => { IsDeleted = n.GetBoolValue(); } }, + { "messageType", n => { MessageType = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("body", Body); + writer.WriteObjectValue("body", Body); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("eventDetail", EventDetail); - writer.WriteObjectValue("from", From); + writer.WriteObjectValue("eventDetail", EventDetail); + writer.WriteObjectValue("from", From); writer.WriteBoolValue("isDeleted", IsDeleted); - writer.WriteEnumValue("messageType", MessageType); + writer.WriteEnumValue("messageType", MessageType); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessageMention.cs b/src/sample/generated/Models/ChatMessageMention.cs index e207fe29..d540baec 100644 --- a/src/sample/generated/Models/ChatMessageMention.cs +++ b/src/sample/generated/Models/ChatMessageMention.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessageMention : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessageMention : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Index of an entity being mentioned in the specified chatMessage. Matches the {index} value in the corresponding <at id='{index}'> tag in the message body. @@ -13,10 +19,10 @@ public class ChatMessageMention : IAdditionalDataHolder, IParsable { /// The mentioned property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatMessageMentionedIdentitySet? Mentioned { get; set; } + public global::ApiSdk.Models.ChatMessageMentionedIdentitySet? Mentioned { get; set; } #nullable restore #else - public ChatMessageMentionedIdentitySet Mentioned { get; set; } + public global::ApiSdk.Models.ChatMessageMentionedIdentitySet Mentioned { get; set; } #endif /// String used to represent the mention. For example, a user's display name, a team name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -27,39 +33,47 @@ public class ChatMessageMention : IAdditionalDataHolder, IParsable { public string MentionText { get; set; } #endif /// - /// Instantiates a new chatMessageMention and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChatMessageMention() { + public ChatMessageMention() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChatMessageMention CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChatMessageMention CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessageMention(); + return new global::ApiSdk.Models.ChatMessageMention(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"id", n => { Id = n.GetIntValue(); } }, - {"mentionText", n => { MentionText = n.GetStringValue(); } }, - {"mentioned", n => { Mentioned = n.GetObjectValue(ChatMessageMentionedIdentitySet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "mentionText", n => { MentionText = n.GetStringValue(); } }, + { "mentioned", n => { Mentioned = n.GetObjectValue(global::ApiSdk.Models.ChatMessageMentionedIdentitySet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("id", Id); - writer.WriteObjectValue("mentioned", Mentioned); + writer.WriteObjectValue("mentioned", Mentioned); writer.WriteStringValue("mentionText", MentionText); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessageMentionedIdentitySet.cs b/src/sample/generated/Models/ChatMessageMentionedIdentitySet.cs index 27c1bdd0..e3a81b7a 100644 --- a/src/sample/generated/Models/ChatMessageMentionedIdentitySet.cs +++ b/src/sample/generated/Models/ChatMessageMentionedIdentitySet.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessageMentionedIdentitySet : IdentitySet, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessageMentionedIdentitySet : global::ApiSdk.Models.IdentitySet, IParsable + #pragma warning restore CS1591 + { /// The conversation property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamworkConversationIdentity? Conversation { get; set; } + public global::ApiSdk.Models.TeamworkConversationIdentity? Conversation { get; set; } #nullable restore #else - public TeamworkConversationIdentity Conversation { get; set; } + public global::ApiSdk.Models.TeamworkConversationIdentity Conversation { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ChatMessageMentionedIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ChatMessageMentionedIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessageMentionedIdentitySet(); + return new global::ApiSdk.Models.ChatMessageMentionedIdentitySet(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"conversation", n => { Conversation = n.GetObjectValue(TeamworkConversationIdentity.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "conversation", n => { Conversation = n.GetObjectValue(global::ApiSdk.Models.TeamworkConversationIdentity.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("conversation", Conversation); + writer.WriteObjectValue("conversation", Conversation); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessagePolicyViolation.cs b/src/sample/generated/Models/ChatMessagePolicyViolation.cs index e7df0da7..7a282654 100644 --- a/src/sample/generated/Models/ChatMessagePolicyViolation.cs +++ b/src/sample/generated/Models/ChatMessagePolicyViolation.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessagePolicyViolation : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessagePolicyViolation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The dlpAction property - public ChatMessagePolicyViolationDlpActionTypes? DlpAction { get; set; } + public global::ApiSdk.Models.ChatMessagePolicyViolationDlpActionTypes? DlpAction { get; set; } /// Justification text provided by the sender of the message when overriding a policy violation. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -21,53 +27,61 @@ public class ChatMessagePolicyViolation : IAdditionalDataHolder, IParsable { /// The policyTip property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatMessagePolicyViolationPolicyTip? PolicyTip { get; set; } + public global::ApiSdk.Models.ChatMessagePolicyViolationPolicyTip? PolicyTip { get; set; } #nullable restore #else - public ChatMessagePolicyViolationPolicyTip PolicyTip { get; set; } + public global::ApiSdk.Models.ChatMessagePolicyViolationPolicyTip PolicyTip { get; set; } #endif /// The userAction property - public ChatMessagePolicyViolationUserActionTypes? UserAction { get; set; } + public global::ApiSdk.Models.ChatMessagePolicyViolationUserActionTypes? UserAction { get; set; } /// The verdictDetails property - public ChatMessagePolicyViolationVerdictDetailsTypes? VerdictDetails { get; set; } + public global::ApiSdk.Models.ChatMessagePolicyViolationVerdictDetailsTypes? VerdictDetails { get; set; } /// - /// Instantiates a new chatMessagePolicyViolation and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChatMessagePolicyViolation() { + public ChatMessagePolicyViolation() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChatMessagePolicyViolation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChatMessagePolicyViolation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessagePolicyViolation(); + return new global::ApiSdk.Models.ChatMessagePolicyViolation(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"dlpAction", n => { DlpAction = n.GetEnumValue(); } }, - {"justificationText", n => { JustificationText = n.GetStringValue(); } }, - {"policyTip", n => { PolicyTip = n.GetObjectValue(ChatMessagePolicyViolationPolicyTip.CreateFromDiscriminatorValue); } }, - {"userAction", n => { UserAction = n.GetEnumValue(); } }, - {"verdictDetails", n => { VerdictDetails = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dlpAction", n => { DlpAction = n.GetEnumValue(); } }, + { "justificationText", n => { JustificationText = n.GetStringValue(); } }, + { "policyTip", n => { PolicyTip = n.GetObjectValue(global::ApiSdk.Models.ChatMessagePolicyViolationPolicyTip.CreateFromDiscriminatorValue); } }, + { "userAction", n => { UserAction = n.GetEnumValue(); } }, + { "verdictDetails", n => { VerdictDetails = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("dlpAction", DlpAction); + writer.WriteEnumValue("dlpAction", DlpAction); writer.WriteStringValue("justificationText", JustificationText); - writer.WriteObjectValue("policyTip", PolicyTip); - writer.WriteEnumValue("userAction", UserAction); - writer.WriteEnumValue("verdictDetails", VerdictDetails); + writer.WriteObjectValue("policyTip", PolicyTip); + writer.WriteEnumValue("userAction", UserAction); + writer.WriteEnumValue("verdictDetails", VerdictDetails); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessagePolicyViolationDlpActionTypes.cs b/src/sample/generated/Models/ChatMessagePolicyViolationDlpActionTypes.cs index a59baa81..c6ec72b4 100644 --- a/src/sample/generated/Models/ChatMessagePolicyViolationDlpActionTypes.cs +++ b/src/sample/generated/Models/ChatMessagePolicyViolationDlpActionTypes.cs @@ -1,16 +1,29 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] [Flags] - public enum ChatMessagePolicyViolationDlpActionTypes { + #pragma warning disable CS1591 + public enum ChatMessagePolicyViolationDlpActionTypes + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None = 1, + #pragma warning restore CS1591 [EnumMember(Value = "notifySender")] + #pragma warning disable CS1591 NotifySender = 2, + #pragma warning restore CS1591 [EnumMember(Value = "blockAccess")] + #pragma warning disable CS1591 BlockAccess = 4, + #pragma warning restore CS1591 [EnumMember(Value = "blockAccessExternal")] + #pragma warning disable CS1591 BlockAccessExternal = 8, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ChatMessagePolicyViolationPolicyTip.cs b/src/sample/generated/Models/ChatMessagePolicyViolationPolicyTip.cs index e6185bfa..c9d1e2c1 100644 --- a/src/sample/generated/Models/ChatMessagePolicyViolationPolicyTip.cs +++ b/src/sample/generated/Models/ChatMessagePolicyViolationPolicyTip.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessagePolicyViolationPolicyTip : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessagePolicyViolationPolicyTip : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The URL a user can visit to read about the data loss prevention policies for the organization. (ie, policies about what users shouldn't say in chats) @@ -33,34 +39,41 @@ public class ChatMessagePolicyViolationPolicyTip : IAdditionalDataHolder, IParsa public List MatchedConditionDescriptions { get; set; } #endif /// - /// Instantiates a new chatMessagePolicyViolationPolicyTip and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChatMessagePolicyViolationPolicyTip() { + public ChatMessagePolicyViolationPolicyTip() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChatMessagePolicyViolationPolicyTip CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChatMessagePolicyViolationPolicyTip CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessagePolicyViolationPolicyTip(); + return new global::ApiSdk.Models.ChatMessagePolicyViolationPolicyTip(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"complianceUrl", n => { ComplianceUrl = n.GetStringValue(); } }, - {"generalText", n => { GeneralText = n.GetStringValue(); } }, - {"matchedConditionDescriptions", n => { MatchedConditionDescriptions = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "complianceUrl", n => { ComplianceUrl = n.GetStringValue(); } }, + { "generalText", n => { GeneralText = n.GetStringValue(); } }, + { "matchedConditionDescriptions", n => { MatchedConditionDescriptions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("complianceUrl", ComplianceUrl); writer.WriteStringValue("generalText", GeneralText); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessagePolicyViolationUserActionTypes.cs b/src/sample/generated/Models/ChatMessagePolicyViolationUserActionTypes.cs index 324c7adf..ee60bc5d 100644 --- a/src/sample/generated/Models/ChatMessagePolicyViolationUserActionTypes.cs +++ b/src/sample/generated/Models/ChatMessagePolicyViolationUserActionTypes.cs @@ -1,14 +1,25 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] [Flags] - public enum ChatMessagePolicyViolationUserActionTypes { + #pragma warning disable CS1591 + public enum ChatMessagePolicyViolationUserActionTypes + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None = 1, + #pragma warning restore CS1591 [EnumMember(Value = "override")] + #pragma warning disable CS1591 Override = 2, + #pragma warning restore CS1591 [EnumMember(Value = "reportFalsePositive")] + #pragma warning disable CS1591 ReportFalsePositive = 4, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ChatMessagePolicyViolationVerdictDetailsTypes.cs b/src/sample/generated/Models/ChatMessagePolicyViolationVerdictDetailsTypes.cs index e4d5dcf8..86a16cab 100644 --- a/src/sample/generated/Models/ChatMessagePolicyViolationVerdictDetailsTypes.cs +++ b/src/sample/generated/Models/ChatMessagePolicyViolationVerdictDetailsTypes.cs @@ -1,16 +1,29 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] [Flags] - public enum ChatMessagePolicyViolationVerdictDetailsTypes { + #pragma warning disable CS1591 + public enum ChatMessagePolicyViolationVerdictDetailsTypes + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None = 1, + #pragma warning restore CS1591 [EnumMember(Value = "allowFalsePositiveOverride")] + #pragma warning disable CS1591 AllowFalsePositiveOverride = 2, + #pragma warning restore CS1591 [EnumMember(Value = "allowOverrideWithoutJustification")] + #pragma warning disable CS1591 AllowOverrideWithoutJustification = 4, + #pragma warning restore CS1591 [EnumMember(Value = "allowOverrideWithJustification")] + #pragma warning disable CS1591 AllowOverrideWithJustification = 8, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ChatMessageReaction.cs b/src/sample/generated/Models/ChatMessageReaction.cs index fc1addfb..540eba22 100644 --- a/src/sample/generated/Models/ChatMessageReaction.cs +++ b/src/sample/generated/Models/ChatMessageReaction.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessageReaction : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessageReaction : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z @@ -21,45 +27,53 @@ public class ChatMessageReaction : IAdditionalDataHolder, IParsable { /// The user property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatMessageReactionIdentitySet? User { get; set; } + public global::ApiSdk.Models.ChatMessageReactionIdentitySet? User { get; set; } #nullable restore #else - public ChatMessageReactionIdentitySet User { get; set; } + public global::ApiSdk.Models.ChatMessageReactionIdentitySet User { get; set; } #endif /// - /// Instantiates a new chatMessageReaction and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChatMessageReaction() { + public ChatMessageReaction() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChatMessageReaction CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChatMessageReaction CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessageReaction(); + return new global::ApiSdk.Models.ChatMessageReaction(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"reactionType", n => { ReactionType = n.GetStringValue(); } }, - {"user", n => { User = n.GetObjectValue(ChatMessageReactionIdentitySet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "reactionType", n => { ReactionType = n.GetStringValue(); } }, + { "user", n => { User = n.GetObjectValue(global::ApiSdk.Models.ChatMessageReactionIdentitySet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("reactionType", ReactionType); - writer.WriteObjectValue("user", User); + writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessageReactionIdentitySet.cs b/src/sample/generated/Models/ChatMessageReactionIdentitySet.cs index 5357ce91..29ef50ec 100644 --- a/src/sample/generated/Models/ChatMessageReactionIdentitySet.cs +++ b/src/sample/generated/Models/ChatMessageReactionIdentitySet.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatMessageReactionIdentitySet : IdentitySet, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatMessageReactionIdentitySet : global::ApiSdk.Models.IdentitySet, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ChatMessageReactionIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ChatMessageReactionIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatMessageReactionIdentitySet(); + return new global::ApiSdk.Models.ChatMessageReactionIdentitySet(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChatMessageType.cs b/src/sample/generated/Models/ChatMessageType.cs index 036d7863..eb51623a 100644 --- a/src/sample/generated/Models/ChatMessageType.cs +++ b/src/sample/generated/Models/ChatMessageType.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ChatMessageType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ChatMessageType + #pragma warning restore CS1591 + { [EnumMember(Value = "message")] + #pragma warning disable CS1591 Message, + #pragma warning restore CS1591 [EnumMember(Value = "chatEvent")] + #pragma warning disable CS1591 ChatEvent, + #pragma warning restore CS1591 [EnumMember(Value = "typing")] + #pragma warning disable CS1591 Typing, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 [EnumMember(Value = "systemEventMessage")] + #pragma warning disable CS1591 SystemEventMessage, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ChatType.cs b/src/sample/generated/Models/ChatType.cs index 6d6dd1cd..aff92075 100644 --- a/src/sample/generated/Models/ChatType.cs +++ b/src/sample/generated/Models/ChatType.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ChatType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ChatType + #pragma warning restore CS1591 + { [EnumMember(Value = "oneOnOne")] + #pragma warning disable CS1591 OneOnOne, + #pragma warning restore CS1591 [EnumMember(Value = "group")] + #pragma warning disable CS1591 Group, + #pragma warning restore CS1591 [EnumMember(Value = "meeting")] + #pragma warning disable CS1591 Meeting, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ChatViewpoint.cs b/src/sample/generated/Models/ChatViewpoint.cs index 46f6a374..b4741578 100644 --- a/src/sample/generated/Models/ChatViewpoint.cs +++ b/src/sample/generated/Models/ChatViewpoint.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChatViewpoint : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChatViewpoint : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Indicates whether the chat is hidden for the current user. @@ -13,33 +19,40 @@ public class ChatViewpoint : IAdditionalDataHolder, IParsable { /// Represents the dateTime up until which the current user has read chatMessages in a specific chat. public DateTimeOffset? LastMessageReadDateTime { get; set; } /// - /// Instantiates a new chatViewpoint and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChatViewpoint() { + public ChatViewpoint() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChatViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChatViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChatViewpoint(); + return new global::ApiSdk.Models.ChatViewpoint(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"isHidden", n => { IsHidden = n.GetBoolValue(); } }, - {"lastMessageReadDateTime", n => { LastMessageReadDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "isHidden", n => { IsHidden = n.GetBoolValue(); } }, + { "lastMessageReadDateTime", n => { LastMessageReadDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isHidden", IsHidden); writer.WriteDateTimeOffsetValue("lastMessageReadDateTime", LastMessageReadDateTime); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChecklistItem.cs b/src/sample/generated/Models/ChecklistItem.cs index c401aa7d..53fab22d 100644 --- a/src/sample/generated/Models/ChecklistItem.cs +++ b/src/sample/generated/Models/ChecklistItem.cs @@ -1,16 +1,22 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChecklistItem : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChecklistItem : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The date and time when the checklistItem was finished. public DateTimeOffset? CheckedDateTime { get; set; } /// The date and time when the checklistItem was created. public DateTimeOffset? CreatedDateTime { get; set; } - /// Field indicating the title of checklistItem. + /// Indicates the title of the checklistItem. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName { get; set; } @@ -18,32 +24,38 @@ public class ChecklistItem : Entity, IParsable { #else public string DisplayName { get; set; } #endif - /// State indicating whether the item is checked off or not. + /// State that indicates whether the item is checked off or not. public bool? IsChecked { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ChecklistItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ChecklistItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChecklistItem(); + return new global::ApiSdk.Models.ChecklistItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"checkedDateTime", n => { CheckedDateTime = n.GetDateTimeOffsetValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"isChecked", n => { IsChecked = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "checkedDateTime", n => { CheckedDateTime = n.GetDateTimeOffsetValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "isChecked", n => { IsChecked = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("checkedDateTime", CheckedDateTime); @@ -53,3 +65,4 @@ public class ChecklistItem : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChecklistItemCollectionResponse.cs b/src/sample/generated/Models/ChecklistItemCollectionResponse.cs index a28e5aa9..2741752d 100644 --- a/src/sample/generated/Models/ChecklistItemCollectionResponse.cs +++ b/src/sample/generated/Models/ChecklistItemCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChecklistItemCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChecklistItemCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class ChecklistItemCollectionResponse : IAdditionalDataHolder, IParsable /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new checklistItemCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChecklistItemCollectionResponse() { + public ChecklistItemCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChecklistItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChecklistItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChecklistItemCollectionResponse(); + return new global::ApiSdk.Models.ChecklistItemCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(ChecklistItem.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChecklistItem.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ChoiceColumn.cs b/src/sample/generated/Models/ChoiceColumn.cs index f55c307f..808089a0 100644 --- a/src/sample/generated/Models/ChoiceColumn.cs +++ b/src/sample/generated/Models/ChoiceColumn.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ChoiceColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ChoiceColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// If true, allows custom values that aren't in the configured choices. @@ -27,34 +33,41 @@ public class ChoiceColumn : IAdditionalDataHolder, IParsable { public string DisplayAs { get; set; } #endif /// - /// Instantiates a new choiceColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public ChoiceColumn() { + public ChoiceColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ChoiceColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ChoiceColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ChoiceColumn(); + return new global::ApiSdk.Models.ChoiceColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowTextEntry", n => { AllowTextEntry = n.GetBoolValue(); } }, - {"choices", n => { Choices = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"displayAs", n => { DisplayAs = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowTextEntry", n => { AllowTextEntry = n.GetBoolValue(); } }, + { "choices", n => { Choices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "displayAs", n => { DisplayAs = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowTextEntry", AllowTextEntry); writer.WriteCollectionOfPrimitiveValues("choices", Choices); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ClaimsMappingPolicy.cs b/src/sample/generated/Models/ClaimsMappingPolicy.cs index 5e762cb0..53242f80 100644 --- a/src/sample/generated/Models/ClaimsMappingPolicy.cs +++ b/src/sample/generated/Models/ClaimsMappingPolicy.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ClaimsMappingPolicy : StsPolicy, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ClaimsMappingPolicy : global::ApiSdk.Models.StsPolicy, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ClaimsMappingPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ClaimsMappingPolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ClaimsMappingPolicy(); + return new global::ApiSdk.Models.ClaimsMappingPolicy(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CloudClipboardItem.cs b/src/sample/generated/Models/CloudClipboardItem.cs new file mode 100644 index 00000000..a2baa8a6 --- /dev/null +++ b/src/sample/generated/Models/CloudClipboardItem.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CloudClipboardItem : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Set by the server. DateTime in UTC when the object was created on the server. + public DateTimeOffset? CreatedDateTime { get; set; } + /// Set by the server. DateTime in UTC when the object expires and after that the object is no longer available. The default and also maximum TTL is 12 hours after the creation, but it might change for performance optimization. + public DateTimeOffset? ExpirationDateTime { get; set; } + /// Set by the server if not provided in the client's request. DateTime in UTC when the object was modified by the client. + public DateTimeOffset? LastModifiedDateTime { get; set; } + /// A cloudClipboardItem can have multiple cloudClipboardItemPayload objects in the payloads. A window can place more than one clipboard object on the clipboard. Each one represents the same information in a different clipboard format. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Payloads { get; set; } +#nullable restore +#else + public List Payloads { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.CloudClipboardItem CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.CloudClipboardItem(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "payloads", n => { Payloads = n.GetCollectionOfObjectValues(global::ApiSdk.Models.CloudClipboardItemPayload.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); + writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); + writer.WriteCollectionOfObjectValues("payloads", Payloads); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CloudClipboardItemPayload.cs b/src/sample/generated/Models/CloudClipboardItemPayload.cs new file mode 100644 index 00000000..7e33dcf4 --- /dev/null +++ b/src/sample/generated/Models/CloudClipboardItemPayload.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CloudClipboardItemPayload : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The formatName version of the value of a cloud clipboard encoded in base64. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Content { get; set; } +#nullable restore +#else + public string Content { get; set; } +#endif + /// For a list of possible values see formatName values. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FormatName { get; set; } +#nullable restore +#else + public string FormatName { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CloudClipboardItemPayload() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.CloudClipboardItemPayload CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.CloudClipboardItemPayload(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetStringValue(); } }, + { "formatName", n => { FormatName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("content", Content); + writer.WriteStringValue("formatName", FormatName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CloudClipboardRoot.cs b/src/sample/generated/Models/CloudClipboardRoot.cs new file mode 100644 index 00000000..f187a9ad --- /dev/null +++ b/src/sample/generated/Models/CloudClipboardRoot.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CloudClipboardRoot : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Represents a collection of Cloud Clipboard items. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Items { get; set; } +#nullable restore +#else + public List Items { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.CloudClipboardRoot CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.CloudClipboardRoot(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "items", n => { Items = n.GetCollectionOfObjectValues(global::ApiSdk.Models.CloudClipboardItem.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("items", Items); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ColumnDefinition.cs b/src/sample/generated/Models/ColumnDefinition.cs index c4a1b7f3..0f0a1866 100644 --- a/src/sample/generated/Models/ColumnDefinition.cs +++ b/src/sample/generated/Models/ColumnDefinition.cs @@ -1,34 +1,40 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ColumnDefinition : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ColumnDefinition : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The boolean property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public BooleanColumn? Boolean { get; set; } + public global::ApiSdk.Models.BooleanColumn? Boolean { get; set; } #nullable restore #else - public BooleanColumn Boolean { get; set; } + public global::ApiSdk.Models.BooleanColumn Boolean { get; set; } #endif /// The calculated property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public CalculatedColumn? Calculated { get; set; } + public global::ApiSdk.Models.CalculatedColumn? Calculated { get; set; } #nullable restore #else - public CalculatedColumn Calculated { get; set; } + public global::ApiSdk.Models.CalculatedColumn Calculated { get; set; } #endif /// The choice property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChoiceColumn? Choice { get; set; } + public global::ApiSdk.Models.ChoiceColumn? Choice { get; set; } #nullable restore #else - public ChoiceColumn Choice { get; set; } + public global::ApiSdk.Models.ChoiceColumn Choice { get; set; } #endif /// For site columns, the name of the group this column belongs to. Helps organize related columns. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,34 +47,34 @@ public class ColumnDefinition : Entity, IParsable { /// The contentApprovalStatus property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ContentApprovalStatusColumn? ContentApprovalStatus { get; set; } + public global::ApiSdk.Models.ContentApprovalStatusColumn? ContentApprovalStatus { get; set; } #nullable restore #else - public ContentApprovalStatusColumn ContentApprovalStatus { get; set; } + public global::ApiSdk.Models.ContentApprovalStatusColumn ContentApprovalStatus { get; set; } #endif /// The currency property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public CurrencyColumn? Currency { get; set; } + public global::ApiSdk.Models.CurrencyColumn? Currency { get; set; } #nullable restore #else - public CurrencyColumn Currency { get; set; } + public global::ApiSdk.Models.CurrencyColumn Currency { get; set; } #endif /// The dateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeColumn? DateTime { get; set; } + public global::ApiSdk.Models.DateTimeColumn? DateTime { get; set; } #nullable restore #else - public DateTimeColumn DateTime { get; set; } + public global::ApiSdk.Models.DateTimeColumn DateTime { get; set; } #endif /// The defaultValue property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DefaultColumnValue? DefaultValue { get; set; } + public global::ApiSdk.Models.DefaultColumnValue? DefaultValue { get; set; } #nullable restore #else - public DefaultColumnValue DefaultValue { get; set; } + public global::ApiSdk.Models.DefaultColumnValue DefaultValue { get; set; } #endif /// The user-facing description of the column. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -91,20 +97,20 @@ public class ColumnDefinition : Entity, IParsable { /// The geolocation property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public GeolocationColumn? Geolocation { get; set; } + public global::ApiSdk.Models.GeolocationColumn? Geolocation { get; set; } #nullable restore #else - public GeolocationColumn Geolocation { get; set; } + public global::ApiSdk.Models.GeolocationColumn Geolocation { get; set; } #endif /// Specifies whether the column is displayed in the user interface. public bool? Hidden { get; set; } /// The hyperlinkOrPicture property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public HyperlinkOrPictureColumn? HyperlinkOrPicture { get; set; } + public global::ApiSdk.Models.HyperlinkOrPictureColumn? HyperlinkOrPicture { get; set; } #nullable restore #else - public HyperlinkOrPictureColumn HyperlinkOrPicture { get; set; } + public global::ApiSdk.Models.HyperlinkOrPictureColumn HyperlinkOrPicture { get; set; } #endif /// Specifies whether the column values can be used for sorting and searching. public bool? Indexed { get; set; } @@ -117,12 +123,12 @@ public class ColumnDefinition : Entity, IParsable { /// The lookup property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public LookupColumn? Lookup { get; set; } + public global::ApiSdk.Models.LookupColumn? Lookup { get; set; } #nullable restore #else - public LookupColumn Lookup { get; set; } + public global::ApiSdk.Models.LookupColumn Lookup { get; set; } #endif - /// The API-facing name of the column as it appears in the [fields][] on a [listItem][]. For the user-facing name, see displayName. + /// The API-facing name of the column as it appears in the fields on a listItem. For the user-facing name, see displayName. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } @@ -133,18 +139,18 @@ public class ColumnDefinition : Entity, IParsable { /// The number property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public NumberColumn? Number { get; set; } + public global::ApiSdk.Models.NumberColumn? Number { get; set; } #nullable restore #else - public NumberColumn Number { get; set; } + public global::ApiSdk.Models.NumberColumn Number { get; set; } #endif /// The personOrGroup property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PersonOrGroupColumn? PersonOrGroup { get; set; } + public global::ApiSdk.Models.PersonOrGroupColumn? PersonOrGroup { get; set; } #nullable restore #else - public PersonOrGroupColumn PersonOrGroup { get; set; } + public global::ApiSdk.Models.PersonOrGroupColumn PersonOrGroup { get; set; } #endif /// If 'true', changes to this column will be propagated to lists that implement the column. public bool? PropagateChanges { get; set; } @@ -155,139 +161,146 @@ public class ColumnDefinition : Entity, IParsable { /// The sourceColumn property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ColumnDefinition? SourceColumn { get; set; } + public global::ApiSdk.Models.ColumnDefinition? SourceColumn { get; set; } #nullable restore #else - public ColumnDefinition SourceColumn { get; set; } + public global::ApiSdk.Models.ColumnDefinition SourceColumn { get; set; } #endif /// The sourceContentType property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ContentTypeInfo? SourceContentType { get; set; } + public global::ApiSdk.Models.ContentTypeInfo? SourceContentType { get; set; } #nullable restore #else - public ContentTypeInfo SourceContentType { get; set; } + public global::ApiSdk.Models.ContentTypeInfo SourceContentType { get; set; } #endif /// The term property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TermColumn? Term { get; set; } + public global::ApiSdk.Models.TermColumn? Term { get; set; } #nullable restore #else - public TermColumn Term { get; set; } + public global::ApiSdk.Models.TermColumn Term { get; set; } #endif /// The text property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TextColumn? Text { get; set; } + public global::ApiSdk.Models.TextColumn? Text { get; set; } #nullable restore #else - public TextColumn Text { get; set; } + public global::ApiSdk.Models.TextColumn Text { get; set; } #endif /// The thumbnail property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ThumbnailColumn? Thumbnail { get; set; } + public global::ApiSdk.Models.ThumbnailColumn? Thumbnail { get; set; } #nullable restore #else - public ThumbnailColumn Thumbnail { get; set; } + public global::ApiSdk.Models.ThumbnailColumn Thumbnail { get; set; } #endif /// The type property - public ColumnTypes? Type { get; set; } + public global::ApiSdk.Models.ColumnTypes? Type { get; set; } /// The validation property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ColumnValidation? Validation { get; set; } + public global::ApiSdk.Models.ColumnValidation? Validation { get; set; } #nullable restore #else - public ColumnValidation Validation { get; set; } + public global::ApiSdk.Models.ColumnValidation Validation { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ColumnDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ColumnDefinition CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ColumnDefinition(); + return new global::ApiSdk.Models.ColumnDefinition(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"boolean", n => { Boolean = n.GetObjectValue(BooleanColumn.CreateFromDiscriminatorValue); } }, - {"calculated", n => { Calculated = n.GetObjectValue(CalculatedColumn.CreateFromDiscriminatorValue); } }, - {"choice", n => { Choice = n.GetObjectValue(ChoiceColumn.CreateFromDiscriminatorValue); } }, - {"columnGroup", n => { ColumnGroup = n.GetStringValue(); } }, - {"contentApprovalStatus", n => { ContentApprovalStatus = n.GetObjectValue(ContentApprovalStatusColumn.CreateFromDiscriminatorValue); } }, - {"currency", n => { Currency = n.GetObjectValue(CurrencyColumn.CreateFromDiscriminatorValue); } }, - {"dateTime", n => { DateTime = n.GetObjectValue(DateTimeColumn.CreateFromDiscriminatorValue); } }, - {"defaultValue", n => { DefaultValue = n.GetObjectValue(DefaultColumnValue.CreateFromDiscriminatorValue); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"enforceUniqueValues", n => { EnforceUniqueValues = n.GetBoolValue(); } }, - {"geolocation", n => { Geolocation = n.GetObjectValue(GeolocationColumn.CreateFromDiscriminatorValue); } }, - {"hidden", n => { Hidden = n.GetBoolValue(); } }, - {"hyperlinkOrPicture", n => { HyperlinkOrPicture = n.GetObjectValue(HyperlinkOrPictureColumn.CreateFromDiscriminatorValue); } }, - {"indexed", n => { Indexed = n.GetBoolValue(); } }, - {"isDeletable", n => { IsDeletable = n.GetBoolValue(); } }, - {"isReorderable", n => { IsReorderable = n.GetBoolValue(); } }, - {"isSealed", n => { IsSealed = n.GetBoolValue(); } }, - {"lookup", n => { Lookup = n.GetObjectValue(LookupColumn.CreateFromDiscriminatorValue); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"number", n => { Number = n.GetObjectValue(NumberColumn.CreateFromDiscriminatorValue); } }, - {"personOrGroup", n => { PersonOrGroup = n.GetObjectValue(PersonOrGroupColumn.CreateFromDiscriminatorValue); } }, - {"propagateChanges", n => { PropagateChanges = n.GetBoolValue(); } }, - {"readOnly", n => { ReadOnly = n.GetBoolValue(); } }, - {"required", n => { Required = n.GetBoolValue(); } }, - {"sourceColumn", n => { SourceColumn = n.GetObjectValue(ColumnDefinition.CreateFromDiscriminatorValue); } }, - {"sourceContentType", n => { SourceContentType = n.GetObjectValue(ContentTypeInfo.CreateFromDiscriminatorValue); } }, - {"term", n => { Term = n.GetObjectValue(TermColumn.CreateFromDiscriminatorValue); } }, - {"text", n => { Text = n.GetObjectValue(TextColumn.CreateFromDiscriminatorValue); } }, - {"thumbnail", n => { Thumbnail = n.GetObjectValue(ThumbnailColumn.CreateFromDiscriminatorValue); } }, - {"type", n => { Type = n.GetEnumValue(); } }, - {"validation", n => { Validation = n.GetObjectValue(ColumnValidation.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "boolean", n => { Boolean = n.GetObjectValue(global::ApiSdk.Models.BooleanColumn.CreateFromDiscriminatorValue); } }, + { "calculated", n => { Calculated = n.GetObjectValue(global::ApiSdk.Models.CalculatedColumn.CreateFromDiscriminatorValue); } }, + { "choice", n => { Choice = n.GetObjectValue(global::ApiSdk.Models.ChoiceColumn.CreateFromDiscriminatorValue); } }, + { "columnGroup", n => { ColumnGroup = n.GetStringValue(); } }, + { "contentApprovalStatus", n => { ContentApprovalStatus = n.GetObjectValue(global::ApiSdk.Models.ContentApprovalStatusColumn.CreateFromDiscriminatorValue); } }, + { "currency", n => { Currency = n.GetObjectValue(global::ApiSdk.Models.CurrencyColumn.CreateFromDiscriminatorValue); } }, + { "dateTime", n => { DateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeColumn.CreateFromDiscriminatorValue); } }, + { "defaultValue", n => { DefaultValue = n.GetObjectValue(global::ApiSdk.Models.DefaultColumnValue.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "enforceUniqueValues", n => { EnforceUniqueValues = n.GetBoolValue(); } }, + { "geolocation", n => { Geolocation = n.GetObjectValue(global::ApiSdk.Models.GeolocationColumn.CreateFromDiscriminatorValue); } }, + { "hidden", n => { Hidden = n.GetBoolValue(); } }, + { "hyperlinkOrPicture", n => { HyperlinkOrPicture = n.GetObjectValue(global::ApiSdk.Models.HyperlinkOrPictureColumn.CreateFromDiscriminatorValue); } }, + { "indexed", n => { Indexed = n.GetBoolValue(); } }, + { "isDeletable", n => { IsDeletable = n.GetBoolValue(); } }, + { "isReorderable", n => { IsReorderable = n.GetBoolValue(); } }, + { "isSealed", n => { IsSealed = n.GetBoolValue(); } }, + { "lookup", n => { Lookup = n.GetObjectValue(global::ApiSdk.Models.LookupColumn.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "number", n => { Number = n.GetObjectValue(global::ApiSdk.Models.NumberColumn.CreateFromDiscriminatorValue); } }, + { "personOrGroup", n => { PersonOrGroup = n.GetObjectValue(global::ApiSdk.Models.PersonOrGroupColumn.CreateFromDiscriminatorValue); } }, + { "propagateChanges", n => { PropagateChanges = n.GetBoolValue(); } }, + { "readOnly", n => { ReadOnly = n.GetBoolValue(); } }, + { "required", n => { Required = n.GetBoolValue(); } }, + { "sourceColumn", n => { SourceColumn = n.GetObjectValue(global::ApiSdk.Models.ColumnDefinition.CreateFromDiscriminatorValue); } }, + { "sourceContentType", n => { SourceContentType = n.GetObjectValue(global::ApiSdk.Models.ContentTypeInfo.CreateFromDiscriminatorValue); } }, + { "term", n => { Term = n.GetObjectValue(global::ApiSdk.Models.TermColumn.CreateFromDiscriminatorValue); } }, + { "text", n => { Text = n.GetObjectValue(global::ApiSdk.Models.TextColumn.CreateFromDiscriminatorValue); } }, + { "thumbnail", n => { Thumbnail = n.GetObjectValue(global::ApiSdk.Models.ThumbnailColumn.CreateFromDiscriminatorValue); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + { "validation", n => { Validation = n.GetObjectValue(global::ApiSdk.Models.ColumnValidation.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("boolean", Boolean); - writer.WriteObjectValue("calculated", Calculated); - writer.WriteObjectValue("choice", Choice); + writer.WriteObjectValue("boolean", Boolean); + writer.WriteObjectValue("calculated", Calculated); + writer.WriteObjectValue("choice", Choice); writer.WriteStringValue("columnGroup", ColumnGroup); - writer.WriteObjectValue("contentApprovalStatus", ContentApprovalStatus); - writer.WriteObjectValue("currency", Currency); - writer.WriteObjectValue("dateTime", DateTime); - writer.WriteObjectValue("defaultValue", DefaultValue); + writer.WriteObjectValue("contentApprovalStatus", ContentApprovalStatus); + writer.WriteObjectValue("currency", Currency); + writer.WriteObjectValue("dateTime", DateTime); + writer.WriteObjectValue("defaultValue", DefaultValue); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("enforceUniqueValues", EnforceUniqueValues); - writer.WriteObjectValue("geolocation", Geolocation); + writer.WriteObjectValue("geolocation", Geolocation); writer.WriteBoolValue("hidden", Hidden); - writer.WriteObjectValue("hyperlinkOrPicture", HyperlinkOrPicture); + writer.WriteObjectValue("hyperlinkOrPicture", HyperlinkOrPicture); writer.WriteBoolValue("indexed", Indexed); writer.WriteBoolValue("isDeletable", IsDeletable); writer.WriteBoolValue("isReorderable", IsReorderable); writer.WriteBoolValue("isSealed", IsSealed); - writer.WriteObjectValue("lookup", Lookup); + writer.WriteObjectValue("lookup", Lookup); writer.WriteStringValue("name", Name); - writer.WriteObjectValue("number", Number); - writer.WriteObjectValue("personOrGroup", PersonOrGroup); + writer.WriteObjectValue("number", Number); + writer.WriteObjectValue("personOrGroup", PersonOrGroup); writer.WriteBoolValue("propagateChanges", PropagateChanges); writer.WriteBoolValue("readOnly", ReadOnly); writer.WriteBoolValue("required", Required); - writer.WriteObjectValue("sourceColumn", SourceColumn); - writer.WriteObjectValue("sourceContentType", SourceContentType); - writer.WriteObjectValue("term", Term); - writer.WriteObjectValue("text", Text); - writer.WriteObjectValue("thumbnail", Thumbnail); - writer.WriteEnumValue("type", Type); - writer.WriteObjectValue("validation", Validation); + writer.WriteObjectValue("sourceColumn", SourceColumn); + writer.WriteObjectValue("sourceContentType", SourceContentType); + writer.WriteObjectValue("term", Term); + writer.WriteObjectValue("text", Text); + writer.WriteObjectValue("thumbnail", Thumbnail); + writer.WriteEnumValue("type", Type); + writer.WriteObjectValue("validation", Validation); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ColumnLink.cs b/src/sample/generated/Models/ColumnLink.cs index c2067809..eb8a4605 100644 --- a/src/sample/generated/Models/ColumnLink.cs +++ b/src/sample/generated/Models/ColumnLink.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ColumnLink : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ColumnLink : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The name of the column in this content type. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class ColumnLink : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ColumnLink CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ColumnLink CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ColumnLink(); + return new global::ApiSdk.Models.ColumnLink(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"name", n => { Name = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "name", n => { Name = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ColumnTypes.cs b/src/sample/generated/Models/ColumnTypes.cs index cd654375..668744d0 100644 --- a/src/sample/generated/Models/ColumnTypes.cs +++ b/src/sample/generated/Models/ColumnTypes.cs @@ -1,45 +1,88 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ColumnTypes { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ColumnTypes + #pragma warning restore CS1591 + { [EnumMember(Value = "note")] + #pragma warning disable CS1591 Note, + #pragma warning restore CS1591 [EnumMember(Value = "text")] + #pragma warning disable CS1591 Text, + #pragma warning restore CS1591 [EnumMember(Value = "choice")] + #pragma warning disable CS1591 Choice, + #pragma warning restore CS1591 [EnumMember(Value = "multichoice")] + #pragma warning disable CS1591 Multichoice, + #pragma warning restore CS1591 [EnumMember(Value = "number")] + #pragma warning disable CS1591 Number, + #pragma warning restore CS1591 [EnumMember(Value = "currency")] + #pragma warning disable CS1591 Currency, + #pragma warning restore CS1591 [EnumMember(Value = "dateTime")] + #pragma warning disable CS1591 DateTime, + #pragma warning restore CS1591 [EnumMember(Value = "lookup")] + #pragma warning disable CS1591 Lookup, + #pragma warning restore CS1591 [EnumMember(Value = "boolean")] + #pragma warning disable CS1591 Boolean, + #pragma warning restore CS1591 [EnumMember(Value = "user")] + #pragma warning disable CS1591 User, + #pragma warning restore CS1591 [EnumMember(Value = "url")] + #pragma warning disable CS1591 Url, + #pragma warning restore CS1591 [EnumMember(Value = "calculated")] + #pragma warning disable CS1591 Calculated, + #pragma warning restore CS1591 [EnumMember(Value = "location")] + #pragma warning disable CS1591 Location, + #pragma warning restore CS1591 [EnumMember(Value = "geolocation")] + #pragma warning disable CS1591 Geolocation, + #pragma warning restore CS1591 [EnumMember(Value = "term")] + #pragma warning disable CS1591 Term, + #pragma warning restore CS1591 [EnumMember(Value = "multiterm")] + #pragma warning disable CS1591 Multiterm, + #pragma warning restore CS1591 [EnumMember(Value = "thumbnail")] + #pragma warning disable CS1591 Thumbnail, + #pragma warning restore CS1591 [EnumMember(Value = "approvalStatus")] + #pragma warning disable CS1591 ApprovalStatus, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ColumnValidation.cs b/src/sample/generated/Models/ColumnValidation.cs index abc7e7e0..20638aaa 100644 --- a/src/sample/generated/Models/ColumnValidation.cs +++ b/src/sample/generated/Models/ColumnValidation.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ColumnValidation : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ColumnValidation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Default BCP 47 language tag for the description. @@ -19,10 +25,10 @@ public class ColumnValidation : IAdditionalDataHolder, IParsable { /// Localized messages that explain what is needed for this column's value to be considered valid. User will be prompted with this message if validation fails. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Descriptions { get; set; } + public List? Descriptions { get; set; } #nullable restore #else - public List Descriptions { get; set; } + public List Descriptions { get; set; } #endif /// The formula to validate column value. For examples, see Examples of common formulas in lists. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,39 +39,47 @@ public class ColumnValidation : IAdditionalDataHolder, IParsable { public string Formula { get; set; } #endif /// - /// Instantiates a new columnValidation and sets the default values. + /// Instantiates a new and sets the default values. /// - public ColumnValidation() { + public ColumnValidation() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ColumnValidation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ColumnValidation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ColumnValidation(); + return new global::ApiSdk.Models.ColumnValidation(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"defaultLanguage", n => { DefaultLanguage = n.GetStringValue(); } }, - {"descriptions", n => { Descriptions = n.GetCollectionOfObjectValues(DisplayNameLocalization.CreateFromDiscriminatorValue)?.ToList(); } }, - {"formula", n => { Formula = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "defaultLanguage", n => { DefaultLanguage = n.GetStringValue(); } }, + { "descriptions", n => { Descriptions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DisplayNameLocalization.CreateFromDiscriminatorValue)?.AsList(); } }, + { "formula", n => { Formula = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultLanguage", DefaultLanguage); - writer.WriteCollectionOfObjectValues("descriptions", Descriptions); + writer.WriteCollectionOfObjectValues("descriptions", Descriptions); writer.WriteStringValue("formula", Formula); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ComplianceState.cs b/src/sample/generated/Models/ComplianceState.cs index cd89bba6..64dac271 100644 --- a/src/sample/generated/Models/ComplianceState.cs +++ b/src/sample/generated/Models/ComplianceState.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Compliance state. - public enum ComplianceState { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ComplianceState + { /// Unknown. [EnumMember(Value = "unknown")] Unknown, diff --git a/src/sample/generated/Models/ComplianceStatus.cs b/src/sample/generated/Models/ComplianceStatus.cs index 85f34766..1bf9973d 100644 --- a/src/sample/generated/Models/ComplianceStatus.cs +++ b/src/sample/generated/Models/ComplianceStatus.cs @@ -1,23 +1,44 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ComplianceStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ComplianceStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 Unknown, + #pragma warning restore CS1591 [EnumMember(Value = "notApplicable")] + #pragma warning disable CS1591 NotApplicable, + #pragma warning restore CS1591 [EnumMember(Value = "compliant")] + #pragma warning disable CS1591 Compliant, + #pragma warning restore CS1591 [EnumMember(Value = "remediated")] + #pragma warning disable CS1591 Remediated, + #pragma warning restore CS1591 [EnumMember(Value = "nonCompliant")] + #pragma warning disable CS1591 NonCompliant, + #pragma warning restore CS1591 [EnumMember(Value = "error")] + #pragma warning disable CS1591 Error, + #pragma warning restore CS1591 [EnumMember(Value = "conflict")] + #pragma warning disable CS1591 Conflict, + #pragma warning restore CS1591 [EnumMember(Value = "notAssigned")] + #pragma warning disable CS1591 NotAssigned, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ConfigurationManagerClientEnabledFeatures.cs b/src/sample/generated/Models/ConfigurationManagerClientEnabledFeatures.cs index e31a3f9b..6207beb8 100644 --- a/src/sample/generated/Models/ConfigurationManagerClientEnabledFeatures.cs +++ b/src/sample/generated/Models/ConfigurationManagerClientEnabledFeatures.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// configuration Manager client enabled features /// - public class ConfigurationManagerClientEnabledFeatures : IAdditionalDataHolder, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ConfigurationManagerClientEnabledFeatures : IAdditionalDataHolder, IParsable + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Whether compliance policy is managed by Intune @@ -24,37 +28,44 @@ public class ConfigurationManagerClientEnabledFeatures : IAdditionalDataHolder, /// Whether Windows Update for Business is managed by Intune public bool? WindowsUpdateForBusiness { get; set; } /// - /// Instantiates a new configurationManagerClientEnabledFeatures and sets the default values. + /// Instantiates a new and sets the default values. /// - public ConfigurationManagerClientEnabledFeatures() { + public ConfigurationManagerClientEnabledFeatures() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ConfigurationManagerClientEnabledFeatures CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ConfigurationManagerClientEnabledFeatures CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ConfigurationManagerClientEnabledFeatures(); + return new global::ApiSdk.Models.ConfigurationManagerClientEnabledFeatures(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"compliancePolicy", n => { CompliancePolicy = n.GetBoolValue(); } }, - {"deviceConfiguration", n => { DeviceConfiguration = n.GetBoolValue(); } }, - {"inventory", n => { Inventory = n.GetBoolValue(); } }, - {"modernApps", n => { ModernApps = n.GetBoolValue(); } }, - {"resourceAccess", n => { ResourceAccess = n.GetBoolValue(); } }, - {"windowsUpdateForBusiness", n => { WindowsUpdateForBusiness = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "compliancePolicy", n => { CompliancePolicy = n.GetBoolValue(); } }, + { "deviceConfiguration", n => { DeviceConfiguration = n.GetBoolValue(); } }, + { "inventory", n => { Inventory = n.GetBoolValue(); } }, + { "modernApps", n => { ModernApps = n.GetBoolValue(); } }, + { "resourceAccess", n => { ResourceAccess = n.GetBoolValue(); } }, + { "windowsUpdateForBusiness", n => { WindowsUpdateForBusiness = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("compliancePolicy", CompliancePolicy); writer.WriteBoolValue("deviceConfiguration", DeviceConfiguration); @@ -66,3 +77,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Contact.cs b/src/sample/generated/Models/Contact.cs index 91b0d1f7..ac09bacf 100644 --- a/src/sample/generated/Models/Contact.cs +++ b/src/sample/generated/Models/Contact.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Contact : OutlookItem, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Contact : global::ApiSdk.Models.OutlookItem, IParsable + #pragma warning restore CS1591 + { /// The name of the contact's assistant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,10 +25,10 @@ public class Contact : OutlookItem, IParsable { /// The businessAddress property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PhysicalAddress? BusinessAddress { get; set; } + public global::ApiSdk.Models.PhysicalAddress? BusinessAddress { get; set; } #nullable restore #else - public PhysicalAddress BusinessAddress { get; set; } + public global::ApiSdk.Models.PhysicalAddress BusinessAddress { get; set; } #endif /// The business home page of the contact. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -75,18 +81,18 @@ public class Contact : OutlookItem, IParsable { /// The contact's email addresses. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? EmailAddresses { get; set; } + public List? EmailAddresses { get; set; } #nullable restore #else - public List EmailAddresses { get; set; } + public List EmailAddresses { get; set; } #endif /// The collection of open extensions defined for the contact. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif /// The name the contact is filed under. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -96,7 +102,7 @@ public class Contact : OutlookItem, IParsable { #else public string FileAs { get; set; } #endif - /// The contact's generation. + /// The contact's suffix. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Generation { get; set; } @@ -115,10 +121,10 @@ public class Contact : OutlookItem, IParsable { /// The homeAddress property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PhysicalAddress? HomeAddress { get; set; } + public global::ApiSdk.Models.PhysicalAddress? HomeAddress { get; set; } #nullable restore #else - public PhysicalAddress HomeAddress { get; set; } + public global::ApiSdk.Models.PhysicalAddress HomeAddress { get; set; } #endif /// The contact's home phone numbers. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -128,7 +134,7 @@ public class Contact : OutlookItem, IParsable { #else public List HomePhones { get; set; } #endif - /// The imAddresses property + /// The contact's instant messaging (IM) addresses. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? ImAddresses { get; set; } @@ -136,7 +142,7 @@ public class Contact : OutlookItem, IParsable { #else public List ImAddresses { get; set; } #endif - /// The initials property + /// The contact's initials. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Initials { get; set; } @@ -144,7 +150,7 @@ public class Contact : OutlookItem, IParsable { #else public string Initials { get; set; } #endif - /// The jobTitle property + /// The contact’s job title. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? JobTitle { get; set; } @@ -152,7 +158,7 @@ public class Contact : OutlookItem, IParsable { #else public string JobTitle { get; set; } #endif - /// The manager property + /// The name of the contact's manager. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Manager { get; set; } @@ -160,7 +166,7 @@ public class Contact : OutlookItem, IParsable { #else public string Manager { get; set; } #endif - /// The middleName property + /// The contact's middle name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? MiddleName { get; set; } @@ -168,7 +174,7 @@ public class Contact : OutlookItem, IParsable { #else public string MiddleName { get; set; } #endif - /// The mobilePhone property + /// The contact's mobile phone number. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? MobilePhone { get; set; } @@ -179,12 +185,12 @@ public class Contact : OutlookItem, IParsable { /// The collection of multi-value extended properties defined for the contact. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MultiValueExtendedProperties { get; set; } + public List? MultiValueExtendedProperties { get; set; } #nullable restore #else - public List MultiValueExtendedProperties { get; set; } + public List MultiValueExtendedProperties { get; set; } #endif - /// The nickName property + /// The contact's nickname. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? NickName { get; set; } @@ -192,7 +198,7 @@ public class Contact : OutlookItem, IParsable { #else public string NickName { get; set; } #endif - /// The officeLocation property + /// The location of the contact's office. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OfficeLocation { get; set; } @@ -203,12 +209,12 @@ public class Contact : OutlookItem, IParsable { /// The otherAddress property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PhysicalAddress? OtherAddress { get; set; } + public global::ApiSdk.Models.PhysicalAddress? OtherAddress { get; set; } #nullable restore #else - public PhysicalAddress OtherAddress { get; set; } + public global::ApiSdk.Models.PhysicalAddress OtherAddress { get; set; } #endif - /// The parentFolderId property + /// The ID of the contact's parent folder. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ParentFolderId { get; set; } @@ -216,7 +222,7 @@ public class Contact : OutlookItem, IParsable { #else public string ParentFolderId { get; set; } #endif - /// The personalNotes property + /// The user's notes about the contact. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? PersonalNotes { get; set; } @@ -227,12 +233,12 @@ public class Contact : OutlookItem, IParsable { /// The photo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ProfilePhoto? Photo { get; set; } + public global::ApiSdk.Models.ProfilePhoto? Photo { get; set; } #nullable restore #else - public ProfilePhoto Photo { get; set; } + public global::ApiSdk.Models.ProfilePhoto Photo { get; set; } #endif - /// The profession property + /// The contact's profession. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Profession { get; set; } @@ -243,12 +249,12 @@ public class Contact : OutlookItem, IParsable { /// The collection of single-value extended properties defined for the contact. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SingleValueExtendedProperties { get; set; } + public List? SingleValueExtendedProperties { get; set; } #nullable restore #else - public List SingleValueExtendedProperties { get; set; } + public List SingleValueExtendedProperties { get; set; } #endif - /// The spouseName property + /// The name of the contact's spouse/partner. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SpouseName { get; set; } @@ -256,7 +262,7 @@ public class Contact : OutlookItem, IParsable { #else public string SpouseName { get; set; } #endif - /// The surname property + /// The contact's surname. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Surname { get; set; } @@ -264,7 +270,7 @@ public class Contact : OutlookItem, IParsable { #else public string Surname { get; set; } #endif - /// The title property + /// The contact's title. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Title { get; set; } @@ -272,7 +278,7 @@ public class Contact : OutlookItem, IParsable { #else public string Title { get; set; } #endif - /// The yomiCompanyName property + /// The phonetic Japanese company name of the contact. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? YomiCompanyName { get; set; } @@ -280,7 +286,7 @@ public class Contact : OutlookItem, IParsable { #else public string YomiCompanyName { get; set; } #endif - /// The yomiGivenName property + /// The phonetic Japanese given name (first name) of the contact. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? YomiGivenName { get; set; } @@ -288,7 +294,7 @@ public class Contact : OutlookItem, IParsable { #else public string YomiGivenName { get; set; } #endif - /// The yomiSurname property + /// The phonetic Japanese surname (last name) of the contact. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? YomiSurname { get; set; } @@ -299,77 +305,83 @@ public class Contact : OutlookItem, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Contact CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Contact CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Contact(); + return new global::ApiSdk.Models.Contact(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"assistantName", n => { AssistantName = n.GetStringValue(); } }, - {"birthday", n => { Birthday = n.GetDateTimeOffsetValue(); } }, - {"businessAddress", n => { BusinessAddress = n.GetObjectValue(PhysicalAddress.CreateFromDiscriminatorValue); } }, - {"businessHomePage", n => { BusinessHomePage = n.GetStringValue(); } }, - {"businessPhones", n => { BusinessPhones = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"children", n => { Children = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"companyName", n => { CompanyName = n.GetStringValue(); } }, - {"department", n => { Department = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"emailAddresses", n => { EmailAddresses = n.GetCollectionOfObjectValues(EmailAddress.CreateFromDiscriminatorValue)?.ToList(); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"fileAs", n => { FileAs = n.GetStringValue(); } }, - {"generation", n => { Generation = n.GetStringValue(); } }, - {"givenName", n => { GivenName = n.GetStringValue(); } }, - {"homeAddress", n => { HomeAddress = n.GetObjectValue(PhysicalAddress.CreateFromDiscriminatorValue); } }, - {"homePhones", n => { HomePhones = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"imAddresses", n => { ImAddresses = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"initials", n => { Initials = n.GetStringValue(); } }, - {"jobTitle", n => { JobTitle = n.GetStringValue(); } }, - {"manager", n => { Manager = n.GetStringValue(); } }, - {"middleName", n => { MiddleName = n.GetStringValue(); } }, - {"mobilePhone", n => { MobilePhone = n.GetStringValue(); } }, - {"multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"nickName", n => { NickName = n.GetStringValue(); } }, - {"officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, - {"otherAddress", n => { OtherAddress = n.GetObjectValue(PhysicalAddress.CreateFromDiscriminatorValue); } }, - {"parentFolderId", n => { ParentFolderId = n.GetStringValue(); } }, - {"personalNotes", n => { PersonalNotes = n.GetStringValue(); } }, - {"photo", n => { Photo = n.GetObjectValue(ProfilePhoto.CreateFromDiscriminatorValue); } }, - {"profession", n => { Profession = n.GetStringValue(); } }, - {"singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"spouseName", n => { SpouseName = n.GetStringValue(); } }, - {"surname", n => { Surname = n.GetStringValue(); } }, - {"title", n => { Title = n.GetStringValue(); } }, - {"yomiCompanyName", n => { YomiCompanyName = n.GetStringValue(); } }, - {"yomiGivenName", n => { YomiGivenName = n.GetStringValue(); } }, - {"yomiSurname", n => { YomiSurname = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "assistantName", n => { AssistantName = n.GetStringValue(); } }, + { "birthday", n => { Birthday = n.GetDateTimeOffsetValue(); } }, + { "businessAddress", n => { BusinessAddress = n.GetObjectValue(global::ApiSdk.Models.PhysicalAddress.CreateFromDiscriminatorValue); } }, + { "businessHomePage", n => { BusinessHomePage = n.GetStringValue(); } }, + { "businessPhones", n => { BusinessPhones = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "children", n => { Children = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "companyName", n => { CompanyName = n.GetStringValue(); } }, + { "department", n => { Department = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "emailAddresses", n => { EmailAddresses = n.GetCollectionOfObjectValues(global::ApiSdk.Models.EmailAddress.CreateFromDiscriminatorValue)?.AsList(); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "fileAs", n => { FileAs = n.GetStringValue(); } }, + { "generation", n => { Generation = n.GetStringValue(); } }, + { "givenName", n => { GivenName = n.GetStringValue(); } }, + { "homeAddress", n => { HomeAddress = n.GetObjectValue(global::ApiSdk.Models.PhysicalAddress.CreateFromDiscriminatorValue); } }, + { "homePhones", n => { HomePhones = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "imAddresses", n => { ImAddresses = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "initials", n => { Initials = n.GetStringValue(); } }, + { "jobTitle", n => { JobTitle = n.GetStringValue(); } }, + { "manager", n => { Manager = n.GetStringValue(); } }, + { "middleName", n => { MiddleName = n.GetStringValue(); } }, + { "mobilePhone", n => { MobilePhone = n.GetStringValue(); } }, + { "multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "nickName", n => { NickName = n.GetStringValue(); } }, + { "officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, + { "otherAddress", n => { OtherAddress = n.GetObjectValue(global::ApiSdk.Models.PhysicalAddress.CreateFromDiscriminatorValue); } }, + { "parentFolderId", n => { ParentFolderId = n.GetStringValue(); } }, + { "personalNotes", n => { PersonalNotes = n.GetStringValue(); } }, + { "photo", n => { Photo = n.GetObjectValue(global::ApiSdk.Models.ProfilePhoto.CreateFromDiscriminatorValue); } }, + { "profession", n => { Profession = n.GetStringValue(); } }, + { "singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "spouseName", n => { SpouseName = n.GetStringValue(); } }, + { "surname", n => { Surname = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "yomiCompanyName", n => { YomiCompanyName = n.GetStringValue(); } }, + { "yomiGivenName", n => { YomiGivenName = n.GetStringValue(); } }, + { "yomiSurname", n => { YomiSurname = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assistantName", AssistantName); writer.WriteDateTimeOffsetValue("birthday", Birthday); - writer.WriteObjectValue("businessAddress", BusinessAddress); + writer.WriteObjectValue("businessAddress", BusinessAddress); writer.WriteStringValue("businessHomePage", BusinessHomePage); writer.WriteCollectionOfPrimitiveValues("businessPhones", BusinessPhones); writer.WriteCollectionOfPrimitiveValues("children", Children); writer.WriteStringValue("companyName", CompanyName); writer.WriteStringValue("department", Department); writer.WriteStringValue("displayName", DisplayName); - writer.WriteCollectionOfObjectValues("emailAddresses", EmailAddresses); - writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteCollectionOfObjectValues("emailAddresses", EmailAddresses); + writer.WriteCollectionOfObjectValues("extensions", Extensions); writer.WriteStringValue("fileAs", FileAs); writer.WriteStringValue("generation", Generation); writer.WriteStringValue("givenName", GivenName); - writer.WriteObjectValue("homeAddress", HomeAddress); + writer.WriteObjectValue("homeAddress", HomeAddress); writer.WriteCollectionOfPrimitiveValues("homePhones", HomePhones); writer.WriteCollectionOfPrimitiveValues("imAddresses", ImAddresses); writer.WriteStringValue("initials", Initials); @@ -377,15 +389,15 @@ public class Contact : OutlookItem, IParsable { writer.WriteStringValue("manager", Manager); writer.WriteStringValue("middleName", MiddleName); writer.WriteStringValue("mobilePhone", MobilePhone); - writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); + writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); writer.WriteStringValue("nickName", NickName); writer.WriteStringValue("officeLocation", OfficeLocation); - writer.WriteObjectValue("otherAddress", OtherAddress); + writer.WriteObjectValue("otherAddress", OtherAddress); writer.WriteStringValue("parentFolderId", ParentFolderId); writer.WriteStringValue("personalNotes", PersonalNotes); - writer.WriteObjectValue("photo", Photo); + writer.WriteObjectValue("photo", Photo); writer.WriteStringValue("profession", Profession); - writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); + writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); writer.WriteStringValue("spouseName", SpouseName); writer.WriteStringValue("surname", Surname); writer.WriteStringValue("title", Title); @@ -395,3 +407,4 @@ public class Contact : OutlookItem, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ContactFolder.cs b/src/sample/generated/Models/ContactFolder.cs index ae81a49d..fd3164e0 100644 --- a/src/sample/generated/Models/ContactFolder.cs +++ b/src/sample/generated/Models/ContactFolder.cs @@ -1,26 +1,32 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ContactFolder : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContactFolder : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The collection of child folders in the folder. Navigation property. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ChildFolders { get; set; } + public List? ChildFolders { get; set; } #nullable restore #else - public List ChildFolders { get; set; } + public List ChildFolders { get; set; } #endif /// The contacts in the folder. Navigation property. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Contacts { get; set; } + public List? Contacts { get; set; } #nullable restore #else - public List Contacts { get; set; } + public List Contacts { get; set; } #endif /// The folder's display name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,10 +39,10 @@ public class ContactFolder : Entity, IParsable { /// The collection of multi-value extended properties defined for the contactFolder. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MultiValueExtendedProperties { get; set; } + public List? MultiValueExtendedProperties { get; set; } #nullable restore #else - public List MultiValueExtendedProperties { get; set; } + public List MultiValueExtendedProperties { get; set; } #endif /// The ID of the folder's parent folder. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -49,45 +55,52 @@ public class ContactFolder : Entity, IParsable { /// The collection of single-value extended properties defined for the contactFolder. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SingleValueExtendedProperties { get; set; } + public List? SingleValueExtendedProperties { get; set; } #nullable restore #else - public List SingleValueExtendedProperties { get; set; } + public List SingleValueExtendedProperties { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ContactFolder CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ContactFolder CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ContactFolder(); + return new global::ApiSdk.Models.ContactFolder(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"childFolders", n => { ChildFolders = n.GetCollectionOfObjectValues(ContactFolder.CreateFromDiscriminatorValue)?.ToList(); } }, - {"contacts", n => { Contacts = n.GetCollectionOfObjectValues(Contact.CreateFromDiscriminatorValue)?.ToList(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"parentFolderId", n => { ParentFolderId = n.GetStringValue(); } }, - {"singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "childFolders", n => { ChildFolders = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ContactFolder.CreateFromDiscriminatorValue)?.AsList(); } }, + { "contacts", n => { Contacts = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Contact.CreateFromDiscriminatorValue)?.AsList(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "parentFolderId", n => { ParentFolderId = n.GetStringValue(); } }, + { "singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("childFolders", ChildFolders); - writer.WriteCollectionOfObjectValues("contacts", Contacts); + writer.WriteCollectionOfObjectValues("childFolders", ChildFolders); + writer.WriteCollectionOfObjectValues("contacts", Contacts); writer.WriteStringValue("displayName", DisplayName); - writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); + writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); writer.WriteStringValue("parentFolderId", ParentFolderId); - writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); + writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ContainerFilter.cs b/src/sample/generated/Models/ContainerFilter.cs index 25a94707..d20ac2c3 100644 --- a/src/sample/generated/Models/ContainerFilter.cs +++ b/src/sample/generated/Models/ContainerFilter.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ContainerFilter : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContainerFilter : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The includedContainers property @@ -17,35 +23,43 @@ public class ContainerFilter : IAdditionalDataHolder, IParsable { public List IncludedContainers { get; set; } #endif /// - /// Instantiates a new containerFilter and sets the default values. + /// Instantiates a new and sets the default values. /// - public ContainerFilter() { + public ContainerFilter() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ContainerFilter CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ContainerFilter CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ContainerFilter(); + return new global::ApiSdk.Models.ContainerFilter(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"includedContainers", n => { IncludedContainers = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "includedContainers", n => { IncludedContainers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("includedContainers", IncludedContainers); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ContentApprovalStatusColumn.cs b/src/sample/generated/Models/ContentApprovalStatusColumn.cs index 3623e04d..fd80601e 100644 --- a/src/sample/generated/Models/ContentApprovalStatusColumn.cs +++ b/src/sample/generated/Models/ContentApprovalStatusColumn.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ContentApprovalStatusColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContentApprovalStatusColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new contentApprovalStatusColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public ContentApprovalStatusColumn() { + public ContentApprovalStatusColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ContentApprovalStatusColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ContentApprovalStatusColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ContentApprovalStatusColumn(); + return new global::ApiSdk.Models.ContentApprovalStatusColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ContentType.cs b/src/sample/generated/Models/ContentType.cs index 90813466..7874f3b1 100644 --- a/src/sample/generated/Models/ContentType.cs +++ b/src/sample/generated/Models/ContentType.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ContentType : Entity, IParsable { - /// List of canonical URLs for hub sites with which this content type is associated to. This will contain all hub sites where this content type is queued to be enforced or is already enforced. Enforcing a content type means that the content type will be applied to the lists in the enforced sites. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContentType : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// List of canonical URLs for hub sites with which this content type is associated to. This will contain all hub sites where this content type is queued to be enforced or is already enforced. Enforcing a content type means that the content type is applied to the lists in the enforced sites. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? AssociatedHubsUrls { get; set; } @@ -17,42 +23,42 @@ public class ContentType : Entity, IParsable { /// The base property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ContentType? Base { get; set; } + public global::ApiSdk.Models.ContentType? Base { get; set; } #nullable restore #else - public ContentType Base { get; set; } + public global::ApiSdk.Models.ContentType Base { get; set; } #endif /// The collection of content types that are ancestors of this content type. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? BaseTypes { get; set; } + public List? BaseTypes { get; set; } #nullable restore #else - public List BaseTypes { get; set; } + public List BaseTypes { get; set; } #endif /// The collection of columns that are required by this content type. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ColumnLinks { get; set; } + public List? ColumnLinks { get; set; } #nullable restore #else - public List ColumnLinks { get; set; } + public List ColumnLinks { get; set; } #endif /// Column order information in a content type. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ColumnPositions { get; set; } + public List? ColumnPositions { get; set; } #nullable restore #else - public List ColumnPositions { get; set; } + public List ColumnPositions { get; set; } #endif - /// The collection of column definitions for this contentType. + /// The collection of column definitions for this content type. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Columns { get; set; } + public List? Columns { get; set; } #nullable restore #else - public List Columns { get; set; } + public List Columns { get; set; } #endif /// The descriptive text for the item. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -65,18 +71,18 @@ public class ContentType : Entity, IParsable { /// The documentSet property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.DocumentSet? DocumentSet { get; set; } + public global::ApiSdk.Models.DocumentSet? DocumentSet { get; set; } #nullable restore #else - public ApiSdk.Models.DocumentSet DocumentSet { get; set; } + public global::ApiSdk.Models.DocumentSet DocumentSet { get; set; } #endif /// The documentTemplate property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DocumentSetContent? DocumentTemplate { get; set; } + public global::ApiSdk.Models.DocumentSetContent? DocumentTemplate { get; set; } #nullable restore #else - public DocumentSetContent DocumentTemplate { get; set; } + public global::ApiSdk.Models.DocumentSetContent DocumentTemplate { get; set; } #endif /// The name of the group this content type belongs to. Helps organize related content types. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -91,10 +97,10 @@ public class ContentType : Entity, IParsable { /// The inheritedFrom property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemReference? InheritedFrom { get; set; } + public global::ApiSdk.Models.ItemReference? InheritedFrom { get; set; } #nullable restore #else - public ItemReference InheritedFrom { get; set; } + public global::ApiSdk.Models.ItemReference InheritedFrom { get; set; } #endif /// Specifies if a content type is a built-in content type. public bool? IsBuiltIn { get; set; } @@ -109,10 +115,10 @@ public class ContentType : Entity, IParsable { /// The order property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ContentTypeOrder? Order { get; set; } + public global::ApiSdk.Models.ContentTypeOrder? Order { get; set; } #nullable restore #else - public ContentTypeOrder Order { get; set; } + public global::ApiSdk.Models.ContentTypeOrder Order { get; set; } #endif /// The unique identifier of the content type. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -122,7 +128,7 @@ public class ContentType : Entity, IParsable { #else public string ParentId { get; set; } #endif - /// If true, any changes made to the content type will be pushed to inherited content types and lists that implement the content type. + /// If true, any changes made to the content type are pushed to inherited content types and lists that implement the content type. public bool? PropagateChanges { get; set; } /// If true, the content type can't be modified unless this value is first set to false. public bool? ReadOnly { get; set; } @@ -131,59 +137,65 @@ public class ContentType : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ContentType CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ContentType CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ContentType(); + return new global::ApiSdk.Models.ContentType(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"associatedHubsUrls", n => { AssociatedHubsUrls = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"base", n => { Base = n.GetObjectValue(ContentType.CreateFromDiscriminatorValue); } }, - {"baseTypes", n => { BaseTypes = n.GetCollectionOfObjectValues(ContentType.CreateFromDiscriminatorValue)?.ToList(); } }, - {"columnLinks", n => { ColumnLinks = n.GetCollectionOfObjectValues(ColumnLink.CreateFromDiscriminatorValue)?.ToList(); } }, - {"columnPositions", n => { ColumnPositions = n.GetCollectionOfObjectValues(ColumnDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"columns", n => { Columns = n.GetCollectionOfObjectValues(ColumnDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"documentSet", n => { DocumentSet = n.GetObjectValue(ApiSdk.Models.DocumentSet.CreateFromDiscriminatorValue); } }, - {"documentTemplate", n => { DocumentTemplate = n.GetObjectValue(DocumentSetContent.CreateFromDiscriminatorValue); } }, - {"group", n => { Group = n.GetStringValue(); } }, - {"hidden", n => { Hidden = n.GetBoolValue(); } }, - {"inheritedFrom", n => { InheritedFrom = n.GetObjectValue(ItemReference.CreateFromDiscriminatorValue); } }, - {"isBuiltIn", n => { IsBuiltIn = n.GetBoolValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"order", n => { Order = n.GetObjectValue(ContentTypeOrder.CreateFromDiscriminatorValue); } }, - {"parentId", n => { ParentId = n.GetStringValue(); } }, - {"propagateChanges", n => { PropagateChanges = n.GetBoolValue(); } }, - {"readOnly", n => { ReadOnly = n.GetBoolValue(); } }, - {"sealed", n => { Sealed = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "associatedHubsUrls", n => { AssociatedHubsUrls = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "base", n => { Base = n.GetObjectValue(global::ApiSdk.Models.ContentType.CreateFromDiscriminatorValue); } }, + { "baseTypes", n => { BaseTypes = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ContentType.CreateFromDiscriminatorValue)?.AsList(); } }, + { "columnLinks", n => { ColumnLinks = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ColumnLink.CreateFromDiscriminatorValue)?.AsList(); } }, + { "columnPositions", n => { ColumnPositions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ColumnDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "columns", n => { Columns = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ColumnDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "documentSet", n => { DocumentSet = n.GetObjectValue(global::ApiSdk.Models.DocumentSet.CreateFromDiscriminatorValue); } }, + { "documentTemplate", n => { DocumentTemplate = n.GetObjectValue(global::ApiSdk.Models.DocumentSetContent.CreateFromDiscriminatorValue); } }, + { "group", n => { Group = n.GetStringValue(); } }, + { "hidden", n => { Hidden = n.GetBoolValue(); } }, + { "inheritedFrom", n => { InheritedFrom = n.GetObjectValue(global::ApiSdk.Models.ItemReference.CreateFromDiscriminatorValue); } }, + { "isBuiltIn", n => { IsBuiltIn = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "order", n => { Order = n.GetObjectValue(global::ApiSdk.Models.ContentTypeOrder.CreateFromDiscriminatorValue); } }, + { "parentId", n => { ParentId = n.GetStringValue(); } }, + { "propagateChanges", n => { PropagateChanges = n.GetBoolValue(); } }, + { "readOnly", n => { ReadOnly = n.GetBoolValue(); } }, + { "sealed", n => { Sealed = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("associatedHubsUrls", AssociatedHubsUrls); - writer.WriteObjectValue("base", Base); - writer.WriteCollectionOfObjectValues("baseTypes", BaseTypes); - writer.WriteCollectionOfObjectValues("columnLinks", ColumnLinks); - writer.WriteCollectionOfObjectValues("columnPositions", ColumnPositions); - writer.WriteCollectionOfObjectValues("columns", Columns); + writer.WriteObjectValue("base", Base); + writer.WriteCollectionOfObjectValues("baseTypes", BaseTypes); + writer.WriteCollectionOfObjectValues("columnLinks", ColumnLinks); + writer.WriteCollectionOfObjectValues("columnPositions", ColumnPositions); + writer.WriteCollectionOfObjectValues("columns", Columns); writer.WriteStringValue("description", Description); - writer.WriteObjectValue("documentSet", DocumentSet); - writer.WriteObjectValue("documentTemplate", DocumentTemplate); + writer.WriteObjectValue("documentSet", DocumentSet); + writer.WriteObjectValue("documentTemplate", DocumentTemplate); writer.WriteStringValue("group", Group); writer.WriteBoolValue("hidden", Hidden); - writer.WriteObjectValue("inheritedFrom", InheritedFrom); + writer.WriteObjectValue("inheritedFrom", InheritedFrom); writer.WriteBoolValue("isBuiltIn", IsBuiltIn); writer.WriteStringValue("name", Name); - writer.WriteObjectValue("order", Order); + writer.WriteObjectValue("order", Order); writer.WriteStringValue("parentId", ParentId); writer.WriteBoolValue("propagateChanges", PropagateChanges); writer.WriteBoolValue("readOnly", ReadOnly); @@ -191,3 +203,4 @@ public class ContentType : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ContentTypeInfo.cs b/src/sample/generated/Models/ContentTypeInfo.cs index 94b81f75..49a8619b 100644 --- a/src/sample/generated/Models/ContentTypeInfo.cs +++ b/src/sample/generated/Models/ContentTypeInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ContentTypeInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContentTypeInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The ID of the content type. @@ -25,33 +31,40 @@ public class ContentTypeInfo : IAdditionalDataHolder, IParsable { public string Name { get; set; } #endif /// - /// Instantiates a new contentTypeInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public ContentTypeInfo() { + public ContentTypeInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ContentTypeInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ContentTypeInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ContentTypeInfo(); + return new global::ApiSdk.Models.ContentTypeInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"id", n => { Id = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("name", Name); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ContentTypeOrder.cs b/src/sample/generated/Models/ContentTypeOrder.cs index 115bd00e..c258f152 100644 --- a/src/sample/generated/Models/ContentTypeOrder.cs +++ b/src/sample/generated/Models/ContentTypeOrder.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ContentTypeOrder : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ContentTypeOrder : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Indicates whether this is the default content type @@ -13,33 +19,40 @@ public class ContentTypeOrder : IAdditionalDataHolder, IParsable { /// Specifies the position in which the content type appears in the selection UI. public int? Position { get; set; } /// - /// Instantiates a new contentTypeOrder and sets the default values. + /// Instantiates a new and sets the default values. /// - public ContentTypeOrder() { + public ContentTypeOrder() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ContentTypeOrder CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ContentTypeOrder CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ContentTypeOrder(); + return new global::ApiSdk.Models.ContentTypeOrder(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"default", n => { Default = n.GetBoolValue(); } }, - {"position", n => { Position = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "default", n => { Default = n.GetBoolValue(); } }, + { "position", n => { Position = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("default", Default); writer.WriteIntValue("position", Position); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Conversation.cs b/src/sample/generated/Models/Conversation.cs index d93c2cbd..85e13bca 100644 --- a/src/sample/generated/Models/Conversation.cs +++ b/src/sample/generated/Models/Conversation.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Conversation : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Conversation : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Indicates whether any of the posts within this Conversation has at least one attachment. Supports $filter (eq, ne) and $search. public bool? HasAttachments { get; set; } /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z @@ -21,10 +27,10 @@ public class Conversation : Entity, IParsable { /// A collection of all the conversation threads in the conversation. A navigation property. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Threads { get; set; } + public List? Threads { get; set; } #nullable restore #else - public List Threads { get; set; } + public List Threads { get; set; } #endif /// The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -45,37 +51,44 @@ public class Conversation : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Conversation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Conversation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Conversation(); + return new global::ApiSdk.Models.Conversation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, - {"lastDeliveredDateTime", n => { LastDeliveredDateTime = n.GetDateTimeOffsetValue(); } }, - {"preview", n => { Preview = n.GetStringValue(); } }, - {"threads", n => { Threads = n.GetCollectionOfObjectValues(ConversationThread.CreateFromDiscriminatorValue)?.ToList(); } }, - {"topic", n => { Topic = n.GetStringValue(); } }, - {"uniqueSenders", n => { UniqueSenders = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, + { "lastDeliveredDateTime", n => { LastDeliveredDateTime = n.GetDateTimeOffsetValue(); } }, + { "preview", n => { Preview = n.GetStringValue(); } }, + { "threads", n => { Threads = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ConversationThread.CreateFromDiscriminatorValue)?.AsList(); } }, + { "topic", n => { Topic = n.GetStringValue(); } }, + { "uniqueSenders", n => { UniqueSenders = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("hasAttachments", HasAttachments); writer.WriteDateTimeOffsetValue("lastDeliveredDateTime", LastDeliveredDateTime); writer.WriteStringValue("preview", Preview); - writer.WriteCollectionOfObjectValues("threads", Threads); + writer.WriteCollectionOfObjectValues("threads", Threads); writer.WriteStringValue("topic", Topic); writer.WriteCollectionOfPrimitiveValues("uniqueSenders", UniqueSenders); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ConversationMember.cs b/src/sample/generated/Models/ConversationMember.cs index d4d1aa1c..0ccbaca0 100644 --- a/src/sample/generated/Models/ConversationMember.cs +++ b/src/sample/generated/Models/ConversationMember.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ConversationMember : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConversationMember : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The display name of the user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -27,26 +33,32 @@ public class ConversationMember : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ConversationMember(); + return new global::ApiSdk.Models.ConversationMember(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"roles", n => { Roles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"visibleHistoryStartDateTime", n => { VisibleHistoryStartDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "roles", n => { Roles = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "visibleHistoryStartDateTime", n => { VisibleHistoryStartDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); @@ -55,3 +67,4 @@ public class ConversationMember : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ConversationThread.cs b/src/sample/generated/Models/ConversationThread.cs index 2f683c96..28949a4d 100644 --- a/src/sample/generated/Models/ConversationThread.cs +++ b/src/sample/generated/Models/ConversationThread.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ConversationThread : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ConversationThread : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The Cc: recipients for the thread. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CcRecipients { get; set; } + public List? CcRecipients { get; set; } #nullable restore #else - public List CcRecipients { get; set; } + public List CcRecipients { get; set; } #endif /// Indicates whether any of the posts within this thread has at least one attachment. Returned by default. public bool? HasAttachments { get; set; } @@ -23,10 +29,10 @@ public class ConversationThread : Entity, IParsable { /// The posts property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Posts { get; set; } + public List? Posts { get; set; } #nullable restore #else - public List Posts { get; set; } + public List Posts { get; set; } #endif /// A short summary from the body of the latest post in this conversation. Returned by default. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -47,10 +53,10 @@ public class ConversationThread : Entity, IParsable { /// The To: recipients for the thread. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ToRecipients { get; set; } + public List? ToRecipients { get; set; } #nullable restore #else - public List ToRecipients { get; set; } + public List ToRecipients { get; set; } #endif /// All the users that sent a message to this thread. Returned by default. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -63,43 +69,50 @@ public class ConversationThread : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ConversationThread CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ConversationThread CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ConversationThread(); + return new global::ApiSdk.Models.ConversationThread(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"ccRecipients", n => { CcRecipients = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, - {"isLocked", n => { IsLocked = n.GetBoolValue(); } }, - {"lastDeliveredDateTime", n => { LastDeliveredDateTime = n.GetDateTimeOffsetValue(); } }, - {"posts", n => { Posts = n.GetCollectionOfObjectValues(Post.CreateFromDiscriminatorValue)?.ToList(); } }, - {"preview", n => { Preview = n.GetStringValue(); } }, - {"toRecipients", n => { ToRecipients = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"topic", n => { Topic = n.GetStringValue(); } }, - {"uniqueSenders", n => { UniqueSenders = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "ccRecipients", n => { CcRecipients = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, + { "isLocked", n => { IsLocked = n.GetBoolValue(); } }, + { "lastDeliveredDateTime", n => { LastDeliveredDateTime = n.GetDateTimeOffsetValue(); } }, + { "posts", n => { Posts = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Post.CreateFromDiscriminatorValue)?.AsList(); } }, + { "preview", n => { Preview = n.GetStringValue(); } }, + { "toRecipients", n => { ToRecipients = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "topic", n => { Topic = n.GetStringValue(); } }, + { "uniqueSenders", n => { UniqueSenders = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("ccRecipients", CcRecipients); + writer.WriteCollectionOfObjectValues("ccRecipients", CcRecipients); writer.WriteBoolValue("hasAttachments", HasAttachments); writer.WriteBoolValue("isLocked", IsLocked); writer.WriteDateTimeOffsetValue("lastDeliveredDateTime", LastDeliveredDateTime); - writer.WriteCollectionOfObjectValues("posts", Posts); + writer.WriteCollectionOfObjectValues("posts", Posts); writer.WriteStringValue("preview", Preview); writer.WriteStringValue("topic", Topic); - writer.WriteCollectionOfObjectValues("toRecipients", ToRecipients); + writer.WriteCollectionOfObjectValues("toRecipients", ToRecipients); writer.WriteCollectionOfPrimitiveValues("uniqueSenders", UniqueSenders); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CourseStatus.cs b/src/sample/generated/Models/CourseStatus.cs index f6ce0818..7266a8d6 100644 --- a/src/sample/generated/Models/CourseStatus.cs +++ b/src/sample/generated/Models/CourseStatus.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum CourseStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum CourseStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "notStarted")] + #pragma warning disable CS1591 NotStarted, + #pragma warning restore CS1591 [EnumMember(Value = "inProgress")] + #pragma warning disable CS1591 InProgress, + #pragma warning restore CS1591 [EnumMember(Value = "completed")] + #pragma warning disable CS1591 Completed, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/CurrencyColumn.cs b/src/sample/generated/Models/CurrencyColumn.cs index 2a161b06..e2fcc23d 100644 --- a/src/sample/generated/Models/CurrencyColumn.cs +++ b/src/sample/generated/Models/CurrencyColumn.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class CurrencyColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CurrencyColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Specifies the locale from which to infer the currency symbol. @@ -17,35 +23,43 @@ public class CurrencyColumn : IAdditionalDataHolder, IParsable { public string Locale { get; set; } #endif /// - /// Instantiates a new currencyColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public CurrencyColumn() { + public CurrencyColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static CurrencyColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.CurrencyColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CurrencyColumn(); + return new global::ApiSdk.Models.CurrencyColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"locale", n => { Locale = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "locale", n => { Locale = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("locale", Locale); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CustomAppManagementConfiguration.cs b/src/sample/generated/Models/CustomAppManagementConfiguration.cs new file mode 100644 index 00000000..2921ca23 --- /dev/null +++ b/src/sample/generated/Models/CustomAppManagementConfiguration.cs @@ -0,0 +1,46 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CustomAppManagementConfiguration : global::ApiSdk.Models.AppManagementConfiguration, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.CustomAppManagementConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.CustomAppManagementConfiguration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/CustomSecurityAttributeValue.cs b/src/sample/generated/Models/CustomSecurityAttributeValue.cs index 45184c02..d2c58fb9 100644 --- a/src/sample/generated/Models/CustomSecurityAttributeValue.cs +++ b/src/sample/generated/Models/CustomSecurityAttributeValue.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class CustomSecurityAttributeValue : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CustomSecurityAttributeValue : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new customSecurityAttributeValue and sets the default values. + /// Instantiates a new and sets the default values. /// - public CustomSecurityAttributeValue() { + public CustomSecurityAttributeValue() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static CustomSecurityAttributeValue CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.CustomSecurityAttributeValue CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new CustomSecurityAttributeValue(); + return new global::ApiSdk.Models.CustomSecurityAttributeValue(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DateTimeColumn.cs b/src/sample/generated/Models/DateTimeColumn.cs index 819b72a9..590e2bbe 100644 --- a/src/sample/generated/Models/DateTimeColumn.cs +++ b/src/sample/generated/Models/DateTimeColumn.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DateTimeColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DateTimeColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// How the value should be presented in the UX. Must be one of default, friendly, or standard. See below for more details. If unspecified, treated as default. @@ -25,33 +31,40 @@ public class DateTimeColumn : IAdditionalDataHolder, IParsable { public string Format { get; set; } #endif /// - /// Instantiates a new dateTimeColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public DateTimeColumn() { + public DateTimeColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DateTimeColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DateTimeColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DateTimeColumn(); + return new global::ApiSdk.Models.DateTimeColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"displayAs", n => { DisplayAs = n.GetStringValue(); } }, - {"format", n => { Format = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "displayAs", n => { DisplayAs = n.GetStringValue(); } }, + { "format", n => { Format = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayAs", DisplayAs); writer.WriteStringValue("format", Format); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DateTimeTimeZone.cs b/src/sample/generated/Models/DateTimeTimeZone.cs index 1b118872..b6762be0 100644 --- a/src/sample/generated/Models/DateTimeTimeZone.cs +++ b/src/sample/generated/Models/DateTimeTimeZone.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DateTimeTimeZone : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DateTimeTimeZone : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A single point of time in a combined date and time representation ({date}T{time}; for example, 2017-08-29T04:00:00.0000000). @@ -25,33 +31,40 @@ public class DateTimeTimeZone : IAdditionalDataHolder, IParsable { public string TimeZone { get; set; } #endif /// - /// Instantiates a new dateTimeTimeZone and sets the default values. + /// Instantiates a new and sets the default values. /// - public DateTimeTimeZone() { + public DateTimeTimeZone() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DateTimeTimeZone CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DateTimeTimeZone CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DateTimeTimeZone(); + return new global::ApiSdk.Models.DateTimeTimeZone(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"dateTime", n => { DateTime = n.GetStringValue(); } }, - {"timeZone", n => { TimeZone = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dateTime", n => { DateTime = n.GetStringValue(); } }, + { "timeZone", n => { TimeZone = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dateTime", DateTime); writer.WriteStringValue("timeZone", TimeZone); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DayOfWeekObject.cs b/src/sample/generated/Models/DayOfWeekObject.cs index 5c940c8f..6d30ee94 100644 --- a/src/sample/generated/Models/DayOfWeekObject.cs +++ b/src/sample/generated/Models/DayOfWeekObject.cs @@ -1,21 +1,40 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum DayOfWeekObject { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum DayOfWeekObject + #pragma warning restore CS1591 + { [EnumMember(Value = "sunday")] + #pragma warning disable CS1591 Sunday, + #pragma warning restore CS1591 [EnumMember(Value = "monday")] + #pragma warning disable CS1591 Monday, + #pragma warning restore CS1591 [EnumMember(Value = "tuesday")] + #pragma warning disable CS1591 Tuesday, + #pragma warning restore CS1591 [EnumMember(Value = "wednesday")] + #pragma warning disable CS1591 Wednesday, + #pragma warning restore CS1591 [EnumMember(Value = "thursday")] + #pragma warning disable CS1591 Thursday, + #pragma warning restore CS1591 [EnumMember(Value = "friday")] + #pragma warning disable CS1591 Friday, + #pragma warning restore CS1591 [EnumMember(Value = "saturday")] + #pragma warning disable CS1591 Saturday, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/DefaultColumnValue.cs b/src/sample/generated/Models/DefaultColumnValue.cs index 81aff91e..43f8322a 100644 --- a/src/sample/generated/Models/DefaultColumnValue.cs +++ b/src/sample/generated/Models/DefaultColumnValue.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DefaultColumnValue : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DefaultColumnValue : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The formula used to compute the default value for the column. @@ -25,33 +31,40 @@ public class DefaultColumnValue : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new defaultColumnValue and sets the default values. + /// Instantiates a new and sets the default values. /// - public DefaultColumnValue() { + public DefaultColumnValue() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DefaultColumnValue CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DefaultColumnValue CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DefaultColumnValue(); + return new global::ApiSdk.Models.DefaultColumnValue(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"formula", n => { Formula = n.GetStringValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "formula", n => { Formula = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("formula", Formula); writer.WriteStringValue("value", Value); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DelegateMeetingMessageDeliveryOptions.cs b/src/sample/generated/Models/DelegateMeetingMessageDeliveryOptions.cs index 59402e72..88a3a87d 100644 --- a/src/sample/generated/Models/DelegateMeetingMessageDeliveryOptions.cs +++ b/src/sample/generated/Models/DelegateMeetingMessageDeliveryOptions.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum DelegateMeetingMessageDeliveryOptions { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum DelegateMeetingMessageDeliveryOptions + #pragma warning restore CS1591 + { [EnumMember(Value = "sendToDelegateAndInformationToPrincipal")] + #pragma warning disable CS1591 SendToDelegateAndInformationToPrincipal, + #pragma warning restore CS1591 [EnumMember(Value = "sendToDelegateAndPrincipal")] + #pragma warning disable CS1591 SendToDelegateAndPrincipal, + #pragma warning restore CS1591 [EnumMember(Value = "sendToDelegateOnly")] + #pragma warning disable CS1591 SendToDelegateOnly, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/DelegatedPermissionClassification.cs b/src/sample/generated/Models/DelegatedPermissionClassification.cs index 0ef7f10e..5708aa7a 100644 --- a/src/sample/generated/Models/DelegatedPermissionClassification.cs +++ b/src/sample/generated/Models/DelegatedPermissionClassification.cs @@ -1,13 +1,19 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DelegatedPermissionClassification : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DelegatedPermissionClassification : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The classification property - public PermissionClassificationType? Classification { get; set; } + public global::ApiSdk.Models.PermissionClassificationType? Classification { get; set; } /// The unique identifier (id) for the delegated permission listed in the oauth2PermissionScopes collection of the servicePrincipal. Required on create. Doesn't support $filter. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -27,31 +33,38 @@ public class DelegatedPermissionClassification : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DelegatedPermissionClassification CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DelegatedPermissionClassification CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DelegatedPermissionClassification(); + return new global::ApiSdk.Models.DelegatedPermissionClassification(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"classification", n => { Classification = n.GetEnumValue(); } }, - {"permissionId", n => { PermissionId = n.GetStringValue(); } }, - {"permissionName", n => { PermissionName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "classification", n => { Classification = n.GetEnumValue(); } }, + { "permissionId", n => { PermissionId = n.GetStringValue(); } }, + { "permissionName", n => { PermissionName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("classification", Classification); + writer.WriteEnumValue("classification", Classification); writer.WriteStringValue("permissionId", PermissionId); writer.WriteStringValue("permissionName", PermissionName); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Deleted.cs b/src/sample/generated/Models/Deleted.cs index 08373282..2e727683 100644 --- a/src/sample/generated/Models/Deleted.cs +++ b/src/sample/generated/Models/Deleted.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Deleted : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Deleted : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Represents the state of the deleted item. @@ -17,35 +23,43 @@ public class Deleted : IAdditionalDataHolder, IParsable { public string State { get; set; } #endif /// - /// Instantiates a new deleted and sets the default values. + /// Instantiates a new and sets the default values. /// - public Deleted() { + public Deleted() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Deleted CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Deleted CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Deleted(); + return new global::ApiSdk.Models.Deleted(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"state", n => { State = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "state", n => { State = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("state", State); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Device.cs b/src/sample/generated/Models/Device.cs index c6cbabb3..a03f2ceb 100644 --- a/src/sample/generated/Models/Device.cs +++ b/src/sample/generated/Models/Device.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Device : DirectoryObject, IParsable { - /// true if the account is enabled; otherwise, false. Required. Default is true. Supports $filter (eq, ne, not, in). Only callers in Global Administrator and Cloud Device Administrator roles can set this property. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Device : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { + /// true if the account is enabled; otherwise, false. Required. Default is true. Supports $filter (eq, ne, not, in). Only callers with at least the Cloud Device Administrator role can set this property. public bool? AccountEnabled { get; set; } /// For internal use only. Not nullable. Supports $filter (eq, not, ge, le). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AlternativeSecurityIds { get; set; } + public List? AlternativeSecurityIds { get; set; } #nullable restore #else - public List AlternativeSecurityIds { get; set; } + public List AlternativeSecurityIds { get; set; } #endif /// The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderby. public DateTimeOffset? ApproximateLastSignInDateTime { get; set; } @@ -28,7 +34,7 @@ public class Device : DirectoryObject, IParsable { #else public string DeviceCategory { get; set; } #endif - /// Unique identifier set by Azure Device Registration Service at the time of registration. This is an alternate key that can be used to reference the device object. Supports $filter (eq, ne, not, startsWith). + /// Unique identifier set by Azure Device Registration Service at the time of registration. This alternate key can be used to reference the device object. Supports $filter (eq, ne, not, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DeviceId { get; set; } @@ -44,7 +50,7 @@ public class Device : DirectoryObject, IParsable { #else public string DeviceMetadata { get; set; } #endif - /// Ownership of the device. This property is set by Intune. Possible values are: unknown, company, personal. + /// Ownership of the device. Intune sets this property. Possible values are: unknown, company, personal. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DeviceOwnership { get; set; } @@ -69,19 +75,47 @@ public class Device : DirectoryObject, IParsable { #nullable restore #else public string EnrollmentProfileName { get; set; } +#endif + /// Enrollment type of the device. Intune sets this property. Possible values are: unknown, userEnrollment, deviceEnrollmentManager, appleBulkWithUser, appleBulkWithoutUser, windowsAzureADJoin, windowsBulkUserless, windowsAutoEnrollment, windowsBulkAzureDomainJoin, windowsCoManagement, windowsAzureADJoinUsingDeviceAuth,appleUserEnrollment, appleUserEnrollmentWithServiceAccount. NOTE: This property might return other values apart from those listed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnrollmentType { get; set; } +#nullable restore +#else + public string EnrollmentType { get; set; } #endif /// The collection of open extensions defined for the device. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif /// true if the device complies with Mobile Device Management (MDM) policies; otherwise, false. Read-only. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). public bool? IsCompliant { get; set; } /// true if the device is managed by a Mobile Device Management (MDM) app; otherwise, false. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). public bool? IsManaged { get; set; } + /// The isManagementRestricted property + public bool? IsManagementRestricted { get; set; } + /// true if the device is rooted or jail-broken. This property can only be updated by Intune. + public bool? IsRooted { get; set; } + /// The management channel of the device. This property is set by Intune. Possible values are: eas, mdm, easMdm, intuneClient, easIntuneClient, configurationManagerClient, configurationManagerClientMdm, configurationManagerClientMdmEas, unknown, jamf, googleCloudDevicePolicyController. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ManagementType { get; set; } +#nullable restore +#else + public string ManagementType { get; set; } +#endif + /// Manufacturer of the device. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Manufacturer { get; set; } +#nullable restore +#else + public string Manufacturer { get; set; } +#endif /// Application identifier used to register device into MDM. Read-only. Supports $filter (eq, ne, not, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -93,13 +127,29 @@ public class Device : DirectoryObject, IParsable { /// Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MemberOf { get; set; } + public List? MemberOf { get; set; } +#nullable restore +#else + public List MemberOf { get; set; } +#endif + /// Model of the device. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Model { get; set; } #nullable restore #else - public List MemberOf { get; set; } + public string Model { get; set; } #endif /// The last time at which the object was synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z Read-only. Supports $filter (eq, ne, not, ge, le, in). public DateTimeOffset? OnPremisesLastSyncDateTime { get; set; } + /// The on-premises security identifier (SID) for the user who was synchronized from on-premises to the cloud. Read-only. Returned only on $select. Supports $filter (eq). +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OnPremisesSecurityIdentifier { get; set; } +#nullable restore +#else + public string OnPremisesSecurityIdentifier { get; set; } +#endif /// true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Read-only. Supports $filter (eq, ne, not, in, and eq on null values). public bool? OnPremisesSyncEnabled { get; set; } /// The type of operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values). @@ -137,18 +187,18 @@ public class Device : DirectoryObject, IParsable { /// The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? RegisteredOwners { get; set; } + public List? RegisteredOwners { get; set; } #nullable restore #else - public List RegisteredOwners { get; set; } + public List RegisteredOwners { get; set; } #endif /// Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? RegisteredUsers { get; set; } + public List? RegisteredUsers { get; set; } #nullable restore #else - public List RegisteredUsers { get; set; } + public List RegisteredUsers { get; set; } #endif /// Date and time of when the device was registered. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. public DateTimeOffset? RegistrationDateTime { get; set; } @@ -163,12 +213,12 @@ public class Device : DirectoryObject, IParsable { /// Groups and administrative units that the device is a member of. This operation is transitive. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TransitiveMemberOf { get; set; } + public List? TransitiveMemberOf { get; set; } #nullable restore #else - public List TransitiveMemberOf { get; set; } + public List TransitiveMemberOf { get; set; } #endif - /// Type of trust for the joined device. Read-only. Possible values: Workplace (indicates bring your own personal devices), AzureAd (Cloud only joined devices), ServerAd (on-premises domain joined devices joined to Azure AD). For more details, see Introduction to device management in Azure Active Directory. + /// Type of trust for the joined device. Read-only. Possible values: Workplace (indicates bring your own personal devices), AzureAd (Cloud-only joined devices), ServerAd (on-premises domain joined devices joined to Microsoft Entra ID). For more information, see Introduction to device management in Microsoft Entra ID. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TrustType { get; set; } @@ -179,55 +229,68 @@ public class Device : DirectoryObject, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Device CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Device CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Device(); + return new global::ApiSdk.Models.Device(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"accountEnabled", n => { AccountEnabled = n.GetBoolValue(); } }, - {"alternativeSecurityIds", n => { AlternativeSecurityIds = n.GetCollectionOfObjectValues(AlternativeSecurityId.CreateFromDiscriminatorValue)?.ToList(); } }, - {"approximateLastSignInDateTime", n => { ApproximateLastSignInDateTime = n.GetDateTimeOffsetValue(); } }, - {"complianceExpirationDateTime", n => { ComplianceExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"deviceCategory", n => { DeviceCategory = n.GetStringValue(); } }, - {"deviceId", n => { DeviceId = n.GetStringValue(); } }, - {"deviceMetadata", n => { DeviceMetadata = n.GetStringValue(); } }, - {"deviceOwnership", n => { DeviceOwnership = n.GetStringValue(); } }, - {"deviceVersion", n => { DeviceVersion = n.GetIntValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"enrollmentProfileName", n => { EnrollmentProfileName = n.GetStringValue(); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"isCompliant", n => { IsCompliant = n.GetBoolValue(); } }, - {"isManaged", n => { IsManaged = n.GetBoolValue(); } }, - {"mdmAppId", n => { MdmAppId = n.GetStringValue(); } }, - {"memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"onPremisesLastSyncDateTime", n => { OnPremisesLastSyncDateTime = n.GetDateTimeOffsetValue(); } }, - {"onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, - {"operatingSystem", n => { OperatingSystem = n.GetStringValue(); } }, - {"operatingSystemVersion", n => { OperatingSystemVersion = n.GetStringValue(); } }, - {"physicalIds", n => { PhysicalIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"profileType", n => { ProfileType = n.GetStringValue(); } }, - {"registeredOwners", n => { RegisteredOwners = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"registeredUsers", n => { RegisteredUsers = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"registrationDateTime", n => { RegistrationDateTime = n.GetDateTimeOffsetValue(); } }, - {"systemLabels", n => { SystemLabels = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"trustType", n => { TrustType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "accountEnabled", n => { AccountEnabled = n.GetBoolValue(); } }, + { "alternativeSecurityIds", n => { AlternativeSecurityIds = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AlternativeSecurityId.CreateFromDiscriminatorValue)?.AsList(); } }, + { "approximateLastSignInDateTime", n => { ApproximateLastSignInDateTime = n.GetDateTimeOffsetValue(); } }, + { "complianceExpirationDateTime", n => { ComplianceExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "deviceCategory", n => { DeviceCategory = n.GetStringValue(); } }, + { "deviceId", n => { DeviceId = n.GetStringValue(); } }, + { "deviceMetadata", n => { DeviceMetadata = n.GetStringValue(); } }, + { "deviceOwnership", n => { DeviceOwnership = n.GetStringValue(); } }, + { "deviceVersion", n => { DeviceVersion = n.GetIntValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "enrollmentProfileName", n => { EnrollmentProfileName = n.GetStringValue(); } }, + { "enrollmentType", n => { EnrollmentType = n.GetStringValue(); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "isCompliant", n => { IsCompliant = n.GetBoolValue(); } }, + { "isManaged", n => { IsManaged = n.GetBoolValue(); } }, + { "isManagementRestricted", n => { IsManagementRestricted = n.GetBoolValue(); } }, + { "isRooted", n => { IsRooted = n.GetBoolValue(); } }, + { "managementType", n => { ManagementType = n.GetStringValue(); } }, + { "manufacturer", n => { Manufacturer = n.GetStringValue(); } }, + { "mdmAppId", n => { MdmAppId = n.GetStringValue(); } }, + { "memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "model", n => { Model = n.GetStringValue(); } }, + { "onPremisesLastSyncDateTime", n => { OnPremisesLastSyncDateTime = n.GetDateTimeOffsetValue(); } }, + { "onPremisesSecurityIdentifier", n => { OnPremisesSecurityIdentifier = n.GetStringValue(); } }, + { "onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, + { "operatingSystem", n => { OperatingSystem = n.GetStringValue(); } }, + { "operatingSystemVersion", n => { OperatingSystemVersion = n.GetStringValue(); } }, + { "physicalIds", n => { PhysicalIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "profileType", n => { ProfileType = n.GetStringValue(); } }, + { "registeredOwners", n => { RegisteredOwners = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "registeredUsers", n => { RegisteredUsers = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "registrationDateTime", n => { RegistrationDateTime = n.GetDateTimeOffsetValue(); } }, + { "systemLabels", n => { SystemLabels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "trustType", n => { TrustType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountEnabled", AccountEnabled); - writer.WriteCollectionOfObjectValues("alternativeSecurityIds", AlternativeSecurityIds); + writer.WriteCollectionOfObjectValues("alternativeSecurityIds", AlternativeSecurityIds); writer.WriteDateTimeOffsetValue("approximateLastSignInDateTime", ApproximateLastSignInDateTime); writer.WriteDateTimeOffsetValue("complianceExpirationDateTime", ComplianceExpirationDateTime); writer.WriteStringValue("deviceCategory", DeviceCategory); @@ -237,23 +300,31 @@ public class Device : DirectoryObject, IParsable { writer.WriteIntValue("deviceVersion", DeviceVersion); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("enrollmentProfileName", EnrollmentProfileName); - writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteStringValue("enrollmentType", EnrollmentType); + writer.WriteCollectionOfObjectValues("extensions", Extensions); writer.WriteBoolValue("isCompliant", IsCompliant); writer.WriteBoolValue("isManaged", IsManaged); + writer.WriteBoolValue("isManagementRestricted", IsManagementRestricted); + writer.WriteBoolValue("isRooted", IsRooted); + writer.WriteStringValue("managementType", ManagementType); + writer.WriteStringValue("manufacturer", Manufacturer); writer.WriteStringValue("mdmAppId", MdmAppId); - writer.WriteCollectionOfObjectValues("memberOf", MemberOf); + writer.WriteCollectionOfObjectValues("memberOf", MemberOf); + writer.WriteStringValue("model", Model); writer.WriteDateTimeOffsetValue("onPremisesLastSyncDateTime", OnPremisesLastSyncDateTime); + writer.WriteStringValue("onPremisesSecurityIdentifier", OnPremisesSecurityIdentifier); writer.WriteBoolValue("onPremisesSyncEnabled", OnPremisesSyncEnabled); writer.WriteStringValue("operatingSystem", OperatingSystem); writer.WriteStringValue("operatingSystemVersion", OperatingSystemVersion); writer.WriteCollectionOfPrimitiveValues("physicalIds", PhysicalIds); writer.WriteStringValue("profileType", ProfileType); - writer.WriteCollectionOfObjectValues("registeredOwners", RegisteredOwners); - writer.WriteCollectionOfObjectValues("registeredUsers", RegisteredUsers); + writer.WriteCollectionOfObjectValues("registeredOwners", RegisteredOwners); + writer.WriteCollectionOfObjectValues("registeredUsers", RegisteredUsers); writer.WriteDateTimeOffsetValue("registrationDateTime", RegistrationDateTime); writer.WriteCollectionOfPrimitiveValues("systemLabels", SystemLabels); - writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); + writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); writer.WriteStringValue("trustType", TrustType); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceActionResult.cs b/src/sample/generated/Models/DeviceActionResult.cs index 06e370d2..8413fc9a 100644 --- a/src/sample/generated/Models/DeviceActionResult.cs +++ b/src/sample/generated/Models/DeviceActionResult.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Device action result /// - public class DeviceActionResult : IAdditionalDataHolder, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeviceActionResult : IAdditionalDataHolder, IParsable + { /// Action name #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -18,7 +22,7 @@ public class DeviceActionResult : IAdditionalDataHolder, IParsable { public string ActionName { get; set; } #endif /// State of the action on the device - public ApiSdk.Models.ActionState? ActionState { get; set; } + public global::ApiSdk.Models.ActionState? ActionState { get; set; } /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Time the action state was last updated @@ -26,41 +30,49 @@ public class DeviceActionResult : IAdditionalDataHolder, IParsable { /// Time the action was initiated public DateTimeOffset? StartDateTime { get; set; } /// - /// Instantiates a new deviceActionResult and sets the default values. + /// Instantiates a new and sets the default values. /// - public DeviceActionResult() { + public DeviceActionResult() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DeviceActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DeviceActionResult CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceActionResult(); + return new global::ApiSdk.Models.DeviceActionResult(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"actionName", n => { ActionName = n.GetStringValue(); } }, - {"actionState", n => { ActionState = n.GetEnumValue(); } }, - {"lastUpdatedDateTime", n => { LastUpdatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actionName", n => { ActionName = n.GetStringValue(); } }, + { "actionState", n => { ActionState = n.GetEnumValue(); } }, + { "lastUpdatedDateTime", n => { LastUpdatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionName", ActionName); - writer.WriteEnumValue("actionState", ActionState); + writer.WriteEnumValue("actionState", ActionState); writer.WriteDateTimeOffsetValue("lastUpdatedDateTime", LastUpdatedDateTime); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceCategory.cs b/src/sample/generated/Models/DeviceCategory.cs index c3cdcded..e2e7ad5d 100644 --- a/src/sample/generated/Models/DeviceCategory.cs +++ b/src/sample/generated/Models/DeviceCategory.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Device categories provides a way to organize your devices. Using device categories, company administrators can define their own categories that make sense to their company. These categories can then be applied to a device in the Intune Azure console or selected by a user during device enrollment. You can filter reports and create dynamic Azure Active Directory device groups based on device categories. /// - public class DeviceCategory : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeviceCategory : global::ApiSdk.Models.Entity, IParsable + { /// Optional description for the device category. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -28,25 +32,31 @@ public class DeviceCategory : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DeviceCategory CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DeviceCategory CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceCategory(); + return new global::ApiSdk.Models.DeviceCategory(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); @@ -54,3 +64,4 @@ public class DeviceCategory : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceCollectionResponse.cs b/src/sample/generated/Models/DeviceCollectionResponse.cs index c77eb6c1..13e4338d 100644 --- a/src/sample/generated/Models/DeviceCollectionResponse.cs +++ b/src/sample/generated/Models/DeviceCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DeviceCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeviceCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class DeviceCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new deviceCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public DeviceCollectionResponse() { + public DeviceCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceCollectionResponse(); + return new global::ApiSdk.Models.DeviceCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(Device.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Device.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceCompliancePolicySettingState.cs b/src/sample/generated/Models/DeviceCompliancePolicySettingState.cs index b7fac263..af25e5fc 100644 --- a/src/sample/generated/Models/DeviceCompliancePolicySettingState.cs +++ b/src/sample/generated/Models/DeviceCompliancePolicySettingState.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Device Compilance Policy Setting State for a given device. /// - public class DeviceCompliancePolicySettingState : IAdditionalDataHolder, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeviceCompliancePolicySettingState : IAdditionalDataHolder, IParsable + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Current value of setting on device @@ -56,13 +60,13 @@ public class DeviceCompliancePolicySettingState : IAdditionalDataHolder, IParsab /// Contributing policies #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Sources { get; set; } + public List? Sources { get; set; } #nullable restore #else - public List Sources { get; set; } + public List Sources { get; set; } #endif /// The state property - public ComplianceStatus? State { get; set; } + public global::ApiSdk.Models.ComplianceStatus? State { get; set; } /// UserEmail #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -96,43 +100,50 @@ public class DeviceCompliancePolicySettingState : IAdditionalDataHolder, IParsab public string UserPrincipalName { get; set; } #endif /// - /// Instantiates a new deviceCompliancePolicySettingState and sets the default values. + /// Instantiates a new and sets the default values. /// - public DeviceCompliancePolicySettingState() { + public DeviceCompliancePolicySettingState() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DeviceCompliancePolicySettingState CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DeviceCompliancePolicySettingState CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceCompliancePolicySettingState(); + return new global::ApiSdk.Models.DeviceCompliancePolicySettingState(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"currentValue", n => { CurrentValue = n.GetStringValue(); } }, - {"errorCode", n => { ErrorCode = n.GetLongValue(); } }, - {"errorDescription", n => { ErrorDescription = n.GetStringValue(); } }, - {"instanceDisplayName", n => { InstanceDisplayName = n.GetStringValue(); } }, - {"setting", n => { Setting = n.GetStringValue(); } }, - {"settingName", n => { SettingName = n.GetStringValue(); } }, - {"sources", n => { Sources = n.GetCollectionOfObjectValues(SettingSource.CreateFromDiscriminatorValue)?.ToList(); } }, - {"state", n => { State = n.GetEnumValue(); } }, - {"userEmail", n => { UserEmail = n.GetStringValue(); } }, - {"userId", n => { UserId = n.GetStringValue(); } }, - {"userName", n => { UserName = n.GetStringValue(); } }, - {"userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "currentValue", n => { CurrentValue = n.GetStringValue(); } }, + { "errorCode", n => { ErrorCode = n.GetLongValue(); } }, + { "errorDescription", n => { ErrorDescription = n.GetStringValue(); } }, + { "instanceDisplayName", n => { InstanceDisplayName = n.GetStringValue(); } }, + { "setting", n => { Setting = n.GetStringValue(); } }, + { "settingName", n => { SettingName = n.GetStringValue(); } }, + { "sources", n => { Sources = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SettingSource.CreateFromDiscriminatorValue)?.AsList(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "userEmail", n => { UserEmail = n.GetStringValue(); } }, + { "userId", n => { UserId = n.GetStringValue(); } }, + { "userName", n => { UserName = n.GetStringValue(); } }, + { "userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("currentValue", CurrentValue); writer.WriteLongValue("errorCode", ErrorCode); @@ -140,8 +151,8 @@ public void Serialize(ISerializationWriter writer) { writer.WriteStringValue("instanceDisplayName", InstanceDisplayName); writer.WriteStringValue("setting", Setting); writer.WriteStringValue("settingName", SettingName); - writer.WriteCollectionOfObjectValues("sources", Sources); - writer.WriteEnumValue("state", State); + writer.WriteCollectionOfObjectValues("sources", Sources); + writer.WriteEnumValue("state", State); writer.WriteStringValue("userEmail", UserEmail); writer.WriteStringValue("userId", UserId); writer.WriteStringValue("userName", UserName); @@ -150,3 +161,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceCompliancePolicyState.cs b/src/sample/generated/Models/DeviceCompliancePolicyState.cs index bddea3f8..ef5b6435 100644 --- a/src/sample/generated/Models/DeviceCompliancePolicyState.cs +++ b/src/sample/generated/Models/DeviceCompliancePolicyState.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Device Compliance Policy State for a given device. /// - public class DeviceCompliancePolicyState : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeviceCompliancePolicyState : global::ApiSdk.Models.Entity, IParsable + { /// The name of the policy for this policyBase #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -18,55 +22,62 @@ public class DeviceCompliancePolicyState : Entity, IParsable { public string DisplayName { get; set; } #endif /// Supported platform types for policies. - public PolicyPlatformType? PlatformType { get; set; } + public global::ApiSdk.Models.PolicyPlatformType? PlatformType { get; set; } /// Count of how many setting a policy holds public int? SettingCount { get; set; } /// The settingStates property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SettingStates { get; set; } + public List? SettingStates { get; set; } #nullable restore #else - public List SettingStates { get; set; } + public List SettingStates { get; set; } #endif /// The state property - public ComplianceStatus? State { get; set; } + public global::ApiSdk.Models.ComplianceStatus? State { get; set; } /// The version of the policy public int? Version { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DeviceCompliancePolicyState CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DeviceCompliancePolicyState CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceCompliancePolicyState(); + return new global::ApiSdk.Models.DeviceCompliancePolicyState(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"platformType", n => { PlatformType = n.GetEnumValue(); } }, - {"settingCount", n => { SettingCount = n.GetIntValue(); } }, - {"settingStates", n => { SettingStates = n.GetCollectionOfObjectValues(DeviceCompliancePolicySettingState.CreateFromDiscriminatorValue)?.ToList(); } }, - {"state", n => { State = n.GetEnumValue(); } }, - {"version", n => { Version = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "platformType", n => { PlatformType = n.GetEnumValue(); } }, + { "settingCount", n => { SettingCount = n.GetIntValue(); } }, + { "settingStates", n => { SettingStates = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DeviceCompliancePolicySettingState.CreateFromDiscriminatorValue)?.AsList(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "version", n => { Version = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); - writer.WriteEnumValue("platformType", PlatformType); + writer.WriteEnumValue("platformType", PlatformType); writer.WriteIntValue("settingCount", SettingCount); - writer.WriteCollectionOfObjectValues("settingStates", SettingStates); - writer.WriteEnumValue("state", State); + writer.WriteCollectionOfObjectValues("settingStates", SettingStates); + writer.WriteEnumValue("state", State); writer.WriteIntValue("version", Version); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceConfigurationSettingState.cs b/src/sample/generated/Models/DeviceConfigurationSettingState.cs index 47e8d1a0..2d061beb 100644 --- a/src/sample/generated/Models/DeviceConfigurationSettingState.cs +++ b/src/sample/generated/Models/DeviceConfigurationSettingState.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Device Configuration Setting State for a given device. /// - public class DeviceConfigurationSettingState : IAdditionalDataHolder, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeviceConfigurationSettingState : IAdditionalDataHolder, IParsable + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Current value of setting on device @@ -56,13 +60,13 @@ public class DeviceConfigurationSettingState : IAdditionalDataHolder, IParsable /// Contributing policies #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Sources { get; set; } + public List? Sources { get; set; } #nullable restore #else - public List Sources { get; set; } + public List Sources { get; set; } #endif /// The state property - public ComplianceStatus? State { get; set; } + public global::ApiSdk.Models.ComplianceStatus? State { get; set; } /// UserEmail #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -96,43 +100,50 @@ public class DeviceConfigurationSettingState : IAdditionalDataHolder, IParsable public string UserPrincipalName { get; set; } #endif /// - /// Instantiates a new deviceConfigurationSettingState and sets the default values. + /// Instantiates a new and sets the default values. /// - public DeviceConfigurationSettingState() { + public DeviceConfigurationSettingState() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DeviceConfigurationSettingState CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DeviceConfigurationSettingState CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceConfigurationSettingState(); + return new global::ApiSdk.Models.DeviceConfigurationSettingState(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"currentValue", n => { CurrentValue = n.GetStringValue(); } }, - {"errorCode", n => { ErrorCode = n.GetLongValue(); } }, - {"errorDescription", n => { ErrorDescription = n.GetStringValue(); } }, - {"instanceDisplayName", n => { InstanceDisplayName = n.GetStringValue(); } }, - {"setting", n => { Setting = n.GetStringValue(); } }, - {"settingName", n => { SettingName = n.GetStringValue(); } }, - {"sources", n => { Sources = n.GetCollectionOfObjectValues(SettingSource.CreateFromDiscriminatorValue)?.ToList(); } }, - {"state", n => { State = n.GetEnumValue(); } }, - {"userEmail", n => { UserEmail = n.GetStringValue(); } }, - {"userId", n => { UserId = n.GetStringValue(); } }, - {"userName", n => { UserName = n.GetStringValue(); } }, - {"userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "currentValue", n => { CurrentValue = n.GetStringValue(); } }, + { "errorCode", n => { ErrorCode = n.GetLongValue(); } }, + { "errorDescription", n => { ErrorDescription = n.GetStringValue(); } }, + { "instanceDisplayName", n => { InstanceDisplayName = n.GetStringValue(); } }, + { "setting", n => { Setting = n.GetStringValue(); } }, + { "settingName", n => { SettingName = n.GetStringValue(); } }, + { "sources", n => { Sources = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SettingSource.CreateFromDiscriminatorValue)?.AsList(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "userEmail", n => { UserEmail = n.GetStringValue(); } }, + { "userId", n => { UserId = n.GetStringValue(); } }, + { "userName", n => { UserName = n.GetStringValue(); } }, + { "userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("currentValue", CurrentValue); writer.WriteLongValue("errorCode", ErrorCode); @@ -140,8 +151,8 @@ public void Serialize(ISerializationWriter writer) { writer.WriteStringValue("instanceDisplayName", InstanceDisplayName); writer.WriteStringValue("setting", Setting); writer.WriteStringValue("settingName", SettingName); - writer.WriteCollectionOfObjectValues("sources", Sources); - writer.WriteEnumValue("state", State); + writer.WriteCollectionOfObjectValues("sources", Sources); + writer.WriteEnumValue("state", State); writer.WriteStringValue("userEmail", UserEmail); writer.WriteStringValue("userId", UserId); writer.WriteStringValue("userName", UserName); @@ -150,3 +161,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceConfigurationState.cs b/src/sample/generated/Models/DeviceConfigurationState.cs index 61d80c33..f6b87d33 100644 --- a/src/sample/generated/Models/DeviceConfigurationState.cs +++ b/src/sample/generated/Models/DeviceConfigurationState.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Device Configuration State for a given device. /// - public class DeviceConfigurationState : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeviceConfigurationState : global::ApiSdk.Models.Entity, IParsable + { /// The name of the policy for this policyBase #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -18,55 +22,62 @@ public class DeviceConfigurationState : Entity, IParsable { public string DisplayName { get; set; } #endif /// Supported platform types for policies. - public PolicyPlatformType? PlatformType { get; set; } + public global::ApiSdk.Models.PolicyPlatformType? PlatformType { get; set; } /// Count of how many setting a policy holds public int? SettingCount { get; set; } /// The settingStates property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SettingStates { get; set; } + public List? SettingStates { get; set; } #nullable restore #else - public List SettingStates { get; set; } + public List SettingStates { get; set; } #endif /// The state property - public ComplianceStatus? State { get; set; } + public global::ApiSdk.Models.ComplianceStatus? State { get; set; } /// The version of the policy public int? Version { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DeviceConfigurationState CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DeviceConfigurationState CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceConfigurationState(); + return new global::ApiSdk.Models.DeviceConfigurationState(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"platformType", n => { PlatformType = n.GetEnumValue(); } }, - {"settingCount", n => { SettingCount = n.GetIntValue(); } }, - {"settingStates", n => { SettingStates = n.GetCollectionOfObjectValues(DeviceConfigurationSettingState.CreateFromDiscriminatorValue)?.ToList(); } }, - {"state", n => { State = n.GetEnumValue(); } }, - {"version", n => { Version = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "platformType", n => { PlatformType = n.GetEnumValue(); } }, + { "settingCount", n => { SettingCount = n.GetIntValue(); } }, + { "settingStates", n => { SettingStates = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DeviceConfigurationSettingState.CreateFromDiscriminatorValue)?.AsList(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "version", n => { Version = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); - writer.WriteEnumValue("platformType", PlatformType); + writer.WriteEnumValue("platformType", PlatformType); writer.WriteIntValue("settingCount", SettingCount); - writer.WriteCollectionOfObjectValues("settingStates", SettingStates); - writer.WriteEnumValue("state", State); + writer.WriteCollectionOfObjectValues("settingStates", SettingStates); + writer.WriteEnumValue("state", State); writer.WriteIntValue("version", Version); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceEnrollmentType.cs b/src/sample/generated/Models/DeviceEnrollmentType.cs index d8efb516..fe4d955c 100644 --- a/src/sample/generated/Models/DeviceEnrollmentType.cs +++ b/src/sample/generated/Models/DeviceEnrollmentType.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Possible ways of adding a mobile device to management. - public enum DeviceEnrollmentType { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DeviceEnrollmentType + { /// Default value, enrollment type was not collected. [EnumMember(Value = "unknown")] Unknown, diff --git a/src/sample/generated/Models/DeviceHealthAttestationState.cs b/src/sample/generated/Models/DeviceHealthAttestationState.cs index 683ab52d..50502ed5 100644 --- a/src/sample/generated/Models/DeviceHealthAttestationState.cs +++ b/src/sample/generated/Models/DeviceHealthAttestationState.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DeviceHealthAttestationState : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DeviceHealthAttestationState : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// TWhen an Attestation Identity Key (AIK) is present on a device, it indicates that the device has an endorsement key (EK) certificate. @@ -247,63 +253,70 @@ public class DeviceHealthAttestationState : IAdditionalDataHolder, IParsable { public string WindowsPE { get; set; } #endif /// - /// Instantiates a new deviceHealthAttestationState and sets the default values. + /// Instantiates a new and sets the default values. /// - public DeviceHealthAttestationState() { + public DeviceHealthAttestationState() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DeviceHealthAttestationState CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DeviceHealthAttestationState CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceHealthAttestationState(); + return new global::ApiSdk.Models.DeviceHealthAttestationState(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"attestationIdentityKey", n => { AttestationIdentityKey = n.GetStringValue(); } }, - {"bitLockerStatus", n => { BitLockerStatus = n.GetStringValue(); } }, - {"bootAppSecurityVersion", n => { BootAppSecurityVersion = n.GetStringValue(); } }, - {"bootDebugging", n => { BootDebugging = n.GetStringValue(); } }, - {"bootManagerSecurityVersion", n => { BootManagerSecurityVersion = n.GetStringValue(); } }, - {"bootManagerVersion", n => { BootManagerVersion = n.GetStringValue(); } }, - {"bootRevisionListInfo", n => { BootRevisionListInfo = n.GetStringValue(); } }, - {"codeIntegrity", n => { CodeIntegrity = n.GetStringValue(); } }, - {"codeIntegrityCheckVersion", n => { CodeIntegrityCheckVersion = n.GetStringValue(); } }, - {"codeIntegrityPolicy", n => { CodeIntegrityPolicy = n.GetStringValue(); } }, - {"contentNamespaceUrl", n => { ContentNamespaceUrl = n.GetStringValue(); } }, - {"contentVersion", n => { ContentVersion = n.GetStringValue(); } }, - {"dataExcutionPolicy", n => { DataExcutionPolicy = n.GetStringValue(); } }, - {"deviceHealthAttestationStatus", n => { DeviceHealthAttestationStatus = n.GetStringValue(); } }, - {"earlyLaunchAntiMalwareDriverProtection", n => { EarlyLaunchAntiMalwareDriverProtection = n.GetStringValue(); } }, - {"healthAttestationSupportedStatus", n => { HealthAttestationSupportedStatus = n.GetStringValue(); } }, - {"healthStatusMismatchInfo", n => { HealthStatusMismatchInfo = n.GetStringValue(); } }, - {"issuedDateTime", n => { IssuedDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastUpdateDateTime", n => { LastUpdateDateTime = n.GetStringValue(); } }, - {"operatingSystemKernelDebugging", n => { OperatingSystemKernelDebugging = n.GetStringValue(); } }, - {"operatingSystemRevListInfo", n => { OperatingSystemRevListInfo = n.GetStringValue(); } }, - {"pcr0", n => { Pcr0 = n.GetStringValue(); } }, - {"pcrHashAlgorithm", n => { PcrHashAlgorithm = n.GetStringValue(); } }, - {"resetCount", n => { ResetCount = n.GetLongValue(); } }, - {"restartCount", n => { RestartCount = n.GetLongValue(); } }, - {"safeMode", n => { SafeMode = n.GetStringValue(); } }, - {"secureBoot", n => { SecureBoot = n.GetStringValue(); } }, - {"secureBootConfigurationPolicyFingerPrint", n => { SecureBootConfigurationPolicyFingerPrint = n.GetStringValue(); } }, - {"testSigning", n => { TestSigning = n.GetStringValue(); } }, - {"tpmVersion", n => { TpmVersion = n.GetStringValue(); } }, - {"virtualSecureMode", n => { VirtualSecureMode = n.GetStringValue(); } }, - {"windowsPE", n => { WindowsPE = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attestationIdentityKey", n => { AttestationIdentityKey = n.GetStringValue(); } }, + { "bitLockerStatus", n => { BitLockerStatus = n.GetStringValue(); } }, + { "bootAppSecurityVersion", n => { BootAppSecurityVersion = n.GetStringValue(); } }, + { "bootDebugging", n => { BootDebugging = n.GetStringValue(); } }, + { "bootManagerSecurityVersion", n => { BootManagerSecurityVersion = n.GetStringValue(); } }, + { "bootManagerVersion", n => { BootManagerVersion = n.GetStringValue(); } }, + { "bootRevisionListInfo", n => { BootRevisionListInfo = n.GetStringValue(); } }, + { "codeIntegrity", n => { CodeIntegrity = n.GetStringValue(); } }, + { "codeIntegrityCheckVersion", n => { CodeIntegrityCheckVersion = n.GetStringValue(); } }, + { "codeIntegrityPolicy", n => { CodeIntegrityPolicy = n.GetStringValue(); } }, + { "contentNamespaceUrl", n => { ContentNamespaceUrl = n.GetStringValue(); } }, + { "contentVersion", n => { ContentVersion = n.GetStringValue(); } }, + { "dataExcutionPolicy", n => { DataExcutionPolicy = n.GetStringValue(); } }, + { "deviceHealthAttestationStatus", n => { DeviceHealthAttestationStatus = n.GetStringValue(); } }, + { "earlyLaunchAntiMalwareDriverProtection", n => { EarlyLaunchAntiMalwareDriverProtection = n.GetStringValue(); } }, + { "healthAttestationSupportedStatus", n => { HealthAttestationSupportedStatus = n.GetStringValue(); } }, + { "healthStatusMismatchInfo", n => { HealthStatusMismatchInfo = n.GetStringValue(); } }, + { "issuedDateTime", n => { IssuedDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastUpdateDateTime", n => { LastUpdateDateTime = n.GetStringValue(); } }, + { "operatingSystemKernelDebugging", n => { OperatingSystemKernelDebugging = n.GetStringValue(); } }, + { "operatingSystemRevListInfo", n => { OperatingSystemRevListInfo = n.GetStringValue(); } }, + { "pcr0", n => { Pcr0 = n.GetStringValue(); } }, + { "pcrHashAlgorithm", n => { PcrHashAlgorithm = n.GetStringValue(); } }, + { "resetCount", n => { ResetCount = n.GetLongValue(); } }, + { "restartCount", n => { RestartCount = n.GetLongValue(); } }, + { "safeMode", n => { SafeMode = n.GetStringValue(); } }, + { "secureBoot", n => { SecureBoot = n.GetStringValue(); } }, + { "secureBootConfigurationPolicyFingerPrint", n => { SecureBootConfigurationPolicyFingerPrint = n.GetStringValue(); } }, + { "testSigning", n => { TestSigning = n.GetStringValue(); } }, + { "tpmVersion", n => { TpmVersion = n.GetStringValue(); } }, + { "virtualSecureMode", n => { VirtualSecureMode = n.GetStringValue(); } }, + { "windowsPE", n => { WindowsPE = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("attestationIdentityKey", AttestationIdentityKey); writer.WriteStringValue("bitLockerStatus", BitLockerStatus); @@ -341,3 +354,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceLogCollectionResponse.cs b/src/sample/generated/Models/DeviceLogCollectionResponse.cs index 7184d8c6..23f791df 100644 --- a/src/sample/generated/Models/DeviceLogCollectionResponse.cs +++ b/src/sample/generated/Models/DeviceLogCollectionResponse.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Windows Log Collection request entity. /// - public class DeviceLogCollectionResponse : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeviceLogCollectionResponse : global::ApiSdk.Models.Entity, IParsable + { /// The User Principal Name (UPN) of the user that enrolled the device. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -36,35 +40,41 @@ public class DeviceLogCollectionResponse : Entity, IParsable { /// The size of the logs in KB. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 public double? SizeInKB { get; set; } /// AppLogUploadStatus - public AppLogUploadState? Status { get; set; } + public global::ApiSdk.Models.AppLogUploadState? Status { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DeviceLogCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DeviceLogCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceLogCollectionResponse(); + return new global::ApiSdk.Models.DeviceLogCollectionResponse(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"enrolledByUser", n => { EnrolledByUser = n.GetStringValue(); } }, - {"expirationDateTimeUTC", n => { ExpirationDateTimeUTC = n.GetDateTimeOffsetValue(); } }, - {"initiatedByUserPrincipalName", n => { InitiatedByUserPrincipalName = n.GetStringValue(); } }, - {"managedDeviceId", n => { ManagedDeviceId = n.GetGuidValue(); } }, - {"receivedDateTimeUTC", n => { ReceivedDateTimeUTC = n.GetDateTimeOffsetValue(); } }, - {"requestedDateTimeUTC", n => { RequestedDateTimeUTC = n.GetDateTimeOffsetValue(); } }, - {"sizeInKB", n => { SizeInKB = n.GetDoubleValue(); } }, - {"status", n => { Status = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "enrolledByUser", n => { EnrolledByUser = n.GetStringValue(); } }, + { "expirationDateTimeUTC", n => { ExpirationDateTimeUTC = n.GetDateTimeOffsetValue(); } }, + { "initiatedByUserPrincipalName", n => { InitiatedByUserPrincipalName = n.GetStringValue(); } }, + { "managedDeviceId", n => { ManagedDeviceId = n.GetGuidValue(); } }, + { "receivedDateTimeUTC", n => { ReceivedDateTimeUTC = n.GetDateTimeOffsetValue(); } }, + { "requestedDateTimeUTC", n => { RequestedDateTimeUTC = n.GetDateTimeOffsetValue(); } }, + { "sizeInKB", n => { SizeInKB = n.GetDoubleValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("enrolledByUser", EnrolledByUser); @@ -74,7 +84,8 @@ public class DeviceLogCollectionResponse : Entity, IParsable { writer.WriteDateTimeOffsetValue("receivedDateTimeUTC", ReceivedDateTimeUTC); writer.WriteDateTimeOffsetValue("requestedDateTimeUTC", RequestedDateTimeUTC); writer.WriteDoubleValue("sizeInKB", SizeInKB); - writer.WriteEnumValue("status", Status); + writer.WriteEnumValue("status", Status); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceManagementExchangeAccessState.cs b/src/sample/generated/Models/DeviceManagementExchangeAccessState.cs index 1b6a0c6f..9e3422c4 100644 --- a/src/sample/generated/Models/DeviceManagementExchangeAccessState.cs +++ b/src/sample/generated/Models/DeviceManagementExchangeAccessState.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Device Exchange Access State. - public enum DeviceManagementExchangeAccessState { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DeviceManagementExchangeAccessState + { /// No access state discovered from Exchange [EnumMember(Value = "none")] None, diff --git a/src/sample/generated/Models/DeviceManagementExchangeAccessStateReason.cs b/src/sample/generated/Models/DeviceManagementExchangeAccessStateReason.cs index 83f99575..a6c3f085 100644 --- a/src/sample/generated/Models/DeviceManagementExchangeAccessStateReason.cs +++ b/src/sample/generated/Models/DeviceManagementExchangeAccessStateReason.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Device Exchange Access State Reason. - public enum DeviceManagementExchangeAccessStateReason { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DeviceManagementExchangeAccessStateReason + { /// No access state reason discovered from Exchange [EnumMember(Value = "none")] None, diff --git a/src/sample/generated/Models/DeviceManagementTroubleshootingEvent.cs b/src/sample/generated/Models/DeviceManagementTroubleshootingEvent.cs index b85761d9..741f02e5 100644 --- a/src/sample/generated/Models/DeviceManagementTroubleshootingEvent.cs +++ b/src/sample/generated/Models/DeviceManagementTroubleshootingEvent.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Event representing an general failure. /// - public class DeviceManagementTroubleshootingEvent : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DeviceManagementTroubleshootingEvent : global::ApiSdk.Models.Entity, IParsable + { /// Id used for tracing the failure in the service. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -22,25 +26,31 @@ public class DeviceManagementTroubleshootingEvent : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DeviceManagementTroubleshootingEvent CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DeviceManagementTroubleshootingEvent CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DeviceManagementTroubleshootingEvent(); + return new global::ApiSdk.Models.DeviceManagementTroubleshootingEvent(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"correlationId", n => { CorrelationId = n.GetStringValue(); } }, - {"eventDateTime", n => { EventDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "correlationId", n => { CorrelationId = n.GetStringValue(); } }, + { "eventDateTime", n => { EventDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("correlationId", CorrelationId); @@ -48,3 +58,4 @@ public class DeviceManagementTroubleshootingEvent : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DeviceRegistrationState.cs b/src/sample/generated/Models/DeviceRegistrationState.cs index 195e748f..6fc4081f 100644 --- a/src/sample/generated/Models/DeviceRegistrationState.cs +++ b/src/sample/generated/Models/DeviceRegistrationState.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Device registration status. - public enum DeviceRegistrationState { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum DeviceRegistrationState + { /// The device is not registered. [EnumMember(Value = "notRegistered")] NotRegistered, diff --git a/src/sample/generated/Models/DirectoryDefinition.cs b/src/sample/generated/Models/DirectoryDefinition.cs index e090fc93..29c4ab7f 100644 --- a/src/sample/generated/Models/DirectoryDefinition.cs +++ b/src/sample/generated/Models/DirectoryDefinition.cs @@ -1,13 +1,19 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DirectoryDefinition : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DirectoryDefinition : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The discoverabilities property - public DirectoryDefinitionDiscoverabilities? Discoverabilities { get; set; } + public global::ApiSdk.Models.DirectoryDefinitionDiscoverabilities? Discoverabilities { get; set; } /// Represents the discovery date and time using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? DiscoveryDateTime { get; set; } /// Name of the directory. Must be unique within the synchronization schema. Not nullable. @@ -21,10 +27,10 @@ public class DirectoryDefinition : Entity, IParsable { /// Collection of objects supported by the directory. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Objects { get; set; } + public List? Objects { get; set; } #nullable restore #else - public List Objects { get; set; } + public List Objects { get; set; } #endif /// Whether this object is read-only. public bool? ReadOnly { get; set; } @@ -39,37 +45,44 @@ public class DirectoryDefinition : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DirectoryDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DirectoryDefinition CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DirectoryDefinition(); + return new global::ApiSdk.Models.DirectoryDefinition(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"discoverabilities", n => { Discoverabilities = n.GetEnumValue(); } }, - {"discoveryDateTime", n => { DiscoveryDateTime = n.GetDateTimeOffsetValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"objects", n => { Objects = n.GetCollectionOfObjectValues(ObjectDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"readOnly", n => { ReadOnly = n.GetBoolValue(); } }, - {"version", n => { Version = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "discoverabilities", n => { Discoverabilities = n.GetEnumValue(); } }, + { "discoveryDateTime", n => { DiscoveryDateTime = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "objects", n => { Objects = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ObjectDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "readOnly", n => { ReadOnly = n.GetBoolValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("discoverabilities", Discoverabilities); + writer.WriteEnumValue("discoverabilities", Discoverabilities); writer.WriteDateTimeOffsetValue("discoveryDateTime", DiscoveryDateTime); writer.WriteStringValue("name", Name); - writer.WriteCollectionOfObjectValues("objects", Objects); + writer.WriteCollectionOfObjectValues("objects", Objects); writer.WriteBoolValue("readOnly", ReadOnly); writer.WriteStringValue("version", Version); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DirectoryDefinitionDiscoverabilities.cs b/src/sample/generated/Models/DirectoryDefinitionDiscoverabilities.cs index 530cfb33..146559bf 100644 --- a/src/sample/generated/Models/DirectoryDefinitionDiscoverabilities.cs +++ b/src/sample/generated/Models/DirectoryDefinitionDiscoverabilities.cs @@ -1,20 +1,37 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] [Flags] - public enum DirectoryDefinitionDiscoverabilities { + #pragma warning disable CS1591 + public enum DirectoryDefinitionDiscoverabilities + #pragma warning restore CS1591 + { [EnumMember(Value = "None")] + #pragma warning disable CS1591 None = 1, + #pragma warning restore CS1591 [EnumMember(Value = "AttributeNames")] + #pragma warning disable CS1591 AttributeNames = 2, + #pragma warning restore CS1591 [EnumMember(Value = "AttributeDataTypes")] + #pragma warning disable CS1591 AttributeDataTypes = 4, + #pragma warning restore CS1591 [EnumMember(Value = "AttributeReadOnly")] + #pragma warning disable CS1591 AttributeReadOnly = 8, + #pragma warning restore CS1591 [EnumMember(Value = "ReferenceAttributes")] + #pragma warning disable CS1591 ReferenceAttributes = 16, + #pragma warning restore CS1591 [EnumMember(Value = "UnknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue = 32, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/DirectoryObject.cs b/src/sample/generated/Models/DirectoryObject.cs index 4bbfdf97..475853f8 100644 --- a/src/sample/generated/Models/DirectoryObject.cs +++ b/src/sample/generated/Models/DirectoryObject.cs @@ -1,37 +1,50 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DirectoryObject : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DirectoryObject : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Date and time when this object was deleted. Always null when the object hasn't been deleted. public DateTimeOffset? DeletedDateTime { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DirectoryObject CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DirectoryObject CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DirectoryObject(); + return new global::ApiSdk.Models.DirectoryObject(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"deletedDateTime", n => { DeletedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "deletedDateTime", n => { DeletedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("deletedDateTime", DeletedDateTime); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DirectoryObjectCollectionResponse.cs b/src/sample/generated/Models/DirectoryObjectCollectionResponse.cs index 010e9e92..b321d8c0 100644 --- a/src/sample/generated/Models/DirectoryObjectCollectionResponse.cs +++ b/src/sample/generated/Models/DirectoryObjectCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DirectoryObjectCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DirectoryObjectCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class DirectoryObjectCollectionResponse : IAdditionalDataHolder, IParsabl /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new directoryObjectCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public DirectoryObjectCollectionResponse() { + public DirectoryObjectCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DirectoryObjectCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DirectoryObjectCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DirectoryObjectCollectionResponse(); + return new global::ApiSdk.Models.DirectoryObjectCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DirectoryRole.cs b/src/sample/generated/Models/DirectoryRole.cs index 9e402af5..6477d078 100644 --- a/src/sample/generated/Models/DirectoryRole.cs +++ b/src/sample/generated/Models/DirectoryRole.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DirectoryRole : DirectoryObject, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DirectoryRole : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { /// The description for the directory role. Read-only. Supports $filter (eq), $search, $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -25,10 +31,10 @@ public class DirectoryRole : DirectoryObject, IParsable { /// Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Members { get; set; } + public List? Members { get; set; } #nullable restore #else - public List Members { get; set; } + public List Members { get; set; } #endif /// The id of the directoryRoleTemplate that this role is based on. The property must be specified when activating a directory role in a tenant with a POST operation. After the directory role has been activated, the property is read only. Supports $filter (eq), $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,43 +47,50 @@ public class DirectoryRole : DirectoryObject, IParsable { /// Members of this directory role that are scoped to administrative units. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ScopedMembers { get; set; } + public List? ScopedMembers { get; set; } #nullable restore #else - public List ScopedMembers { get; set; } + public List ScopedMembers { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DirectoryRole CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DirectoryRole CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DirectoryRole(); + return new global::ApiSdk.Models.DirectoryRole(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"members", n => { Members = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"roleTemplateId", n => { RoleTemplateId = n.GetStringValue(); } }, - {"scopedMembers", n => { ScopedMembers = n.GetCollectionOfObjectValues(ScopedRoleMembership.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "members", n => { Members = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "roleTemplateId", n => { RoleTemplateId = n.GetStringValue(); } }, + { "scopedMembers", n => { ScopedMembers = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ScopedRoleMembership.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); - writer.WriteCollectionOfObjectValues("members", Members); + writer.WriteCollectionOfObjectValues("members", Members); writer.WriteStringValue("roleTemplateId", RoleTemplateId); - writer.WriteCollectionOfObjectValues("scopedMembers", ScopedMembers); + writer.WriteCollectionOfObjectValues("scopedMembers", ScopedMembers); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DirectoryRoleCollectionResponse.cs b/src/sample/generated/Models/DirectoryRoleCollectionResponse.cs index 6707add9..4256ddeb 100644 --- a/src/sample/generated/Models/DirectoryRoleCollectionResponse.cs +++ b/src/sample/generated/Models/DirectoryRoleCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DirectoryRoleCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DirectoryRoleCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class DirectoryRoleCollectionResponse : IAdditionalDataHolder, IParsable /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new directoryRoleCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public DirectoryRoleCollectionResponse() { + public DirectoryRoleCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DirectoryRoleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DirectoryRoleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DirectoryRoleCollectionResponse(); + return new global::ApiSdk.Models.DirectoryRoleCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(DirectoryRole.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryRole.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DisplayNameLocalization.cs b/src/sample/generated/Models/DisplayNameLocalization.cs index e6223112..0e0ce575 100644 --- a/src/sample/generated/Models/DisplayNameLocalization.cs +++ b/src/sample/generated/Models/DisplayNameLocalization.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DisplayNameLocalization : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DisplayNameLocalization : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// If present, the value of this field contains the displayName string that has been set for the language present in the languageTag field. @@ -25,33 +31,40 @@ public class DisplayNameLocalization : IAdditionalDataHolder, IParsable { public string LanguageTag { get; set; } #endif /// - /// Instantiates a new displayNameLocalization and sets the default values. + /// Instantiates a new and sets the default values. /// - public DisplayNameLocalization() { + public DisplayNameLocalization() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DisplayNameLocalization CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DisplayNameLocalization CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DisplayNameLocalization(); + return new global::ApiSdk.Models.DisplayNameLocalization(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"languageTag", n => { LanguageTag = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "languageTag", n => { LanguageTag = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("languageTag", LanguageTag); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DocumentSet.cs b/src/sample/generated/Models/DocumentSet.cs index 6b0b6c6a..bb8cacad 100644 --- a/src/sample/generated/Models/DocumentSet.cs +++ b/src/sample/generated/Models/DocumentSet.cs @@ -1,48 +1,54 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DocumentSet : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentSet : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Content types allowed in document set. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AllowedContentTypes { get; set; } + public List? AllowedContentTypes { get; set; } #nullable restore #else - public List AllowedContentTypes { get; set; } + public List AllowedContentTypes { get; set; } #endif /// Default contents of document set. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DefaultContents { get; set; } + public List? DefaultContents { get; set; } #nullable restore #else - public List DefaultContents { get; set; } + public List DefaultContents { get; set; } #endif /// Specifies whether to push welcome page changes to inherited content types. public bool? PropagateWelcomePageChanges { get; set; } /// The sharedColumns property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SharedColumns { get; set; } + public List? SharedColumns { get; set; } #nullable restore #else - public List SharedColumns { get; set; } + public List SharedColumns { get; set; } #endif /// Indicates whether to add the name of the document set to each file name. public bool? ShouldPrefixNameToFile { get; set; } /// The welcomePageColumns property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? WelcomePageColumns { get; set; } + public List? WelcomePageColumns { get; set; } #nullable restore #else - public List WelcomePageColumns { get; set; } + public List WelcomePageColumns { get; set; } #endif /// Welcome page absolute URL. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -53,47 +59,55 @@ public class DocumentSet : IAdditionalDataHolder, IParsable { public string WelcomePageUrl { get; set; } #endif /// - /// Instantiates a new documentSet and sets the default values. + /// Instantiates a new and sets the default values. /// - public DocumentSet() { + public DocumentSet() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DocumentSet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DocumentSet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DocumentSet(); + return new global::ApiSdk.Models.DocumentSet(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowedContentTypes", n => { AllowedContentTypes = n.GetCollectionOfObjectValues(ContentTypeInfo.CreateFromDiscriminatorValue)?.ToList(); } }, - {"defaultContents", n => { DefaultContents = n.GetCollectionOfObjectValues(DocumentSetContent.CreateFromDiscriminatorValue)?.ToList(); } }, - {"propagateWelcomePageChanges", n => { PropagateWelcomePageChanges = n.GetBoolValue(); } }, - {"sharedColumns", n => { SharedColumns = n.GetCollectionOfObjectValues(ColumnDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"shouldPrefixNameToFile", n => { ShouldPrefixNameToFile = n.GetBoolValue(); } }, - {"welcomePageColumns", n => { WelcomePageColumns = n.GetCollectionOfObjectValues(ColumnDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"welcomePageUrl", n => { WelcomePageUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowedContentTypes", n => { AllowedContentTypes = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ContentTypeInfo.CreateFromDiscriminatorValue)?.AsList(); } }, + { "defaultContents", n => { DefaultContents = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DocumentSetContent.CreateFromDiscriminatorValue)?.AsList(); } }, + { "propagateWelcomePageChanges", n => { PropagateWelcomePageChanges = n.GetBoolValue(); } }, + { "sharedColumns", n => { SharedColumns = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ColumnDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "shouldPrefixNameToFile", n => { ShouldPrefixNameToFile = n.GetBoolValue(); } }, + { "welcomePageColumns", n => { WelcomePageColumns = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ColumnDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "welcomePageUrl", n => { WelcomePageUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("allowedContentTypes", AllowedContentTypes); - writer.WriteCollectionOfObjectValues("defaultContents", DefaultContents); + writer.WriteCollectionOfObjectValues("allowedContentTypes", AllowedContentTypes); + writer.WriteCollectionOfObjectValues("defaultContents", DefaultContents); writer.WriteBoolValue("propagateWelcomePageChanges", PropagateWelcomePageChanges); - writer.WriteCollectionOfObjectValues("sharedColumns", SharedColumns); + writer.WriteCollectionOfObjectValues("sharedColumns", SharedColumns); writer.WriteBoolValue("shouldPrefixNameToFile", ShouldPrefixNameToFile); - writer.WriteCollectionOfObjectValues("welcomePageColumns", WelcomePageColumns); + writer.WriteCollectionOfObjectValues("welcomePageColumns", WelcomePageColumns); writer.WriteStringValue("welcomePageUrl", WelcomePageUrl); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DocumentSetContent.cs b/src/sample/generated/Models/DocumentSetContent.cs index d7c507c3..f0c19732 100644 --- a/src/sample/generated/Models/DocumentSetContent.cs +++ b/src/sample/generated/Models/DocumentSetContent.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DocumentSetContent : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentSetContent : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The contentType property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ContentTypeInfo? ContentType { get; set; } + public global::ApiSdk.Models.ContentTypeInfo? ContentType { get; set; } #nullable restore #else - public ContentTypeInfo ContentType { get; set; } + public global::ApiSdk.Models.ContentTypeInfo ContentType { get; set; } #endif /// Name of the file in resource folder that should be added as a default content or a template in the document set. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,39 +39,47 @@ public class DocumentSetContent : IAdditionalDataHolder, IParsable { public string FolderName { get; set; } #endif /// - /// Instantiates a new documentSetContent and sets the default values. + /// Instantiates a new and sets the default values. /// - public DocumentSetContent() { + public DocumentSetContent() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DocumentSetContent CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DocumentSetContent CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DocumentSetContent(); + return new global::ApiSdk.Models.DocumentSetContent(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"contentType", n => { ContentType = n.GetObjectValue(ContentTypeInfo.CreateFromDiscriminatorValue); } }, - {"fileName", n => { FileName = n.GetStringValue(); } }, - {"folderName", n => { FolderName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "contentType", n => { ContentType = n.GetObjectValue(global::ApiSdk.Models.ContentTypeInfo.CreateFromDiscriminatorValue); } }, + { "fileName", n => { FileName = n.GetStringValue(); } }, + { "folderName", n => { FolderName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("contentType", ContentType); + writer.WriteObjectValue("contentType", ContentType); writer.WriteStringValue("fileName", FileName); writer.WriteStringValue("folderName", FolderName); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DocumentSetVersion.cs b/src/sample/generated/Models/DocumentSetVersion.cs index 5656b605..285bd0b1 100644 --- a/src/sample/generated/Models/DocumentSetVersion.cs +++ b/src/sample/generated/Models/DocumentSetVersion.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DocumentSetVersion : ListItemVersion, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentSetVersion : global::ApiSdk.Models.ListItemVersion, IParsable + #pragma warning restore CS1591 + { /// Comment about the captured version. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,55 +23,62 @@ public class DocumentSetVersion : ListItemVersion, IParsable { /// The createdBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? CreatedBy { get; set; } #nullable restore #else - public IdentitySet CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet CreatedBy { get; set; } #endif /// Date and time when this version was created. public DateTimeOffset? CreatedDateTime { get; set; } /// Items within the document set that are captured as part of this version. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Items { get; set; } + public List? Items { get; set; } #nullable restore #else - public List Items { get; set; } + public List Items { get; set; } #endif - /// If true, minor versions of items are also captured; otherwise, only major versions will be captured. Default value is false. + /// If true, minor versions of items are also captured; otherwise, only major versions are captured. The default value is false. public bool? ShouldCaptureMinorVersion { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DocumentSetVersion CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DocumentSetVersion CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DocumentSetVersion(); + return new global::ApiSdk.Models.DocumentSetVersion(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"comment", n => { Comment = n.GetStringValue(); } }, - {"createdBy", n => { CreatedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"items", n => { Items = n.GetCollectionOfObjectValues(DocumentSetVersionItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"shouldCaptureMinorVersion", n => { ShouldCaptureMinorVersion = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "comment", n => { Comment = n.GetStringValue(); } }, + { "createdBy", n => { CreatedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DocumentSetVersionItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "shouldCaptureMinorVersion", n => { ShouldCaptureMinorVersion = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("comment", Comment); - writer.WriteObjectValue("createdBy", CreatedBy); + writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteCollectionOfObjectValues("items", Items); writer.WriteBoolValue("shouldCaptureMinorVersion", ShouldCaptureMinorVersion); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DocumentSetVersionItem.cs b/src/sample/generated/Models/DocumentSetVersionItem.cs index b6c2fbea..7ab994e1 100644 --- a/src/sample/generated/Models/DocumentSetVersionItem.cs +++ b/src/sample/generated/Models/DocumentSetVersionItem.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DocumentSetVersionItem : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DocumentSetVersionItem : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The unique identifier for the item. @@ -33,34 +39,41 @@ public class DocumentSetVersionItem : IAdditionalDataHolder, IParsable { public string VersionId { get; set; } #endif /// - /// Instantiates a new documentSetVersionItem and sets the default values. + /// Instantiates a new and sets the default values. /// - public DocumentSetVersionItem() { + public DocumentSetVersionItem() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static DocumentSetVersionItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.DocumentSetVersionItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DocumentSetVersionItem(); + return new global::ApiSdk.Models.DocumentSetVersionItem(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"itemId", n => { ItemId = n.GetStringValue(); } }, - {"title", n => { Title = n.GetStringValue(); } }, - {"versionId", n => { VersionId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "itemId", n => { ItemId = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "versionId", n => { VersionId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("itemId", ItemId); writer.WriteStringValue("title", Title); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Drive.cs b/src/sample/generated/Models/Drive.cs index ab8d39a0..a9c199a3 100644 --- a/src/sample/generated/Models/Drive.cs +++ b/src/sample/generated/Models/Drive.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Drive : BaseItem, IParsable { - /// Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Drive : global::ApiSdk.Models.BaseItem, IParsable + #pragma warning restore CS1591 + { + /// Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Bundles { get; set; } + public List? Bundles { get; set; } #nullable restore #else - public List Bundles { get; set; } + public List Bundles { get; set; } #endif /// Describes the type of drive represented by this resource. OneDrive personal drives will return personal. OneDrive for Business will return business. SharePoint document libraries will return documentLibrary. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,119 +31,126 @@ public class Drive : BaseItem, IParsable { /// The list of items the user is following. Only in OneDrive for Business. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Following { get; set; } + public List? Following { get; set; } #nullable restore #else - public List Following { get; set; } + public List Following { get; set; } #endif /// All items contained in the drive. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Items { get; set; } + public List? Items { get; set; } #nullable restore #else - public List Items { get; set; } + public List Items { get; set; } #endif /// The list property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.List? List { get; set; } + public global::ApiSdk.Models.List? List { get; set; } #nullable restore #else - public ApiSdk.Models.List List { get; set; } + public global::ApiSdk.Models.List List { get; set; } #endif /// The owner property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? Owner { get; set; } + public global::ApiSdk.Models.IdentitySet? Owner { get; set; } #nullable restore #else - public IdentitySet Owner { get; set; } + public global::ApiSdk.Models.IdentitySet Owner { get; set; } #endif /// The quota property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Quota? Quota { get; set; } + public global::ApiSdk.Models.Quota? Quota { get; set; } #nullable restore #else - public ApiSdk.Models.Quota Quota { get; set; } + public global::ApiSdk.Models.Quota Quota { get; set; } #endif /// The root property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DriveItem? Root { get; set; } + public global::ApiSdk.Models.DriveItem? Root { get; set; } #nullable restore #else - public DriveItem Root { get; set; } + public global::ApiSdk.Models.DriveItem Root { get; set; } #endif /// The sharePointIds property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SharepointIds? SharePointIds { get; set; } + public global::ApiSdk.Models.SharepointIds? SharePointIds { get; set; } #nullable restore #else - public ApiSdk.Models.SharepointIds SharePointIds { get; set; } + public global::ApiSdk.Models.SharepointIds SharePointIds { get; set; } #endif /// Collection of common folders available in OneDrive. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Special { get; set; } + public List? Special { get; set; } #nullable restore #else - public List Special { get; set; } + public List Special { get; set; } #endif /// The system property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SystemFacet? System { get; set; } + public global::ApiSdk.Models.SystemFacet? System { get; set; } #nullable restore #else - public SystemFacet System { get; set; } + public global::ApiSdk.Models.SystemFacet System { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Drive CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Drive CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Drive(); + return new global::ApiSdk.Models.Drive(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"bundles", n => { Bundles = n.GetCollectionOfObjectValues(DriveItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"driveType", n => { DriveType = n.GetStringValue(); } }, - {"following", n => { Following = n.GetCollectionOfObjectValues(DriveItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"items", n => { Items = n.GetCollectionOfObjectValues(DriveItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"list", n => { List = n.GetObjectValue(ApiSdk.Models.List.CreateFromDiscriminatorValue); } }, - {"owner", n => { Owner = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"quota", n => { Quota = n.GetObjectValue(ApiSdk.Models.Quota.CreateFromDiscriminatorValue); } }, - {"root", n => { Root = n.GetObjectValue(DriveItem.CreateFromDiscriminatorValue); } }, - {"sharePointIds", n => { SharePointIds = n.GetObjectValue(ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, - {"special", n => { Special = n.GetCollectionOfObjectValues(DriveItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"system", n => { System = n.GetObjectValue(SystemFacet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "bundles", n => { Bundles = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "driveType", n => { DriveType = n.GetStringValue(); } }, + { "following", n => { Following = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "list", n => { List = n.GetObjectValue(global::ApiSdk.Models.List.CreateFromDiscriminatorValue); } }, + { "owner", n => { Owner = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "quota", n => { Quota = n.GetObjectValue(global::ApiSdk.Models.Quota.CreateFromDiscriminatorValue); } }, + { "root", n => { Root = n.GetObjectValue(global::ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue); } }, + { "sharePointIds", n => { SharePointIds = n.GetObjectValue(global::ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, + { "special", n => { Special = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "system", n => { System = n.GetObjectValue(global::ApiSdk.Models.SystemFacet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("bundles", Bundles); + writer.WriteCollectionOfObjectValues("bundles", Bundles); writer.WriteStringValue("driveType", DriveType); - writer.WriteCollectionOfObjectValues("following", Following); - writer.WriteCollectionOfObjectValues("items", Items); - writer.WriteObjectValue("list", List); - writer.WriteObjectValue("owner", Owner); - writer.WriteObjectValue("quota", Quota); - writer.WriteObjectValue("root", Root); - writer.WriteObjectValue("sharePointIds", SharePointIds); - writer.WriteCollectionOfObjectValues("special", Special); - writer.WriteObjectValue("system", System); + writer.WriteCollectionOfObjectValues("following", Following); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteObjectValue("list", List); + writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("quota", Quota); + writer.WriteObjectValue("root", Root); + writer.WriteObjectValue("sharePointIds", SharePointIds); + writer.WriteCollectionOfObjectValues("special", Special); + writer.WriteObjectValue("system", System); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DriveItem.cs b/src/sample/generated/Models/DriveItem.cs index cb1da8fa..a5bfbce6 100644 --- a/src/sample/generated/Models/DriveItem.cs +++ b/src/sample/generated/Models/DriveItem.cs @@ -1,42 +1,48 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DriveItem : BaseItem, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DriveItem : global::ApiSdk.Models.BaseItem, IParsable + #pragma warning restore CS1591 + { /// The analytics property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemAnalytics? Analytics { get; set; } + public global::ApiSdk.Models.ItemAnalytics? Analytics { get; set; } #nullable restore #else - public ItemAnalytics Analytics { get; set; } + public global::ApiSdk.Models.ItemAnalytics Analytics { get; set; } #endif /// The audio property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Audio? Audio { get; set; } + public global::ApiSdk.Models.Audio? Audio { get; set; } #nullable restore #else - public ApiSdk.Models.Audio Audio { get; set; } + public global::ApiSdk.Models.Audio Audio { get; set; } #endif /// The bundle property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Bundle? Bundle { get; set; } + public global::ApiSdk.Models.Bundle? Bundle { get; set; } #nullable restore #else - public ApiSdk.Models.Bundle Bundle { get; set; } + public global::ApiSdk.Models.Bundle Bundle { get; set; } #endif /// Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Children { get; set; } + public List? Children { get; set; } #nullable restore #else - public List Children { get; set; } + public List Children { get; set; } #endif /// The content stream, if the item represents a file. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -46,7 +52,7 @@ public class DriveItem : BaseItem, IParsable { #else public byte[] Content { get; set; } #endif - /// An eTag for the content of the item. This eTag is not changed if only the metadata is changed. Note This property is not returned if the item is a folder. Read-only. + /// An eTag for the content of the item. This eTag isn't changed if only the metadata is changed. Note This property isn't returned if the item is a folder. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CTag { get; set; } @@ -57,188 +63,196 @@ public class DriveItem : BaseItem, IParsable { /// The deleted property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Deleted? Deleted { get; set; } + public global::ApiSdk.Models.Deleted? Deleted { get; set; } #nullable restore #else - public ApiSdk.Models.Deleted Deleted { get; set; } + public global::ApiSdk.Models.Deleted Deleted { get; set; } #endif /// The file property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public FileObject? File { get; set; } + public global::ApiSdk.Models.FileObject? File { get; set; } #nullable restore #else - public FileObject File { get; set; } + public global::ApiSdk.Models.FileObject File { get; set; } #endif /// The fileSystemInfo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.FileSystemInfo? FileSystemInfo { get; set; } + public global::ApiSdk.Models.FileSystemInfo? FileSystemInfo { get; set; } #nullable restore #else - public ApiSdk.Models.FileSystemInfo FileSystemInfo { get; set; } + public global::ApiSdk.Models.FileSystemInfo FileSystemInfo { get; set; } #endif /// The folder property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Folder? Folder { get; set; } + public global::ApiSdk.Models.Folder? Folder { get; set; } #nullable restore #else - public ApiSdk.Models.Folder Folder { get; set; } + public global::ApiSdk.Models.Folder Folder { get; set; } #endif /// The image property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Image? Image { get; set; } + public global::ApiSdk.Models.Image? Image { get; set; } #nullable restore #else - public ApiSdk.Models.Image Image { get; set; } + public global::ApiSdk.Models.Image Image { get; set; } #endif /// The listItem property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ListItem? ListItem { get; set; } + public global::ApiSdk.Models.ListItem? ListItem { get; set; } #nullable restore #else - public ApiSdk.Models.ListItem ListItem { get; set; } + public global::ApiSdk.Models.ListItem ListItem { get; set; } #endif /// The location property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public GeoCoordinates? Location { get; set; } + public global::ApiSdk.Models.GeoCoordinates? Location { get; set; } #nullable restore #else - public GeoCoordinates Location { get; set; } + public global::ApiSdk.Models.GeoCoordinates Location { get; set; } #endif /// The malware property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Malware? Malware { get; set; } + public global::ApiSdk.Models.Malware? Malware { get; set; } #nullable restore #else - public ApiSdk.Models.Malware Malware { get; set; } + public global::ApiSdk.Models.Malware Malware { get; set; } #endif /// The package property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Package? Package { get; set; } + public global::ApiSdk.Models.Package? Package { get; set; } #nullable restore #else - public ApiSdk.Models.Package Package { get; set; } + public global::ApiSdk.Models.Package Package { get; set; } #endif /// The pendingOperations property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.PendingOperations? PendingOperations { get; set; } + public global::ApiSdk.Models.PendingOperations? PendingOperations { get; set; } #nullable restore #else - public ApiSdk.Models.PendingOperations PendingOperations { get; set; } + public global::ApiSdk.Models.PendingOperations PendingOperations { get; set; } #endif /// The set of permissions for the item. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Permissions { get; set; } + public List? Permissions { get; set; } #nullable restore #else - public List Permissions { get; set; } + public List Permissions { get; set; } #endif /// The photo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Photo? Photo { get; set; } + public global::ApiSdk.Models.Photo? Photo { get; set; } #nullable restore #else - public ApiSdk.Models.Photo Photo { get; set; } + public global::ApiSdk.Models.Photo Photo { get; set; } #endif /// The publication property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PublicationFacet? Publication { get; set; } + public global::ApiSdk.Models.PublicationFacet? Publication { get; set; } #nullable restore #else - public PublicationFacet Publication { get; set; } + public global::ApiSdk.Models.PublicationFacet Publication { get; set; } #endif /// The remoteItem property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.RemoteItem? RemoteItem { get; set; } + public global::ApiSdk.Models.RemoteItem? RemoteItem { get; set; } #nullable restore #else - public ApiSdk.Models.RemoteItem RemoteItem { get; set; } + public global::ApiSdk.Models.RemoteItem RemoteItem { get; set; } +#endif + /// The retentionLabel property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.ItemRetentionLabel? RetentionLabel { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.ItemRetentionLabel RetentionLabel { get; set; } #endif /// The root property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Root? Root { get; set; } + public global::ApiSdk.Models.Root? Root { get; set; } #nullable restore #else - public ApiSdk.Models.Root Root { get; set; } + public global::ApiSdk.Models.Root Root { get; set; } #endif /// The searchResult property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SearchResult? SearchResult { get; set; } + public global::ApiSdk.Models.SearchResult? SearchResult { get; set; } #nullable restore #else - public ApiSdk.Models.SearchResult SearchResult { get; set; } + public global::ApiSdk.Models.SearchResult SearchResult { get; set; } #endif /// The shared property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Shared? Shared { get; set; } + public global::ApiSdk.Models.Shared? Shared { get; set; } #nullable restore #else - public ApiSdk.Models.Shared Shared { get; set; } + public global::ApiSdk.Models.Shared Shared { get; set; } #endif /// The sharepointIds property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SharepointIds? SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds? SharepointIds { get; set; } #nullable restore #else - public ApiSdk.Models.SharepointIds SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds SharepointIds { get; set; } #endif /// Size of the item in bytes. Read-only. public long? Size { get; set; } /// The specialFolder property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SpecialFolder? SpecialFolder { get; set; } + public global::ApiSdk.Models.SpecialFolder? SpecialFolder { get; set; } #nullable restore #else - public ApiSdk.Models.SpecialFolder SpecialFolder { get; set; } + public global::ApiSdk.Models.SpecialFolder SpecialFolder { get; set; } #endif /// The set of subscriptions on the item. Only supported on the root of a drive. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Subscriptions { get; set; } + public List? Subscriptions { get; set; } #nullable restore #else - public List Subscriptions { get; set; } + public List Subscriptions { get; set; } #endif - /// Collection containing [ThumbnailSet][] objects associated with the item. For more info, see [getting thumbnails][]. Read-only. Nullable. + /// Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Thumbnails { get; set; } + public List? Thumbnails { get; set; } #nullable restore #else - public List Thumbnails { get; set; } + public List Thumbnails { get; set; } #endif - /// The list of previous versions of the item. For more info, see [getting previous versions][]. Read-only. Nullable. + /// The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Versions { get; set; } + public List? Versions { get; set; } #nullable restore #else - public List Versions { get; set; } + public List Versions { get; set; } #endif /// The video property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Video? Video { get; set; } + public global::ApiSdk.Models.Video? Video { get; set; } #nullable restore #else - public ApiSdk.Models.Video Video { get; set; } + public global::ApiSdk.Models.Video Video { get; set; } #endif /// WebDAV compatible URL for the item. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -251,97 +265,106 @@ public class DriveItem : BaseItem, IParsable { /// The workbook property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Workbook? Workbook { get; set; } + public global::ApiSdk.Models.Workbook? Workbook { get; set; } #nullable restore #else - public ApiSdk.Models.Workbook Workbook { get; set; } + public global::ApiSdk.Models.Workbook Workbook { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DriveItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DriveItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DriveItem(); + return new global::ApiSdk.Models.DriveItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"analytics", n => { Analytics = n.GetObjectValue(ItemAnalytics.CreateFromDiscriminatorValue); } }, - {"audio", n => { Audio = n.GetObjectValue(ApiSdk.Models.Audio.CreateFromDiscriminatorValue); } }, - {"bundle", n => { Bundle = n.GetObjectValue(ApiSdk.Models.Bundle.CreateFromDiscriminatorValue); } }, - {"cTag", n => { CTag = n.GetStringValue(); } }, - {"children", n => { Children = n.GetCollectionOfObjectValues(DriveItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"content", n => { Content = n.GetByteArrayValue(); } }, - {"deleted", n => { Deleted = n.GetObjectValue(ApiSdk.Models.Deleted.CreateFromDiscriminatorValue); } }, - {"file", n => { File = n.GetObjectValue(FileObject.CreateFromDiscriminatorValue); } }, - {"fileSystemInfo", n => { FileSystemInfo = n.GetObjectValue(ApiSdk.Models.FileSystemInfo.CreateFromDiscriminatorValue); } }, - {"folder", n => { Folder = n.GetObjectValue(ApiSdk.Models.Folder.CreateFromDiscriminatorValue); } }, - {"image", n => { Image = n.GetObjectValue(ApiSdk.Models.Image.CreateFromDiscriminatorValue); } }, - {"listItem", n => { ListItem = n.GetObjectValue(ApiSdk.Models.ListItem.CreateFromDiscriminatorValue); } }, - {"location", n => { Location = n.GetObjectValue(GeoCoordinates.CreateFromDiscriminatorValue); } }, - {"malware", n => { Malware = n.GetObjectValue(ApiSdk.Models.Malware.CreateFromDiscriminatorValue); } }, - {"package", n => { Package = n.GetObjectValue(ApiSdk.Models.Package.CreateFromDiscriminatorValue); } }, - {"pendingOperations", n => { PendingOperations = n.GetObjectValue(ApiSdk.Models.PendingOperations.CreateFromDiscriminatorValue); } }, - {"permissions", n => { Permissions = n.GetCollectionOfObjectValues(Permission.CreateFromDiscriminatorValue)?.ToList(); } }, - {"photo", n => { Photo = n.GetObjectValue(ApiSdk.Models.Photo.CreateFromDiscriminatorValue); } }, - {"publication", n => { Publication = n.GetObjectValue(PublicationFacet.CreateFromDiscriminatorValue); } }, - {"remoteItem", n => { RemoteItem = n.GetObjectValue(ApiSdk.Models.RemoteItem.CreateFromDiscriminatorValue); } }, - {"root", n => { Root = n.GetObjectValue(ApiSdk.Models.Root.CreateFromDiscriminatorValue); } }, - {"searchResult", n => { SearchResult = n.GetObjectValue(ApiSdk.Models.SearchResult.CreateFromDiscriminatorValue); } }, - {"shared", n => { Shared = n.GetObjectValue(ApiSdk.Models.Shared.CreateFromDiscriminatorValue); } }, - {"sharepointIds", n => { SharepointIds = n.GetObjectValue(ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, - {"size", n => { Size = n.GetLongValue(); } }, - {"specialFolder", n => { SpecialFolder = n.GetObjectValue(ApiSdk.Models.SpecialFolder.CreateFromDiscriminatorValue); } }, - {"subscriptions", n => { Subscriptions = n.GetCollectionOfObjectValues(Subscription.CreateFromDiscriminatorValue)?.ToList(); } }, - {"thumbnails", n => { Thumbnails = n.GetCollectionOfObjectValues(ThumbnailSet.CreateFromDiscriminatorValue)?.ToList(); } }, - {"versions", n => { Versions = n.GetCollectionOfObjectValues(DriveItemVersion.CreateFromDiscriminatorValue)?.ToList(); } }, - {"video", n => { Video = n.GetObjectValue(ApiSdk.Models.Video.CreateFromDiscriminatorValue); } }, - {"webDavUrl", n => { WebDavUrl = n.GetStringValue(); } }, - {"workbook", n => { Workbook = n.GetObjectValue(ApiSdk.Models.Workbook.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "analytics", n => { Analytics = n.GetObjectValue(global::ApiSdk.Models.ItemAnalytics.CreateFromDiscriminatorValue); } }, + { "audio", n => { Audio = n.GetObjectValue(global::ApiSdk.Models.Audio.CreateFromDiscriminatorValue); } }, + { "bundle", n => { Bundle = n.GetObjectValue(global::ApiSdk.Models.Bundle.CreateFromDiscriminatorValue); } }, + { "cTag", n => { CTag = n.GetStringValue(); } }, + { "children", n => { Children = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "content", n => { Content = n.GetByteArrayValue(); } }, + { "deleted", n => { Deleted = n.GetObjectValue(global::ApiSdk.Models.Deleted.CreateFromDiscriminatorValue); } }, + { "file", n => { File = n.GetObjectValue(global::ApiSdk.Models.FileObject.CreateFromDiscriminatorValue); } }, + { "fileSystemInfo", n => { FileSystemInfo = n.GetObjectValue(global::ApiSdk.Models.FileSystemInfo.CreateFromDiscriminatorValue); } }, + { "folder", n => { Folder = n.GetObjectValue(global::ApiSdk.Models.Folder.CreateFromDiscriminatorValue); } }, + { "image", n => { Image = n.GetObjectValue(global::ApiSdk.Models.Image.CreateFromDiscriminatorValue); } }, + { "listItem", n => { ListItem = n.GetObjectValue(global::ApiSdk.Models.ListItem.CreateFromDiscriminatorValue); } }, + { "location", n => { Location = n.GetObjectValue(global::ApiSdk.Models.GeoCoordinates.CreateFromDiscriminatorValue); } }, + { "malware", n => { Malware = n.GetObjectValue(global::ApiSdk.Models.Malware.CreateFromDiscriminatorValue); } }, + { "package", n => { Package = n.GetObjectValue(global::ApiSdk.Models.Package.CreateFromDiscriminatorValue); } }, + { "pendingOperations", n => { PendingOperations = n.GetObjectValue(global::ApiSdk.Models.PendingOperations.CreateFromDiscriminatorValue); } }, + { "permissions", n => { Permissions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Permission.CreateFromDiscriminatorValue)?.AsList(); } }, + { "photo", n => { Photo = n.GetObjectValue(global::ApiSdk.Models.Photo.CreateFromDiscriminatorValue); } }, + { "publication", n => { Publication = n.GetObjectValue(global::ApiSdk.Models.PublicationFacet.CreateFromDiscriminatorValue); } }, + { "remoteItem", n => { RemoteItem = n.GetObjectValue(global::ApiSdk.Models.RemoteItem.CreateFromDiscriminatorValue); } }, + { "retentionLabel", n => { RetentionLabel = n.GetObjectValue(global::ApiSdk.Models.ItemRetentionLabel.CreateFromDiscriminatorValue); } }, + { "root", n => { Root = n.GetObjectValue(global::ApiSdk.Models.Root.CreateFromDiscriminatorValue); } }, + { "searchResult", n => { SearchResult = n.GetObjectValue(global::ApiSdk.Models.SearchResult.CreateFromDiscriminatorValue); } }, + { "shared", n => { Shared = n.GetObjectValue(global::ApiSdk.Models.Shared.CreateFromDiscriminatorValue); } }, + { "sharepointIds", n => { SharepointIds = n.GetObjectValue(global::ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, + { "size", n => { Size = n.GetLongValue(); } }, + { "specialFolder", n => { SpecialFolder = n.GetObjectValue(global::ApiSdk.Models.SpecialFolder.CreateFromDiscriminatorValue); } }, + { "subscriptions", n => { Subscriptions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Subscription.CreateFromDiscriminatorValue)?.AsList(); } }, + { "thumbnails", n => { Thumbnails = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ThumbnailSet.CreateFromDiscriminatorValue)?.AsList(); } }, + { "versions", n => { Versions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DriveItemVersion.CreateFromDiscriminatorValue)?.AsList(); } }, + { "video", n => { Video = n.GetObjectValue(global::ApiSdk.Models.Video.CreateFromDiscriminatorValue); } }, + { "webDavUrl", n => { WebDavUrl = n.GetStringValue(); } }, + { "workbook", n => { Workbook = n.GetObjectValue(global::ApiSdk.Models.Workbook.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("analytics", Analytics); - writer.WriteObjectValue("audio", Audio); - writer.WriteObjectValue("bundle", Bundle); - writer.WriteCollectionOfObjectValues("children", Children); + writer.WriteObjectValue("analytics", Analytics); + writer.WriteObjectValue("audio", Audio); + writer.WriteObjectValue("bundle", Bundle); + writer.WriteCollectionOfObjectValues("children", Children); writer.WriteByteArrayValue("content", Content); writer.WriteStringValue("cTag", CTag); - writer.WriteObjectValue("deleted", Deleted); - writer.WriteObjectValue("file", File); - writer.WriteObjectValue("fileSystemInfo", FileSystemInfo); - writer.WriteObjectValue("folder", Folder); - writer.WriteObjectValue("image", Image); - writer.WriteObjectValue("listItem", ListItem); - writer.WriteObjectValue("location", Location); - writer.WriteObjectValue("malware", Malware); - writer.WriteObjectValue("package", Package); - writer.WriteObjectValue("pendingOperations", PendingOperations); - writer.WriteCollectionOfObjectValues("permissions", Permissions); - writer.WriteObjectValue("photo", Photo); - writer.WriteObjectValue("publication", Publication); - writer.WriteObjectValue("remoteItem", RemoteItem); - writer.WriteObjectValue("root", Root); - writer.WriteObjectValue("searchResult", SearchResult); - writer.WriteObjectValue("shared", Shared); - writer.WriteObjectValue("sharepointIds", SharepointIds); + writer.WriteObjectValue("deleted", Deleted); + writer.WriteObjectValue("file", File); + writer.WriteObjectValue("fileSystemInfo", FileSystemInfo); + writer.WriteObjectValue("folder", Folder); + writer.WriteObjectValue("image", Image); + writer.WriteObjectValue("listItem", ListItem); + writer.WriteObjectValue("location", Location); + writer.WriteObjectValue("malware", Malware); + writer.WriteObjectValue("package", Package); + writer.WriteObjectValue("pendingOperations", PendingOperations); + writer.WriteCollectionOfObjectValues("permissions", Permissions); + writer.WriteObjectValue("photo", Photo); + writer.WriteObjectValue("publication", Publication); + writer.WriteObjectValue("remoteItem", RemoteItem); + writer.WriteObjectValue("retentionLabel", RetentionLabel); + writer.WriteObjectValue("root", Root); + writer.WriteObjectValue("searchResult", SearchResult); + writer.WriteObjectValue("shared", Shared); + writer.WriteObjectValue("sharepointIds", SharepointIds); writer.WriteLongValue("size", Size); - writer.WriteObjectValue("specialFolder", SpecialFolder); - writer.WriteCollectionOfObjectValues("subscriptions", Subscriptions); - writer.WriteCollectionOfObjectValues("thumbnails", Thumbnails); - writer.WriteCollectionOfObjectValues("versions", Versions); - writer.WriteObjectValue("video", Video); + writer.WriteObjectValue("specialFolder", SpecialFolder); + writer.WriteCollectionOfObjectValues("subscriptions", Subscriptions); + writer.WriteCollectionOfObjectValues("thumbnails", Thumbnails); + writer.WriteCollectionOfObjectValues("versions", Versions); + writer.WriteObjectValue("video", Video); writer.WriteStringValue("webDavUrl", WebDavUrl); - writer.WriteObjectValue("workbook", Workbook); + writer.WriteObjectValue("workbook", Workbook); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/DriveItemVersion.cs b/src/sample/generated/Models/DriveItemVersion.cs index 1060a4b7..cfe0a8b2 100644 --- a/src/sample/generated/Models/DriveItemVersion.cs +++ b/src/sample/generated/Models/DriveItemVersion.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class DriveItemVersion : BaseItemVersion, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class DriveItemVersion : global::ApiSdk.Models.BaseItemVersion, IParsable + #pragma warning restore CS1591 + { /// The content stream for this version of the item. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,25 +25,31 @@ public class DriveItemVersion : BaseItemVersion, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new DriveItemVersion CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.DriveItemVersion CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new DriveItemVersion(); + return new global::ApiSdk.Models.DriveItemVersion(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"content", n => { Content = n.GetByteArrayValue(); } }, - {"size", n => { Size = n.GetLongValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "content", n => { Content = n.GetByteArrayValue(); } }, + { "size", n => { Size = n.GetLongValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); @@ -45,3 +57,4 @@ public class DriveItemVersion : BaseItemVersion, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/EmailAddress.cs b/src/sample/generated/Models/EmailAddress.cs index d56a34d8..ff537247 100644 --- a/src/sample/generated/Models/EmailAddress.cs +++ b/src/sample/generated/Models/EmailAddress.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class EmailAddress : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EmailAddress : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The email address of the person or entity. @@ -25,33 +31,40 @@ public class EmailAddress : IAdditionalDataHolder, IParsable { public string Name { get; set; } #endif /// - /// Instantiates a new emailAddress and sets the default values. + /// Instantiates a new and sets the default values. /// - public EmailAddress() { + public EmailAddress() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static EmailAddress CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.EmailAddress CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new EmailAddress(); + return new global::ApiSdk.Models.EmailAddress(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"address", n => { Address = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "address", n => { Address = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("name", Name); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/EmailAuthenticationMethod.cs b/src/sample/generated/Models/EmailAuthenticationMethod.cs index 4138f404..ef21c173 100644 --- a/src/sample/generated/Models/EmailAuthenticationMethod.cs +++ b/src/sample/generated/Models/EmailAuthenticationMethod.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class EmailAuthenticationMethod : AuthenticationMethod, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EmailAuthenticationMethod : global::ApiSdk.Models.AuthenticationMethod, IParsable + #pragma warning restore CS1591 + { /// The email address registered to this user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class EmailAuthenticationMethod : AuthenticationMethod, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new EmailAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.EmailAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new EmailAuthenticationMethod(); + return new global::ApiSdk.Models.EmailAuthenticationMethod(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"emailAddress", n => { EmailAddress = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "emailAddress", n => { EmailAddress = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("emailAddress", EmailAddress); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/EmployeeExperienceUser.cs b/src/sample/generated/Models/EmployeeExperienceUser.cs index 5dfa204f..b479c7c3 100644 --- a/src/sample/generated/Models/EmployeeExperienceUser.cs +++ b/src/sample/generated/Models/EmployeeExperienceUser.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class EmployeeExperienceUser : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EmployeeExperienceUser : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The learningCourseActivities property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? LearningCourseActivities { get; set; } + public List? LearningCourseActivities { get; set; } #nullable restore #else - public List LearningCourseActivities { get; set; } + public List LearningCourseActivities { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new EmployeeExperienceUser CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.EmployeeExperienceUser CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new EmployeeExperienceUser(); + return new global::ApiSdk.Models.EmployeeExperienceUser(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"learningCourseActivities", n => { LearningCourseActivities = n.GetCollectionOfObjectValues(LearningCourseActivity.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "learningCourseActivities", n => { LearningCourseActivities = n.GetCollectionOfObjectValues(global::ApiSdk.Models.LearningCourseActivity.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("learningCourseActivities", LearningCourseActivities); + writer.WriteCollectionOfObjectValues("learningCourseActivities", LearningCourseActivities); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/EmployeeOrgData.cs b/src/sample/generated/Models/EmployeeOrgData.cs index 1c9e662b..0baa912c 100644 --- a/src/sample/generated/Models/EmployeeOrgData.cs +++ b/src/sample/generated/Models/EmployeeOrgData.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class EmployeeOrgData : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EmployeeOrgData : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The cost center associated with the user. Returned only on $select. Supports $filter. @@ -25,33 +31,40 @@ public class EmployeeOrgData : IAdditionalDataHolder, IParsable { public string Division { get; set; } #endif /// - /// Instantiates a new employeeOrgData and sets the default values. + /// Instantiates a new and sets the default values. /// - public EmployeeOrgData() { + public EmployeeOrgData() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static EmployeeOrgData CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.EmployeeOrgData CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new EmployeeOrgData(); + return new global::ApiSdk.Models.EmployeeOrgData(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"costCenter", n => { CostCenter = n.GetStringValue(); } }, - {"division", n => { Division = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "costCenter", n => { CostCenter = n.GetStringValue(); } }, + { "division", n => { Division = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("costCenter", CostCenter); writer.WriteStringValue("division", Division); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Endpoint.cs b/src/sample/generated/Models/Endpoint.cs index 4f5544a3..8efcfda3 100644 --- a/src/sample/generated/Models/Endpoint.cs +++ b/src/sample/generated/Models/Endpoint.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Endpoint : DirectoryObject, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Endpoint : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { /// The capability property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -49,28 +55,34 @@ public class Endpoint : DirectoryObject, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Endpoint CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Endpoint CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Endpoint(); + return new global::ApiSdk.Models.Endpoint(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"capability", n => { Capability = n.GetStringValue(); } }, - {"providerId", n => { ProviderId = n.GetStringValue(); } }, - {"providerName", n => { ProviderName = n.GetStringValue(); } }, - {"providerResourceId", n => { ProviderResourceId = n.GetStringValue(); } }, - {"uri", n => { Uri = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "capability", n => { Capability = n.GetStringValue(); } }, + { "providerId", n => { ProviderId = n.GetStringValue(); } }, + { "providerName", n => { ProviderName = n.GetStringValue(); } }, + { "providerResourceId", n => { ProviderResourceId = n.GetStringValue(); } }, + { "uri", n => { Uri = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("capability", Capability); @@ -81,3 +93,4 @@ public class Endpoint : DirectoryObject, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/EndpointCollectionResponse.cs b/src/sample/generated/Models/EndpointCollectionResponse.cs index c1cdd69e..4f83fecf 100644 --- a/src/sample/generated/Models/EndpointCollectionResponse.cs +++ b/src/sample/generated/Models/EndpointCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class EndpointCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EndpointCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class EndpointCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new endpointCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public EndpointCollectionResponse() { + public EndpointCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static EndpointCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.EndpointCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new EndpointCollectionResponse(); + return new global::ApiSdk.Models.EndpointCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(Endpoint.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Endpoint.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Entity.cs b/src/sample/generated/Models/Entity.cs index 8c935266..492b1cd0 100644 --- a/src/sample/generated/Models/Entity.cs +++ b/src/sample/generated/Models/Entity.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Entity : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Entity : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The unique identifier for an entity. Read-only. @@ -17,35 +23,43 @@ public class Entity : IAdditionalDataHolder, IParsable { public string Id { get; set; } #endif /// - /// Instantiates a new entity and sets the default values. + /// Instantiates a new and sets the default values. /// - public Entity() { + public Entity() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Entity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Entity(); + return new global::ApiSdk.Models.Entity(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"id", n => { Id = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Event.cs b/src/sample/generated/Models/Event.cs index 39fb0ac5..73d7ab59 100644 --- a/src/sample/generated/Models/Event.cs +++ b/src/sample/generated/Models/Event.cs @@ -1,36 +1,42 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Event : OutlookItem, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Event : global::ApiSdk.Models.OutlookItem, IParsable + #pragma warning restore CS1591 + { /// true if the meeting organizer allows invitees to propose a new time when responding; otherwise, false. Optional. Default is true. public bool? AllowNewTimeProposals { get; set; } /// The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Attachments { get; set; } + public List? Attachments { get; set; } #nullable restore #else - public List Attachments { get; set; } + public List Attachments { get; set; } #endif /// The collection of attendees for the event. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Attendees { get; set; } + public List? Attendees { get; set; } #nullable restore #else - public List Attendees { get; set; } + public List Attendees { get; set; } #endif /// The body property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemBody? Body { get; set; } + public global::ApiSdk.Models.ItemBody? Body { get; set; } #nullable restore #else - public ItemBody Body { get; set; } + public global::ApiSdk.Models.ItemBody Body { get; set; } #endif /// The preview of the message associated with the event. It is in text format. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -43,26 +49,26 @@ public class Event : OutlookItem, IParsable { /// The calendar property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Calendar? Calendar { get; set; } + public global::ApiSdk.Models.Calendar? Calendar { get; set; } #nullable restore #else - public ApiSdk.Models.Calendar Calendar { get; set; } + public global::ApiSdk.Models.Calendar Calendar { get; set; } #endif /// The end property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? End { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? End { get; set; } #nullable restore #else - public DateTimeTimeZone End { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone End { get; set; } #endif /// The collection of open extensions defined for the event. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif /// Set to true if the event has attachments. public bool? HasAttachments { get; set; } @@ -77,62 +83,62 @@ public class Event : OutlookItem, IParsable { public string ICalUId { get; set; } #endif /// The importance property - public ApiSdk.Models.Importance? Importance { get; set; } + public global::ApiSdk.Models.Importance? Importance { get; set; } /// The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Instances { get; set; } + public List? Instances { get; set; } #nullable restore #else - public List Instances { get; set; } + public List Instances { get; set; } #endif - /// The isAllDay property + /// Set to true if the event lasts all day. If true, regardless of whether it's a single-day or multi-day event, start and end time must be set to midnight and be in the same time zone. public bool? IsAllDay { get; set; } - /// The isCancelled property + /// Set to true if the event has been canceled. public bool? IsCancelled { get; set; } - /// The isDraft property + /// Set to true if the user has updated the meeting in Outlook but has not sent the updates to attendees. Set to false if all changes have been sent, or if the event is an appointment without any attendees. public bool? IsDraft { get; set; } - /// The isOnlineMeeting property + /// True if this event has online meeting information (that is, onlineMeeting points to an onlineMeetingInfo resource), false otherwise. Default is false (onlineMeeting is null). Optional. After you set isOnlineMeeting to true, Microsoft Graph initializes onlineMeeting. Subsequently Outlook ignores any further changes to isOnlineMeeting, and the meeting remains available online. public bool? IsOnlineMeeting { get; set; } - /// The isOrganizer property + /// Set to true if the calendar owner (specified by the owner property of the calendar) is the organizer of the event (specified by the organizer property of the event). This also applies if a delegate organized the event on behalf of the owner. public bool? IsOrganizer { get; set; } - /// The isReminderOn property + /// Set to true if an alert is set to remind the user of the event. public bool? IsReminderOn { get; set; } /// The location property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Location? Location { get; set; } + public global::ApiSdk.Models.Location? Location { get; set; } #nullable restore #else - public ApiSdk.Models.Location Location { get; set; } + public global::ApiSdk.Models.Location Location { get; set; } #endif - /// The locations property + /// The locations where the event is held or attended from. The location and locations properties always correspond with each other. If you update the location property, any prior locations in the locations collection would be removed and replaced by the new location value. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Locations { get; set; } + public List? Locations { get; set; } #nullable restore #else - public List Locations { get; set; } + public List Locations { get; set; } #endif /// The collection of multi-value extended properties defined for the event. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MultiValueExtendedProperties { get; set; } + public List? MultiValueExtendedProperties { get; set; } #nullable restore #else - public List MultiValueExtendedProperties { get; set; } + public List MultiValueExtendedProperties { get; set; } #endif /// The onlineMeeting property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public OnlineMeetingInfo? OnlineMeeting { get; set; } + public global::ApiSdk.Models.OnlineMeetingInfo? OnlineMeeting { get; set; } #nullable restore #else - public OnlineMeetingInfo OnlineMeeting { get; set; } + public global::ApiSdk.Models.OnlineMeetingInfo OnlineMeeting { get; set; } #endif /// The onlineMeetingProvider property - public OnlineMeetingProviderType? OnlineMeetingProvider { get; set; } - /// The onlineMeetingUrl property + public global::ApiSdk.Models.OnlineMeetingProviderType? OnlineMeetingProvider { get; set; } + /// A URL for an online meeting. The property is set only when an organizer specifies in Outlook that an event is an online meeting such as Skype. Read-only.To access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. The onlineMeetingUrl property will be deprecated in the future. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnlineMeetingUrl { get; set; } @@ -143,12 +149,12 @@ public class Event : OutlookItem, IParsable { /// The organizer property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Recipient? Organizer { get; set; } + public global::ApiSdk.Models.Recipient? Organizer { get; set; } #nullable restore #else - public Recipient Organizer { get; set; } + public global::ApiSdk.Models.Recipient Organizer { get; set; } #endif - /// The originalEndTimeZone property + /// The end time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OriginalEndTimeZone { get; set; } @@ -156,9 +162,9 @@ public class Event : OutlookItem, IParsable { #else public string OriginalEndTimeZone { get; set; } #endif - /// The originalStart property + /// Represents the start time of an event when it is initially created as an occurrence or exception in a recurring series. This property is not returned for events that are single instances. Its date and time information is expressed in ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? OriginalStart { get; set; } - /// The originalStartTimeZone property + /// The start time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OriginalStartTimeZone { get; set; } @@ -169,26 +175,26 @@ public class Event : OutlookItem, IParsable { /// The recurrence property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PatternedRecurrence? Recurrence { get; set; } + public global::ApiSdk.Models.PatternedRecurrence? Recurrence { get; set; } #nullable restore #else - public PatternedRecurrence Recurrence { get; set; } + public global::ApiSdk.Models.PatternedRecurrence Recurrence { get; set; } #endif - /// The reminderMinutesBeforeStart property + /// The number of minutes before the event start time that the reminder alert occurs. public int? ReminderMinutesBeforeStart { get; set; } - /// The responseRequested property + /// Default is true, which represents the organizer would like an invitee to send a response to the event. public bool? ResponseRequested { get; set; } /// The responseStatus property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ResponseStatus? ResponseStatus { get; set; } + public global::ApiSdk.Models.ResponseStatus? ResponseStatus { get; set; } #nullable restore #else - public ApiSdk.Models.ResponseStatus ResponseStatus { get; set; } + public global::ApiSdk.Models.ResponseStatus ResponseStatus { get; set; } #endif /// The sensitivity property - public ApiSdk.Models.Sensitivity? Sensitivity { get; set; } - /// The seriesMasterId property + public global::ApiSdk.Models.Sensitivity? Sensitivity { get; set; } + /// The ID for the recurring series master item, if this event is part of a recurring series. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SeriesMasterId { get; set; } @@ -197,24 +203,24 @@ public class Event : OutlookItem, IParsable { public string SeriesMasterId { get; set; } #endif /// The showAs property - public FreeBusyStatus? ShowAs { get; set; } + public global::ApiSdk.Models.FreeBusyStatus? ShowAs { get; set; } /// The collection of single-value extended properties defined for the event. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SingleValueExtendedProperties { get; set; } + public List? SingleValueExtendedProperties { get; set; } #nullable restore #else - public List SingleValueExtendedProperties { get; set; } + public List SingleValueExtendedProperties { get; set; } #endif /// The start property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? Start { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? Start { get; set; } #nullable restore #else - public DateTimeTimeZone Start { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone Start { get; set; } #endif - /// The subject property + /// The text of the event's subject line. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Subject { get; set; } @@ -222,7 +228,7 @@ public class Event : OutlookItem, IParsable { #else public string Subject { get; set; } #endif - /// The transactionId property + /// A custom identifier specified by a client app for the server to avoid redundant POST operations in case of client retries to create the same event. This is useful when low network connectivity causes the client to time out before receiving a response from the server for the client's prior create-event request. After you set transactionId when creating an event, you cannot change transactionId in a subsequent update. This property is only returned in a response payload if an app has set it. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TransactionId { get; set; } @@ -231,8 +237,8 @@ public class Event : OutlookItem, IParsable { public string TransactionId { get; set; } #endif /// The type property - public EventType? Type { get; set; } - /// The webLink property + public global::ApiSdk.Models.EventType? Type { get; set; } + /// The URL to open the event in Outlook on the web.Outlook on the web opens the event in the browser if you are signed in to your mailbox. Otherwise, Outlook on the web prompts you to sign in.This URL cannot be accessed from within an iFrame. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? WebLink { get; set; } @@ -243,109 +249,116 @@ public class Event : OutlookItem, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Event CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Event CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Event(); + return new global::ApiSdk.Models.Event(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"allowNewTimeProposals", n => { AllowNewTimeProposals = n.GetBoolValue(); } }, - {"attachments", n => { Attachments = n.GetCollectionOfObjectValues(Attachment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"attendees", n => { Attendees = n.GetCollectionOfObjectValues(Attendee.CreateFromDiscriminatorValue)?.ToList(); } }, - {"body", n => { Body = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, - {"bodyPreview", n => { BodyPreview = n.GetStringValue(); } }, - {"calendar", n => { Calendar = n.GetObjectValue(ApiSdk.Models.Calendar.CreateFromDiscriminatorValue); } }, - {"end", n => { End = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, - {"hideAttendees", n => { HideAttendees = n.GetBoolValue(); } }, - {"iCalUId", n => { ICalUId = n.GetStringValue(); } }, - {"importance", n => { Importance = n.GetEnumValue(); } }, - {"instances", n => { Instances = n.GetCollectionOfObjectValues(Event.CreateFromDiscriminatorValue)?.ToList(); } }, - {"isAllDay", n => { IsAllDay = n.GetBoolValue(); } }, - {"isCancelled", n => { IsCancelled = n.GetBoolValue(); } }, - {"isDraft", n => { IsDraft = n.GetBoolValue(); } }, - {"isOnlineMeeting", n => { IsOnlineMeeting = n.GetBoolValue(); } }, - {"isOrganizer", n => { IsOrganizer = n.GetBoolValue(); } }, - {"isReminderOn", n => { IsReminderOn = n.GetBoolValue(); } }, - {"location", n => { Location = n.GetObjectValue(ApiSdk.Models.Location.CreateFromDiscriminatorValue); } }, - {"locations", n => { Locations = n.GetCollectionOfObjectValues(ApiSdk.Models.Location.CreateFromDiscriminatorValue)?.ToList(); } }, - {"multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"onlineMeeting", n => { OnlineMeeting = n.GetObjectValue(OnlineMeetingInfo.CreateFromDiscriminatorValue); } }, - {"onlineMeetingProvider", n => { OnlineMeetingProvider = n.GetEnumValue(); } }, - {"onlineMeetingUrl", n => { OnlineMeetingUrl = n.GetStringValue(); } }, - {"organizer", n => { Organizer = n.GetObjectValue(Recipient.CreateFromDiscriminatorValue); } }, - {"originalEndTimeZone", n => { OriginalEndTimeZone = n.GetStringValue(); } }, - {"originalStart", n => { OriginalStart = n.GetDateTimeOffsetValue(); } }, - {"originalStartTimeZone", n => { OriginalStartTimeZone = n.GetStringValue(); } }, - {"recurrence", n => { Recurrence = n.GetObjectValue(PatternedRecurrence.CreateFromDiscriminatorValue); } }, - {"reminderMinutesBeforeStart", n => { ReminderMinutesBeforeStart = n.GetIntValue(); } }, - {"responseRequested", n => { ResponseRequested = n.GetBoolValue(); } }, - {"responseStatus", n => { ResponseStatus = n.GetObjectValue(ApiSdk.Models.ResponseStatus.CreateFromDiscriminatorValue); } }, - {"sensitivity", n => { Sensitivity = n.GetEnumValue(); } }, - {"seriesMasterId", n => { SeriesMasterId = n.GetStringValue(); } }, - {"showAs", n => { ShowAs = n.GetEnumValue(); } }, - {"singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"start", n => { Start = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"subject", n => { Subject = n.GetStringValue(); } }, - {"transactionId", n => { TransactionId = n.GetStringValue(); } }, - {"type", n => { Type = n.GetEnumValue(); } }, - {"webLink", n => { WebLink = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "allowNewTimeProposals", n => { AllowNewTimeProposals = n.GetBoolValue(); } }, + { "attachments", n => { Attachments = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Attachment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "attendees", n => { Attendees = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Attendee.CreateFromDiscriminatorValue)?.AsList(); } }, + { "body", n => { Body = n.GetObjectValue(global::ApiSdk.Models.ItemBody.CreateFromDiscriminatorValue); } }, + { "bodyPreview", n => { BodyPreview = n.GetStringValue(); } }, + { "calendar", n => { Calendar = n.GetObjectValue(global::ApiSdk.Models.Calendar.CreateFromDiscriminatorValue); } }, + { "end", n => { End = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, + { "hideAttendees", n => { HideAttendees = n.GetBoolValue(); } }, + { "iCalUId", n => { ICalUId = n.GetStringValue(); } }, + { "importance", n => { Importance = n.GetEnumValue(); } }, + { "instances", n => { Instances = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Event.CreateFromDiscriminatorValue)?.AsList(); } }, + { "isAllDay", n => { IsAllDay = n.GetBoolValue(); } }, + { "isCancelled", n => { IsCancelled = n.GetBoolValue(); } }, + { "isDraft", n => { IsDraft = n.GetBoolValue(); } }, + { "isOnlineMeeting", n => { IsOnlineMeeting = n.GetBoolValue(); } }, + { "isOrganizer", n => { IsOrganizer = n.GetBoolValue(); } }, + { "isReminderOn", n => { IsReminderOn = n.GetBoolValue(); } }, + { "location", n => { Location = n.GetObjectValue(global::ApiSdk.Models.Location.CreateFromDiscriminatorValue); } }, + { "locations", n => { Locations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Location.CreateFromDiscriminatorValue)?.AsList(); } }, + { "multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "onlineMeeting", n => { OnlineMeeting = n.GetObjectValue(global::ApiSdk.Models.OnlineMeetingInfo.CreateFromDiscriminatorValue); } }, + { "onlineMeetingProvider", n => { OnlineMeetingProvider = n.GetEnumValue(); } }, + { "onlineMeetingUrl", n => { OnlineMeetingUrl = n.GetStringValue(); } }, + { "organizer", n => { Organizer = n.GetObjectValue(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue); } }, + { "originalEndTimeZone", n => { OriginalEndTimeZone = n.GetStringValue(); } }, + { "originalStart", n => { OriginalStart = n.GetDateTimeOffsetValue(); } }, + { "originalStartTimeZone", n => { OriginalStartTimeZone = n.GetStringValue(); } }, + { "recurrence", n => { Recurrence = n.GetObjectValue(global::ApiSdk.Models.PatternedRecurrence.CreateFromDiscriminatorValue); } }, + { "reminderMinutesBeforeStart", n => { ReminderMinutesBeforeStart = n.GetIntValue(); } }, + { "responseRequested", n => { ResponseRequested = n.GetBoolValue(); } }, + { "responseStatus", n => { ResponseStatus = n.GetObjectValue(global::ApiSdk.Models.ResponseStatus.CreateFromDiscriminatorValue); } }, + { "sensitivity", n => { Sensitivity = n.GetEnumValue(); } }, + { "seriesMasterId", n => { SeriesMasterId = n.GetStringValue(); } }, + { "showAs", n => { ShowAs = n.GetEnumValue(); } }, + { "singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "start", n => { Start = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "subject", n => { Subject = n.GetStringValue(); } }, + { "transactionId", n => { TransactionId = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + { "webLink", n => { WebLink = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowNewTimeProposals", AllowNewTimeProposals); - writer.WriteCollectionOfObjectValues("attachments", Attachments); - writer.WriteCollectionOfObjectValues("attendees", Attendees); - writer.WriteObjectValue("body", Body); + writer.WriteCollectionOfObjectValues("attachments", Attachments); + writer.WriteCollectionOfObjectValues("attendees", Attendees); + writer.WriteObjectValue("body", Body); writer.WriteStringValue("bodyPreview", BodyPreview); - writer.WriteObjectValue("calendar", Calendar); - writer.WriteObjectValue("end", End); - writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteObjectValue("calendar", Calendar); + writer.WriteObjectValue("end", End); + writer.WriteCollectionOfObjectValues("extensions", Extensions); writer.WriteBoolValue("hasAttachments", HasAttachments); writer.WriteBoolValue("hideAttendees", HideAttendees); writer.WriteStringValue("iCalUId", ICalUId); - writer.WriteEnumValue("importance", Importance); - writer.WriteCollectionOfObjectValues("instances", Instances); + writer.WriteEnumValue("importance", Importance); + writer.WriteCollectionOfObjectValues("instances", Instances); writer.WriteBoolValue("isAllDay", IsAllDay); writer.WriteBoolValue("isCancelled", IsCancelled); writer.WriteBoolValue("isDraft", IsDraft); writer.WriteBoolValue("isOnlineMeeting", IsOnlineMeeting); writer.WriteBoolValue("isOrganizer", IsOrganizer); writer.WriteBoolValue("isReminderOn", IsReminderOn); - writer.WriteObjectValue("location", Location); - writer.WriteCollectionOfObjectValues("locations", Locations); - writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); - writer.WriteObjectValue("onlineMeeting", OnlineMeeting); - writer.WriteEnumValue("onlineMeetingProvider", OnlineMeetingProvider); + writer.WriteObjectValue("location", Location); + writer.WriteCollectionOfObjectValues("locations", Locations); + writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); + writer.WriteObjectValue("onlineMeeting", OnlineMeeting); + writer.WriteEnumValue("onlineMeetingProvider", OnlineMeetingProvider); writer.WriteStringValue("onlineMeetingUrl", OnlineMeetingUrl); - writer.WriteObjectValue("organizer", Organizer); + writer.WriteObjectValue("organizer", Organizer); writer.WriteStringValue("originalEndTimeZone", OriginalEndTimeZone); writer.WriteDateTimeOffsetValue("originalStart", OriginalStart); writer.WriteStringValue("originalStartTimeZone", OriginalStartTimeZone); - writer.WriteObjectValue("recurrence", Recurrence); + writer.WriteObjectValue("recurrence", Recurrence); writer.WriteIntValue("reminderMinutesBeforeStart", ReminderMinutesBeforeStart); writer.WriteBoolValue("responseRequested", ResponseRequested); - writer.WriteObjectValue("responseStatus", ResponseStatus); - writer.WriteEnumValue("sensitivity", Sensitivity); + writer.WriteObjectValue("responseStatus", ResponseStatus); + writer.WriteEnumValue("sensitivity", Sensitivity); writer.WriteStringValue("seriesMasterId", SeriesMasterId); - writer.WriteEnumValue("showAs", ShowAs); - writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); - writer.WriteObjectValue("start", Start); + writer.WriteEnumValue("showAs", ShowAs); + writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); + writer.WriteObjectValue("start", Start); writer.WriteStringValue("subject", Subject); writer.WriteStringValue("transactionId", TransactionId); - writer.WriteEnumValue("type", Type); + writer.WriteEnumValue("type", Type); writer.WriteStringValue("webLink", WebLink); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/EventMessageDetail.cs b/src/sample/generated/Models/EventMessageDetail.cs index 038bfbf2..470e5327 100644 --- a/src/sample/generated/Models/EventMessageDetail.cs +++ b/src/sample/generated/Models/EventMessageDetail.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class EventMessageDetail : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class EventMessageDetail : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new eventMessageDetail and sets the default values. + /// Instantiates a new and sets the default values. /// - public EventMessageDetail() { + public EventMessageDetail() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static EventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.EventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new EventMessageDetail(); + return new global::ApiSdk.Models.EventMessageDetail(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/EventType.cs b/src/sample/generated/Models/EventType.cs index 479ca924..4e3f90e1 100644 --- a/src/sample/generated/Models/EventType.cs +++ b/src/sample/generated/Models/EventType.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum EventType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum EventType + #pragma warning restore CS1591 + { [EnumMember(Value = "singleInstance")] + #pragma warning disable CS1591 SingleInstance, + #pragma warning restore CS1591 [EnumMember(Value = "occurrence")] + #pragma warning disable CS1591 Occurrence, + #pragma warning restore CS1591 [EnumMember(Value = "exception")] + #pragma warning disable CS1591 Exception, + #pragma warning restore CS1591 [EnumMember(Value = "seriesMaster")] + #pragma warning disable CS1591 SeriesMaster, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/Extension.cs b/src/sample/generated/Models/Extension.cs index affa5ce7..60ae8b94 100644 --- a/src/sample/generated/Models/Extension.cs +++ b/src/sample/generated/Models/Extension.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Extension : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Extension : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Extension CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Extension CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Extension(); + return new global::ApiSdk.Models.Extension(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ExtensionCollectionResponse.cs b/src/sample/generated/Models/ExtensionCollectionResponse.cs index dfed652f..0a453e1c 100644 --- a/src/sample/generated/Models/ExtensionCollectionResponse.cs +++ b/src/sample/generated/Models/ExtensionCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ExtensionCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ExtensionCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class ExtensionCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new extensionCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public ExtensionCollectionResponse() { + public ExtensionCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ExtensionCollectionResponse(); + return new global::ApiSdk.Models.ExtensionCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ExtensionProperty.cs b/src/sample/generated/Models/ExtensionProperty.cs index 10b57998..6250c899 100644 --- a/src/sample/generated/Models/ExtensionProperty.cs +++ b/src/sample/generated/Models/ExtensionProperty.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ExtensionProperty : DirectoryObject, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ExtensionProperty : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { /// Display name of the application object on which this extension property is defined. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -14,7 +20,7 @@ public class ExtensionProperty : DirectoryObject, IParsable { #else public string AppDisplayName { get; set; } #endif - /// Specifies the data type of the value the extension property can hold. Following values are supported. Not nullable. Binary - 256 bytes maximumBooleanDateTime - Must be specified in ISO 8601 format. Will be stored in UTC.Integer - 32-bit value.LargeInteger - 64-bit value.String - 256 characters maximum + /// Specifies the data type of the value the extension property can hold. Following values are supported. Binary - 256 bytes maximumBooleanDateTime - Must be specified in ISO 8601 format. Will be stored in UTC.Integer - 32-bit value.LargeInteger - 64-bit value.String - 256 characters maximumNot nullable. For multivalued directory extensions, these limits apply per value in the collection. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DataType { get; set; } @@ -22,7 +28,9 @@ public class ExtensionProperty : DirectoryObject, IParsable { #else public string DataType { get; set; } #endif - /// Indicates if this extension property was synced from on-premises active directory using Azure AD Connect. Read-only. + /// Defines the directory extension as a multi-valued property. When true, the directory extension property can store a collection of objects of the dataType; for example, a collection of string types such as 'extensionb7b1c57b532f40b8b5ed4b7a7ba67401jobGroupTracker': ['String 1', 'String 2']. The default value is false. Supports $filter (eq). + public bool? IsMultiValued { get; set; } + /// Indicates if this extension property was synced from on-premises active directory using Microsoft Entra Connect. Read-only. public bool? IsSyncedFromOnPremises { get; set; } /// Name of the extension property. Not nullable. Supports $filter (eq). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -43,35 +51,44 @@ public class ExtensionProperty : DirectoryObject, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ExtensionProperty CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ExtensionProperty CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ExtensionProperty(); + return new global::ApiSdk.Models.ExtensionProperty(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, - {"dataType", n => { DataType = n.GetStringValue(); } }, - {"isSyncedFromOnPremises", n => { IsSyncedFromOnPremises = n.GetBoolValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"targetObjects", n => { TargetObjects = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, + { "dataType", n => { DataType = n.GetStringValue(); } }, + { "isMultiValued", n => { IsMultiValued = n.GetBoolValue(); } }, + { "isSyncedFromOnPremises", n => { IsSyncedFromOnPremises = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "targetObjects", n => { TargetObjects = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appDisplayName", AppDisplayName); writer.WriteStringValue("dataType", DataType); + writer.WriteBoolValue("isMultiValued", IsMultiValued); writer.WriteBoolValue("isSyncedFromOnPremises", IsSyncedFromOnPremises); writer.WriteStringValue("name", Name); writer.WriteCollectionOfPrimitiveValues("targetObjects", TargetObjects); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ExternalAudienceScope.cs b/src/sample/generated/Models/ExternalAudienceScope.cs index 949bf7ee..ccb01961 100644 --- a/src/sample/generated/Models/ExternalAudienceScope.cs +++ b/src/sample/generated/Models/ExternalAudienceScope.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ExternalAudienceScope { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ExternalAudienceScope + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "contactsOnly")] + #pragma warning disable CS1591 ContactsOnly, + #pragma warning restore CS1591 [EnumMember(Value = "all")] + #pragma warning disable CS1591 All, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ExternalLink.cs b/src/sample/generated/Models/ExternalLink.cs index b205bacb..c2b824f5 100644 --- a/src/sample/generated/Models/ExternalLink.cs +++ b/src/sample/generated/Models/ExternalLink.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ExternalLink : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ExternalLink : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The URL of the link. @@ -17,35 +23,43 @@ public class ExternalLink : IAdditionalDataHolder, IParsable { public string Href { get; set; } #endif /// - /// Instantiates a new externalLink and sets the default values. + /// Instantiates a new and sets the default values. /// - public ExternalLink() { + public ExternalLink() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ExternalLink CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ExternalLink CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ExternalLink(); + return new global::ApiSdk.Models.ExternalLink(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"href", n => { Href = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "href", n => { Href = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("href", Href); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FederatedIdentityCredential.cs b/src/sample/generated/Models/FederatedIdentityCredential.cs index 0b91048a..7eb7fef8 100644 --- a/src/sample/generated/Models/FederatedIdentityCredential.cs +++ b/src/sample/generated/Models/FederatedIdentityCredential.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class FederatedIdentityCredential : Entity, IParsable { - /// The audience that can appear in the external token. This field is mandatory and should be set to api://AzureADTokenExchange for Azure AD. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Azure AD in your external identity provider and has no fixed value across identity providers - you may need to create a new application registration in your identity provider to serve as the audience of this token. This field can only accept a single value and has a limit of 600 characters. Required. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FederatedIdentityCredential : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The audience that can appear in the external token. This field is mandatory and should be set to api://AzureADTokenExchange for Microsoft Entra ID. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Microsoft Entra ID in your external identity provider and has no fixed value across identity providers - you might need to create a new application registration in your identity provider to serve as the audience of this token. This field can only accept a single value and has a limit of 600 characters. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Audiences { get; set; } @@ -14,7 +20,7 @@ public class FederatedIdentityCredential : Entity, IParsable { #else public List Audiences { get; set; } #endif - /// The un-validated, user-provided description of the federated identity credential. It has a limit of 600 characters. Optional. + /// The unvalidated description of the federated identity credential, provided by the user. It has a limit of 600 characters. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Description { get; set; } @@ -22,7 +28,7 @@ public class FederatedIdentityCredential : Entity, IParsable { #else public string Description { get; set; } #endif - /// The URL of the external identity provider and must match the issuer claim of the external token being exchanged. The combination of the values of issuer and subject must be unique on the app. It has a limit of 600 characters. Required. + /// The URL of the external identity provider, which must match the issuer claim of the external token being exchanged. The combination of the values of issuer and subject must be unique within the app. It has a limit of 600 characters. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Issuer { get; set; } @@ -30,7 +36,7 @@ public class FederatedIdentityCredential : Entity, IParsable { #else public string Issuer { get; set; } #endif - /// is the unique identifier for the federated identity credential, which has a limit of 120 characters and must be URL friendly. It is immutable once created. Required. Not nullable. Supports $filter (eq). + /// The unique identifier for the federated identity credential, which has a limit of 120 characters and must be URL friendly. The string is immutable after it's created. Alternate key. Required. Not nullable. Supports $filter (eq). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } @@ -38,7 +44,7 @@ public class FederatedIdentityCredential : Entity, IParsable { #else public string Name { get; set; } #endif - /// Required. The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format, as each identity provider uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Azure AD. The combination of issuer and subject must be unique on the app. It has a limit of 600 characters. Supports $filter (eq). + /// Required. The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format; each identity provider uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Microsoft Entra ID. The combination of issuer and subject must be unique within the app. It has a limit of 600 characters. Supports $filter (eq). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Subject { get; set; } @@ -49,28 +55,34 @@ public class FederatedIdentityCredential : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new FederatedIdentityCredential CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.FederatedIdentityCredential CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new FederatedIdentityCredential(); + return new global::ApiSdk.Models.FederatedIdentityCredential(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"audiences", n => { Audiences = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"issuer", n => { Issuer = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"subject", n => { Subject = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "audiences", n => { Audiences = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "issuer", n => { Issuer = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "subject", n => { Subject = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("audiences", Audiences); @@ -81,3 +93,4 @@ public class FederatedIdentityCredential : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Fido2AuthenticationMethod.cs b/src/sample/generated/Models/Fido2AuthenticationMethod.cs index 11f71874..ca3a5013 100644 --- a/src/sample/generated/Models/Fido2AuthenticationMethod.cs +++ b/src/sample/generated/Models/Fido2AuthenticationMethod.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Fido2AuthenticationMethod : AuthenticationMethod, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Fido2AuthenticationMethod : global::ApiSdk.Models.AuthenticationMethod, IParsable + #pragma warning restore CS1591 + { /// Authenticator Attestation GUID, an identifier that indicates the type (e.g. make and model) of the authenticator. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -23,7 +29,7 @@ public class Fido2AuthenticationMethod : AuthenticationMethod, IParsable { public List AttestationCertificates { get; set; } #endif /// The attestationLevel property - public ApiSdk.Models.AttestationLevel? AttestationLevel { get; set; } + public global::ApiSdk.Models.AttestationLevel? AttestationLevel { get; set; } /// The timestamp when this key was registered to the user. public DateTimeOffset? CreatedDateTime { get; set; } /// The display name of the key as given by the user. @@ -45,37 +51,44 @@ public class Fido2AuthenticationMethod : AuthenticationMethod, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Fido2AuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Fido2AuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Fido2AuthenticationMethod(); + return new global::ApiSdk.Models.Fido2AuthenticationMethod(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"aaGuid", n => { AaGuid = n.GetStringValue(); } }, - {"attestationCertificates", n => { AttestationCertificates = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"attestationLevel", n => { AttestationLevel = n.GetEnumValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"model", n => { Model = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "aaGuid", n => { AaGuid = n.GetStringValue(); } }, + { "attestationCertificates", n => { AttestationCertificates = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "attestationLevel", n => { AttestationLevel = n.GetEnumValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "model", n => { Model = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("aaGuid", AaGuid); writer.WriteCollectionOfPrimitiveValues("attestationCertificates", AttestationCertificates); - writer.WriteEnumValue("attestationLevel", AttestationLevel); + writer.WriteEnumValue("attestationLevel", AttestationLevel); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("model", Model); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FieldValueSet.cs b/src/sample/generated/Models/FieldValueSet.cs index fb7a87d1..9d93220e 100644 --- a/src/sample/generated/Models/FieldValueSet.cs +++ b/src/sample/generated/Models/FieldValueSet.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class FieldValueSet : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FieldValueSet : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new FieldValueSet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.FieldValueSet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new FieldValueSet(); + return new global::ApiSdk.Models.FieldValueSet(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FileObject.cs b/src/sample/generated/Models/FileObject.cs index a48c3458..46fe4644 100644 --- a/src/sample/generated/Models/FileObject.cs +++ b/src/sample/generated/Models/FileObject.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class FileObject : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileObject : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The hashes property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Hashes? Hashes { get; set; } + public global::ApiSdk.Models.Hashes? Hashes { get; set; } #nullable restore #else - public ApiSdk.Models.Hashes Hashes { get; set; } + public global::ApiSdk.Models.Hashes Hashes { get; set; } #endif /// The MIME type for the file. This is determined by logic on the server and might not be the value provided when the file was uploaded. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -27,39 +33,47 @@ public class FileObject : IAdditionalDataHolder, IParsable { /// The processingMetadata property public bool? ProcessingMetadata { get; set; } /// - /// Instantiates a new fileObject and sets the default values. + /// Instantiates a new and sets the default values. /// - public FileObject() { + public FileObject() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static FileObject CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.FileObject CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new FileObject(); + return new global::ApiSdk.Models.FileObject(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"hashes", n => { Hashes = n.GetObjectValue(ApiSdk.Models.Hashes.CreateFromDiscriminatorValue); } }, - {"mimeType", n => { MimeType = n.GetStringValue(); } }, - {"processingMetadata", n => { ProcessingMetadata = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "hashes", n => { Hashes = n.GetObjectValue(global::ApiSdk.Models.Hashes.CreateFromDiscriminatorValue); } }, + { "mimeType", n => { MimeType = n.GetStringValue(); } }, + { "processingMetadata", n => { ProcessingMetadata = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("hashes", Hashes); + writer.WriteObjectValue("hashes", Hashes); writer.WriteStringValue("mimeType", MimeType); writer.WriteBoolValue("processingMetadata", ProcessingMetadata); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FileSystemInfo.cs b/src/sample/generated/Models/FileSystemInfo.cs index e0fec60c..aff1a55c 100644 --- a/src/sample/generated/Models/FileSystemInfo.cs +++ b/src/sample/generated/Models/FileSystemInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class FileSystemInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FileSystemInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The UTC date and time the file was created on a client. @@ -15,34 +21,41 @@ public class FileSystemInfo : IAdditionalDataHolder, IParsable { /// The UTC date and time the file was last modified on a client. public DateTimeOffset? LastModifiedDateTime { get; set; } /// - /// Instantiates a new fileSystemInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public FileSystemInfo() { + public FileSystemInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static FileSystemInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.FileSystemInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new FileSystemInfo(); + return new global::ApiSdk.Models.FileSystemInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastAccessedDateTime", n => { LastAccessedDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastAccessedDateTime", n => { LastAccessedDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastAccessedDateTime", LastAccessedDateTime); @@ -51,3 +64,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Filter.cs b/src/sample/generated/Models/Filter.cs index 4c6aa004..ccd65847 100644 --- a/src/sample/generated/Models/Filter.cs +++ b/src/sample/generated/Models/Filter.cs @@ -1,71 +1,85 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Filter : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Filter : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// *Experimental* Filter group set used to decide whether given object belongs and should be processed as part of this object mapping. An object is considered in scope if ANY of the groups in the collection is evaluated to true. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CategoryFilterGroups { get; set; } + public List? CategoryFilterGroups { get; set; } #nullable restore #else - public List CategoryFilterGroups { get; set; } + public List CategoryFilterGroups { get; set; } #endif /// Filter group set used to decide whether given object is in scope for provisioning. This is the filter which should be used in most cases. If an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter isn't satisfied any longer, such object will get deprovisioned'. An object is considered in scope if ANY of the groups in the collection is evaluated to true. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Groups { get; set; } + public List? Groups { get; set; } #nullable restore #else - public List Groups { get; set; } + public List Groups { get; set; } #endif /// *Experimental* Filter group set used to filter out objects at the early stage of reading them from the directory. If an object doesn't satisfy this filter, then it will not be processed further. Important to understand is that if an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is no longer satisfied, such object will NOT get deprovisioned. An object is considered in scope if ANY of the groups in the collection is evaluated to true. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? InputFilterGroups { get; set; } + public List? InputFilterGroups { get; set; } #nullable restore #else - public List InputFilterGroups { get; set; } + public List InputFilterGroups { get; set; } #endif /// - /// Instantiates a new filter and sets the default values. + /// Instantiates a new and sets the default values. /// - public Filter() { + public Filter() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Filter CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Filter CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Filter(); + return new global::ApiSdk.Models.Filter(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"categoryFilterGroups", n => { CategoryFilterGroups = n.GetCollectionOfObjectValues(FilterGroup.CreateFromDiscriminatorValue)?.ToList(); } }, - {"groups", n => { Groups = n.GetCollectionOfObjectValues(FilterGroup.CreateFromDiscriminatorValue)?.ToList(); } }, - {"inputFilterGroups", n => { InputFilterGroups = n.GetCollectionOfObjectValues(FilterGroup.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "categoryFilterGroups", n => { CategoryFilterGroups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.FilterGroup.CreateFromDiscriminatorValue)?.AsList(); } }, + { "groups", n => { Groups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.FilterGroup.CreateFromDiscriminatorValue)?.AsList(); } }, + { "inputFilterGroups", n => { InputFilterGroups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.FilterGroup.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("categoryFilterGroups", CategoryFilterGroups); - writer.WriteCollectionOfObjectValues("groups", Groups); - writer.WriteCollectionOfObjectValues("inputFilterGroups", InputFilterGroups); + writer.WriteCollectionOfObjectValues("categoryFilterGroups", CategoryFilterGroups); + writer.WriteCollectionOfObjectValues("groups", Groups); + writer.WriteCollectionOfObjectValues("inputFilterGroups", InputFilterGroups); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FilterClause.cs b/src/sample/generated/Models/FilterClause.cs index 930cbe25..28f231b6 100644 --- a/src/sample/generated/Models/FilterClause.cs +++ b/src/sample/generated/Models/FilterClause.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class FilterClause : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FilterClause : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Name of the operator to be applied to the source and target operands. Must be one of the supported operators. Supported operators can be discovered. @@ -27,45 +33,53 @@ public class FilterClause : IAdditionalDataHolder, IParsable { /// The targetOperand property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public FilterOperand? TargetOperand { get; set; } + public global::ApiSdk.Models.FilterOperand? TargetOperand { get; set; } #nullable restore #else - public FilterOperand TargetOperand { get; set; } + public global::ApiSdk.Models.FilterOperand TargetOperand { get; set; } #endif /// - /// Instantiates a new filterClause and sets the default values. + /// Instantiates a new and sets the default values. /// - public FilterClause() { + public FilterClause() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static FilterClause CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.FilterClause CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new FilterClause(); + return new global::ApiSdk.Models.FilterClause(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"operatorName", n => { OperatorName = n.GetStringValue(); } }, - {"sourceOperandName", n => { SourceOperandName = n.GetStringValue(); } }, - {"targetOperand", n => { TargetOperand = n.GetObjectValue(FilterOperand.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "operatorName", n => { OperatorName = n.GetStringValue(); } }, + { "sourceOperandName", n => { SourceOperandName = n.GetStringValue(); } }, + { "targetOperand", n => { TargetOperand = n.GetObjectValue(global::ApiSdk.Models.FilterOperand.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("operatorName", OperatorName); writer.WriteStringValue("sourceOperandName", SourceOperandName); - writer.WriteObjectValue("targetOperand", TargetOperand); + writer.WriteObjectValue("targetOperand", TargetOperand); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FilterGroup.cs b/src/sample/generated/Models/FilterGroup.cs index 8021e421..aae426e0 100644 --- a/src/sample/generated/Models/FilterGroup.cs +++ b/src/sample/generated/Models/FilterGroup.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class FilterGroup : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FilterGroup : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Filter clauses (conditions) of this group. All clauses in a group must be satisfied in order for the filter group to evaluate to true. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Clauses { get; set; } + public List? Clauses { get; set; } #nullable restore #else - public List Clauses { get; set; } + public List Clauses { get; set; } #endif /// Human-readable name of the filter group. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,37 +31,45 @@ public class FilterGroup : IAdditionalDataHolder, IParsable { public string Name { get; set; } #endif /// - /// Instantiates a new filterGroup and sets the default values. + /// Instantiates a new and sets the default values. /// - public FilterGroup() { + public FilterGroup() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static FilterGroup CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.FilterGroup CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new FilterGroup(); + return new global::ApiSdk.Models.FilterGroup(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"clauses", n => { Clauses = n.GetCollectionOfObjectValues(FilterClause.CreateFromDiscriminatorValue)?.ToList(); } }, - {"name", n => { Name = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "clauses", n => { Clauses = n.GetCollectionOfObjectValues(global::ApiSdk.Models.FilterClause.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("clauses", Clauses); + writer.WriteCollectionOfObjectValues("clauses", Clauses); writer.WriteStringValue("name", Name); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FilterOperand.cs b/src/sample/generated/Models/FilterOperand.cs index 4b085604..d32171df 100644 --- a/src/sample/generated/Models/FilterOperand.cs +++ b/src/sample/generated/Models/FilterOperand.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class FilterOperand : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FilterOperand : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Collection of values. @@ -17,35 +23,43 @@ public class FilterOperand : IAdditionalDataHolder, IParsable { public List Values { get; set; } #endif /// - /// Instantiates a new filterOperand and sets the default values. + /// Instantiates a new and sets the default values. /// - public FilterOperand() { + public FilterOperand() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static FilterOperand CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.FilterOperand CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new FilterOperand(); + return new global::ApiSdk.Models.FilterOperand(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"values", n => { Values = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "values", n => { Values = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("values", Values); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Folder.cs b/src/sample/generated/Models/Folder.cs index 5af51878..7a307d60 100644 --- a/src/sample/generated/Models/Folder.cs +++ b/src/sample/generated/Models/Folder.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Folder : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Folder : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Number of children contained immediately within this container. @@ -13,43 +19,51 @@ public class Folder : IAdditionalDataHolder, IParsable { /// The view property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public FolderView? View { get; set; } + public global::ApiSdk.Models.FolderView? View { get; set; } #nullable restore #else - public FolderView View { get; set; } + public global::ApiSdk.Models.FolderView View { get; set; } #endif /// - /// Instantiates a new folder and sets the default values. + /// Instantiates a new and sets the default values. /// - public Folder() { + public Folder() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Folder CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Folder CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Folder(); + return new global::ApiSdk.Models.Folder(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"childCount", n => { ChildCount = n.GetIntValue(); } }, - {"view", n => { View = n.GetObjectValue(FolderView.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "childCount", n => { ChildCount = n.GetIntValue(); } }, + { "view", n => { View = n.GetObjectValue(global::ApiSdk.Models.FolderView.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("childCount", ChildCount); - writer.WriteObjectValue("view", View); + writer.WriteObjectValue("view", View); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FolderView.cs b/src/sample/generated/Models/FolderView.cs index e2d87fb4..7c05b02d 100644 --- a/src/sample/generated/Models/FolderView.cs +++ b/src/sample/generated/Models/FolderView.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class FolderView : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FolderView : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The method by which the folder should be sorted. @@ -33,34 +39,41 @@ public class FolderView : IAdditionalDataHolder, IParsable { public string ViewType { get; set; } #endif /// - /// Instantiates a new folderView and sets the default values. + /// Instantiates a new and sets the default values. /// - public FolderView() { + public FolderView() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static FolderView CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.FolderView CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new FolderView(); + return new global::ApiSdk.Models.FolderView(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"sortBy", n => { SortBy = n.GetStringValue(); } }, - {"sortOrder", n => { SortOrder = n.GetStringValue(); } }, - {"viewType", n => { ViewType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sortBy", n => { SortBy = n.GetStringValue(); } }, + { "sortOrder", n => { SortOrder = n.GetStringValue(); } }, + { "viewType", n => { ViewType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("sortBy", SortBy); writer.WriteStringValue("sortOrder", SortOrder); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FollowupFlag.cs b/src/sample/generated/Models/FollowupFlag.cs index b7dfb24e..4fad4b91 100644 --- a/src/sample/generated/Models/FollowupFlag.cs +++ b/src/sample/generated/Models/FollowupFlag.cs @@ -1,75 +1,89 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class FollowupFlag : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class FollowupFlag : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The completedDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? CompletedDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? CompletedDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone CompletedDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone CompletedDateTime { get; set; } #endif /// The dueDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? DueDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? DueDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone DueDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone DueDateTime { get; set; } #endif /// The flagStatus property - public FollowupFlagStatus? FlagStatus { get; set; } + public global::ApiSdk.Models.FollowupFlagStatus? FlagStatus { get; set; } /// The startDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? StartDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? StartDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone StartDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone StartDateTime { get; set; } #endif /// - /// Instantiates a new followupFlag and sets the default values. + /// Instantiates a new and sets the default values. /// - public FollowupFlag() { + public FollowupFlag() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static FollowupFlag CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.FollowupFlag CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new FollowupFlag(); + return new global::ApiSdk.Models.FollowupFlag(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"completedDateTime", n => { CompletedDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"dueDateTime", n => { DueDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"flagStatus", n => { FlagStatus = n.GetEnumValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "completedDateTime", n => { CompletedDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "dueDateTime", n => { DueDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "flagStatus", n => { FlagStatus = n.GetEnumValue(); } }, + { "startDateTime", n => { StartDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("completedDateTime", CompletedDateTime); - writer.WriteObjectValue("dueDateTime", DueDateTime); - writer.WriteEnumValue("flagStatus", FlagStatus); - writer.WriteObjectValue("startDateTime", StartDateTime); + writer.WriteObjectValue("completedDateTime", CompletedDateTime); + writer.WriteObjectValue("dueDateTime", DueDateTime); + writer.WriteEnumValue("flagStatus", FlagStatus); + writer.WriteObjectValue("startDateTime", StartDateTime); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/FollowupFlagStatus.cs b/src/sample/generated/Models/FollowupFlagStatus.cs index 7c03517f..1771197f 100644 --- a/src/sample/generated/Models/FollowupFlagStatus.cs +++ b/src/sample/generated/Models/FollowupFlagStatus.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum FollowupFlagStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum FollowupFlagStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "notFlagged")] + #pragma warning disable CS1591 NotFlagged, + #pragma warning restore CS1591 [EnumMember(Value = "complete")] + #pragma warning disable CS1591 Complete, + #pragma warning restore CS1591 [EnumMember(Value = "flagged")] + #pragma warning disable CS1591 Flagged, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/FreeBusyStatus.cs b/src/sample/generated/Models/FreeBusyStatus.cs index 720f661f..734c9253 100644 --- a/src/sample/generated/Models/FreeBusyStatus.cs +++ b/src/sample/generated/Models/FreeBusyStatus.cs @@ -1,19 +1,36 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum FreeBusyStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum FreeBusyStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 Unknown, + #pragma warning restore CS1591 [EnumMember(Value = "free")] + #pragma warning disable CS1591 Free, + #pragma warning restore CS1591 [EnumMember(Value = "tentative")] + #pragma warning disable CS1591 Tentative, + #pragma warning restore CS1591 [EnumMember(Value = "busy")] + #pragma warning disable CS1591 Busy, + #pragma warning restore CS1591 [EnumMember(Value = "oof")] + #pragma warning disable CS1591 Oof, + #pragma warning restore CS1591 [EnumMember(Value = "workingElsewhere")] + #pragma warning disable CS1591 WorkingElsewhere, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/GeoCoordinates.cs b/src/sample/generated/Models/GeoCoordinates.cs index 44316d0b..ba57ab10 100644 --- a/src/sample/generated/Models/GeoCoordinates.cs +++ b/src/sample/generated/Models/GeoCoordinates.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class GeoCoordinates : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GeoCoordinates : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Optional. The altitude (height), in feet, above sea level for the item. Read-only. @@ -15,34 +21,41 @@ public class GeoCoordinates : IAdditionalDataHolder, IParsable { /// Optional. The longitude, in decimal, for the item. Read-only. public double? Longitude { get; set; } /// - /// Instantiates a new geoCoordinates and sets the default values. + /// Instantiates a new and sets the default values. /// - public GeoCoordinates() { + public GeoCoordinates() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static GeoCoordinates CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.GeoCoordinates CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GeoCoordinates(); + return new global::ApiSdk.Models.GeoCoordinates(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"altitude", n => { Altitude = n.GetDoubleValue(); } }, - {"latitude", n => { Latitude = n.GetDoubleValue(); } }, - {"longitude", n => { Longitude = n.GetDoubleValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "altitude", n => { Altitude = n.GetDoubleValue(); } }, + { "latitude", n => { Latitude = n.GetDoubleValue(); } }, + { "longitude", n => { Longitude = n.GetDoubleValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDoubleValue("altitude", Altitude); writer.WriteDoubleValue("latitude", Latitude); @@ -51,3 +64,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/GeolocationColumn.cs b/src/sample/generated/Models/GeolocationColumn.cs index 8b74a169..18cee08d 100644 --- a/src/sample/generated/Models/GeolocationColumn.cs +++ b/src/sample/generated/Models/GeolocationColumn.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class GeolocationColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GeolocationColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new geolocationColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public GeolocationColumn() { + public GeolocationColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static GeolocationColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.GeolocationColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GeolocationColumn(); + return new global::ApiSdk.Models.GeolocationColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/GiphyRatingType.cs b/src/sample/generated/Models/GiphyRatingType.cs index ce298b04..255b9509 100644 --- a/src/sample/generated/Models/GiphyRatingType.cs +++ b/src/sample/generated/Models/GiphyRatingType.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum GiphyRatingType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum GiphyRatingType + #pragma warning restore CS1591 + { [EnumMember(Value = "strict")] + #pragma warning disable CS1591 Strict, + #pragma warning restore CS1591 [EnumMember(Value = "moderate")] + #pragma warning disable CS1591 Moderate, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/Group.cs b/src/sample/generated/Models/Group.cs index 0f1bfb09..6bce4921 100644 --- a/src/sample/generated/Models/Group.cs +++ b/src/sample/generated/Models/Group.cs @@ -1,64 +1,70 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Group : DirectoryObject, IParsable { - /// 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. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Group : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { + /// The list of users or groups allowed to create posts or calendar events in this group. If this list is nonempty, then only users or groups listed here are allowed to post. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AcceptedSenders { get; set; } + public List? AcceptedSenders { get; set; } #nullable restore #else - public List AcceptedSenders { get; set; } + public List AcceptedSenders { get; set; } #endif - /// Indicates if people external to the organization can send messages to the group. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + /// Indicates if people external to the organization can send messages to the group. The default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). public bool? AllowExternalSenders { get; set; } - /// Represents the app roles a group has been granted for an application. Supports $expand. + /// Represents the app roles granted to a group for an application. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppRoleAssignments { get; set; } + public List? AppRoleAssignments { get; set; } #nullable restore #else - public List AppRoleAssignments { get; set; } + public List AppRoleAssignments { get; set; } #endif - /// The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group. Returned only on $select. + /// The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group. Returned only on $select. This property can be updated only in delegated scenarios where the caller requires both the Microsoft Graph permission and a supported administrator role. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AssignedLabels { get; set; } + public List? AssignedLabels { get; set; } #nullable restore #else - public List AssignedLabels { get; set; } + public List AssignedLabels { get; set; } #endif /// The licenses that are assigned to the group. Returned only on $select. Supports $filter (eq).Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AssignedLicenses { get; set; } + public List? AssignedLicenses { get; set; } #nullable restore #else - public List AssignedLicenses { get; set; } + public List AssignedLicenses { get; set; } #endif - /// Indicates if new members added to the group will be auto-subscribed to receive email notifications. You can set this property in a PATCH request for the group; do not set it in the initial POST request that creates the group. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + /// Indicates if new members added to the group are autosubscribed to receive email notifications. You can set this property in a PATCH request for the group; don't set it in the initial POST request that creates the group. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). public bool? AutoSubscribeNewMembers { get; set; } /// The calendar property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Calendar? Calendar { get; set; } + public global::ApiSdk.Models.Calendar? Calendar { get; set; } #nullable restore #else - public ApiSdk.Models.Calendar Calendar { get; set; } + public global::ApiSdk.Models.Calendar Calendar { get; set; } #endif /// The calendar view for the calendar. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CalendarView { get; set; } + public List? CalendarView { get; set; } #nullable restore #else - public List CalendarView { get; set; } + public List CalendarView { get; set; } #endif - /// Describes a classification for the group (such as low, medium or high business impact). Valid values for this property are defined by creating a ClassificationList setting value, based on the template definition.Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith). + /// Describes a classification for the group (such as low, medium, or high business impact). Valid values for this property are defined by creating a ClassificationList setting value, based on the template definition.Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Classification { get; set; } @@ -69,20 +75,20 @@ public class Group : DirectoryObject, IParsable { /// The group's conversations. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Conversations { get; set; } + public List? Conversations { get; set; } #nullable restore #else - public List Conversations { get; set; } + public List Conversations { get; set; } #endif - /// Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Read-only. + /// Timestamp of when the group was created. The value can't be modified and is automatically populated when the group is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on January 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } /// The createdOnBehalfOf property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DirectoryObject? CreatedOnBehalfOf { get; set; } + public global::ApiSdk.Models.DirectoryObject? CreatedOnBehalfOf { get; set; } #nullable restore #else - public DirectoryObject CreatedOnBehalfOf { get; set; } + public global::ApiSdk.Models.DirectoryObject CreatedOnBehalfOf { get; set; } #endif /// An optional description for the group. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -92,7 +98,7 @@ public class Group : DirectoryObject, IParsable { #else public string Description { get; set; } #endif - /// The display name for the group. This property is required when a group is created and cannot be cleared during updates. Maximum length is 256 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderby. + /// The display name for the group. This property is required when a group is created and can't be cleared during updates. Maximum length is 256 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderby. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName { get; set; } @@ -103,46 +109,46 @@ public class Group : DirectoryObject, IParsable { /// The drive property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Drive? Drive { get; set; } + public global::ApiSdk.Models.Drive? Drive { get; set; } #nullable restore #else - public ApiSdk.Models.Drive Drive { get; set; } + public global::ApiSdk.Models.Drive Drive { get; set; } #endif /// The group's drives. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Drives { get; set; } + public List? Drives { get; set; } #nullable restore #else - public List Drives { get; set; } + public List Drives { get; set; } #endif /// The group's calendar events. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Events { get; set; } + public List? Events { get; set; } #nullable restore #else - public List Events { get; set; } + public List Events { get; set; } #endif - /// Timestamp of when the group is set to expire. Is null for security groups but for Microsoft 365 groups, it represents when the group is set to expire as defined in the groupLifecyclePolicy. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. + /// Timestamp of when the group is set to expire. It's null for security groups, but for Microsoft 365 groups, it represents when the group is set to expire as defined in the groupLifecyclePolicy. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on January 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. public DateTimeOffset? ExpirationDateTime { get; set; } /// The collection of open extensions defined for the group. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif /// The collection of lifecycle policies for this group. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? GroupLifecyclePolicies { get; set; } + public List? GroupLifecyclePolicies { get; set; } #nullable restore #else - public List GroupLifecyclePolicies { get; set; } + public List GroupLifecyclePolicies { get; set; } #endif - /// Specifies the group type and its membership. If the collection contains Unified, the group is a Microsoft 365 group; otherwise, it's either a security group or distribution group. For details, see groups overview.If the collection includes DynamicMembership, the group has dynamic membership; otherwise, membership is static. Returned by default. Supports $filter (eq, not). + /// Specifies the group type and its membership. If the collection contains Unified, the group is a Microsoft 365 group; otherwise, it's either a security group or a distribution group. For details, see groups overview.If the collection includes DynamicMembership, the group has dynamic membership; otherwise, membership is static. Returned by default. Supports $filter (eq, not). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? GroupTypes { get; set; } @@ -152,25 +158,27 @@ public class Group : DirectoryObject, IParsable { #endif /// Indicates whether there are members in this group that have license errors from its group-based license assignment. This property is never returned on a GET operation. You can use it as a $filter argument to get groups that have members with license errors (that is, filter for this property being true). See an example. Supports $filter (eq). public bool? HasMembersWithLicenseErrors { get; set; } - /// True if the group is not displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups; otherwise, false. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + /// True if the group isn't displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups; otherwise, false. The default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). public bool? HideFromAddressLists { get; set; } - /// True if the group is not displayed in Outlook clients, such as Outlook for Windows and Outlook on the web; otherwise, false. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + /// True if the group isn't displayed in Outlook clients, such as Outlook for Windows and Outlook on the web; otherwise, false. The default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). public bool? HideFromOutlookClients { get; set; } - /// When a group is associated with a team this property determines whether the team is in read-only mode.To read this property, use the /group/{groupId}/team endpoint or the Get team API. To update this property, use the archiveTeam and unarchiveTeam APIs. + /// When a group is associated with a team, this property determines whether the team is in read-only mode.To read this property, use the /group/{groupId}/team endpoint or the Get team API. To update this property, use the archiveTeam and unarchiveTeam APIs. public bool? IsArchived { get; set; } - /// Indicates whether this group can be assigned to an Azure Active Directory role or not. Optional. This property can only be set while creating the group and is immutable. If set to true, the securityEnabled property must also be set to true, visibility must be Hidden, and the group cannot be a dynamic group (that is, groupTypes cannot contain DynamicMembership). Only callers in Global Administrator and Privileged Role Administrator roles can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups. For more, see Using a group to manage Azure AD role assignmentsUsing this feature requires a Azure AD Premium P1 license. Returned by default. Supports $filter (eq, ne, not). + /// Indicates whether this group can be assigned to a Microsoft Entra role. Optional. This property can only be set while creating the group and is immutable. If set to true, the securityEnabled property must also be set to true, visibility must be Hidden, and the group can't be a dynamic group (that is, groupTypes can't contain DynamicMembership). Only callers with at least the Privileged Role Administrator role can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups. For more, see Using a group to manage Microsoft Entra role assignmentsUsing this feature requires a Microsoft Entra ID P1 license. Returned by default. Supports $filter (eq, ne, not). public bool? IsAssignableToRole { get; set; } - /// Indicates whether the signed-in user is subscribed to receive email conversations. Default value is true. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + /// The isManagementRestricted property + public bool? IsManagementRestricted { get; set; } + /// Indicates whether the signed-in user is subscribed to receive email conversations. The default value is true. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). public bool? IsSubscribedByMail { get; set; } /// The licenseProcessingState property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.LicenseProcessingState? LicenseProcessingState { get; set; } + public global::ApiSdk.Models.LicenseProcessingState? LicenseProcessingState { get; set; } #nullable restore #else - public ApiSdk.Models.LicenseProcessingState LicenseProcessingState { get; set; } + public global::ApiSdk.Models.LicenseProcessingState LicenseProcessingState { get; set; } #endif - /// The SMTP address for the group, for example, 'serviceadmins@contoso.onmicrosoft.com'. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). + /// The SMTP address for the group, for example, 'serviceadmins@contoso.com'. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Mail { get; set; } @@ -180,7 +188,7 @@ public class Group : DirectoryObject, IParsable { #endif /// Specifies whether the group is mail-enabled. Required. Returned by default. Supports $filter (eq, ne, not). public bool? MailEnabled { get; set; } - /// The mail alias for the group, unique for Microsoft 365 groups in the organization. Maximum length is 64 characters. This property can contain only characters in the ASCII character set 0 - 127 except the following: @ () / [] ' ; : <> , SPACE. Required. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). + /// The mail alias for the group, unique for Microsoft 365 groups in the organization. Maximum length is 64 characters. This property can contain only characters in the ASCII character set 0 - 127 except the following characters: @ () / [] ' ; : <> , SPACE. Required. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? MailNickname { get; set; } @@ -191,18 +199,18 @@ public class Group : DirectoryObject, IParsable { /// Groups that this group is a member of. HTTP Methods: GET (supported for all groups). Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MemberOf { get; set; } + public List? MemberOf { get; set; } #nullable restore #else - public List MemberOf { get; set; } + public List MemberOf { get; set; } #endif /// The members of this group, who can be users, devices, other groups, or service principals. Supports the List members, Add member, and Remove member operations. Nullable. Supports $expand including nested $select. For example, /groups?$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=members($select=id,userPrincipalName,displayName). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Members { get; set; } + public List? Members { get; set; } #nullable restore #else - public List Members { get; set; } + public List Members { get; set; } #endif /// The rule that determines members for this group if the group is a dynamic group (groupTypes contains DynamicMembership). For more information about the syntax of the membership rule, see Membership Rules syntax. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -223,20 +231,20 @@ public class Group : DirectoryObject, IParsable { /// A list of group members with license errors from this group-based license assignment. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MembersWithLicenseErrors { get; set; } + public List? MembersWithLicenseErrors { get; set; } #nullable restore #else - public List MembersWithLicenseErrors { get; set; } + public List MembersWithLicenseErrors { get; set; } #endif /// The onenote property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Onenote? Onenote { get; set; } + public global::ApiSdk.Models.Onenote? Onenote { get; set; } #nullable restore #else - public ApiSdk.Models.Onenote Onenote { get; set; } + public global::ApiSdk.Models.Onenote Onenote { get; set; } #endif - /// The onPremisesDomainName property + /// Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect.Returned by default. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesDomainName { get; set; } @@ -244,9 +252,9 @@ public class Group : DirectoryObject, IParsable { #else public string OnPremisesDomainName { get; set; } #endif - /// Indicates the last time at which the group was synced with the on-premises directory.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in). + /// Indicates the last time at which the group was synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on January 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in). public DateTimeOffset? OnPremisesLastSyncDateTime { get; set; } - /// The onPremisesNetBiosName property + /// Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect.Returned by default. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesNetBiosName { get; set; } @@ -257,12 +265,12 @@ public class Group : DirectoryObject, IParsable { /// Errors when using Microsoft synchronization product during provisioning. Returned by default. Supports $filter (eq, not). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OnPremisesProvisioningErrors { get; set; } + public List? OnPremisesProvisioningErrors { get; set; } #nullable restore #else - public List OnPremisesProvisioningErrors { get; set; } + public List OnPremisesProvisioningErrors { get; set; } #endif - /// Contains the on-premises SAM account name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith). Read-only. + /// Contains the on-premises SAM account name synchronized from the on-premises directory. The property is only populated for customers synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect.Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith). Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesSamAccountName { get; set; } @@ -270,7 +278,7 @@ public class Group : DirectoryObject, IParsable { #else public string OnPremisesSamAccountName { get; set; } #endif - /// Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Supports $filter (eq including on null values). Read-only. + /// Contains the on-premises security identifier (SID) for the group synchronized from on-premises to the cloud. Read-only. Returned by default. Supports $filter (eq including on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesSecurityIdentifier { get; set; } @@ -278,49 +286,49 @@ public class Group : DirectoryObject, IParsable { #else public string OnPremisesSecurityIdentifier { get; set; } #endif - /// true if this group is synced from an on-premises directory; false if this group was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Returned by default. Read-only. Supports $filter (eq, ne, not, in, and eq on null values). + /// true if this group is synced from an on-premises directory; false if this group was originally synced from an on-premises directory but is no longer synced; null if this object has never synced from an on-premises directory (default). Returned by default. Read-only. Supports $filter (eq, ne, not, in, and eq on null values). public bool? OnPremisesSyncEnabled { get; set; } - /// The owners of the group. Limited to 100 owners. Nullable. If this property is not specified when creating a Microsoft 365 group, the calling user is automatically assigned as the group owner. Supports $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). Supports $expand including nested $select. For example, /groups?$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=owners($select=id,userPrincipalName,displayName). + /// The owners of the group who can be users or service principals. Limited to 100 owners. Nullable. If this property isn't specified when creating a Microsoft 365 group the calling user (admin or non-admin) is automatically assigned as the group owner. A non-admin user can't explicitly add themselves to this collection when they're creating the group. For more information, see the related known issue. For security groups, the admin user isn't automatically added to this collection. For more information, see the related known issue. Supports $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1); Supports $expand including nested $select. For example, /groups?$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=owners($select=id,userPrincipalName,displayName). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Owners { get; set; } + public List? Owners { get; set; } #nullable restore #else - public List Owners { get; set; } + public List Owners { get; set; } #endif /// The permissionGrants property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PermissionGrants { get; set; } + public List? PermissionGrants { get; set; } #nullable restore #else - public List PermissionGrants { get; set; } + public List PermissionGrants { get; set; } #endif /// The photo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ProfilePhoto? Photo { get; set; } + public global::ApiSdk.Models.ProfilePhoto? Photo { get; set; } #nullable restore #else - public ProfilePhoto Photo { get; set; } + public global::ApiSdk.Models.ProfilePhoto Photo { get; set; } #endif /// The profile photos owned by the group. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Photos { get; set; } + public List? Photos { get; set; } #nullable restore #else - public List Photos { get; set; } + public List Photos { get; set; } #endif /// The planner property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerGroup? Planner { get; set; } + public global::ApiSdk.Models.PlannerGroup? Planner { get; set; } #nullable restore #else - public PlannerGroup Planner { get; set; } + public global::ApiSdk.Models.PlannerGroup Planner { get; set; } #endif - /// The preferred data location for the Microsoft 365 group. By default, the group inherits the group creator's preferred data location. To set this property, the calling user must be assigned one of the following Azure AD roles: Global Administrator User Account Administrator Directory Writer Exchange Administrator SharePoint Administrator For more information about this property, see OneDrive Online Multi-Geo. Nullable. Returned by default. + /// The preferred data location for the Microsoft 365 group. By default, the group inherits the group creator's preferred data location. To set this property, the calling app must be granted the Directory.ReadWrite.All permission and the user be assigned at least one of the following Microsoft Entra roles: User Account Administrator Directory Writer Exchange Administrator SharePoint Administrator For more information about this property, see OneDrive Online Multi-Geo. Nullable. Returned by default. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? PreferredDataLocation { get; set; } @@ -328,7 +336,7 @@ public class Group : DirectoryObject, IParsable { #else public string PreferredDataLocation { get; set; } #endif - /// The preferred language for a Microsoft 365 group. Should follow ISO 639-1 Code; for example en-US. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). + /// The preferred language for a Microsoft 365 group. Should follow ISO 639-1 Code; for example, en-US. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? PreferredLanguage { get; set; } @@ -344,19 +352,19 @@ public class Group : DirectoryObject, IParsable { #else public List ProxyAddresses { get; set; } #endif - /// The list of users or groups that are not allowed to create posts or calendar events in this group. Nullable + /// The list of users or groups not allowed to create posts or calendar events in this group. Nullable #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? RejectedSenders { get; set; } + public List? RejectedSenders { get; set; } #nullable restore #else - public List RejectedSenders { get; set; } + public List RejectedSenders { get; set; } #endif - /// Timestamp of when the group was last renewed. This cannot be modified directly and is only updated via the renew service action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. + /// Timestamp of when the group was last renewed. This value can't be modified directly and is only updated via the renew service action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on January 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. public DateTimeOffset? RenewedDateTime { get; set; } /// Specifies whether the group is a security group. Required. Returned by default. Supports $filter (eq, ne, not, in). public bool? SecurityEnabled { get; set; } - /// Security identifier of the group, used in Windows scenarios. Returned by default. + /// Security identifier of the group, used in Windows scenarios. Read-only. Returned by default. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SecurityIdentifier { get; set; } @@ -364,39 +372,39 @@ public class Group : DirectoryObject, IParsable { #else public string SecurityIdentifier { get; set; } #endif - /// The serviceProvisioningErrors property + /// Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a group object. Supports $filter (eq, not, for isResolved and serviceInstance). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ServiceProvisioningErrors { get; set; } + public List? ServiceProvisioningErrors { get; set; } #nullable restore #else - public List ServiceProvisioningErrors { get; set; } + public List ServiceProvisioningErrors { get; set; } #endif - /// Settings that can govern this group's behavior, like whether members can invite guest users to the group. Nullable. + /// Settings that can govern this group's behavior, like whether members can invite guests to the group. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Settings { get; set; } + public List? Settings { get; set; } #nullable restore #else - public List Settings { get; set; } + public List Settings { get; set; } #endif /// The list of SharePoint sites in this group. Access the default site with /sites/root. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Sites { get; set; } + public List? Sites { get; set; } #nullable restore #else - public List Sites { get; set; } + public List Sites { get; set; } #endif /// The team property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Team? Team { get; set; } + public global::ApiSdk.Models.Team? Team { get; set; } #nullable restore #else - public ApiSdk.Models.Team Team { get; set; } + public global::ApiSdk.Models.Team Team { get; set; } #endif - /// Specifies a Microsoft 365 group's color theme. Possible values are Teal, Purple, Green, Blue, Pink, Orange or Red. Returned by default. + /// Specifies a Microsoft 365 group's color theme. Possible values are Teal, Purple, Green, Blue, Pink, Orange, or Red. Returned by default. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Theme { get; set; } @@ -407,30 +415,38 @@ public class Group : DirectoryObject, IParsable { /// The group's conversation threads. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Threads { get; set; } + public List? Threads { get; set; } #nullable restore #else - public List Threads { get; set; } + public List Threads { get; set; } #endif - /// The groups that a group is a member of, either directly and through nested membership. Nullable. + /// The groups that a group is a member of, either directly or through nested membership. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TransitiveMemberOf { get; set; } + public List? TransitiveMemberOf { get; set; } #nullable restore #else - public List TransitiveMemberOf { get; set; } + public List TransitiveMemberOf { get; set; } #endif /// The direct and transitive members of a group. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TransitiveMembers { get; set; } + public List? TransitiveMembers { get; set; } #nullable restore #else - public List TransitiveMembers { get; set; } + public List TransitiveMembers { get; set; } #endif - /// Count of conversations that have received new posts since the signed-in user last visited the group. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + /// The unique identifier that can be assigned to a group and used as an alternate key. Immutable. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UniqueName { get; set; } +#nullable restore +#else + public string UniqueName { get; set; } +#endif + /// Count of conversations that received new posts since the signed-in user last visited the group. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). public int? UnseenCount { get; set; } - /// Specifies the group join policy and group content visibility for groups. Possible values are: Private, Public, or HiddenMembership. HiddenMembership can be set only for Microsoft 365 groups, when the groups are created. It can't be updated later. Other values of visibility can be updated after group creation. If visibility value is not specified during group creation on Microsoft Graph, a security group is created as Private by default and Microsoft 365 group is Public. Groups assignable to roles are always Private. To learn more, see group visibility options. Returned by default. Nullable. + /// Specifies the group join policy and group content visibility for groups. Possible values are: Private, Public, or HiddenMembership. HiddenMembership can be set only for Microsoft 365 groups when the groups are created. It can't be updated later. Other values of visibility can be updated after group creation. If visibility value isn't specified during group creation on Microsoft Graph, a security group is created as Private by default, and the Microsoft 365 group is Public. Groups assignable to roles are always Private. To learn more, see group visibility options. Returned by default. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Visibility { get; set; } @@ -441,157 +457,168 @@ public class Group : DirectoryObject, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Group CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Group CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Group(); + return new global::ApiSdk.Models.Group(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"acceptedSenders", n => { AcceptedSenders = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"allowExternalSenders", n => { AllowExternalSenders = n.GetBoolValue(); } }, - {"appRoleAssignments", n => { AppRoleAssignments = n.GetCollectionOfObjectValues(AppRoleAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"assignedLabels", n => { AssignedLabels = n.GetCollectionOfObjectValues(AssignedLabel.CreateFromDiscriminatorValue)?.ToList(); } }, - {"assignedLicenses", n => { AssignedLicenses = n.GetCollectionOfObjectValues(AssignedLicense.CreateFromDiscriminatorValue)?.ToList(); } }, - {"autoSubscribeNewMembers", n => { AutoSubscribeNewMembers = n.GetBoolValue(); } }, - {"calendar", n => { Calendar = n.GetObjectValue(ApiSdk.Models.Calendar.CreateFromDiscriminatorValue); } }, - {"calendarView", n => { CalendarView = n.GetCollectionOfObjectValues(Event.CreateFromDiscriminatorValue)?.ToList(); } }, - {"classification", n => { Classification = n.GetStringValue(); } }, - {"conversations", n => { Conversations = n.GetCollectionOfObjectValues(Conversation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"createdOnBehalfOf", n => { CreatedOnBehalfOf = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"drive", n => { Drive = n.GetObjectValue(ApiSdk.Models.Drive.CreateFromDiscriminatorValue); } }, - {"drives", n => { Drives = n.GetCollectionOfObjectValues(ApiSdk.Models.Drive.CreateFromDiscriminatorValue)?.ToList(); } }, - {"events", n => { Events = n.GetCollectionOfObjectValues(Event.CreateFromDiscriminatorValue)?.ToList(); } }, - {"expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"groupLifecyclePolicies", n => { GroupLifecyclePolicies = n.GetCollectionOfObjectValues(GroupLifecyclePolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"groupTypes", n => { GroupTypes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"hasMembersWithLicenseErrors", n => { HasMembersWithLicenseErrors = n.GetBoolValue(); } }, - {"hideFromAddressLists", n => { HideFromAddressLists = n.GetBoolValue(); } }, - {"hideFromOutlookClients", n => { HideFromOutlookClients = n.GetBoolValue(); } }, - {"isArchived", n => { IsArchived = n.GetBoolValue(); } }, - {"isAssignableToRole", n => { IsAssignableToRole = n.GetBoolValue(); } }, - {"isSubscribedByMail", n => { IsSubscribedByMail = n.GetBoolValue(); } }, - {"licenseProcessingState", n => { LicenseProcessingState = n.GetObjectValue(ApiSdk.Models.LicenseProcessingState.CreateFromDiscriminatorValue); } }, - {"mail", n => { Mail = n.GetStringValue(); } }, - {"mailEnabled", n => { MailEnabled = n.GetBoolValue(); } }, - {"mailNickname", n => { MailNickname = n.GetStringValue(); } }, - {"memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"members", n => { Members = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"membersWithLicenseErrors", n => { MembersWithLicenseErrors = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"membershipRule", n => { MembershipRule = n.GetStringValue(); } }, - {"membershipRuleProcessingState", n => { MembershipRuleProcessingState = n.GetStringValue(); } }, - {"onPremisesDomainName", n => { OnPremisesDomainName = n.GetStringValue(); } }, - {"onPremisesLastSyncDateTime", n => { OnPremisesLastSyncDateTime = n.GetDateTimeOffsetValue(); } }, - {"onPremisesNetBiosName", n => { OnPremisesNetBiosName = n.GetStringValue(); } }, - {"onPremisesProvisioningErrors", n => { OnPremisesProvisioningErrors = n.GetCollectionOfObjectValues(OnPremisesProvisioningError.CreateFromDiscriminatorValue)?.ToList(); } }, - {"onPremisesSamAccountName", n => { OnPremisesSamAccountName = n.GetStringValue(); } }, - {"onPremisesSecurityIdentifier", n => { OnPremisesSecurityIdentifier = n.GetStringValue(); } }, - {"onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, - {"onenote", n => { Onenote = n.GetObjectValue(ApiSdk.Models.Onenote.CreateFromDiscriminatorValue); } }, - {"owners", n => { Owners = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"permissionGrants", n => { PermissionGrants = n.GetCollectionOfObjectValues(ResourceSpecificPermissionGrant.CreateFromDiscriminatorValue)?.ToList(); } }, - {"photo", n => { Photo = n.GetObjectValue(ProfilePhoto.CreateFromDiscriminatorValue); } }, - {"photos", n => { Photos = n.GetCollectionOfObjectValues(ProfilePhoto.CreateFromDiscriminatorValue)?.ToList(); } }, - {"planner", n => { Planner = n.GetObjectValue(PlannerGroup.CreateFromDiscriminatorValue); } }, - {"preferredDataLocation", n => { PreferredDataLocation = n.GetStringValue(); } }, - {"preferredLanguage", n => { PreferredLanguage = n.GetStringValue(); } }, - {"proxyAddresses", n => { ProxyAddresses = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"rejectedSenders", n => { RejectedSenders = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"renewedDateTime", n => { RenewedDateTime = n.GetDateTimeOffsetValue(); } }, - {"securityEnabled", n => { SecurityEnabled = n.GetBoolValue(); } }, - {"securityIdentifier", n => { SecurityIdentifier = n.GetStringValue(); } }, - {"serviceProvisioningErrors", n => { ServiceProvisioningErrors = n.GetCollectionOfObjectValues(ServiceProvisioningError.CreateFromDiscriminatorValue)?.ToList(); } }, - {"settings", n => { Settings = n.GetCollectionOfObjectValues(GroupSetting.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sites", n => { Sites = n.GetCollectionOfObjectValues(Site.CreateFromDiscriminatorValue)?.ToList(); } }, - {"team", n => { Team = n.GetObjectValue(ApiSdk.Models.Team.CreateFromDiscriminatorValue); } }, - {"theme", n => { Theme = n.GetStringValue(); } }, - {"threads", n => { Threads = n.GetCollectionOfObjectValues(ConversationThread.CreateFromDiscriminatorValue)?.ToList(); } }, - {"transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"transitiveMembers", n => { TransitiveMembers = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"unseenCount", n => { UnseenCount = n.GetIntValue(); } }, - {"visibility", n => { Visibility = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "acceptedSenders", n => { AcceptedSenders = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "allowExternalSenders", n => { AllowExternalSenders = n.GetBoolValue(); } }, + { "appRoleAssignments", n => { AppRoleAssignments = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AppRoleAssignment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "assignedLabels", n => { AssignedLabels = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AssignedLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "assignedLicenses", n => { AssignedLicenses = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AssignedLicense.CreateFromDiscriminatorValue)?.AsList(); } }, + { "autoSubscribeNewMembers", n => { AutoSubscribeNewMembers = n.GetBoolValue(); } }, + { "calendar", n => { Calendar = n.GetObjectValue(global::ApiSdk.Models.Calendar.CreateFromDiscriminatorValue); } }, + { "calendarView", n => { CalendarView = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Event.CreateFromDiscriminatorValue)?.AsList(); } }, + { "classification", n => { Classification = n.GetStringValue(); } }, + { "conversations", n => { Conversations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Conversation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "createdOnBehalfOf", n => { CreatedOnBehalfOf = n.GetObjectValue(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "drive", n => { Drive = n.GetObjectValue(global::ApiSdk.Models.Drive.CreateFromDiscriminatorValue); } }, + { "drives", n => { Drives = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Drive.CreateFromDiscriminatorValue)?.AsList(); } }, + { "events", n => { Events = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Event.CreateFromDiscriminatorValue)?.AsList(); } }, + { "expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "groupLifecyclePolicies", n => { GroupLifecyclePolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.GroupLifecyclePolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "groupTypes", n => { GroupTypes = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "hasMembersWithLicenseErrors", n => { HasMembersWithLicenseErrors = n.GetBoolValue(); } }, + { "hideFromAddressLists", n => { HideFromAddressLists = n.GetBoolValue(); } }, + { "hideFromOutlookClients", n => { HideFromOutlookClients = n.GetBoolValue(); } }, + { "isArchived", n => { IsArchived = n.GetBoolValue(); } }, + { "isAssignableToRole", n => { IsAssignableToRole = n.GetBoolValue(); } }, + { "isManagementRestricted", n => { IsManagementRestricted = n.GetBoolValue(); } }, + { "isSubscribedByMail", n => { IsSubscribedByMail = n.GetBoolValue(); } }, + { "licenseProcessingState", n => { LicenseProcessingState = n.GetObjectValue(global::ApiSdk.Models.LicenseProcessingState.CreateFromDiscriminatorValue); } }, + { "mail", n => { Mail = n.GetStringValue(); } }, + { "mailEnabled", n => { MailEnabled = n.GetBoolValue(); } }, + { "mailNickname", n => { MailNickname = n.GetStringValue(); } }, + { "memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "members", n => { Members = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "membersWithLicenseErrors", n => { MembersWithLicenseErrors = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "membershipRule", n => { MembershipRule = n.GetStringValue(); } }, + { "membershipRuleProcessingState", n => { MembershipRuleProcessingState = n.GetStringValue(); } }, + { "onPremisesDomainName", n => { OnPremisesDomainName = n.GetStringValue(); } }, + { "onPremisesLastSyncDateTime", n => { OnPremisesLastSyncDateTime = n.GetDateTimeOffsetValue(); } }, + { "onPremisesNetBiosName", n => { OnPremisesNetBiosName = n.GetStringValue(); } }, + { "onPremisesProvisioningErrors", n => { OnPremisesProvisioningErrors = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnPremisesProvisioningError.CreateFromDiscriminatorValue)?.AsList(); } }, + { "onPremisesSamAccountName", n => { OnPremisesSamAccountName = n.GetStringValue(); } }, + { "onPremisesSecurityIdentifier", n => { OnPremisesSecurityIdentifier = n.GetStringValue(); } }, + { "onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, + { "onenote", n => { Onenote = n.GetObjectValue(global::ApiSdk.Models.Onenote.CreateFromDiscriminatorValue); } }, + { "owners", n => { Owners = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "permissionGrants", n => { PermissionGrants = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ResourceSpecificPermissionGrant.CreateFromDiscriminatorValue)?.AsList(); } }, + { "photo", n => { Photo = n.GetObjectValue(global::ApiSdk.Models.ProfilePhoto.CreateFromDiscriminatorValue); } }, + { "photos", n => { Photos = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ProfilePhoto.CreateFromDiscriminatorValue)?.AsList(); } }, + { "planner", n => { Planner = n.GetObjectValue(global::ApiSdk.Models.PlannerGroup.CreateFromDiscriminatorValue); } }, + { "preferredDataLocation", n => { PreferredDataLocation = n.GetStringValue(); } }, + { "preferredLanguage", n => { PreferredLanguage = n.GetStringValue(); } }, + { "proxyAddresses", n => { ProxyAddresses = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "rejectedSenders", n => { RejectedSenders = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "renewedDateTime", n => { RenewedDateTime = n.GetDateTimeOffsetValue(); } }, + { "securityEnabled", n => { SecurityEnabled = n.GetBoolValue(); } }, + { "securityIdentifier", n => { SecurityIdentifier = n.GetStringValue(); } }, + { "serviceProvisioningErrors", n => { ServiceProvisioningErrors = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ServiceProvisioningError.CreateFromDiscriminatorValue)?.AsList(); } }, + { "settings", n => { Settings = n.GetCollectionOfObjectValues(global::ApiSdk.Models.GroupSetting.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sites", n => { Sites = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Site.CreateFromDiscriminatorValue)?.AsList(); } }, + { "team", n => { Team = n.GetObjectValue(global::ApiSdk.Models.Team.CreateFromDiscriminatorValue); } }, + { "theme", n => { Theme = n.GetStringValue(); } }, + { "threads", n => { Threads = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ConversationThread.CreateFromDiscriminatorValue)?.AsList(); } }, + { "transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "transitiveMembers", n => { TransitiveMembers = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "uniqueName", n => { UniqueName = n.GetStringValue(); } }, + { "unseenCount", n => { UnseenCount = n.GetIntValue(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("acceptedSenders", AcceptedSenders); + writer.WriteCollectionOfObjectValues("acceptedSenders", AcceptedSenders); writer.WriteBoolValue("allowExternalSenders", AllowExternalSenders); - writer.WriteCollectionOfObjectValues("appRoleAssignments", AppRoleAssignments); - writer.WriteCollectionOfObjectValues("assignedLabels", AssignedLabels); - writer.WriteCollectionOfObjectValues("assignedLicenses", AssignedLicenses); + writer.WriteCollectionOfObjectValues("appRoleAssignments", AppRoleAssignments); + writer.WriteCollectionOfObjectValues("assignedLabels", AssignedLabels); + writer.WriteCollectionOfObjectValues("assignedLicenses", AssignedLicenses); writer.WriteBoolValue("autoSubscribeNewMembers", AutoSubscribeNewMembers); - writer.WriteObjectValue("calendar", Calendar); - writer.WriteCollectionOfObjectValues("calendarView", CalendarView); + writer.WriteObjectValue("calendar", Calendar); + writer.WriteCollectionOfObjectValues("calendarView", CalendarView); writer.WriteStringValue("classification", Classification); - writer.WriteCollectionOfObjectValues("conversations", Conversations); + writer.WriteCollectionOfObjectValues("conversations", Conversations); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("createdOnBehalfOf", CreatedOnBehalfOf); + writer.WriteObjectValue("createdOnBehalfOf", CreatedOnBehalfOf); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); - writer.WriteObjectValue("drive", Drive); - writer.WriteCollectionOfObjectValues("drives", Drives); - writer.WriteCollectionOfObjectValues("events", Events); + writer.WriteObjectValue("drive", Drive); + writer.WriteCollectionOfObjectValues("drives", Drives); + writer.WriteCollectionOfObjectValues("events", Events); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); - writer.WriteCollectionOfObjectValues("extensions", Extensions); - writer.WriteCollectionOfObjectValues("groupLifecyclePolicies", GroupLifecyclePolicies); + writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteCollectionOfObjectValues("groupLifecyclePolicies", GroupLifecyclePolicies); writer.WriteCollectionOfPrimitiveValues("groupTypes", GroupTypes); writer.WriteBoolValue("hasMembersWithLicenseErrors", HasMembersWithLicenseErrors); writer.WriteBoolValue("hideFromAddressLists", HideFromAddressLists); writer.WriteBoolValue("hideFromOutlookClients", HideFromOutlookClients); writer.WriteBoolValue("isArchived", IsArchived); writer.WriteBoolValue("isAssignableToRole", IsAssignableToRole); + writer.WriteBoolValue("isManagementRestricted", IsManagementRestricted); writer.WriteBoolValue("isSubscribedByMail", IsSubscribedByMail); - writer.WriteObjectValue("licenseProcessingState", LicenseProcessingState); + writer.WriteObjectValue("licenseProcessingState", LicenseProcessingState); writer.WriteStringValue("mail", Mail); writer.WriteBoolValue("mailEnabled", MailEnabled); writer.WriteStringValue("mailNickname", MailNickname); - writer.WriteCollectionOfObjectValues("memberOf", MemberOf); - writer.WriteCollectionOfObjectValues("members", Members); + writer.WriteCollectionOfObjectValues("memberOf", MemberOf); + writer.WriteCollectionOfObjectValues("members", Members); writer.WriteStringValue("membershipRule", MembershipRule); writer.WriteStringValue("membershipRuleProcessingState", MembershipRuleProcessingState); - writer.WriteCollectionOfObjectValues("membersWithLicenseErrors", MembersWithLicenseErrors); - writer.WriteObjectValue("onenote", Onenote); + writer.WriteCollectionOfObjectValues("membersWithLicenseErrors", MembersWithLicenseErrors); + writer.WriteObjectValue("onenote", Onenote); writer.WriteStringValue("onPremisesDomainName", OnPremisesDomainName); writer.WriteDateTimeOffsetValue("onPremisesLastSyncDateTime", OnPremisesLastSyncDateTime); writer.WriteStringValue("onPremisesNetBiosName", OnPremisesNetBiosName); - writer.WriteCollectionOfObjectValues("onPremisesProvisioningErrors", OnPremisesProvisioningErrors); + writer.WriteCollectionOfObjectValues("onPremisesProvisioningErrors", OnPremisesProvisioningErrors); writer.WriteStringValue("onPremisesSamAccountName", OnPremisesSamAccountName); writer.WriteStringValue("onPremisesSecurityIdentifier", OnPremisesSecurityIdentifier); writer.WriteBoolValue("onPremisesSyncEnabled", OnPremisesSyncEnabled); - writer.WriteCollectionOfObjectValues("owners", Owners); - writer.WriteCollectionOfObjectValues("permissionGrants", PermissionGrants); - writer.WriteObjectValue("photo", Photo); - writer.WriteCollectionOfObjectValues("photos", Photos); - writer.WriteObjectValue("planner", Planner); + writer.WriteCollectionOfObjectValues("owners", Owners); + writer.WriteCollectionOfObjectValues("permissionGrants", PermissionGrants); + writer.WriteObjectValue("photo", Photo); + writer.WriteCollectionOfObjectValues("photos", Photos); + writer.WriteObjectValue("planner", Planner); writer.WriteStringValue("preferredDataLocation", PreferredDataLocation); writer.WriteStringValue("preferredLanguage", PreferredLanguage); writer.WriteCollectionOfPrimitiveValues("proxyAddresses", ProxyAddresses); - writer.WriteCollectionOfObjectValues("rejectedSenders", RejectedSenders); + writer.WriteCollectionOfObjectValues("rejectedSenders", RejectedSenders); writer.WriteDateTimeOffsetValue("renewedDateTime", RenewedDateTime); writer.WriteBoolValue("securityEnabled", SecurityEnabled); writer.WriteStringValue("securityIdentifier", SecurityIdentifier); - writer.WriteCollectionOfObjectValues("serviceProvisioningErrors", ServiceProvisioningErrors); - writer.WriteCollectionOfObjectValues("settings", Settings); - writer.WriteCollectionOfObjectValues("sites", Sites); - writer.WriteObjectValue("team", Team); + writer.WriteCollectionOfObjectValues("serviceProvisioningErrors", ServiceProvisioningErrors); + writer.WriteCollectionOfObjectValues("settings", Settings); + writer.WriteCollectionOfObjectValues("sites", Sites); + writer.WriteObjectValue("team", Team); writer.WriteStringValue("theme", Theme); - writer.WriteCollectionOfObjectValues("threads", Threads); - writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); - writer.WriteCollectionOfObjectValues("transitiveMembers", TransitiveMembers); + writer.WriteCollectionOfObjectValues("threads", Threads); + writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); + writer.WriteCollectionOfObjectValues("transitiveMembers", TransitiveMembers); + writer.WriteStringValue("uniqueName", UniqueName); writer.WriteIntValue("unseenCount", UnseenCount); writer.WriteStringValue("visibility", Visibility); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/GroupCollectionResponse.cs b/src/sample/generated/Models/GroupCollectionResponse.cs index d5fc0894..58fe1586 100644 --- a/src/sample/generated/Models/GroupCollectionResponse.cs +++ b/src/sample/generated/Models/GroupCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class GroupCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GroupCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class GroupCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new groupCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public GroupCollectionResponse() { + public GroupCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static GroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.GroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GroupCollectionResponse(); + return new global::ApiSdk.Models.GroupCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(Group.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Group.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/GroupFilter.cs b/src/sample/generated/Models/GroupFilter.cs index 02c845d9..106aeb3d 100644 --- a/src/sample/generated/Models/GroupFilter.cs +++ b/src/sample/generated/Models/GroupFilter.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class GroupFilter : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GroupFilter : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The includedGroups property @@ -17,35 +23,43 @@ public class GroupFilter : IAdditionalDataHolder, IParsable { public List IncludedGroups { get; set; } #endif /// - /// Instantiates a new groupFilter and sets the default values. + /// Instantiates a new and sets the default values. /// - public GroupFilter() { + public GroupFilter() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static GroupFilter CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.GroupFilter CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GroupFilter(); + return new global::ApiSdk.Models.GroupFilter(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"includedGroups", n => { IncludedGroups = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "includedGroups", n => { IncludedGroups = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("includedGroups", IncludedGroups); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/GroupLifecyclePolicy.cs b/src/sample/generated/Models/GroupLifecyclePolicy.cs index 7d0d45c7..85bc5939 100644 --- a/src/sample/generated/Models/GroupLifecyclePolicy.cs +++ b/src/sample/generated/Models/GroupLifecyclePolicy.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class GroupLifecyclePolicy : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GroupLifecyclePolicy : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// List of email address to send notifications for groups without owners. Multiple email address can be defined by separating email address with a semicolon. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -27,26 +33,32 @@ public class GroupLifecyclePolicy : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new GroupLifecyclePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.GroupLifecyclePolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GroupLifecyclePolicy(); + return new global::ApiSdk.Models.GroupLifecyclePolicy(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"alternateNotificationEmails", n => { AlternateNotificationEmails = n.GetStringValue(); } }, - {"groupLifetimeInDays", n => { GroupLifetimeInDays = n.GetIntValue(); } }, - {"managedGroupTypes", n => { ManagedGroupTypes = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "alternateNotificationEmails", n => { AlternateNotificationEmails = n.GetStringValue(); } }, + { "groupLifetimeInDays", n => { GroupLifetimeInDays = n.GetIntValue(); } }, + { "managedGroupTypes", n => { ManagedGroupTypes = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("alternateNotificationEmails", AlternateNotificationEmails); @@ -55,3 +67,4 @@ public class GroupLifecyclePolicy : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/GroupSetting.cs b/src/sample/generated/Models/GroupSetting.cs index 7a413a1b..861ebef7 100644 --- a/src/sample/generated/Models/GroupSetting.cs +++ b/src/sample/generated/Models/GroupSetting.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class GroupSetting : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class GroupSetting : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Display name of this group of settings, which comes from the associated template. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -25,39 +31,46 @@ public class GroupSetting : Entity, IParsable { /// Collection of name-value pairs corresponding to the name and defaultValue properties in the referenced groupSettingTemplates object. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Values { get; set; } + public List? Values { get; set; } #nullable restore #else - public List Values { get; set; } + public List Values { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new GroupSetting CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.GroupSetting CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new GroupSetting(); + return new global::ApiSdk.Models.GroupSetting(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"templateId", n => { TemplateId = n.GetStringValue(); } }, - {"values", n => { Values = n.GetCollectionOfObjectValues(SettingValue.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "templateId", n => { TemplateId = n.GetStringValue(); } }, + { "values", n => { Values = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SettingValue.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("templateId", TemplateId); - writer.WriteCollectionOfObjectValues("values", Values); + writer.WriteCollectionOfObjectValues("values", Values); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Hashes.cs b/src/sample/generated/Models/Hashes.cs index 3345604d..ddb9b187 100644 --- a/src/sample/generated/Models/Hashes.cs +++ b/src/sample/generated/Models/Hashes.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Hashes : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Hashes : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The CRC32 value of the file in little endian (if available). Read-only. @@ -41,35 +47,42 @@ public class Hashes : IAdditionalDataHolder, IParsable { public string Sha256Hash { get; set; } #endif /// - /// Instantiates a new hashes and sets the default values. + /// Instantiates a new and sets the default values. /// - public Hashes() { + public Hashes() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Hashes CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Hashes CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Hashes(); + return new global::ApiSdk.Models.Hashes(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"crc32Hash", n => { Crc32Hash = n.GetStringValue(); } }, - {"quickXorHash", n => { QuickXorHash = n.GetStringValue(); } }, - {"sha1Hash", n => { Sha1Hash = n.GetStringValue(); } }, - {"sha256Hash", n => { Sha256Hash = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "crc32Hash", n => { Crc32Hash = n.GetStringValue(); } }, + { "quickXorHash", n => { QuickXorHash = n.GetStringValue(); } }, + { "sha1Hash", n => { Sha1Hash = n.GetStringValue(); } }, + { "sha256Hash", n => { Sha256Hash = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("crc32Hash", Crc32Hash); writer.WriteStringValue("quickXorHash", QuickXorHash); @@ -79,3 +92,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/HomeRealmDiscoveryPolicy.cs b/src/sample/generated/Models/HomeRealmDiscoveryPolicy.cs index b88369f7..179b1ad3 100644 --- a/src/sample/generated/Models/HomeRealmDiscoveryPolicy.cs +++ b/src/sample/generated/Models/HomeRealmDiscoveryPolicy.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class HomeRealmDiscoveryPolicy : StsPolicy, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HomeRealmDiscoveryPolicy : global::ApiSdk.Models.StsPolicy, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new HomeRealmDiscoveryPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.HomeRealmDiscoveryPolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new HomeRealmDiscoveryPolicy(); + return new global::ApiSdk.Models.HomeRealmDiscoveryPolicy(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/HyperlinkOrPictureColumn.cs b/src/sample/generated/Models/HyperlinkOrPictureColumn.cs index 8598af40..b154b7e1 100644 --- a/src/sample/generated/Models/HyperlinkOrPictureColumn.cs +++ b/src/sample/generated/Models/HyperlinkOrPictureColumn.cs @@ -1,45 +1,59 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class HyperlinkOrPictureColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class HyperlinkOrPictureColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Specifies whether the display format used for URL columns is an image or a hyperlink. public bool? IsPicture { get; set; } /// - /// Instantiates a new hyperlinkOrPictureColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public HyperlinkOrPictureColumn() { + public HyperlinkOrPictureColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static HyperlinkOrPictureColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.HyperlinkOrPictureColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new HyperlinkOrPictureColumn(); + return new global::ApiSdk.Models.HyperlinkOrPictureColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"isPicture", n => { IsPicture = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "isPicture", n => { IsPicture = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isPicture", IsPicture); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Identity.cs b/src/sample/generated/Models/Identity.cs index 1bab7f9e..f2c9c8e3 100644 --- a/src/sample/generated/Models/Identity.cs +++ b/src/sample/generated/Models/Identity.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Identity : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Identity : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The display name of the identity. The display name might not always be available or up to date. For example, if a user changes their display name, the API might show the new value in a future response, but the items associated with the user won't show up as having changed when using delta. + /// The display name of the identity.For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName { get; set; } @@ -16,7 +22,7 @@ public class Identity : IAdditionalDataHolder, IParsable { #else public string DisplayName { get; set; } #endif - /// Unique identifier for the identity. + /// Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Id { get; set; } @@ -25,33 +31,40 @@ public class Identity : IAdditionalDataHolder, IParsable { public string Id { get; set; } #endif /// - /// Instantiates a new identity and sets the default values. + /// Instantiates a new and sets the default values. /// - public Identity() { + public Identity() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Identity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Identity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Identity(); + return new global::ApiSdk.Models.Identity(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"id", n => { Id = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/IdentitySet.cs b/src/sample/generated/Models/IdentitySet.cs index 13779621..3431c324 100644 --- a/src/sample/generated/Models/IdentitySet.cs +++ b/src/sample/generated/Models/IdentitySet.cs @@ -1,71 +1,85 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class IdentitySet : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IdentitySet : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The application property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Identity? Application { get; set; } + public global::ApiSdk.Models.Identity? Application { get; set; } #nullable restore #else - public Identity Application { get; set; } + public global::ApiSdk.Models.Identity Application { get; set; } #endif /// The device property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Identity? Device { get; set; } + public global::ApiSdk.Models.Identity? Device { get; set; } #nullable restore #else - public Identity Device { get; set; } + public global::ApiSdk.Models.Identity Device { get; set; } #endif /// The user property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Identity? User { get; set; } + public global::ApiSdk.Models.Identity? User { get; set; } #nullable restore #else - public Identity User { get; set; } + public global::ApiSdk.Models.Identity User { get; set; } #endif /// - /// Instantiates a new identitySet and sets the default values. + /// Instantiates a new and sets the default values. /// - public IdentitySet() { + public IdentitySet() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static IdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.IdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new IdentitySet(); + return new global::ApiSdk.Models.IdentitySet(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"application", n => { Application = n.GetObjectValue(Identity.CreateFromDiscriminatorValue); } }, - {"device", n => { Device = n.GetObjectValue(Identity.CreateFromDiscriminatorValue); } }, - {"user", n => { User = n.GetObjectValue(Identity.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "application", n => { Application = n.GetObjectValue(global::ApiSdk.Models.Identity.CreateFromDiscriminatorValue); } }, + { "device", n => { Device = n.GetObjectValue(global::ApiSdk.Models.Identity.CreateFromDiscriminatorValue); } }, + { "user", n => { User = n.GetObjectValue(global::ApiSdk.Models.Identity.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("application", Application); - writer.WriteObjectValue("device", Device); - writer.WriteObjectValue("user", User); + writer.WriteObjectValue("application", Application); + writer.WriteObjectValue("device", Device); + writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Image.cs b/src/sample/generated/Models/Image.cs index 67ced08a..ee522f88 100644 --- a/src/sample/generated/Models/Image.cs +++ b/src/sample/generated/Models/Image.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Image : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Image : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Optional. Height of the image, in pixels. Read-only. @@ -13,33 +19,40 @@ public class Image : IAdditionalDataHolder, IParsable { /// Optional. Width of the image, in pixels. Read-only. public int? Width { get; set; } /// - /// Instantiates a new image and sets the default values. + /// Instantiates a new and sets the default values. /// - public Image() { + public Image() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Image CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Image CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Image(); + return new global::ApiSdk.Models.Image(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"height", n => { Height = n.GetIntValue(); } }, - {"width", n => { Width = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "height", n => { Height = n.GetIntValue(); } }, + { "width", n => { Width = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("height", Height); writer.WriteIntValue("width", Width); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ImageInfo.cs b/src/sample/generated/Models/ImageInfo.cs index 3bf8ffef..d3b3c243 100644 --- a/src/sample/generated/Models/ImageInfo.cs +++ b/src/sample/generated/Models/ImageInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ImageInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ImageInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Optional; parameter used to indicate the server is able to render image dynamically in response to parameterization. For example – a high contrast image public bool? AddImageQuery { get; set; } /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @@ -35,35 +41,42 @@ public class ImageInfo : IAdditionalDataHolder, IParsable { public string IconUrl { get; set; } #endif /// - /// Instantiates a new imageInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public ImageInfo() { + public ImageInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ImageInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ImageInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ImageInfo(); + return new global::ApiSdk.Models.ImageInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"addImageQuery", n => { AddImageQuery = n.GetBoolValue(); } }, - {"alternateText", n => { AlternateText = n.GetStringValue(); } }, - {"alternativeText", n => { AlternativeText = n.GetStringValue(); } }, - {"iconUrl", n => { IconUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "addImageQuery", n => { AddImageQuery = n.GetBoolValue(); } }, + { "alternateText", n => { AlternateText = n.GetStringValue(); } }, + { "alternativeText", n => { AlternativeText = n.GetStringValue(); } }, + { "iconUrl", n => { IconUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("addImageQuery", AddImageQuery); writer.WriteStringValue("alternateText", AlternateText); @@ -73,3 +86,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ImplicitGrantSettings.cs b/src/sample/generated/Models/ImplicitGrantSettings.cs index e5eed15b..bc0486f8 100644 --- a/src/sample/generated/Models/ImplicitGrantSettings.cs +++ b/src/sample/generated/Models/ImplicitGrantSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ImplicitGrantSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ImplicitGrantSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Specifies whether this web application can request an access token using the OAuth 2.0 implicit flow. @@ -13,33 +19,40 @@ public class ImplicitGrantSettings : IAdditionalDataHolder, IParsable { /// Specifies whether this web application can request an ID token using the OAuth 2.0 implicit flow. public bool? EnableIdTokenIssuance { get; set; } /// - /// Instantiates a new implicitGrantSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public ImplicitGrantSettings() { + public ImplicitGrantSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ImplicitGrantSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ImplicitGrantSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ImplicitGrantSettings(); + return new global::ApiSdk.Models.ImplicitGrantSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"enableAccessTokenIssuance", n => { EnableAccessTokenIssuance = n.GetBoolValue(); } }, - {"enableIdTokenIssuance", n => { EnableIdTokenIssuance = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enableAccessTokenIssuance", n => { EnableAccessTokenIssuance = n.GetBoolValue(); } }, + { "enableIdTokenIssuance", n => { EnableIdTokenIssuance = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enableAccessTokenIssuance", EnableAccessTokenIssuance); writer.WriteBoolValue("enableIdTokenIssuance", EnableIdTokenIssuance); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Importance.cs b/src/sample/generated/Models/Importance.cs index 5d37380b..2372dd8e 100644 --- a/src/sample/generated/Models/Importance.cs +++ b/src/sample/generated/Models/Importance.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum Importance { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum Importance + #pragma warning restore CS1591 + { [EnumMember(Value = "low")] + #pragma warning disable CS1591 Low, + #pragma warning restore CS1591 [EnumMember(Value = "normal")] + #pragma warning disable CS1591 Normal, + #pragma warning restore CS1591 [EnumMember(Value = "high")] + #pragma warning disable CS1591 High, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/IncompleteData.cs b/src/sample/generated/Models/IncompleteData.cs index 1ef9f243..da21942e 100644 --- a/src/sample/generated/Models/IncompleteData.cs +++ b/src/sample/generated/Models/IncompleteData.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class IncompleteData : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IncompleteData : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The service does not have source data before the specified time. @@ -13,33 +19,40 @@ public class IncompleteData : IAdditionalDataHolder, IParsable { /// Some data was not recorded due to excessive activity. public bool? WasThrottled { get; set; } /// - /// Instantiates a new incompleteData and sets the default values. + /// Instantiates a new and sets the default values. /// - public IncompleteData() { + public IncompleteData() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static IncompleteData CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.IncompleteData CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new IncompleteData(); + return new global::ApiSdk.Models.IncompleteData(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"missingDataBeforeDateTime", n => { MissingDataBeforeDateTime = n.GetDateTimeOffsetValue(); } }, - {"wasThrottled", n => { WasThrottled = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "missingDataBeforeDateTime", n => { MissingDataBeforeDateTime = n.GetDateTimeOffsetValue(); } }, + { "wasThrottled", n => { WasThrottled = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("missingDataBeforeDateTime", MissingDataBeforeDateTime); writer.WriteBoolValue("wasThrottled", WasThrottled); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/InferenceClassification.cs b/src/sample/generated/Models/InferenceClassification.cs index e7f8e926..277d4a71 100644 --- a/src/sample/generated/Models/InferenceClassification.cs +++ b/src/sample/generated/Models/InferenceClassification.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class InferenceClassification : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InferenceClassification : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Overrides { get; set; } + public List? Overrides { get; set; } #nullable restore #else - public List Overrides { get; set; } + public List Overrides { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new InferenceClassification CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.InferenceClassification CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new InferenceClassification(); + return new global::ApiSdk.Models.InferenceClassification(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"overrides", n => { Overrides = n.GetCollectionOfObjectValues(InferenceClassificationOverride.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "overrides", n => { Overrides = n.GetCollectionOfObjectValues(global::ApiSdk.Models.InferenceClassificationOverride.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("overrides", Overrides); + writer.WriteCollectionOfObjectValues("overrides", Overrides); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/InferenceClassificationOverride.cs b/src/sample/generated/Models/InferenceClassificationOverride.cs index 262c14d6..60f8ffdc 100644 --- a/src/sample/generated/Models/InferenceClassificationOverride.cs +++ b/src/sample/generated/Models/InferenceClassificationOverride.cs @@ -1,47 +1,60 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class InferenceClassificationOverride : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InferenceClassificationOverride : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The classifyAs property - public InferenceClassificationType? ClassifyAs { get; set; } + public global::ApiSdk.Models.InferenceClassificationType? ClassifyAs { get; set; } /// The senderEmailAddress property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public EmailAddress? SenderEmailAddress { get; set; } + public global::ApiSdk.Models.EmailAddress? SenderEmailAddress { get; set; } #nullable restore #else - public EmailAddress SenderEmailAddress { get; set; } + public global::ApiSdk.Models.EmailAddress SenderEmailAddress { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new InferenceClassificationOverride CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.InferenceClassificationOverride CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new InferenceClassificationOverride(); + return new global::ApiSdk.Models.InferenceClassificationOverride(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"classifyAs", n => { ClassifyAs = n.GetEnumValue(); } }, - {"senderEmailAddress", n => { SenderEmailAddress = n.GetObjectValue(EmailAddress.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "classifyAs", n => { ClassifyAs = n.GetEnumValue(); } }, + { "senderEmailAddress", n => { SenderEmailAddress = n.GetObjectValue(global::ApiSdk.Models.EmailAddress.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("classifyAs", ClassifyAs); - writer.WriteObjectValue("senderEmailAddress", SenderEmailAddress); + writer.WriteEnumValue("classifyAs", ClassifyAs); + writer.WriteObjectValue("senderEmailAddress", SenderEmailAddress); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/InferenceClassificationType.cs b/src/sample/generated/Models/InferenceClassificationType.cs index 0be5b4d9..b1c5a8b4 100644 --- a/src/sample/generated/Models/InferenceClassificationType.cs +++ b/src/sample/generated/Models/InferenceClassificationType.cs @@ -1,11 +1,20 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum InferenceClassificationType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum InferenceClassificationType + #pragma warning restore CS1591 + { [EnumMember(Value = "focused")] + #pragma warning disable CS1591 Focused, + #pragma warning restore CS1591 [EnumMember(Value = "other")] + #pragma warning disable CS1591 Other, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/InformationalUrl.cs b/src/sample/generated/Models/InformationalUrl.cs index 2a7aafcf..b1b708b1 100644 --- a/src/sample/generated/Models/InformationalUrl.cs +++ b/src/sample/generated/Models/InformationalUrl.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class InformationalUrl : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InformationalUrl : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// CDN URL to the application's logo, Read-only. @@ -49,36 +55,43 @@ public class InformationalUrl : IAdditionalDataHolder, IParsable { public string TermsOfServiceUrl { get; set; } #endif /// - /// Instantiates a new informationalUrl and sets the default values. + /// Instantiates a new and sets the default values. /// - public InformationalUrl() { + public InformationalUrl() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static InformationalUrl CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.InformationalUrl CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new InformationalUrl(); + return new global::ApiSdk.Models.InformationalUrl(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"logoUrl", n => { LogoUrl = n.GetStringValue(); } }, - {"marketingUrl", n => { MarketingUrl = n.GetStringValue(); } }, - {"privacyStatementUrl", n => { PrivacyStatementUrl = n.GetStringValue(); } }, - {"supportUrl", n => { SupportUrl = n.GetStringValue(); } }, - {"termsOfServiceUrl", n => { TermsOfServiceUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "logoUrl", n => { LogoUrl = n.GetStringValue(); } }, + { "marketingUrl", n => { MarketingUrl = n.GetStringValue(); } }, + { "privacyStatementUrl", n => { PrivacyStatementUrl = n.GetStringValue(); } }, + { "supportUrl", n => { SupportUrl = n.GetStringValue(); } }, + { "termsOfServiceUrl", n => { TermsOfServiceUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("logoUrl", LogoUrl); writer.WriteStringValue("marketingUrl", MarketingUrl); @@ -89,3 +102,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/InsightIdentity.cs b/src/sample/generated/Models/InsightIdentity.cs index 76b06ce0..844e2829 100644 --- a/src/sample/generated/Models/InsightIdentity.cs +++ b/src/sample/generated/Models/InsightIdentity.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class InsightIdentity : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InsightIdentity : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The email address of the user who shared the item. @@ -33,34 +39,41 @@ public class InsightIdentity : IAdditionalDataHolder, IParsable { public string Id { get; set; } #endif /// - /// Instantiates a new insightIdentity and sets the default values. + /// Instantiates a new and sets the default values. /// - public InsightIdentity() { + public InsightIdentity() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static InsightIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.InsightIdentity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new InsightIdentity(); + return new global::ApiSdk.Models.InsightIdentity(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"address", n => { Address = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"id", n => { Id = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "address", n => { Address = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("displayName", DisplayName); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/IntegerRange.cs b/src/sample/generated/Models/IntegerRange.cs index c23ca4af..41756d3b 100644 --- a/src/sample/generated/Models/IntegerRange.cs +++ b/src/sample/generated/Models/IntegerRange.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class IntegerRange : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class IntegerRange : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The inclusive upper bound of the integer range. @@ -13,33 +19,40 @@ public class IntegerRange : IAdditionalDataHolder, IParsable { /// The inclusive lower bound of the integer range. public long? Start { get; set; } /// - /// Instantiates a new integerRange and sets the default values. + /// Instantiates a new and sets the default values. /// - public IntegerRange() { + public IntegerRange() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static IntegerRange CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.IntegerRange CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new IntegerRange(); + return new global::ApiSdk.Models.IntegerRange(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"end", n => { End = n.GetLongValue(); } }, - {"start", n => { Start = n.GetLongValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "end", n => { End = n.GetLongValue(); } }, + { "start", n => { Start = n.GetLongValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("end", End); writer.WriteLongValue("start", Start); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/InternetMessageHeader.cs b/src/sample/generated/Models/InternetMessageHeader.cs index 91a45a8d..70e36340 100644 --- a/src/sample/generated/Models/InternetMessageHeader.cs +++ b/src/sample/generated/Models/InternetMessageHeader.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class InternetMessageHeader : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class InternetMessageHeader : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Represents the key in a key-value pair. @@ -25,33 +31,40 @@ public class InternetMessageHeader : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new internetMessageHeader and sets the default values. + /// Instantiates a new and sets the default values. /// - public InternetMessageHeader() { + public InternetMessageHeader() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static InternetMessageHeader CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.InternetMessageHeader CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new InternetMessageHeader(); + return new global::ApiSdk.Models.InternetMessageHeader(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"name", n => { Name = n.GetStringValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("value", Value); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ItemActionStat.cs b/src/sample/generated/Models/ItemActionStat.cs index 377a657f..4a1c8325 100644 --- a/src/sample/generated/Models/ItemActionStat.cs +++ b/src/sample/generated/Models/ItemActionStat.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ItemActionStat : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ItemActionStat : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// The number of times the action took place. Read-only. public int? ActionCount { get; set; } /// The number of distinct actors that performed the action. Read-only. @@ -13,33 +19,40 @@ public class ItemActionStat : IAdditionalDataHolder, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new itemActionStat and sets the default values. + /// Instantiates a new and sets the default values. /// - public ItemActionStat() { + public ItemActionStat() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ItemActionStat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ItemActionStat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ItemActionStat(); + return new global::ApiSdk.Models.ItemActionStat(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"actionCount", n => { ActionCount = n.GetIntValue(); } }, - {"actorCount", n => { ActorCount = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actionCount", n => { ActionCount = n.GetIntValue(); } }, + { "actorCount", n => { ActorCount = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("actionCount", ActionCount); writer.WriteIntValue("actorCount", ActorCount); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ItemActivity.cs b/src/sample/generated/Models/ItemActivity.cs index 969e7ec0..cf40a9cf 100644 --- a/src/sample/generated/Models/ItemActivity.cs +++ b/src/sample/generated/Models/ItemActivity.cs @@ -1,67 +1,80 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ItemActivity : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ItemActivity : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The access property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public AccessAction? Access { get; set; } + public global::ApiSdk.Models.AccessAction? Access { get; set; } #nullable restore #else - public AccessAction Access { get; set; } + public global::ApiSdk.Models.AccessAction Access { get; set; } #endif /// Details about when the activity took place. Read-only. public DateTimeOffset? ActivityDateTime { get; set; } /// The actor property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? Actor { get; set; } + public global::ApiSdk.Models.IdentitySet? Actor { get; set; } #nullable restore #else - public IdentitySet Actor { get; set; } + public global::ApiSdk.Models.IdentitySet Actor { get; set; } #endif /// The driveItem property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.DriveItem? DriveItem { get; set; } + public global::ApiSdk.Models.DriveItem? DriveItem { get; set; } #nullable restore #else - public ApiSdk.Models.DriveItem DriveItem { get; set; } + public global::ApiSdk.Models.DriveItem DriveItem { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ItemActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ItemActivity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ItemActivity(); + return new global::ApiSdk.Models.ItemActivity(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"access", n => { Access = n.GetObjectValue(AccessAction.CreateFromDiscriminatorValue); } }, - {"activityDateTime", n => { ActivityDateTime = n.GetDateTimeOffsetValue(); } }, - {"actor", n => { Actor = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"driveItem", n => { DriveItem = n.GetObjectValue(ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "access", n => { Access = n.GetObjectValue(global::ApiSdk.Models.AccessAction.CreateFromDiscriminatorValue); } }, + { "activityDateTime", n => { ActivityDateTime = n.GetDateTimeOffsetValue(); } }, + { "actor", n => { Actor = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "driveItem", n => { DriveItem = n.GetObjectValue(global::ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("access", Access); + writer.WriteObjectValue("access", Access); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); - writer.WriteObjectValue("actor", Actor); - writer.WriteObjectValue("driveItem", DriveItem); + writer.WriteObjectValue("actor", Actor); + writer.WriteObjectValue("driveItem", DriveItem); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ItemActivityStat.cs b/src/sample/generated/Models/ItemActivityStat.cs index f2576947..58ef4834 100644 --- a/src/sample/generated/Models/ItemActivityStat.cs +++ b/src/sample/generated/Models/ItemActivityStat.cs @@ -1,115 +1,128 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ItemActivityStat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ItemActivityStat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The access property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemActionStat? Access { get; set; } + public global::ApiSdk.Models.ItemActionStat? Access { get; set; } #nullable restore #else - public ItemActionStat Access { get; set; } + public global::ApiSdk.Models.ItemActionStat Access { get; set; } #endif /// Exposes the itemActivities represented in this itemActivityStat resource. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Activities { get; set; } + public List? Activities { get; set; } #nullable restore #else - public List Activities { get; set; } + public List Activities { get; set; } #endif /// The create property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemActionStat? Create { get; set; } + public global::ApiSdk.Models.ItemActionStat? Create { get; set; } #nullable restore #else - public ItemActionStat Create { get; set; } + public global::ApiSdk.Models.ItemActionStat Create { get; set; } #endif /// The delete property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemActionStat? Delete { get; set; } + public global::ApiSdk.Models.ItemActionStat? Delete { get; set; } #nullable restore #else - public ItemActionStat Delete { get; set; } + public global::ApiSdk.Models.ItemActionStat Delete { get; set; } #endif /// The edit property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemActionStat? Edit { get; set; } + public global::ApiSdk.Models.ItemActionStat? Edit { get; set; } #nullable restore #else - public ItemActionStat Edit { get; set; } + public global::ApiSdk.Models.ItemActionStat Edit { get; set; } #endif /// When the interval ends. Read-only. public DateTimeOffset? EndDateTime { get; set; } /// The incompleteData property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.IncompleteData? IncompleteData { get; set; } + public global::ApiSdk.Models.IncompleteData? IncompleteData { get; set; } #nullable restore #else - public ApiSdk.Models.IncompleteData IncompleteData { get; set; } + public global::ApiSdk.Models.IncompleteData IncompleteData { get; set; } #endif /// Indicates whether the item is 'trending.' Read-only. public bool? IsTrending { get; set; } /// The move property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemActionStat? Move { get; set; } + public global::ApiSdk.Models.ItemActionStat? Move { get; set; } #nullable restore #else - public ItemActionStat Move { get; set; } + public global::ApiSdk.Models.ItemActionStat Move { get; set; } #endif /// When the interval starts. Read-only. public DateTimeOffset? StartDateTime { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ItemActivityStat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ItemActivityStat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ItemActivityStat(); + return new global::ApiSdk.Models.ItemActivityStat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"access", n => { Access = n.GetObjectValue(ItemActionStat.CreateFromDiscriminatorValue); } }, - {"activities", n => { Activities = n.GetCollectionOfObjectValues(ItemActivity.CreateFromDiscriminatorValue)?.ToList(); } }, - {"create", n => { Create = n.GetObjectValue(ItemActionStat.CreateFromDiscriminatorValue); } }, - {"delete", n => { Delete = n.GetObjectValue(ItemActionStat.CreateFromDiscriminatorValue); } }, - {"edit", n => { Edit = n.GetObjectValue(ItemActionStat.CreateFromDiscriminatorValue); } }, - {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, - {"incompleteData", n => { IncompleteData = n.GetObjectValue(ApiSdk.Models.IncompleteData.CreateFromDiscriminatorValue); } }, - {"isTrending", n => { IsTrending = n.GetBoolValue(); } }, - {"move", n => { Move = n.GetObjectValue(ItemActionStat.CreateFromDiscriminatorValue); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "access", n => { Access = n.GetObjectValue(global::ApiSdk.Models.ItemActionStat.CreateFromDiscriminatorValue); } }, + { "activities", n => { Activities = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ItemActivity.CreateFromDiscriminatorValue)?.AsList(); } }, + { "create", n => { Create = n.GetObjectValue(global::ApiSdk.Models.ItemActionStat.CreateFromDiscriminatorValue); } }, + { "delete", n => { Delete = n.GetObjectValue(global::ApiSdk.Models.ItemActionStat.CreateFromDiscriminatorValue); } }, + { "edit", n => { Edit = n.GetObjectValue(global::ApiSdk.Models.ItemActionStat.CreateFromDiscriminatorValue); } }, + { "endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + { "incompleteData", n => { IncompleteData = n.GetObjectValue(global::ApiSdk.Models.IncompleteData.CreateFromDiscriminatorValue); } }, + { "isTrending", n => { IsTrending = n.GetBoolValue(); } }, + { "move", n => { Move = n.GetObjectValue(global::ApiSdk.Models.ItemActionStat.CreateFromDiscriminatorValue); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("access", Access); - writer.WriteCollectionOfObjectValues("activities", Activities); - writer.WriteObjectValue("create", Create); - writer.WriteObjectValue("delete", Delete); - writer.WriteObjectValue("edit", Edit); + writer.WriteObjectValue("access", Access); + writer.WriteCollectionOfObjectValues("activities", Activities); + writer.WriteObjectValue("create", Create); + writer.WriteObjectValue("delete", Delete); + writer.WriteObjectValue("edit", Edit); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); - writer.WriteObjectValue("incompleteData", IncompleteData); + writer.WriteObjectValue("incompleteData", IncompleteData); writer.WriteBoolValue("isTrending", IsTrending); - writer.WriteObjectValue("move", Move); + writer.WriteObjectValue("move", Move); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ItemAnalytics.cs b/src/sample/generated/Models/ItemAnalytics.cs index 3e1a0ae1..b3802548 100644 --- a/src/sample/generated/Models/ItemAnalytics.cs +++ b/src/sample/generated/Models/ItemAnalytics.cs @@ -1,63 +1,76 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ItemAnalytics : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ItemAnalytics : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The allTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemActivityStat? AllTime { get; set; } + public global::ApiSdk.Models.ItemActivityStat? AllTime { get; set; } #nullable restore #else - public ItemActivityStat AllTime { get; set; } + public global::ApiSdk.Models.ItemActivityStat AllTime { get; set; } #endif /// The itemActivityStats property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ItemActivityStats { get; set; } + public List? ItemActivityStats { get; set; } #nullable restore #else - public List ItemActivityStats { get; set; } + public List ItemActivityStats { get; set; } #endif /// The lastSevenDays property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemActivityStat? LastSevenDays { get; set; } + public global::ApiSdk.Models.ItemActivityStat? LastSevenDays { get; set; } #nullable restore #else - public ItemActivityStat LastSevenDays { get; set; } + public global::ApiSdk.Models.ItemActivityStat LastSevenDays { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ItemAnalytics CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ItemAnalytics CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ItemAnalytics(); + return new global::ApiSdk.Models.ItemAnalytics(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"allTime", n => { AllTime = n.GetObjectValue(ItemActivityStat.CreateFromDiscriminatorValue); } }, - {"itemActivityStats", n => { ItemActivityStats = n.GetCollectionOfObjectValues(ItemActivityStat.CreateFromDiscriminatorValue)?.ToList(); } }, - {"lastSevenDays", n => { LastSevenDays = n.GetObjectValue(ItemActivityStat.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "allTime", n => { AllTime = n.GetObjectValue(global::ApiSdk.Models.ItemActivityStat.CreateFromDiscriminatorValue); } }, + { "itemActivityStats", n => { ItemActivityStats = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ItemActivityStat.CreateFromDiscriminatorValue)?.AsList(); } }, + { "lastSevenDays", n => { LastSevenDays = n.GetObjectValue(global::ApiSdk.Models.ItemActivityStat.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("allTime", AllTime); - writer.WriteCollectionOfObjectValues("itemActivityStats", ItemActivityStats); - writer.WriteObjectValue("lastSevenDays", LastSevenDays); + writer.WriteObjectValue("allTime", AllTime); + writer.WriteCollectionOfObjectValues("itemActivityStats", ItemActivityStats); + writer.WriteObjectValue("lastSevenDays", LastSevenDays); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ItemBody.cs b/src/sample/generated/Models/ItemBody.cs index 72a8f366..f3a62e8b 100644 --- a/src/sample/generated/Models/ItemBody.cs +++ b/src/sample/generated/Models/ItemBody.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ItemBody : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ItemBody : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The content of the item. @@ -17,39 +23,47 @@ public class ItemBody : IAdditionalDataHolder, IParsable { public string Content { get; set; } #endif /// The contentType property - public BodyType? ContentType { get; set; } + public global::ApiSdk.Models.BodyType? ContentType { get; set; } /// - /// Instantiates a new itemBody and sets the default values. + /// Instantiates a new and sets the default values. /// - public ItemBody() { + public ItemBody() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ItemBody CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ItemBody CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ItemBody(); + return new global::ApiSdk.Models.ItemBody(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"content", n => { Content = n.GetStringValue(); } }, - {"contentType", n => { ContentType = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetStringValue(); } }, + { "contentType", n => { ContentType = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("content", Content); - writer.WriteEnumValue("contentType", ContentType); + writer.WriteEnumValue("contentType", ContentType); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ItemInsights.cs b/src/sample/generated/Models/ItemInsights.cs new file mode 100644 index 00000000..bf25736c --- /dev/null +++ b/src/sample/generated/Models/ItemInsights.cs @@ -0,0 +1,46 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ItemInsights : global::ApiSdk.Models.OfficeGraphInsights, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.ItemInsights CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.ItemInsights(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ItemReference.cs b/src/sample/generated/Models/ItemReference.cs index 4ec68e60..58765e7b 100644 --- a/src/sample/generated/Models/ItemReference.cs +++ b/src/sample/generated/Models/ItemReference.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ItemReference : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ItemReference : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// Unique identifier of the drive instance that contains the driveItem. Only returned if the item is located in a [drive][]. Read-only. + /// Unique identifier of the drive instance that contains the driveItem. Only returned if the item is located in a drive. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DriveId { get; set; } @@ -16,7 +22,7 @@ public class ItemReference : IAdditionalDataHolder, IParsable { #else public string DriveId { get; set; } #endif - /// Identifies the type of drive. Only returned if the item is located in a [drive][]. See [drive][] resource for values. + /// Identifies the type of drive. Only returned if the item is located in a drive. See drive resource for values. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DriveType { get; set; } @@ -40,7 +46,7 @@ public class ItemReference : IAdditionalDataHolder, IParsable { #else public string Name { get; set; } #endif - /// Path that can be used to navigate to the item. Read-only. + /// Percent-encoded path that can be used to navigate to the item. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Path { get; set; } @@ -48,7 +54,7 @@ public class ItemReference : IAdditionalDataHolder, IParsable { #else public string Path { get; set; } #endif - /// A unique identifier for a shared resource that can be accessed via the [Shares][] API. + /// A unique identifier for a shared resource that can be accessed via the Shares API. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ShareId { get; set; } @@ -59,12 +65,12 @@ public class ItemReference : IAdditionalDataHolder, IParsable { /// The sharepointIds property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SharepointIds? SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds? SharepointIds { get; set; } #nullable restore #else - public ApiSdk.Models.SharepointIds SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds SharepointIds { get; set; } #endif - /// For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource or the parent list of the listItem resource. The value is the same as the id property of that [site][] resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated. + /// For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource or the parent list of the listItem resource. The value is the same as the id property of that site resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SiteId { get; set; } @@ -73,39 +79,46 @@ public class ItemReference : IAdditionalDataHolder, IParsable { public string SiteId { get; set; } #endif /// - /// Instantiates a new itemReference and sets the default values. + /// Instantiates a new and sets the default values. /// - public ItemReference() { + public ItemReference() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ItemReference CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ItemReference CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ItemReference(); + return new global::ApiSdk.Models.ItemReference(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"driveId", n => { DriveId = n.GetStringValue(); } }, - {"driveType", n => { DriveType = n.GetStringValue(); } }, - {"id", n => { Id = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"path", n => { Path = n.GetStringValue(); } }, - {"shareId", n => { ShareId = n.GetStringValue(); } }, - {"sharepointIds", n => { SharepointIds = n.GetObjectValue(ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, - {"siteId", n => { SiteId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "driveId", n => { DriveId = n.GetStringValue(); } }, + { "driveType", n => { DriveType = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "path", n => { Path = n.GetStringValue(); } }, + { "shareId", n => { ShareId = n.GetStringValue(); } }, + { "sharepointIds", n => { SharepointIds = n.GetObjectValue(global::ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, + { "siteId", n => { SiteId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("driveId", DriveId); writer.WriteStringValue("driveType", DriveType); @@ -113,9 +126,10 @@ public void Serialize(ISerializationWriter writer) { writer.WriteStringValue("name", Name); writer.WriteStringValue("path", Path); writer.WriteStringValue("shareId", ShareId); - writer.WriteObjectValue("sharepointIds", SharepointIds); + writer.WriteObjectValue("sharepointIds", SharepointIds); writer.WriteStringValue("siteId", SiteId); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ItemRetentionLabel.cs b/src/sample/generated/Models/ItemRetentionLabel.cs new file mode 100644 index 00000000..412a13f8 --- /dev/null +++ b/src/sample/generated/Models/ItemRetentionLabel.cs @@ -0,0 +1,84 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ItemRetentionLabel : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Specifies whether the label is applied explicitly on the item. True indicates that the label is applied explicitly; otherwise, the label is inherited from its parent. Read-only. + public bool? IsLabelAppliedExplicitly { get; set; } + /// The labelAppliedBy property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.IdentitySet? LabelAppliedBy { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.IdentitySet LabelAppliedBy { get; set; } +#endif + /// The date and time when the label was applied on the item. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + public DateTimeOffset? LabelAppliedDateTime { get; set; } + /// The retention label on the document. Read-write. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The retentionSettings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.RetentionLabelSettings? RetentionSettings { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.RetentionLabelSettings RetentionSettings { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.ItemRetentionLabel CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.ItemRetentionLabel(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "isLabelAppliedExplicitly", n => { IsLabelAppliedExplicitly = n.GetBoolValue(); } }, + { "labelAppliedBy", n => { LabelAppliedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "labelAppliedDateTime", n => { LabelAppliedDateTime = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "retentionSettings", n => { RetentionSettings = n.GetObjectValue(global::ApiSdk.Models.RetentionLabelSettings.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteBoolValue("isLabelAppliedExplicitly", IsLabelAppliedExplicitly); + writer.WriteObjectValue("labelAppliedBy", LabelAppliedBy); + writer.WriteDateTimeOffsetValue("labelAppliedDateTime", LabelAppliedDateTime); + writer.WriteStringValue("name", Name); + writer.WriteObjectValue("retentionSettings", RetentionSettings); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/JoinMeetingIdSettings.cs b/src/sample/generated/Models/JoinMeetingIdSettings.cs index f82baba6..651fc173 100644 --- a/src/sample/generated/Models/JoinMeetingIdSettings.cs +++ b/src/sample/generated/Models/JoinMeetingIdSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class JoinMeetingIdSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class JoinMeetingIdSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Indicates whether a passcode is required to join a meeting when using joinMeetingId. Optional. @@ -27,34 +33,41 @@ public class JoinMeetingIdSettings : IAdditionalDataHolder, IParsable { public string Passcode { get; set; } #endif /// - /// Instantiates a new joinMeetingIdSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public JoinMeetingIdSettings() { + public JoinMeetingIdSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static JoinMeetingIdSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.JoinMeetingIdSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new JoinMeetingIdSettings(); + return new global::ApiSdk.Models.JoinMeetingIdSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"isPasscodeRequired", n => { IsPasscodeRequired = n.GetBoolValue(); } }, - {"joinMeetingId", n => { JoinMeetingId = n.GetStringValue(); } }, - {"passcode", n => { Passcode = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "isPasscodeRequired", n => { IsPasscodeRequired = n.GetBoolValue(); } }, + { "joinMeetingId", n => { JoinMeetingId = n.GetStringValue(); } }, + { "passcode", n => { Passcode = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isPasscodeRequired", IsPasscodeRequired); writer.WriteStringValue("joinMeetingId", JoinMeetingId); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Json.cs b/src/sample/generated/Models/Json.cs index 52934926..093879a0 100644 --- a/src/sample/generated/Models/Json.cs +++ b/src/sample/generated/Models/Json.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Json : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Json : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new Json and sets the default values. + /// Instantiates a new and sets the default values. /// - public Json() { + public Json() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Json CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Json CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Json(); + return new global::ApiSdk.Models.Json(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/KeyCredential.cs b/src/sample/generated/Models/KeyCredential.cs index a14cd2a8..321384e7 100644 --- a/src/sample/generated/Models/KeyCredential.cs +++ b/src/sample/generated/Models/KeyCredential.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class KeyCredential : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class KeyCredential : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A 40-character binary type that can be used to identify the credential. Optional. When not provided in the payload, defaults to the thumbprint of the certificate. @@ -55,39 +61,46 @@ public class KeyCredential : IAdditionalDataHolder, IParsable { public string Usage { get; set; } #endif /// - /// Instantiates a new keyCredential and sets the default values. + /// Instantiates a new and sets the default values. /// - public KeyCredential() { + public KeyCredential() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static KeyCredential CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.KeyCredential CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new KeyCredential(); + return new global::ApiSdk.Models.KeyCredential(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"customKeyIdentifier", n => { CustomKeyIdentifier = n.GetByteArrayValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, - {"key", n => { Key = n.GetByteArrayValue(); } }, - {"keyId", n => { KeyId = n.GetGuidValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, - {"type", n => { Type = n.GetStringValue(); } }, - {"usage", n => { Usage = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "customKeyIdentifier", n => { CustomKeyIdentifier = n.GetByteArrayValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + { "key", n => { Key = n.GetByteArrayValue(); } }, + { "keyId", n => { KeyId = n.GetGuidValue(); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "usage", n => { Usage = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("customKeyIdentifier", CustomKeyIdentifier); writer.WriteStringValue("displayName", DisplayName); @@ -101,3 +114,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/KeyCredentialConfiguration.cs b/src/sample/generated/Models/KeyCredentialConfiguration.cs index 00466101..03ea692f 100644 --- a/src/sample/generated/Models/KeyCredentialConfiguration.cs +++ b/src/sample/generated/Models/KeyCredentialConfiguration.cs @@ -1,53 +1,67 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class KeyCredentialConfiguration : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class KeyCredentialConfiguration : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The maxLifetime property + /// Value that can be used as the maximum duration in days, hours, minutes, or seconds from the date of key creation, for which the key is valid. Defined in ISO 8601 format for Durations. For example, P4DT12H30M5S represents a duration of four days, twelve hours, thirty minutes, and five seconds. This property is required when restrictionType is set to keyLifetime. public TimeSpan? MaxLifetime { get; set; } /// Timestamp when the policy is enforced for all apps created on or after the specified date. For existing applications, the enforcement date would be back dated. To apply to all applications regardless of their creation date, this property would be null. Nullable. public DateTimeOffset? RestrictForAppsCreatedAfterDateTime { get; set; } /// The restrictionType property - public AppKeyCredentialRestrictionType? RestrictionType { get; set; } + public global::ApiSdk.Models.AppKeyCredentialRestrictionType? RestrictionType { get; set; } /// - /// Instantiates a new keyCredentialConfiguration and sets the default values. + /// Instantiates a new and sets the default values. /// - public KeyCredentialConfiguration() { + public KeyCredentialConfiguration() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static KeyCredentialConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.KeyCredentialConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new KeyCredentialConfiguration(); + return new global::ApiSdk.Models.KeyCredentialConfiguration(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"maxLifetime", n => { MaxLifetime = n.GetTimeSpanValue(); } }, - {"restrictForAppsCreatedAfterDateTime", n => { RestrictForAppsCreatedAfterDateTime = n.GetDateTimeOffsetValue(); } }, - {"restrictionType", n => { RestrictionType = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "maxLifetime", n => { MaxLifetime = n.GetTimeSpanValue(); } }, + { "restrictForAppsCreatedAfterDateTime", n => { RestrictForAppsCreatedAfterDateTime = n.GetDateTimeOffsetValue(); } }, + { "restrictionType", n => { RestrictionType = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteTimeSpanValue("maxLifetime", MaxLifetime); writer.WriteDateTimeOffsetValue("restrictForAppsCreatedAfterDateTime", RestrictForAppsCreatedAfterDateTime); - writer.WriteEnumValue("restrictionType", RestrictionType); + writer.WriteEnumValue("restrictionType", RestrictionType); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/KeyValue.cs b/src/sample/generated/Models/KeyValue.cs index 622c63a6..4af7feb7 100644 --- a/src/sample/generated/Models/KeyValue.cs +++ b/src/sample/generated/Models/KeyValue.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class KeyValue : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class KeyValue : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Key for the key-value pair. @@ -25,33 +31,40 @@ public class KeyValue : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new keyValue and sets the default values. + /// Instantiates a new and sets the default values. /// - public KeyValue() { + public KeyValue() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static KeyValue CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.KeyValue CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new KeyValue(); + return new global::ApiSdk.Models.KeyValue(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"key", n => { Key = n.GetStringValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("value", Value); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/KeyValuePair.cs b/src/sample/generated/Models/KeyValuePair.cs index a41ae1fc..bee955c7 100644 --- a/src/sample/generated/Models/KeyValuePair.cs +++ b/src/sample/generated/Models/KeyValuePair.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class KeyValuePair : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class KeyValuePair : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Name for this key-value pair @@ -25,33 +31,40 @@ public class KeyValuePair : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new keyValuePair and sets the default values. + /// Instantiates a new and sets the default values. /// - public KeyValuePair() { + public KeyValuePair() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static KeyValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.KeyValuePair CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new KeyValuePair(); + return new global::ApiSdk.Models.KeyValuePair(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"name", n => { Name = n.GetStringValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("value", Value); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LearningCourseActivity.cs b/src/sample/generated/Models/LearningCourseActivity.cs index 79267505..3ae6790c 100644 --- a/src/sample/generated/Models/LearningCourseActivity.cs +++ b/src/sample/generated/Models/LearningCourseActivity.cs @@ -1,16 +1,22 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LearningCourseActivity : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LearningCourseActivity : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Date and time when the assignment was completed. Optional. public DateTimeOffset? CompletedDateTime { get; set; } /// The percentage completion value of the course activity. Optional. public int? CompletionPercentage { get; set; } - /// A course activity ID generated by the provider. Optional. + /// The externalcourseActivityId property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ExternalcourseActivityId { get; set; } @@ -43,34 +49,40 @@ public class LearningCourseActivity : Entity, IParsable { public string LearningProviderId { get; set; } #endif /// The status property - public CourseStatus? Status { get; set; } + public global::ApiSdk.Models.CourseStatus? Status { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new LearningCourseActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.LearningCourseActivity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LearningCourseActivity(); + return new global::ApiSdk.Models.LearningCourseActivity(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"completedDateTime", n => { CompletedDateTime = n.GetDateTimeOffsetValue(); } }, - {"completionPercentage", n => { CompletionPercentage = n.GetIntValue(); } }, - {"externalcourseActivityId", n => { ExternalcourseActivityId = n.GetStringValue(); } }, - {"learnerUserId", n => { LearnerUserId = n.GetStringValue(); } }, - {"learningContentId", n => { LearningContentId = n.GetStringValue(); } }, - {"learningProviderId", n => { LearningProviderId = n.GetStringValue(); } }, - {"status", n => { Status = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "completedDateTime", n => { CompletedDateTime = n.GetDateTimeOffsetValue(); } }, + { "completionPercentage", n => { CompletionPercentage = n.GetIntValue(); } }, + { "externalcourseActivityId", n => { ExternalcourseActivityId = n.GetStringValue(); } }, + { "learnerUserId", n => { LearnerUserId = n.GetStringValue(); } }, + { "learningContentId", n => { LearningContentId = n.GetStringValue(); } }, + { "learningProviderId", n => { LearningProviderId = n.GetStringValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); @@ -79,7 +91,8 @@ public class LearningCourseActivity : Entity, IParsable { writer.WriteStringValue("learnerUserId", LearnerUserId); writer.WriteStringValue("learningContentId", LearningContentId); writer.WriteStringValue("learningProviderId", LearningProviderId); - writer.WriteEnumValue("status", Status); + writer.WriteEnumValue("status", Status); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LicenseAssignmentState.cs b/src/sample/generated/Models/LicenseAssignmentState.cs index c22d9bd5..078d9b90 100644 --- a/src/sample/generated/Models/LicenseAssignmentState.cs +++ b/src/sample/generated/Models/LicenseAssignmentState.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LicenseAssignmentState : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LicenseAssignmentState : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The assignedByGroup property @@ -45,37 +51,44 @@ public class LicenseAssignmentState : IAdditionalDataHolder, IParsable { public string State { get; set; } #endif /// - /// Instantiates a new licenseAssignmentState and sets the default values. + /// Instantiates a new and sets the default values. /// - public LicenseAssignmentState() { + public LicenseAssignmentState() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LicenseAssignmentState CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.LicenseAssignmentState CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LicenseAssignmentState(); + return new global::ApiSdk.Models.LicenseAssignmentState(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"assignedByGroup", n => { AssignedByGroup = n.GetStringValue(); } }, - {"disabledPlans", n => { DisabledPlans = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"error", n => { Error = n.GetStringValue(); } }, - {"lastUpdatedDateTime", n => { LastUpdatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"skuId", n => { SkuId = n.GetGuidValue(); } }, - {"state", n => { State = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignedByGroup", n => { AssignedByGroup = n.GetStringValue(); } }, + { "disabledPlans", n => { DisabledPlans = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "error", n => { Error = n.GetStringValue(); } }, + { "lastUpdatedDateTime", n => { LastUpdatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "skuId", n => { SkuId = n.GetGuidValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("assignedByGroup", AssignedByGroup); writer.WriteCollectionOfPrimitiveValues("disabledPlans", DisabledPlans); @@ -87,3 +100,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LicenseDetails.cs b/src/sample/generated/Models/LicenseDetails.cs index bd2a22cc..6a6a6ec7 100644 --- a/src/sample/generated/Models/LicenseDetails.cs +++ b/src/sample/generated/Models/LicenseDetails.cs @@ -1,22 +1,28 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LicenseDetails : Entity, IParsable { - /// Information about the service plans assigned with the license. Read-only, Not nullable +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LicenseDetails : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Information about the service plans assigned with the license. Read-only. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ServicePlans { get; set; } + public List? ServicePlans { get; set; } #nullable restore #else - public List ServicePlans { get; set; } + public List ServicePlans { get; set; } #endif - /// Unique identifier (GUID) for the service SKU. Equal to the skuId property on the related SubscribedSku object. Read-only + /// Unique identifier (GUID) for the service SKU. Equal to the skuId property on the related subscribedSku object. Read-only. public Guid? SkuId { get; set; } - /// Unique SKU display name. Equal to the skuPartNumber on the related SubscribedSku object; for example: 'AAD_Premium'. Read-only + /// Unique SKU display name. Equal to the skuPartNumber on the related subscribedSku object; for example, AAD_Premium. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SkuPartNumber { get; set; } @@ -27,31 +33,38 @@ public class LicenseDetails : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new LicenseDetails CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.LicenseDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LicenseDetails(); + return new global::ApiSdk.Models.LicenseDetails(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"servicePlans", n => { ServicePlans = n.GetCollectionOfObjectValues(ServicePlanInfo.CreateFromDiscriminatorValue)?.ToList(); } }, - {"skuId", n => { SkuId = n.GetGuidValue(); } }, - {"skuPartNumber", n => { SkuPartNumber = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "servicePlans", n => { ServicePlans = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ServicePlanInfo.CreateFromDiscriminatorValue)?.AsList(); } }, + { "skuId", n => { SkuId = n.GetGuidValue(); } }, + { "skuPartNumber", n => { SkuPartNumber = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("servicePlans", ServicePlans); + writer.WriteCollectionOfObjectValues("servicePlans", ServicePlans); writer.WriteGuidValue("skuId", SkuId); writer.WriteStringValue("skuPartNumber", SkuPartNumber); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LicenseDetailsCollectionResponse.cs b/src/sample/generated/Models/LicenseDetailsCollectionResponse.cs index 1ff29a4f..9e64e320 100644 --- a/src/sample/generated/Models/LicenseDetailsCollectionResponse.cs +++ b/src/sample/generated/Models/LicenseDetailsCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LicenseDetailsCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LicenseDetailsCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class LicenseDetailsCollectionResponse : IAdditionalDataHolder, IParsable /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new licenseDetailsCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public LicenseDetailsCollectionResponse() { + public LicenseDetailsCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LicenseDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.LicenseDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LicenseDetailsCollectionResponse(); + return new global::ApiSdk.Models.LicenseDetailsCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(LicenseDetails.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.LicenseDetails.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LicenseProcessingState.cs b/src/sample/generated/Models/LicenseProcessingState.cs index 1d53b38e..eea759f7 100644 --- a/src/sample/generated/Models/LicenseProcessingState.cs +++ b/src/sample/generated/Models/LicenseProcessingState.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LicenseProcessingState : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LicenseProcessingState : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The state property @@ -17,35 +23,43 @@ public class LicenseProcessingState : IAdditionalDataHolder, IParsable { public string State { get; set; } #endif /// - /// Instantiates a new licenseProcessingState and sets the default values. + /// Instantiates a new and sets the default values. /// - public LicenseProcessingState() { + public LicenseProcessingState() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LicenseProcessingState CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.LicenseProcessingState CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LicenseProcessingState(); + return new global::ApiSdk.Models.LicenseProcessingState(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"state", n => { State = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "state", n => { State = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("state", State); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LinkedResource.cs b/src/sample/generated/Models/LinkedResource.cs index a837cf78..b069661c 100644 --- a/src/sample/generated/Models/LinkedResource.cs +++ b/src/sample/generated/Models/LinkedResource.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LinkedResource : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LinkedResource : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The app name of the source that sends the linkedResource. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -41,27 +47,33 @@ public class LinkedResource : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new LinkedResource CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.LinkedResource CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LinkedResource(); + return new global::ApiSdk.Models.LinkedResource(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"applicationName", n => { ApplicationName = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"externalId", n => { ExternalId = n.GetStringValue(); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "applicationName", n => { ApplicationName = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "externalId", n => { ExternalId = n.GetStringValue(); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("applicationName", ApplicationName); @@ -71,3 +83,4 @@ public class LinkedResource : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LinkedResourceCollectionResponse.cs b/src/sample/generated/Models/LinkedResourceCollectionResponse.cs index b14772ab..f89d3bba 100644 --- a/src/sample/generated/Models/LinkedResourceCollectionResponse.cs +++ b/src/sample/generated/Models/LinkedResourceCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LinkedResourceCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LinkedResourceCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class LinkedResourceCollectionResponse : IAdditionalDataHolder, IParsable /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new linkedResourceCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public LinkedResourceCollectionResponse() { + public LinkedResourceCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LinkedResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.LinkedResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LinkedResourceCollectionResponse(); + return new global::ApiSdk.Models.LinkedResourceCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(LinkedResource.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.LinkedResource.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/List.cs b/src/sample/generated/Models/List.cs index d2dfc17a..f77d1066 100644 --- a/src/sample/generated/Models/List.cs +++ b/src/sample/generated/Models/List.cs @@ -1,26 +1,32 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class List : BaseItem, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class List : global::ApiSdk.Models.BaseItem, IParsable + #pragma warning restore CS1591 + { /// The collection of field definitions for this list. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Columns { get; set; } + public List? Columns { get; set; } #nullable restore #else - public List Columns { get; set; } + public List Columns { get; set; } #endif /// The collection of content types present in this list. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ContentTypes { get; set; } + public List? ContentTypes { get; set; } #nullable restore #else - public List ContentTypes { get; set; } + public List ContentTypes { get; set; } #endif /// The displayable title of the list. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,101 +39,108 @@ public class List : BaseItem, IParsable { /// The drive property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Drive? Drive { get; set; } + public global::ApiSdk.Models.Drive? Drive { get; set; } #nullable restore #else - public ApiSdk.Models.Drive Drive { get; set; } + public global::ApiSdk.Models.Drive Drive { get; set; } #endif /// All items contained in the list. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Items { get; set; } + public List? Items { get; set; } #nullable restore #else - public List Items { get; set; } + public List Items { get; set; } #endif /// The list property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ListInfo? ListProp { get; set; } + public global::ApiSdk.Models.ListInfo? ListProp { get; set; } #nullable restore #else - public ListInfo ListProp { get; set; } + public global::ApiSdk.Models.ListInfo ListProp { get; set; } #endif /// The collection of long-running operations on the list. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Operations { get; set; } + public List? Operations { get; set; } #nullable restore #else - public List Operations { get; set; } + public List Operations { get; set; } #endif /// The sharepointIds property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SharepointIds? SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds? SharepointIds { get; set; } #nullable restore #else - public ApiSdk.Models.SharepointIds SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds SharepointIds { get; set; } #endif /// The set of subscriptions on the list. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Subscriptions { get; set; } + public List? Subscriptions { get; set; } #nullable restore #else - public List Subscriptions { get; set; } + public List Subscriptions { get; set; } #endif /// The system property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SystemFacet? System { get; set; } + public global::ApiSdk.Models.SystemFacet? System { get; set; } #nullable restore #else - public SystemFacet System { get; set; } + public global::ApiSdk.Models.SystemFacet System { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new List CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.List CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new List(); + return new global::ApiSdk.Models.List(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"columns", n => { Columns = n.GetCollectionOfObjectValues(ColumnDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"contentTypes", n => { ContentTypes = n.GetCollectionOfObjectValues(ContentType.CreateFromDiscriminatorValue)?.ToList(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"drive", n => { Drive = n.GetObjectValue(ApiSdk.Models.Drive.CreateFromDiscriminatorValue); } }, - {"items", n => { Items = n.GetCollectionOfObjectValues(ListItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"list", n => { ListProp = n.GetObjectValue(ListInfo.CreateFromDiscriminatorValue); } }, - {"operations", n => { Operations = n.GetCollectionOfObjectValues(RichLongRunningOperation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sharepointIds", n => { SharepointIds = n.GetObjectValue(ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, - {"subscriptions", n => { Subscriptions = n.GetCollectionOfObjectValues(Subscription.CreateFromDiscriminatorValue)?.ToList(); } }, - {"system", n => { System = n.GetObjectValue(SystemFacet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "columns", n => { Columns = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ColumnDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "contentTypes", n => { ContentTypes = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ContentType.CreateFromDiscriminatorValue)?.AsList(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "drive", n => { Drive = n.GetObjectValue(global::ApiSdk.Models.Drive.CreateFromDiscriminatorValue); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ListItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "list", n => { ListProp = n.GetObjectValue(global::ApiSdk.Models.ListInfo.CreateFromDiscriminatorValue); } }, + { "operations", n => { Operations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.RichLongRunningOperation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sharepointIds", n => { SharepointIds = n.GetObjectValue(global::ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, + { "subscriptions", n => { Subscriptions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Subscription.CreateFromDiscriminatorValue)?.AsList(); } }, + { "system", n => { System = n.GetObjectValue(global::ApiSdk.Models.SystemFacet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("columns", Columns); - writer.WriteCollectionOfObjectValues("contentTypes", ContentTypes); + writer.WriteCollectionOfObjectValues("columns", Columns); + writer.WriteCollectionOfObjectValues("contentTypes", ContentTypes); writer.WriteStringValue("displayName", DisplayName); - writer.WriteObjectValue("drive", Drive); - writer.WriteCollectionOfObjectValues("items", Items); - writer.WriteObjectValue("list", ListProp); - writer.WriteCollectionOfObjectValues("operations", Operations); - writer.WriteObjectValue("sharepointIds", SharepointIds); - writer.WriteCollectionOfObjectValues("subscriptions", Subscriptions); - writer.WriteObjectValue("system", System); + writer.WriteObjectValue("drive", Drive); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteObjectValue("list", ListProp); + writer.WriteCollectionOfObjectValues("operations", Operations); + writer.WriteObjectValue("sharepointIds", SharepointIds); + writer.WriteCollectionOfObjectValues("subscriptions", Subscriptions); + writer.WriteObjectValue("system", System); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ListInfo.cs b/src/sample/generated/Models/ListInfo.cs index c1ed7aaa..c162b968 100644 --- a/src/sample/generated/Models/ListInfo.cs +++ b/src/sample/generated/Models/ListInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ListInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ListInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// If true, indicates that content types are enabled for this list. @@ -21,34 +27,41 @@ public class ListInfo : IAdditionalDataHolder, IParsable { public string Template { get; set; } #endif /// - /// Instantiates a new listInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public ListInfo() { + public ListInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ListInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ListInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ListInfo(); + return new global::ApiSdk.Models.ListInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"contentTypesEnabled", n => { ContentTypesEnabled = n.GetBoolValue(); } }, - {"hidden", n => { Hidden = n.GetBoolValue(); } }, - {"template", n => { Template = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "contentTypesEnabled", n => { ContentTypesEnabled = n.GetBoolValue(); } }, + { "hidden", n => { Hidden = n.GetBoolValue(); } }, + { "template", n => { Template = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("contentTypesEnabled", ContentTypesEnabled); writer.WriteBoolValue("hidden", Hidden); @@ -57,3 +70,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ListItem.cs b/src/sample/generated/Models/ListItem.cs index ff2b575a..9c0feacc 100644 --- a/src/sample/generated/Models/ListItem.cs +++ b/src/sample/generated/Models/ListItem.cs @@ -1,103 +1,116 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ListItem : BaseItem, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ListItem : global::ApiSdk.Models.BaseItem, IParsable + #pragma warning restore CS1591 + { /// The analytics property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemAnalytics? Analytics { get; set; } + public global::ApiSdk.Models.ItemAnalytics? Analytics { get; set; } #nullable restore #else - public ItemAnalytics Analytics { get; set; } + public global::ApiSdk.Models.ItemAnalytics Analytics { get; set; } #endif /// The contentType property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ContentTypeInfo? ContentType { get; set; } + public global::ApiSdk.Models.ContentTypeInfo? ContentType { get; set; } #nullable restore #else - public ContentTypeInfo ContentType { get; set; } + public global::ApiSdk.Models.ContentTypeInfo ContentType { get; set; } #endif /// Version information for a document set version created by a user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DocumentSetVersions { get; set; } + public List? DocumentSetVersions { get; set; } #nullable restore #else - public List DocumentSetVersions { get; set; } + public List DocumentSetVersions { get; set; } #endif /// The driveItem property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.DriveItem? DriveItem { get; set; } + public global::ApiSdk.Models.DriveItem? DriveItem { get; set; } #nullable restore #else - public ApiSdk.Models.DriveItem DriveItem { get; set; } + public global::ApiSdk.Models.DriveItem DriveItem { get; set; } #endif /// The fields property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public FieldValueSet? Fields { get; set; } + public global::ApiSdk.Models.FieldValueSet? Fields { get; set; } #nullable restore #else - public FieldValueSet Fields { get; set; } + public global::ApiSdk.Models.FieldValueSet Fields { get; set; } #endif /// The sharepointIds property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SharepointIds? SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds? SharepointIds { get; set; } #nullable restore #else - public ApiSdk.Models.SharepointIds SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds SharepointIds { get; set; } #endif /// The list of previous versions of the list item. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Versions { get; set; } + public List? Versions { get; set; } #nullable restore #else - public List Versions { get; set; } + public List Versions { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ListItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ListItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ListItem(); + return new global::ApiSdk.Models.ListItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"analytics", n => { Analytics = n.GetObjectValue(ItemAnalytics.CreateFromDiscriminatorValue); } }, - {"contentType", n => { ContentType = n.GetObjectValue(ContentTypeInfo.CreateFromDiscriminatorValue); } }, - {"documentSetVersions", n => { DocumentSetVersions = n.GetCollectionOfObjectValues(DocumentSetVersion.CreateFromDiscriminatorValue)?.ToList(); } }, - {"driveItem", n => { DriveItem = n.GetObjectValue(ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue); } }, - {"fields", n => { Fields = n.GetObjectValue(FieldValueSet.CreateFromDiscriminatorValue); } }, - {"sharepointIds", n => { SharepointIds = n.GetObjectValue(ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, - {"versions", n => { Versions = n.GetCollectionOfObjectValues(ListItemVersion.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "analytics", n => { Analytics = n.GetObjectValue(global::ApiSdk.Models.ItemAnalytics.CreateFromDiscriminatorValue); } }, + { "contentType", n => { ContentType = n.GetObjectValue(global::ApiSdk.Models.ContentTypeInfo.CreateFromDiscriminatorValue); } }, + { "documentSetVersions", n => { DocumentSetVersions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DocumentSetVersion.CreateFromDiscriminatorValue)?.AsList(); } }, + { "driveItem", n => { DriveItem = n.GetObjectValue(global::ApiSdk.Models.DriveItem.CreateFromDiscriminatorValue); } }, + { "fields", n => { Fields = n.GetObjectValue(global::ApiSdk.Models.FieldValueSet.CreateFromDiscriminatorValue); } }, + { "sharepointIds", n => { SharepointIds = n.GetObjectValue(global::ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, + { "versions", n => { Versions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ListItemVersion.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("analytics", Analytics); - writer.WriteObjectValue("contentType", ContentType); - writer.WriteCollectionOfObjectValues("documentSetVersions", DocumentSetVersions); - writer.WriteObjectValue("driveItem", DriveItem); - writer.WriteObjectValue("fields", Fields); - writer.WriteObjectValue("sharepointIds", SharepointIds); - writer.WriteCollectionOfObjectValues("versions", Versions); + writer.WriteObjectValue("analytics", Analytics); + writer.WriteObjectValue("contentType", ContentType); + writer.WriteCollectionOfObjectValues("documentSetVersions", DocumentSetVersions); + writer.WriteObjectValue("driveItem", DriveItem); + writer.WriteObjectValue("fields", Fields); + writer.WriteObjectValue("sharepointIds", SharepointIds); + writer.WriteCollectionOfObjectValues("versions", Versions); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ListItemVersion.cs b/src/sample/generated/Models/ListItemVersion.cs index 453cd321..015039b0 100644 --- a/src/sample/generated/Models/ListItemVersion.cs +++ b/src/sample/generated/Models/ListItemVersion.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ListItemVersion : BaseItemVersion, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ListItemVersion : global::ApiSdk.Models.BaseItemVersion, IParsable + #pragma warning restore CS1591 + { /// The fields property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public FieldValueSet? Fields { get; set; } + public global::ApiSdk.Models.FieldValueSet? Fields { get; set; } #nullable restore #else - public FieldValueSet Fields { get; set; } + public global::ApiSdk.Models.FieldValueSet Fields { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ListItemVersion CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ListItemVersion CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ListItemVersion(); + return new global::ApiSdk.Models.ListItemVersion(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"fields", n => { Fields = n.GetObjectValue(FieldValueSet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "fields", n => { Fields = n.GetObjectValue(global::ApiSdk.Models.FieldValueSet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("fields", Fields); + writer.WriteObjectValue("fields", Fields); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LobbyBypassScope.cs b/src/sample/generated/Models/LobbyBypassScope.cs index a3704e6c..0247baa0 100644 --- a/src/sample/generated/Models/LobbyBypassScope.cs +++ b/src/sample/generated/Models/LobbyBypassScope.cs @@ -1,21 +1,40 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum LobbyBypassScope { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum LobbyBypassScope + #pragma warning restore CS1591 + { [EnumMember(Value = "organizer")] + #pragma warning disable CS1591 Organizer, + #pragma warning restore CS1591 [EnumMember(Value = "organization")] + #pragma warning disable CS1591 Organization, + #pragma warning restore CS1591 [EnumMember(Value = "organizationAndFederated")] + #pragma warning disable CS1591 OrganizationAndFederated, + #pragma warning restore CS1591 [EnumMember(Value = "everyone")] + #pragma warning disable CS1591 Everyone, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 [EnumMember(Value = "invited")] + #pragma warning disable CS1591 Invited, + #pragma warning restore CS1591 [EnumMember(Value = "organizationExcludingGuests")] + #pragma warning disable CS1591 OrganizationExcludingGuests, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/LobbyBypassSettings.cs b/src/sample/generated/Models/LobbyBypassSettings.cs index 4dffbff3..e6990778 100644 --- a/src/sample/generated/Models/LobbyBypassSettings.cs +++ b/src/sample/generated/Models/LobbyBypassSettings.cs @@ -1,49 +1,63 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LobbyBypassSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LobbyBypassSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Specifies whether or not to always let dial-in callers bypass the lobby. Optional. public bool? IsDialInBypassEnabled { get; set; } /// The scope property - public LobbyBypassScope? Scope { get; set; } + public global::ApiSdk.Models.LobbyBypassScope? Scope { get; set; } /// - /// Instantiates a new lobbyBypassSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public LobbyBypassSettings() { + public LobbyBypassSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LobbyBypassSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.LobbyBypassSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LobbyBypassSettings(); + return new global::ApiSdk.Models.LobbyBypassSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"isDialInBypassEnabled", n => { IsDialInBypassEnabled = n.GetBoolValue(); } }, - {"scope", n => { Scope = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "isDialInBypassEnabled", n => { IsDialInBypassEnabled = n.GetBoolValue(); } }, + { "scope", n => { Scope = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDialInBypassEnabled", IsDialInBypassEnabled); - writer.WriteEnumValue("scope", Scope); + writer.WriteEnumValue("scope", Scope); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LocaleInfo.cs b/src/sample/generated/Models/LocaleInfo.cs index a8fd85e4..6c1d3aee 100644 --- a/src/sample/generated/Models/LocaleInfo.cs +++ b/src/sample/generated/Models/LocaleInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LocaleInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LocaleInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A name representing the user's locale in natural language, for example, 'English (United States)'. @@ -25,33 +31,40 @@ public class LocaleInfo : IAdditionalDataHolder, IParsable { public string Locale { get; set; } #endif /// - /// Instantiates a new localeInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public LocaleInfo() { + public LocaleInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LocaleInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.LocaleInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LocaleInfo(); + return new global::ApiSdk.Models.LocaleInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"locale", n => { Locale = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "locale", n => { Locale = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("locale", Locale); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Location.cs b/src/sample/generated/Models/Location.cs index 6fcb199b..cbeb7167 100644 --- a/src/sample/generated/Models/Location.cs +++ b/src/sample/generated/Models/Location.cs @@ -1,28 +1,34 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Location : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Location : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The address property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PhysicalAddress? Address { get; set; } + public global::ApiSdk.Models.PhysicalAddress? Address { get; set; } #nullable restore #else - public PhysicalAddress Address { get; set; } + public global::ApiSdk.Models.PhysicalAddress Address { get; set; } #endif /// The coordinates property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public OutlookGeoCoordinates? Coordinates { get; set; } + public global::ApiSdk.Models.OutlookGeoCoordinates? Coordinates { get; set; } #nullable restore #else - public OutlookGeoCoordinates Coordinates { get; set; } + public global::ApiSdk.Models.OutlookGeoCoordinates Coordinates { get; set; } #endif /// The name associated with the location. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,7 +47,7 @@ public class Location : IAdditionalDataHolder, IParsable { public string LocationEmailAddress { get; set; } #endif /// The locationType property - public ApiSdk.Models.LocationType? LocationType { get; set; } + public global::ApiSdk.Models.LocationType? LocationType { get; set; } /// Optional URI representing the location. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -59,51 +65,59 @@ public class Location : IAdditionalDataHolder, IParsable { public string UniqueId { get; set; } #endif /// The uniqueIdType property - public LocationUniqueIdType? UniqueIdType { get; set; } + public global::ApiSdk.Models.LocationUniqueIdType? UniqueIdType { get; set; } /// - /// Instantiates a new location and sets the default values. + /// Instantiates a new and sets the default values. /// - public Location() { + public Location() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Location CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Location CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Location(); + return new global::ApiSdk.Models.Location(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"address", n => { Address = n.GetObjectValue(PhysicalAddress.CreateFromDiscriminatorValue); } }, - {"coordinates", n => { Coordinates = n.GetObjectValue(OutlookGeoCoordinates.CreateFromDiscriminatorValue); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"locationEmailAddress", n => { LocationEmailAddress = n.GetStringValue(); } }, - {"locationType", n => { LocationType = n.GetEnumValue(); } }, - {"locationUri", n => { LocationUri = n.GetStringValue(); } }, - {"uniqueId", n => { UniqueId = n.GetStringValue(); } }, - {"uniqueIdType", n => { UniqueIdType = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "address", n => { Address = n.GetObjectValue(global::ApiSdk.Models.PhysicalAddress.CreateFromDiscriminatorValue); } }, + { "coordinates", n => { Coordinates = n.GetObjectValue(global::ApiSdk.Models.OutlookGeoCoordinates.CreateFromDiscriminatorValue); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "locationEmailAddress", n => { LocationEmailAddress = n.GetStringValue(); } }, + { "locationType", n => { LocationType = n.GetEnumValue(); } }, + { "locationUri", n => { LocationUri = n.GetStringValue(); } }, + { "uniqueId", n => { UniqueId = n.GetStringValue(); } }, + { "uniqueIdType", n => { UniqueIdType = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("address", Address); - writer.WriteObjectValue("coordinates", Coordinates); + writer.WriteObjectValue("address", Address); + writer.WriteObjectValue("coordinates", Coordinates); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("locationEmailAddress", LocationEmailAddress); - writer.WriteEnumValue("locationType", LocationType); + writer.WriteEnumValue("locationType", LocationType); writer.WriteStringValue("locationUri", LocationUri); writer.WriteStringValue("uniqueId", UniqueId); - writer.WriteEnumValue("uniqueIdType", UniqueIdType); + writer.WriteEnumValue("uniqueIdType", UniqueIdType); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LocationType.cs b/src/sample/generated/Models/LocationType.cs index 10a8b50f..2ea806d8 100644 --- a/src/sample/generated/Models/LocationType.cs +++ b/src/sample/generated/Models/LocationType.cs @@ -1,27 +1,52 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum LocationType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum LocationType + #pragma warning restore CS1591 + { [EnumMember(Value = "default")] + #pragma warning disable CS1591 Default, + #pragma warning restore CS1591 [EnumMember(Value = "conferenceRoom")] + #pragma warning disable CS1591 ConferenceRoom, + #pragma warning restore CS1591 [EnumMember(Value = "homeAddress")] + #pragma warning disable CS1591 HomeAddress, + #pragma warning restore CS1591 [EnumMember(Value = "businessAddress")] + #pragma warning disable CS1591 BusinessAddress, + #pragma warning restore CS1591 [EnumMember(Value = "geoCoordinates")] + #pragma warning disable CS1591 GeoCoordinates, + #pragma warning restore CS1591 [EnumMember(Value = "streetAddress")] + #pragma warning disable CS1591 StreetAddress, + #pragma warning restore CS1591 [EnumMember(Value = "hotel")] + #pragma warning disable CS1591 Hotel, + #pragma warning restore CS1591 [EnumMember(Value = "restaurant")] + #pragma warning disable CS1591 Restaurant, + #pragma warning restore CS1591 [EnumMember(Value = "localBusiness")] + #pragma warning disable CS1591 LocalBusiness, + #pragma warning restore CS1591 [EnumMember(Value = "postalAddress")] + #pragma warning disable CS1591 PostalAddress, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/LocationUniqueIdType.cs b/src/sample/generated/Models/LocationUniqueIdType.cs index 6ce3358b..cfb9f3f3 100644 --- a/src/sample/generated/Models/LocationUniqueIdType.cs +++ b/src/sample/generated/Models/LocationUniqueIdType.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum LocationUniqueIdType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum LocationUniqueIdType + #pragma warning restore CS1591 + { [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 Unknown, + #pragma warning restore CS1591 [EnumMember(Value = "locationStore")] + #pragma warning disable CS1591 LocationStore, + #pragma warning restore CS1591 [EnumMember(Value = "directory")] + #pragma warning disable CS1591 Directory, + #pragma warning restore CS1591 [EnumMember(Value = "private")] + #pragma warning disable CS1591 Private, + #pragma warning restore CS1591 [EnumMember(Value = "bing")] + #pragma warning disable CS1591 Bing, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/LongRunningOperation.cs b/src/sample/generated/Models/LongRunningOperation.cs index 5c1dc8f7..a0802d17 100644 --- a/src/sample/generated/Models/LongRunningOperation.cs +++ b/src/sample/generated/Models/LongRunningOperation.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LongRunningOperation : Entity, IParsable { - /// The start time of the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LongRunningOperation : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The start time of the operation. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? CreatedDateTime { get; set; } - /// The time of the last action in the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + /// The time of the last action in the operation. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? LastActionDateTime { get; set; } /// URI of the resource that the operation is performed on. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -19,7 +25,7 @@ public class LongRunningOperation : Entity, IParsable { public string ResourceLocation { get; set; } #endif /// The status property - public LongRunningOperationStatus? Status { get; set; } + public global::ApiSdk.Models.LongRunningOperationStatus? Status { get; set; } /// Details about the status of the operation. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -31,35 +37,42 @@ public class LongRunningOperation : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new LongRunningOperation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.LongRunningOperation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LongRunningOperation(); + return new global::ApiSdk.Models.LongRunningOperation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastActionDateTime", n => { LastActionDateTime = n.GetDateTimeOffsetValue(); } }, - {"resourceLocation", n => { ResourceLocation = n.GetStringValue(); } }, - {"status", n => { Status = n.GetEnumValue(); } }, - {"statusDetail", n => { StatusDetail = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastActionDateTime", n => { LastActionDateTime = n.GetDateTimeOffsetValue(); } }, + { "resourceLocation", n => { ResourceLocation = n.GetStringValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "statusDetail", n => { StatusDetail = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastActionDateTime", LastActionDateTime); writer.WriteStringValue("resourceLocation", ResourceLocation); - writer.WriteEnumValue("status", Status); + writer.WriteEnumValue("status", Status); writer.WriteStringValue("statusDetail", StatusDetail); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/LongRunningOperationStatus.cs b/src/sample/generated/Models/LongRunningOperationStatus.cs index b69fb1e3..606aad90 100644 --- a/src/sample/generated/Models/LongRunningOperationStatus.cs +++ b/src/sample/generated/Models/LongRunningOperationStatus.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum LongRunningOperationStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum LongRunningOperationStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "notStarted")] + #pragma warning disable CS1591 NotStarted, + #pragma warning restore CS1591 [EnumMember(Value = "running")] + #pragma warning disable CS1591 Running, + #pragma warning restore CS1591 [EnumMember(Value = "succeeded")] + #pragma warning disable CS1591 Succeeded, + #pragma warning restore CS1591 [EnumMember(Value = "failed")] + #pragma warning disable CS1591 Failed, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/LookupColumn.cs b/src/sample/generated/Models/LookupColumn.cs index a82b498c..c22737d1 100644 --- a/src/sample/generated/Models/LookupColumn.cs +++ b/src/sample/generated/Models/LookupColumn.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class LookupColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LookupColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Indicates whether multiple values can be selected from the source. @@ -37,36 +43,43 @@ public class LookupColumn : IAdditionalDataHolder, IParsable { public string PrimaryLookupColumnId { get; set; } #endif /// - /// Instantiates a new lookupColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public LookupColumn() { + public LookupColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LookupColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.LookupColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LookupColumn(); + return new global::ApiSdk.Models.LookupColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowMultipleValues", n => { AllowMultipleValues = n.GetBoolValue(); } }, - {"allowUnlimitedLength", n => { AllowUnlimitedLength = n.GetBoolValue(); } }, - {"columnName", n => { ColumnName = n.GetStringValue(); } }, - {"listId", n => { ListId = n.GetStringValue(); } }, - {"primaryLookupColumnId", n => { PrimaryLookupColumnId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowMultipleValues", n => { AllowMultipleValues = n.GetBoolValue(); } }, + { "allowUnlimitedLength", n => { AllowUnlimitedLength = n.GetBoolValue(); } }, + { "columnName", n => { ColumnName = n.GetStringValue(); } }, + { "listId", n => { ListId = n.GetStringValue(); } }, + { "primaryLookupColumnId", n => { PrimaryLookupColumnId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowMultipleValues", AllowMultipleValues); writer.WriteBoolValue("allowUnlimitedLength", AllowUnlimitedLength); @@ -77,3 +90,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MailFolder.cs b/src/sample/generated/Models/MailFolder.cs index 0727c4c8..c348e9a2 100644 --- a/src/sample/generated/Models/MailFolder.cs +++ b/src/sample/generated/Models/MailFolder.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MailFolder : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MailFolder : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The number of immediate child mailFolders in the current mailFolder. public int? ChildFolderCount { get; set; } /// The collection of child folders in the mailFolder. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ChildFolders { get; set; } + public List? ChildFolders { get; set; } #nullable restore #else - public List ChildFolders { get; set; } + public List ChildFolders { get; set; } #endif /// The mailFolder's display name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -29,26 +35,26 @@ public class MailFolder : Entity, IParsable { /// The collection of rules that apply to the user's Inbox folder. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MessageRules { get; set; } + public List? MessageRules { get; set; } #nullable restore #else - public List MessageRules { get; set; } + public List MessageRules { get; set; } #endif /// The collection of messages in the mailFolder. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Messages { get; set; } + public List? Messages { get; set; } #nullable restore #else - public List Messages { get; set; } + public List Messages { get; set; } #endif /// The collection of multi-value extended properties defined for the mailFolder. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MultiValueExtendedProperties { get; set; } + public List? MultiValueExtendedProperties { get; set; } #nullable restore #else - public List MultiValueExtendedProperties { get; set; } + public List MultiValueExtendedProperties { get; set; } #endif /// The unique identifier for the mailFolder's parent mailFolder. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -61,10 +67,10 @@ public class MailFolder : Entity, IParsable { /// The collection of single-value extended properties defined for the mailFolder. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SingleValueExtendedProperties { get; set; } + public List? SingleValueExtendedProperties { get; set; } #nullable restore #else - public List SingleValueExtendedProperties { get; set; } + public List SingleValueExtendedProperties { get; set; } #endif /// The number of items in the mailFolder. public int? TotalItemCount { get; set; } @@ -73,47 +79,54 @@ public class MailFolder : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new MailFolder CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.MailFolder CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MailFolder(); + return new global::ApiSdk.Models.MailFolder(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"childFolderCount", n => { ChildFolderCount = n.GetIntValue(); } }, - {"childFolders", n => { ChildFolders = n.GetCollectionOfObjectValues(MailFolder.CreateFromDiscriminatorValue)?.ToList(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"isHidden", n => { IsHidden = n.GetBoolValue(); } }, - {"messageRules", n => { MessageRules = n.GetCollectionOfObjectValues(MessageRule.CreateFromDiscriminatorValue)?.ToList(); } }, - {"messages", n => { Messages = n.GetCollectionOfObjectValues(Message.CreateFromDiscriminatorValue)?.ToList(); } }, - {"multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"parentFolderId", n => { ParentFolderId = n.GetStringValue(); } }, - {"singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"totalItemCount", n => { TotalItemCount = n.GetIntValue(); } }, - {"unreadItemCount", n => { UnreadItemCount = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "childFolderCount", n => { ChildFolderCount = n.GetIntValue(); } }, + { "childFolders", n => { ChildFolders = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MailFolder.CreateFromDiscriminatorValue)?.AsList(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "isHidden", n => { IsHidden = n.GetBoolValue(); } }, + { "messageRules", n => { MessageRules = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MessageRule.CreateFromDiscriminatorValue)?.AsList(); } }, + { "messages", n => { Messages = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Message.CreateFromDiscriminatorValue)?.AsList(); } }, + { "multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "parentFolderId", n => { ParentFolderId = n.GetStringValue(); } }, + { "singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "totalItemCount", n => { TotalItemCount = n.GetIntValue(); } }, + { "unreadItemCount", n => { UnreadItemCount = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("childFolderCount", ChildFolderCount); - writer.WriteCollectionOfObjectValues("childFolders", ChildFolders); + writer.WriteCollectionOfObjectValues("childFolders", ChildFolders); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("isHidden", IsHidden); - writer.WriteCollectionOfObjectValues("messageRules", MessageRules); - writer.WriteCollectionOfObjectValues("messages", Messages); - writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); + writer.WriteCollectionOfObjectValues("messageRules", MessageRules); + writer.WriteCollectionOfObjectValues("messages", Messages); + writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); writer.WriteStringValue("parentFolderId", ParentFolderId); - writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); + writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); writer.WriteIntValue("totalItemCount", TotalItemCount); writer.WriteIntValue("unreadItemCount", UnreadItemCount); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MailboxSettings.cs b/src/sample/generated/Models/MailboxSettings.cs index 44dcd620..dcc70491 100644 --- a/src/sample/generated/Models/MailboxSettings.cs +++ b/src/sample/generated/Models/MailboxSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MailboxSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MailboxSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Folder ID of an archive folder for the user. @@ -19,10 +25,10 @@ public class MailboxSettings : IAdditionalDataHolder, IParsable { /// The automaticRepliesSetting property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.AutomaticRepliesSetting? AutomaticRepliesSetting { get; set; } + public global::ApiSdk.Models.AutomaticRepliesSetting? AutomaticRepliesSetting { get; set; } #nullable restore #else - public ApiSdk.Models.AutomaticRepliesSetting AutomaticRepliesSetting { get; set; } + public global::ApiSdk.Models.AutomaticRepliesSetting AutomaticRepliesSetting { get; set; } #endif /// The date format for the user's mailbox. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,14 +39,14 @@ public class MailboxSettings : IAdditionalDataHolder, IParsable { public string DateFormat { get; set; } #endif /// The delegateMeetingMessageDeliveryOptions property - public ApiSdk.Models.DelegateMeetingMessageDeliveryOptions? DelegateMeetingMessageDeliveryOptions { get; set; } + public global::ApiSdk.Models.DelegateMeetingMessageDeliveryOptions? DelegateMeetingMessageDeliveryOptions { get; set; } /// The language property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public LocaleInfo? Language { get; set; } + public global::ApiSdk.Models.LocaleInfo? Language { get; set; } #nullable restore #else - public LocaleInfo Language { get; set; } + public global::ApiSdk.Models.LocaleInfo Language { get; set; } #endif /// The time format for the user's mailbox. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -59,61 +65,69 @@ public class MailboxSettings : IAdditionalDataHolder, IParsable { public string TimeZone { get; set; } #endif /// The userPurpose property - public ApiSdk.Models.UserPurpose? UserPurpose { get; set; } + public global::ApiSdk.Models.UserPurpose? UserPurpose { get; set; } /// The workingHours property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.WorkingHours? WorkingHours { get; set; } + public global::ApiSdk.Models.WorkingHours? WorkingHours { get; set; } #nullable restore #else - public ApiSdk.Models.WorkingHours WorkingHours { get; set; } + public global::ApiSdk.Models.WorkingHours WorkingHours { get; set; } #endif /// - /// Instantiates a new mailboxSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public MailboxSettings() { + public MailboxSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static MailboxSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.MailboxSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MailboxSettings(); + return new global::ApiSdk.Models.MailboxSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"archiveFolder", n => { ArchiveFolder = n.GetStringValue(); } }, - {"automaticRepliesSetting", n => { AutomaticRepliesSetting = n.GetObjectValue(ApiSdk.Models.AutomaticRepliesSetting.CreateFromDiscriminatorValue); } }, - {"dateFormat", n => { DateFormat = n.GetStringValue(); } }, - {"delegateMeetingMessageDeliveryOptions", n => { DelegateMeetingMessageDeliveryOptions = n.GetEnumValue(); } }, - {"language", n => { Language = n.GetObjectValue(LocaleInfo.CreateFromDiscriminatorValue); } }, - {"timeFormat", n => { TimeFormat = n.GetStringValue(); } }, - {"timeZone", n => { TimeZone = n.GetStringValue(); } }, - {"userPurpose", n => { UserPurpose = n.GetEnumValue(); } }, - {"workingHours", n => { WorkingHours = n.GetObjectValue(ApiSdk.Models.WorkingHours.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archiveFolder", n => { ArchiveFolder = n.GetStringValue(); } }, + { "automaticRepliesSetting", n => { AutomaticRepliesSetting = n.GetObjectValue(global::ApiSdk.Models.AutomaticRepliesSetting.CreateFromDiscriminatorValue); } }, + { "dateFormat", n => { DateFormat = n.GetStringValue(); } }, + { "delegateMeetingMessageDeliveryOptions", n => { DelegateMeetingMessageDeliveryOptions = n.GetEnumValue(); } }, + { "language", n => { Language = n.GetObjectValue(global::ApiSdk.Models.LocaleInfo.CreateFromDiscriminatorValue); } }, + { "timeFormat", n => { TimeFormat = n.GetStringValue(); } }, + { "timeZone", n => { TimeZone = n.GetStringValue(); } }, + { "userPurpose", n => { UserPurpose = n.GetEnumValue(); } }, + { "workingHours", n => { WorkingHours = n.GetObjectValue(global::ApiSdk.Models.WorkingHours.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("archiveFolder", ArchiveFolder); - writer.WriteObjectValue("automaticRepliesSetting", AutomaticRepliesSetting); + writer.WriteObjectValue("automaticRepliesSetting", AutomaticRepliesSetting); writer.WriteStringValue("dateFormat", DateFormat); - writer.WriteEnumValue("delegateMeetingMessageDeliveryOptions", DelegateMeetingMessageDeliveryOptions); - writer.WriteObjectValue("language", Language); + writer.WriteEnumValue("delegateMeetingMessageDeliveryOptions", DelegateMeetingMessageDeliveryOptions); + writer.WriteObjectValue("language", Language); writer.WriteStringValue("timeFormat", TimeFormat); writer.WriteStringValue("timeZone", TimeZone); - writer.WriteEnumValue("userPurpose", UserPurpose); - writer.WriteObjectValue("workingHours", WorkingHours); + writer.WriteEnumValue("userPurpose", UserPurpose); + writer.WriteObjectValue("workingHours", WorkingHours); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Malware.cs b/src/sample/generated/Models/Malware.cs index 8d765c2a..47f0e765 100644 --- a/src/sample/generated/Models/Malware.cs +++ b/src/sample/generated/Models/Malware.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Malware : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Malware : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Contains the virus details for the malware facet. @@ -17,35 +23,43 @@ public class Malware : IAdditionalDataHolder, IParsable { public string Description { get; set; } #endif /// - /// Instantiates a new malware and sets the default values. + /// Instantiates a new and sets the default values. /// - public Malware() { + public Malware() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Malware CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Malware CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Malware(); + return new global::ApiSdk.Models.Malware(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"description", n => { Description = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ManagedAppFlaggedReason.cs b/src/sample/generated/Models/ManagedAppFlaggedReason.cs index 0c60ba87..4d1743a9 100644 --- a/src/sample/generated/Models/ManagedAppFlaggedReason.cs +++ b/src/sample/generated/Models/ManagedAppFlaggedReason.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// The reason for which a user has been flagged - public enum ManagedAppFlaggedReason { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ManagedAppFlaggedReason + { /// No issue. [EnumMember(Value = "none")] None, diff --git a/src/sample/generated/Models/ManagedAppOperation.cs b/src/sample/generated/Models/ManagedAppOperation.cs index 30344290..7ddff839 100644 --- a/src/sample/generated/Models/ManagedAppOperation.cs +++ b/src/sample/generated/Models/ManagedAppOperation.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Represents an operation applied against an app registration. /// - public class ManagedAppOperation : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ManagedAppOperation : global::ApiSdk.Models.Entity, IParsable + { /// The operation name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -38,27 +42,33 @@ public class ManagedAppOperation : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ManagedAppOperation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ManagedAppOperation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ManagedAppOperation(); + return new global::ApiSdk.Models.ManagedAppOperation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"state", n => { State = n.GetStringValue(); } }, - {"version", n => { Version = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); @@ -68,3 +78,4 @@ public class ManagedAppOperation : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ManagedAppPolicy.cs b/src/sample/generated/Models/ManagedAppPolicy.cs index 29c440ba..eb2647a4 100644 --- a/src/sample/generated/Models/ManagedAppPolicy.cs +++ b/src/sample/generated/Models/ManagedAppPolicy.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// The ManagedAppPolicy resource represents a base type for platform specific policies. /// - public class ManagedAppPolicy : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ManagedAppPolicy : global::ApiSdk.Models.Entity, IParsable + { /// The date and time the policy was created. public DateTimeOffset? CreatedDateTime { get; set; } /// The policy's description. @@ -40,28 +44,34 @@ public class ManagedAppPolicy : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ManagedAppPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ManagedAppPolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ManagedAppPolicy(); + return new global::ApiSdk.Models.ManagedAppPolicy(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"version", n => { Version = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); @@ -72,3 +82,4 @@ public class ManagedAppPolicy : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ManagedAppRegistration.cs b/src/sample/generated/Models/ManagedAppRegistration.cs index 1ba4087e..aefdc048 100644 --- a/src/sample/generated/Models/ManagedAppRegistration.cs +++ b/src/sample/generated/Models/ManagedAppRegistration.cs @@ -1,21 +1,25 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// The ManagedAppEntity is the base entity type for all other entity types under app management workflow. /// - public class ManagedAppRegistration : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ManagedAppRegistration : global::ApiSdk.Models.Entity, IParsable + { /// The identifier for a mobile app. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public MobileAppIdentifier? AppIdentifier { get; set; } + public global::ApiSdk.Models.MobileAppIdentifier? AppIdentifier { get; set; } #nullable restore #else - public MobileAppIdentifier AppIdentifier { get; set; } + public global::ApiSdk.Models.MobileAppIdentifier AppIdentifier { get; set; } #endif /// App version #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -28,10 +32,10 @@ public class ManagedAppRegistration : Entity, IParsable { /// Zero or more policys already applied on the registered app when it last synchronized with managment service. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppliedPolicies { get; set; } + public List? AppliedPolicies { get; set; } #nullable restore #else - public List AppliedPolicies { get; set; } + public List AppliedPolicies { get; set; } #endif /// Date and time of creation public DateTimeOffset? CreatedDateTime { get; set; } @@ -62,18 +66,18 @@ public class ManagedAppRegistration : Entity, IParsable { /// Zero or more reasons an app registration is flagged. E.g. app running on rooted device #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? FlaggedReasons { get; set; } + public List? FlaggedReasons { get; set; } #nullable restore #else - public List FlaggedReasons { get; set; } + public List FlaggedReasons { get; set; } #endif /// Zero or more policies admin intended for the app as of now. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? IntendedPolicies { get; set; } + public List? IntendedPolicies { get; set; } #nullable restore #else - public List IntendedPolicies { get; set; } + public List IntendedPolicies { get; set; } #endif /// Date and time of last the app synced with management service. public DateTimeOffset? LastSyncDateTime { get; set; } @@ -88,10 +92,10 @@ public class ManagedAppRegistration : Entity, IParsable { /// Zero or more long running operations triggered on the app registration. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Operations { get; set; } + public List? Operations { get; set; } #nullable restore #else - public List Operations { get; set; } + public List Operations { get; set; } #endif /// Operating System version #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -120,55 +124,62 @@ public class ManagedAppRegistration : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ManagedAppRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ManagedAppRegistration CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ManagedAppRegistration(); + return new global::ApiSdk.Models.ManagedAppRegistration(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"appIdentifier", n => { AppIdentifier = n.GetObjectValue(MobileAppIdentifier.CreateFromDiscriminatorValue); } }, - {"applicationVersion", n => { ApplicationVersion = n.GetStringValue(); } }, - {"appliedPolicies", n => { AppliedPolicies = n.GetCollectionOfObjectValues(ManagedAppPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"deviceName", n => { DeviceName = n.GetStringValue(); } }, - {"deviceTag", n => { DeviceTag = n.GetStringValue(); } }, - {"deviceType", n => { DeviceType = n.GetStringValue(); } }, - {"flaggedReasons", n => { FlaggedReasons = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"intendedPolicies", n => { IntendedPolicies = n.GetCollectionOfObjectValues(ManagedAppPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"lastSyncDateTime", n => { LastSyncDateTime = n.GetDateTimeOffsetValue(); } }, - {"managementSdkVersion", n => { ManagementSdkVersion = n.GetStringValue(); } }, - {"operations", n => { Operations = n.GetCollectionOfObjectValues(ManagedAppOperation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"platformVersion", n => { PlatformVersion = n.GetStringValue(); } }, - {"userId", n => { UserId = n.GetStringValue(); } }, - {"version", n => { Version = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "appIdentifier", n => { AppIdentifier = n.GetObjectValue(global::ApiSdk.Models.MobileAppIdentifier.CreateFromDiscriminatorValue); } }, + { "applicationVersion", n => { ApplicationVersion = n.GetStringValue(); } }, + { "appliedPolicies", n => { AppliedPolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ManagedAppPolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "deviceName", n => { DeviceName = n.GetStringValue(); } }, + { "deviceTag", n => { DeviceTag = n.GetStringValue(); } }, + { "deviceType", n => { DeviceType = n.GetStringValue(); } }, + { "flaggedReasons", n => { FlaggedReasons = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "intendedPolicies", n => { IntendedPolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ManagedAppPolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "lastSyncDateTime", n => { LastSyncDateTime = n.GetDateTimeOffsetValue(); } }, + { "managementSdkVersion", n => { ManagementSdkVersion = n.GetStringValue(); } }, + { "operations", n => { Operations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ManagedAppOperation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "platformVersion", n => { PlatformVersion = n.GetStringValue(); } }, + { "userId", n => { UserId = n.GetStringValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("appIdentifier", AppIdentifier); + writer.WriteObjectValue("appIdentifier", AppIdentifier); writer.WriteStringValue("applicationVersion", ApplicationVersion); - writer.WriteCollectionOfObjectValues("appliedPolicies", AppliedPolicies); + writer.WriteCollectionOfObjectValues("appliedPolicies", AppliedPolicies); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("deviceName", DeviceName); writer.WriteStringValue("deviceTag", DeviceTag); writer.WriteStringValue("deviceType", DeviceType); - writer.WriteCollectionOfEnumValues("flaggedReasons", FlaggedReasons); - writer.WriteCollectionOfObjectValues("intendedPolicies", IntendedPolicies); + writer.WriteCollectionOfEnumValues("flaggedReasons", FlaggedReasons); + writer.WriteCollectionOfObjectValues("intendedPolicies", IntendedPolicies); writer.WriteDateTimeOffsetValue("lastSyncDateTime", LastSyncDateTime); writer.WriteStringValue("managementSdkVersion", ManagementSdkVersion); - writer.WriteCollectionOfObjectValues("operations", Operations); + writer.WriteCollectionOfObjectValues("operations", Operations); writer.WriteStringValue("platformVersion", PlatformVersion); writer.WriteStringValue("userId", UserId); writer.WriteStringValue("version", Version); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ManagedDevice.cs b/src/sample/generated/Models/ManagedDevice.cs index 92b81b24..ffc741a4 100644 --- a/src/sample/generated/Models/ManagedDevice.cs +++ b/src/sample/generated/Models/ManagedDevice.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Devices that are managed or pre-enrolled through Intune /// - public class ManagedDevice : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ManagedDevice : global::ApiSdk.Models.Entity, IParsable + { /// The code that allows the Activation Lock on managed device to be bypassed. Default, is Null (Non-Default property) for this property when returned as part of managedDevice entity in LIST call. To retrieve actual values GET call needs to be made, with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -38,30 +42,30 @@ public class ManagedDevice : Entity, IParsable { /// The DateTime when device compliance grace period expires. This property is read-only. public DateTimeOffset? ComplianceGracePeriodExpirationDateTime { get; private set; } /// Compliance state. - public ApiSdk.Models.ComplianceState? ComplianceState { get; set; } + public global::ApiSdk.Models.ComplianceState? ComplianceState { get; set; } /// configuration Manager client enabled features #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ConfigurationManagerClientEnabledFeatures? ConfigurationManagerClientEnabledFeatures { get; set; } + public global::ApiSdk.Models.ConfigurationManagerClientEnabledFeatures? ConfigurationManagerClientEnabledFeatures { get; set; } #nullable restore #else - public ApiSdk.Models.ConfigurationManagerClientEnabledFeatures ConfigurationManagerClientEnabledFeatures { get; set; } + public global::ApiSdk.Models.ConfigurationManagerClientEnabledFeatures ConfigurationManagerClientEnabledFeatures { get; set; } #endif /// List of ComplexType deviceActionResult objects. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DeviceActionResults { get; private set; } + public List? DeviceActionResults { get; private set; } #nullable restore #else - public List DeviceActionResults { get; private set; } + public List DeviceActionResults { get; private set; } #endif /// The deviceCategory property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.DeviceCategory? DeviceCategory { get; set; } + public global::ApiSdk.Models.DeviceCategory? DeviceCategory { get; set; } #nullable restore #else - public ApiSdk.Models.DeviceCategory DeviceCategory { get; set; } + public global::ApiSdk.Models.DeviceCategory DeviceCategory { get; set; } #endif /// Device category display name. Default is an empty string. Supports $filter operator 'eq' and 'or'. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -74,28 +78,28 @@ public class ManagedDevice : Entity, IParsable { /// Device compliance policy states for this device. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DeviceCompliancePolicyStates { get; set; } + public List? DeviceCompliancePolicyStates { get; set; } #nullable restore #else - public List DeviceCompliancePolicyStates { get; set; } + public List DeviceCompliancePolicyStates { get; set; } #endif /// Device configuration states for this device. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DeviceConfigurationStates { get; set; } + public List? DeviceConfigurationStates { get; set; } #nullable restore #else - public List DeviceConfigurationStates { get; set; } + public List DeviceConfigurationStates { get; set; } #endif /// Possible ways of adding a mobile device to management. - public ApiSdk.Models.DeviceEnrollmentType? DeviceEnrollmentType { get; set; } + public global::ApiSdk.Models.DeviceEnrollmentType? DeviceEnrollmentType { get; set; } /// The deviceHealthAttestationState property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.DeviceHealthAttestationState? DeviceHealthAttestationState { get; set; } + public global::ApiSdk.Models.DeviceHealthAttestationState? DeviceHealthAttestationState { get; set; } #nullable restore #else - public ApiSdk.Models.DeviceHealthAttestationState DeviceHealthAttestationState { get; set; } + public global::ApiSdk.Models.DeviceHealthAttestationState DeviceHealthAttestationState { get; set; } #endif /// Name of the device. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -106,7 +110,7 @@ public class ManagedDevice : Entity, IParsable { public string DeviceName { get; private set; } #endif /// Device registration status. - public ApiSdk.Models.DeviceRegistrationState? DeviceRegistrationState { get; set; } + public global::ApiSdk.Models.DeviceRegistrationState? DeviceRegistrationState { get; set; } /// Whether the device is Exchange ActiveSync activated. This property is read-only. public bool? EasActivated { get; private set; } /// Exchange ActivationSync activation time of the device. This property is read-only. @@ -129,6 +133,14 @@ public class ManagedDevice : Entity, IParsable { #endif /// Enrollment time of the device. Supports $filter operator 'lt' and 'gt'. This property is read-only. public DateTimeOffset? EnrolledDateTime { get; private set; } + /// Name of the enrollment profile assigned to the device. Default value is empty string, indicating no enrollment profile was assgined. This property is read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EnrollmentProfileName { get; private set; } +#nullable restore +#else + public string EnrollmentProfileName { get; private set; } +#endif /// Indicates Ethernet MAC Address of the device. Default, is Null (Non-Default property) for this property when returned as part of managedDevice entity. Individual get call with select query options is needed to retrieve actual values. Example: deviceManagement/managedDevices({managedDeviceId})?$select=ethernetMacAddress Supports: $select. $Search is not supported. Read-only. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -138,9 +150,9 @@ public class ManagedDevice : Entity, IParsable { public string EthernetMacAddress { get; private set; } #endif /// Device Exchange Access State. - public DeviceManagementExchangeAccessState? ExchangeAccessState { get; set; } + public global::ApiSdk.Models.DeviceManagementExchangeAccessState? ExchangeAccessState { get; set; } /// Device Exchange Access State Reason. - public DeviceManagementExchangeAccessStateReason? ExchangeAccessStateReason { get; set; } + public global::ApiSdk.Models.DeviceManagementExchangeAccessStateReason? ExchangeAccessStateReason { get; set; } /// Last time the device contacted Exchange. This property is read-only. public DateTimeOffset? ExchangeLastSuccessfulSyncDateTime { get; private set; } /// Free Storage in Bytes. Default value is 0. Read-only. This property is read-only. @@ -178,10 +190,10 @@ public class ManagedDevice : Entity, IParsable { /// List of log collection requests #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? LogCollectionRequests { get; set; } + public List? LogCollectionRequests { get; set; } #nullable restore #else - public List LogCollectionRequests { get; set; } + public List LogCollectionRequests { get; set; } #endif /// Automatically generated name to identify a device. Can be overwritten to a user friendly name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -192,9 +204,9 @@ public class ManagedDevice : Entity, IParsable { public string ManagedDeviceName { get; set; } #endif /// Owner type of device. - public ApiSdk.Models.ManagedDeviceOwnerType? ManagedDeviceOwnerType { get; set; } + public global::ApiSdk.Models.ManagedDeviceOwnerType? ManagedDeviceOwnerType { get; set; } /// The managementAgent property - public ManagementAgentType? ManagementAgent { get; set; } + public global::ApiSdk.Models.ManagementAgentType? ManagementAgent { get; set; } /// Reports device management certificate expiration date. This property is read-only. public DateTimeOffset? ManagementCertificateExpirationDate { get; private set; } /// Manufacturer of the device. This property is read-only. @@ -246,7 +258,7 @@ public class ManagedDevice : Entity, IParsable { public string OsVersion { get; private set; } #endif /// Available health states for the Device Health API - public ManagedDevicePartnerReportedHealthState? PartnerReportedThreatState { get; set; } + public global::ApiSdk.Models.ManagedDevicePartnerReportedHealthState? PartnerReportedThreatState { get; set; } /// Phone number of the device. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -328,10 +340,10 @@ public class ManagedDevice : Entity, IParsable { /// The primary users associated with the managed device. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Users { get; set; } + public List? Users { get; set; } #nullable restore #else - public List Users { get; set; } + public List Users { get; set; } #endif /// Wi-Fi MAC. This property is read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -344,110 +356,118 @@ public class ManagedDevice : Entity, IParsable { /// The windowsProtectionState property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.WindowsProtectionState? WindowsProtectionState { get; set; } + public global::ApiSdk.Models.WindowsProtectionState? WindowsProtectionState { get; set; } #nullable restore #else - public ApiSdk.Models.WindowsProtectionState WindowsProtectionState { get; set; } + public global::ApiSdk.Models.WindowsProtectionState WindowsProtectionState { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ManagedDevice CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ManagedDevice CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ManagedDevice(); + return new global::ApiSdk.Models.ManagedDevice(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"activationLockBypassCode", n => { ActivationLockBypassCode = n.GetStringValue(); } }, - {"androidSecurityPatchLevel", n => { AndroidSecurityPatchLevel = n.GetStringValue(); } }, - {"azureADDeviceId", n => { AzureADDeviceId = n.GetStringValue(); } }, - {"azureADRegistered", n => { AzureADRegistered = n.GetBoolValue(); } }, - {"complianceGracePeriodExpirationDateTime", n => { ComplianceGracePeriodExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"complianceState", n => { ComplianceState = n.GetEnumValue(); } }, - {"configurationManagerClientEnabledFeatures", n => { ConfigurationManagerClientEnabledFeatures = n.GetObjectValue(ApiSdk.Models.ConfigurationManagerClientEnabledFeatures.CreateFromDiscriminatorValue); } }, - {"deviceActionResults", n => { DeviceActionResults = n.GetCollectionOfObjectValues(DeviceActionResult.CreateFromDiscriminatorValue)?.ToList(); } }, - {"deviceCategory", n => { DeviceCategory = n.GetObjectValue(ApiSdk.Models.DeviceCategory.CreateFromDiscriminatorValue); } }, - {"deviceCategoryDisplayName", n => { DeviceCategoryDisplayName = n.GetStringValue(); } }, - {"deviceCompliancePolicyStates", n => { DeviceCompliancePolicyStates = n.GetCollectionOfObjectValues(DeviceCompliancePolicyState.CreateFromDiscriminatorValue)?.ToList(); } }, - {"deviceConfigurationStates", n => { DeviceConfigurationStates = n.GetCollectionOfObjectValues(DeviceConfigurationState.CreateFromDiscriminatorValue)?.ToList(); } }, - {"deviceEnrollmentType", n => { DeviceEnrollmentType = n.GetEnumValue(); } }, - {"deviceHealthAttestationState", n => { DeviceHealthAttestationState = n.GetObjectValue(ApiSdk.Models.DeviceHealthAttestationState.CreateFromDiscriminatorValue); } }, - {"deviceName", n => { DeviceName = n.GetStringValue(); } }, - {"deviceRegistrationState", n => { DeviceRegistrationState = n.GetEnumValue(); } }, - {"easActivated", n => { EasActivated = n.GetBoolValue(); } }, - {"easActivationDateTime", n => { EasActivationDateTime = n.GetDateTimeOffsetValue(); } }, - {"easDeviceId", n => { EasDeviceId = n.GetStringValue(); } }, - {"emailAddress", n => { EmailAddress = n.GetStringValue(); } }, - {"enrolledDateTime", n => { EnrolledDateTime = n.GetDateTimeOffsetValue(); } }, - {"ethernetMacAddress", n => { EthernetMacAddress = n.GetStringValue(); } }, - {"exchangeAccessState", n => { ExchangeAccessState = n.GetEnumValue(); } }, - {"exchangeAccessStateReason", n => { ExchangeAccessStateReason = n.GetEnumValue(); } }, - {"exchangeLastSuccessfulSyncDateTime", n => { ExchangeLastSuccessfulSyncDateTime = n.GetDateTimeOffsetValue(); } }, - {"freeStorageSpaceInBytes", n => { FreeStorageSpaceInBytes = n.GetLongValue(); } }, - {"iccid", n => { Iccid = n.GetStringValue(); } }, - {"imei", n => { Imei = n.GetStringValue(); } }, - {"isEncrypted", n => { IsEncrypted = n.GetBoolValue(); } }, - {"isSupervised", n => { IsSupervised = n.GetBoolValue(); } }, - {"jailBroken", n => { JailBroken = n.GetStringValue(); } }, - {"lastSyncDateTime", n => { LastSyncDateTime = n.GetDateTimeOffsetValue(); } }, - {"logCollectionRequests", n => { LogCollectionRequests = n.GetCollectionOfObjectValues(DeviceLogCollectionResponse.CreateFromDiscriminatorValue)?.ToList(); } }, - {"managedDeviceName", n => { ManagedDeviceName = n.GetStringValue(); } }, - {"managedDeviceOwnerType", n => { ManagedDeviceOwnerType = n.GetEnumValue(); } }, - {"managementAgent", n => { ManagementAgent = n.GetEnumValue(); } }, - {"managementCertificateExpirationDate", n => { ManagementCertificateExpirationDate = n.GetDateTimeOffsetValue(); } }, - {"manufacturer", n => { Manufacturer = n.GetStringValue(); } }, - {"meid", n => { Meid = n.GetStringValue(); } }, - {"model", n => { Model = n.GetStringValue(); } }, - {"notes", n => { Notes = n.GetStringValue(); } }, - {"operatingSystem", n => { OperatingSystem = n.GetStringValue(); } }, - {"osVersion", n => { OsVersion = n.GetStringValue(); } }, - {"partnerReportedThreatState", n => { PartnerReportedThreatState = n.GetEnumValue(); } }, - {"phoneNumber", n => { PhoneNumber = n.GetStringValue(); } }, - {"physicalMemoryInBytes", n => { PhysicalMemoryInBytes = n.GetLongValue(); } }, - {"remoteAssistanceSessionErrorDetails", n => { RemoteAssistanceSessionErrorDetails = n.GetStringValue(); } }, - {"remoteAssistanceSessionUrl", n => { RemoteAssistanceSessionUrl = n.GetStringValue(); } }, - {"requireUserEnrollmentApproval", n => { RequireUserEnrollmentApproval = n.GetBoolValue(); } }, - {"serialNumber", n => { SerialNumber = n.GetStringValue(); } }, - {"subscriberCarrier", n => { SubscriberCarrier = n.GetStringValue(); } }, - {"totalStorageSpaceInBytes", n => { TotalStorageSpaceInBytes = n.GetLongValue(); } }, - {"udid", n => { Udid = n.GetStringValue(); } }, - {"userDisplayName", n => { UserDisplayName = n.GetStringValue(); } }, - {"userId", n => { UserId = n.GetStringValue(); } }, - {"userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, - {"users", n => { Users = n.GetCollectionOfObjectValues(User.CreateFromDiscriminatorValue)?.ToList(); } }, - {"wiFiMacAddress", n => { WiFiMacAddress = n.GetStringValue(); } }, - {"windowsProtectionState", n => { WindowsProtectionState = n.GetObjectValue(ApiSdk.Models.WindowsProtectionState.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "activationLockBypassCode", n => { ActivationLockBypassCode = n.GetStringValue(); } }, + { "androidSecurityPatchLevel", n => { AndroidSecurityPatchLevel = n.GetStringValue(); } }, + { "azureADDeviceId", n => { AzureADDeviceId = n.GetStringValue(); } }, + { "azureADRegistered", n => { AzureADRegistered = n.GetBoolValue(); } }, + { "complianceGracePeriodExpirationDateTime", n => { ComplianceGracePeriodExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "complianceState", n => { ComplianceState = n.GetEnumValue(); } }, + { "configurationManagerClientEnabledFeatures", n => { ConfigurationManagerClientEnabledFeatures = n.GetObjectValue(global::ApiSdk.Models.ConfigurationManagerClientEnabledFeatures.CreateFromDiscriminatorValue); } }, + { "deviceActionResults", n => { DeviceActionResults = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DeviceActionResult.CreateFromDiscriminatorValue)?.AsList(); } }, + { "deviceCategory", n => { DeviceCategory = n.GetObjectValue(global::ApiSdk.Models.DeviceCategory.CreateFromDiscriminatorValue); } }, + { "deviceCategoryDisplayName", n => { DeviceCategoryDisplayName = n.GetStringValue(); } }, + { "deviceCompliancePolicyStates", n => { DeviceCompliancePolicyStates = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DeviceCompliancePolicyState.CreateFromDiscriminatorValue)?.AsList(); } }, + { "deviceConfigurationStates", n => { DeviceConfigurationStates = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DeviceConfigurationState.CreateFromDiscriminatorValue)?.AsList(); } }, + { "deviceEnrollmentType", n => { DeviceEnrollmentType = n.GetEnumValue(); } }, + { "deviceHealthAttestationState", n => { DeviceHealthAttestationState = n.GetObjectValue(global::ApiSdk.Models.DeviceHealthAttestationState.CreateFromDiscriminatorValue); } }, + { "deviceName", n => { DeviceName = n.GetStringValue(); } }, + { "deviceRegistrationState", n => { DeviceRegistrationState = n.GetEnumValue(); } }, + { "easActivated", n => { EasActivated = n.GetBoolValue(); } }, + { "easActivationDateTime", n => { EasActivationDateTime = n.GetDateTimeOffsetValue(); } }, + { "easDeviceId", n => { EasDeviceId = n.GetStringValue(); } }, + { "emailAddress", n => { EmailAddress = n.GetStringValue(); } }, + { "enrolledDateTime", n => { EnrolledDateTime = n.GetDateTimeOffsetValue(); } }, + { "enrollmentProfileName", n => { EnrollmentProfileName = n.GetStringValue(); } }, + { "ethernetMacAddress", n => { EthernetMacAddress = n.GetStringValue(); } }, + { "exchangeAccessState", n => { ExchangeAccessState = n.GetEnumValue(); } }, + { "exchangeAccessStateReason", n => { ExchangeAccessStateReason = n.GetEnumValue(); } }, + { "exchangeLastSuccessfulSyncDateTime", n => { ExchangeLastSuccessfulSyncDateTime = n.GetDateTimeOffsetValue(); } }, + { "freeStorageSpaceInBytes", n => { FreeStorageSpaceInBytes = n.GetLongValue(); } }, + { "iccid", n => { Iccid = n.GetStringValue(); } }, + { "imei", n => { Imei = n.GetStringValue(); } }, + { "isEncrypted", n => { IsEncrypted = n.GetBoolValue(); } }, + { "isSupervised", n => { IsSupervised = n.GetBoolValue(); } }, + { "jailBroken", n => { JailBroken = n.GetStringValue(); } }, + { "lastSyncDateTime", n => { LastSyncDateTime = n.GetDateTimeOffsetValue(); } }, + { "logCollectionRequests", n => { LogCollectionRequests = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DeviceLogCollectionResponse.CreateFromDiscriminatorValue)?.AsList(); } }, + { "managedDeviceName", n => { ManagedDeviceName = n.GetStringValue(); } }, + { "managedDeviceOwnerType", n => { ManagedDeviceOwnerType = n.GetEnumValue(); } }, + { "managementAgent", n => { ManagementAgent = n.GetEnumValue(); } }, + { "managementCertificateExpirationDate", n => { ManagementCertificateExpirationDate = n.GetDateTimeOffsetValue(); } }, + { "manufacturer", n => { Manufacturer = n.GetStringValue(); } }, + { "meid", n => { Meid = n.GetStringValue(); } }, + { "model", n => { Model = n.GetStringValue(); } }, + { "notes", n => { Notes = n.GetStringValue(); } }, + { "operatingSystem", n => { OperatingSystem = n.GetStringValue(); } }, + { "osVersion", n => { OsVersion = n.GetStringValue(); } }, + { "partnerReportedThreatState", n => { PartnerReportedThreatState = n.GetEnumValue(); } }, + { "phoneNumber", n => { PhoneNumber = n.GetStringValue(); } }, + { "physicalMemoryInBytes", n => { PhysicalMemoryInBytes = n.GetLongValue(); } }, + { "remoteAssistanceSessionErrorDetails", n => { RemoteAssistanceSessionErrorDetails = n.GetStringValue(); } }, + { "remoteAssistanceSessionUrl", n => { RemoteAssistanceSessionUrl = n.GetStringValue(); } }, + { "requireUserEnrollmentApproval", n => { RequireUserEnrollmentApproval = n.GetBoolValue(); } }, + { "serialNumber", n => { SerialNumber = n.GetStringValue(); } }, + { "subscriberCarrier", n => { SubscriberCarrier = n.GetStringValue(); } }, + { "totalStorageSpaceInBytes", n => { TotalStorageSpaceInBytes = n.GetLongValue(); } }, + { "udid", n => { Udid = n.GetStringValue(); } }, + { "userDisplayName", n => { UserDisplayName = n.GetStringValue(); } }, + { "userId", n => { UserId = n.GetStringValue(); } }, + { "userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, + { "users", n => { Users = n.GetCollectionOfObjectValues(global::ApiSdk.Models.User.CreateFromDiscriminatorValue)?.AsList(); } }, + { "wiFiMacAddress", n => { WiFiMacAddress = n.GetStringValue(); } }, + { "windowsProtectionState", n => { WindowsProtectionState = n.GetObjectValue(global::ApiSdk.Models.WindowsProtectionState.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("complianceState", ComplianceState); - writer.WriteObjectValue("configurationManagerClientEnabledFeatures", ConfigurationManagerClientEnabledFeatures); - writer.WriteObjectValue("deviceCategory", DeviceCategory); - writer.WriteCollectionOfObjectValues("deviceCompliancePolicyStates", DeviceCompliancePolicyStates); - writer.WriteCollectionOfObjectValues("deviceConfigurationStates", DeviceConfigurationStates); - writer.WriteEnumValue("deviceEnrollmentType", DeviceEnrollmentType); - writer.WriteObjectValue("deviceHealthAttestationState", DeviceHealthAttestationState); - writer.WriteEnumValue("deviceRegistrationState", DeviceRegistrationState); - writer.WriteEnumValue("exchangeAccessState", ExchangeAccessState); - writer.WriteEnumValue("exchangeAccessStateReason", ExchangeAccessStateReason); - writer.WriteCollectionOfObjectValues("logCollectionRequests", LogCollectionRequests); + writer.WriteEnumValue("complianceState", ComplianceState); + writer.WriteObjectValue("configurationManagerClientEnabledFeatures", ConfigurationManagerClientEnabledFeatures); + writer.WriteObjectValue("deviceCategory", DeviceCategory); + writer.WriteCollectionOfObjectValues("deviceCompliancePolicyStates", DeviceCompliancePolicyStates); + writer.WriteCollectionOfObjectValues("deviceConfigurationStates", DeviceConfigurationStates); + writer.WriteEnumValue("deviceEnrollmentType", DeviceEnrollmentType); + writer.WriteObjectValue("deviceHealthAttestationState", DeviceHealthAttestationState); + writer.WriteEnumValue("deviceRegistrationState", DeviceRegistrationState); + writer.WriteEnumValue("exchangeAccessState", ExchangeAccessState); + writer.WriteEnumValue("exchangeAccessStateReason", ExchangeAccessStateReason); + writer.WriteCollectionOfObjectValues("logCollectionRequests", LogCollectionRequests); writer.WriteStringValue("managedDeviceName", ManagedDeviceName); - writer.WriteEnumValue("managedDeviceOwnerType", ManagedDeviceOwnerType); - writer.WriteEnumValue("managementAgent", ManagementAgent); + writer.WriteEnumValue("managedDeviceOwnerType", ManagedDeviceOwnerType); + writer.WriteEnumValue("managementAgent", ManagementAgent); writer.WriteStringValue("notes", Notes); - writer.WriteEnumValue("partnerReportedThreatState", PartnerReportedThreatState); - writer.WriteCollectionOfObjectValues("users", Users); - writer.WriteObjectValue("windowsProtectionState", WindowsProtectionState); + writer.WriteEnumValue("partnerReportedThreatState", PartnerReportedThreatState); + writer.WriteCollectionOfObjectValues("users", Users); + writer.WriteObjectValue("windowsProtectionState", WindowsProtectionState); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ManagedDeviceOwnerType.cs b/src/sample/generated/Models/ManagedDeviceOwnerType.cs index aab7d2bf..b6deb7b7 100644 --- a/src/sample/generated/Models/ManagedDeviceOwnerType.cs +++ b/src/sample/generated/Models/ManagedDeviceOwnerType.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Owner type of device. - public enum ManagedDeviceOwnerType { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ManagedDeviceOwnerType + { /// Unknown. [EnumMember(Value = "unknown")] Unknown, diff --git a/src/sample/generated/Models/ManagedDevicePartnerReportedHealthState.cs b/src/sample/generated/Models/ManagedDevicePartnerReportedHealthState.cs index e04cb134..ae14ed73 100644 --- a/src/sample/generated/Models/ManagedDevicePartnerReportedHealthState.cs +++ b/src/sample/generated/Models/ManagedDevicePartnerReportedHealthState.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Available health states for the Device Health API - public enum ManagedDevicePartnerReportedHealthState { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum ManagedDevicePartnerReportedHealthState + { /// Device health state is not yet reported [EnumMember(Value = "unknown")] Unknown, diff --git a/src/sample/generated/Models/ManagementAgentType.cs b/src/sample/generated/Models/ManagementAgentType.cs index 9b020d89..760c6a12 100644 --- a/src/sample/generated/Models/ManagementAgentType.cs +++ b/src/sample/generated/Models/ManagementAgentType.cs @@ -1,8 +1,13 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ManagementAgentType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ManagementAgentType + #pragma warning restore CS1591 + { /// The device is managed by Exchange server. [EnumMember(Value = "eas")] Eas, @@ -40,6 +45,8 @@ public enum ManagementAgentType { [EnumMember(Value = "microsoft365ManagedMdm")] Microsoft365ManagedMdm, [EnumMember(Value = "msSense")] + #pragma warning disable CS1591 MsSense, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/MeetingAttendanceReport.cs b/src/sample/generated/Models/MeetingAttendanceReport.cs index 30e852ae..d476fd99 100644 --- a/src/sample/generated/Models/MeetingAttendanceReport.cs +++ b/src/sample/generated/Models/MeetingAttendanceReport.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MeetingAttendanceReport : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MeetingAttendanceReport : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// List of attendance records of an attendance report. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AttendanceRecords { get; set; } + public List? AttendanceRecords { get; set; } #nullable restore #else - public List AttendanceRecords { get; set; } + public List AttendanceRecords { get; set; } #endif /// UTC time when the meeting ended. Read-only. public DateTimeOffset? MeetingEndDateTime { get; set; } @@ -23,33 +29,40 @@ public class MeetingAttendanceReport : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new MeetingAttendanceReport CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.MeetingAttendanceReport CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MeetingAttendanceReport(); + return new global::ApiSdk.Models.MeetingAttendanceReport(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"attendanceRecords", n => { AttendanceRecords = n.GetCollectionOfObjectValues(AttendanceRecord.CreateFromDiscriminatorValue)?.ToList(); } }, - {"meetingEndDateTime", n => { MeetingEndDateTime = n.GetDateTimeOffsetValue(); } }, - {"meetingStartDateTime", n => { MeetingStartDateTime = n.GetDateTimeOffsetValue(); } }, - {"totalParticipantCount", n => { TotalParticipantCount = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "attendanceRecords", n => { AttendanceRecords = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AttendanceRecord.CreateFromDiscriminatorValue)?.AsList(); } }, + { "meetingEndDateTime", n => { MeetingEndDateTime = n.GetDateTimeOffsetValue(); } }, + { "meetingStartDateTime", n => { MeetingStartDateTime = n.GetDateTimeOffsetValue(); } }, + { "totalParticipantCount", n => { TotalParticipantCount = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("attendanceRecords", AttendanceRecords); + writer.WriteCollectionOfObjectValues("attendanceRecords", AttendanceRecords); writer.WriteDateTimeOffsetValue("meetingEndDateTime", MeetingEndDateTime); writer.WriteDateTimeOffsetValue("meetingStartDateTime", MeetingStartDateTime); writer.WriteIntValue("totalParticipantCount", TotalParticipantCount); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MeetingChatHistoryDefaultMode.cs b/src/sample/generated/Models/MeetingChatHistoryDefaultMode.cs index 21ec8ec3..7342d981 100644 --- a/src/sample/generated/Models/MeetingChatHistoryDefaultMode.cs +++ b/src/sample/generated/Models/MeetingChatHistoryDefaultMode.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum MeetingChatHistoryDefaultMode { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum MeetingChatHistoryDefaultMode + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "all")] + #pragma warning disable CS1591 All, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/MeetingChatMode.cs b/src/sample/generated/Models/MeetingChatMode.cs index 41c2efcb..cbda9807 100644 --- a/src/sample/generated/Models/MeetingChatMode.cs +++ b/src/sample/generated/Models/MeetingChatMode.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum MeetingChatMode { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum MeetingChatMode + #pragma warning restore CS1591 + { [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 Enabled, + #pragma warning restore CS1591 [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 Disabled, + #pragma warning restore CS1591 [EnumMember(Value = "limited")] + #pragma warning disable CS1591 Limited, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/MeetingParticipantInfo.cs b/src/sample/generated/Models/MeetingParticipantInfo.cs index a2c30374..5cb798e1 100644 --- a/src/sample/generated/Models/MeetingParticipantInfo.cs +++ b/src/sample/generated/Models/MeetingParticipantInfo.cs @@ -1,23 +1,29 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MeetingParticipantInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MeetingParticipantInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The identity property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? Identity { get; set; } + public global::ApiSdk.Models.IdentitySet? Identity { get; set; } #nullable restore #else - public IdentitySet Identity { get; set; } + public global::ApiSdk.Models.IdentitySet Identity { get; set; } #endif /// The role property - public OnlineMeetingRole? Role { get; set; } + public global::ApiSdk.Models.OnlineMeetingRole? Role { get; set; } /// User principal name of the participant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -27,39 +33,47 @@ public class MeetingParticipantInfo : IAdditionalDataHolder, IParsable { public string Upn { get; set; } #endif /// - /// Instantiates a new meetingParticipantInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public MeetingParticipantInfo() { + public MeetingParticipantInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static MeetingParticipantInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.MeetingParticipantInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MeetingParticipantInfo(); + return new global::ApiSdk.Models.MeetingParticipantInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"identity", n => { Identity = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"role", n => { Role = n.GetEnumValue(); } }, - {"upn", n => { Upn = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "identity", n => { Identity = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "role", n => { Role = n.GetEnumValue(); } }, + { "upn", n => { Upn = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("identity", Identity); - writer.WriteEnumValue("role", Role); + writer.WriteObjectValue("identity", Identity); + writer.WriteEnumValue("role", Role); writer.WriteStringValue("upn", Upn); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MeetingParticipants.cs b/src/sample/generated/Models/MeetingParticipants.cs index 58ace808..2e2b07e3 100644 --- a/src/sample/generated/Models/MeetingParticipants.cs +++ b/src/sample/generated/Models/MeetingParticipants.cs @@ -1,61 +1,75 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MeetingParticipants : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MeetingParticipants : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The attendees property + /// Information about the meeting attendees. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Attendees { get; set; } + public List? Attendees { get; set; } #nullable restore #else - public List Attendees { get; set; } + public List Attendees { get; set; } #endif /// The organizer property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public MeetingParticipantInfo? Organizer { get; set; } + public global::ApiSdk.Models.MeetingParticipantInfo? Organizer { get; set; } #nullable restore #else - public MeetingParticipantInfo Organizer { get; set; } + public global::ApiSdk.Models.MeetingParticipantInfo Organizer { get; set; } #endif /// - /// Instantiates a new meetingParticipants and sets the default values. + /// Instantiates a new and sets the default values. /// - public MeetingParticipants() { + public MeetingParticipants() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static MeetingParticipants CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.MeetingParticipants CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MeetingParticipants(); + return new global::ApiSdk.Models.MeetingParticipants(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"attendees", n => { Attendees = n.GetCollectionOfObjectValues(MeetingParticipantInfo.CreateFromDiscriminatorValue)?.ToList(); } }, - {"organizer", n => { Organizer = n.GetObjectValue(MeetingParticipantInfo.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attendees", n => { Attendees = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MeetingParticipantInfo.CreateFromDiscriminatorValue)?.AsList(); } }, + { "organizer", n => { Organizer = n.GetObjectValue(global::ApiSdk.Models.MeetingParticipantInfo.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("attendees", Attendees); - writer.WriteObjectValue("organizer", Organizer); + writer.WriteCollectionOfObjectValues("attendees", Attendees); + writer.WriteObjectValue("organizer", Organizer); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Message.cs b/src/sample/generated/Models/Message.cs index 7893f537..34380319 100644 --- a/src/sample/generated/Models/Message.cs +++ b/src/sample/generated/Models/Message.cs @@ -1,34 +1,40 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Message : OutlookItem, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Message : global::ApiSdk.Models.OutlookItem, IParsable + #pragma warning restore CS1591 + { /// The fileAttachment and itemAttachment attachments for the message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Attachments { get; set; } + public List? Attachments { get; set; } #nullable restore #else - public List Attachments { get; set; } + public List Attachments { get; set; } #endif /// The Bcc: recipients for the message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? BccRecipients { get; set; } + public List? BccRecipients { get; set; } #nullable restore #else - public List BccRecipients { get; set; } + public List BccRecipients { get; set; } #endif /// The body property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemBody? Body { get; set; } + public global::ApiSdk.Models.ItemBody? Body { get; set; } #nullable restore #else - public ItemBody Body { get; set; } + public global::ApiSdk.Models.ItemBody Body { get; set; } #endif /// The first 255 characters of the message body. It is in text format. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,10 +47,10 @@ public class Message : OutlookItem, IParsable { /// The Cc: recipients for the message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CcRecipients { get; set; } + public List? CcRecipients { get; set; } #nullable restore #else - public List CcRecipients { get; set; } + public List CcRecipients { get; set; } #endif /// The ID of the conversation the email belongs to. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -65,42 +71,42 @@ public class Message : OutlookItem, IParsable { /// The collection of open extensions defined for the message. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif /// The flag property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public FollowupFlag? Flag { get; set; } + public global::ApiSdk.Models.FollowupFlag? Flag { get; set; } #nullable restore #else - public FollowupFlag Flag { get; set; } + public global::ApiSdk.Models.FollowupFlag Flag { get; set; } #endif /// The from property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Recipient? From { get; set; } + public global::ApiSdk.Models.Recipient? From { get; set; } #nullable restore #else - public Recipient From { get; set; } + public global::ApiSdk.Models.Recipient From { get; set; } #endif /// Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as <IMG src='cid:image001.jpg@01D26CD8.6C05F070'>. public bool? HasAttachments { get; set; } /// The importance property - public ApiSdk.Models.Importance? Importance { get; set; } + public global::ApiSdk.Models.Importance? Importance { get; set; } /// The inferenceClassification property - public InferenceClassificationType? InferenceClassification { get; set; } - /// The internetMessageHeaders property + public global::ApiSdk.Models.InferenceClassificationType? InferenceClassification { get; set; } + /// A collection of message headers defined by RFC5322. The set includes message headers indicating the network path taken by a message from the sender to the recipient. It can also contain custom message headers that hold app data for the message. Returned only on applying a $select query option. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? InternetMessageHeaders { get; set; } + public List? InternetMessageHeaders { get; set; } #nullable restore #else - public List InternetMessageHeaders { get; set; } + public List InternetMessageHeaders { get; set; } #endif - /// The internetMessageId property + /// The message ID in the format specified by RFC2822. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? InternetMessageId { get; set; } @@ -108,23 +114,23 @@ public class Message : OutlookItem, IParsable { #else public string InternetMessageId { get; set; } #endif - /// The isDeliveryReceiptRequested property + /// Indicates whether a read receipt is requested for the message. public bool? IsDeliveryReceiptRequested { get; set; } - /// The isDraft property + /// Indicates whether the message is a draft. A message is a draft if it hasn't been sent yet. public bool? IsDraft { get; set; } - /// The isRead property + /// Indicates whether the message has been read. public bool? IsRead { get; set; } - /// The isReadReceiptRequested property + /// Indicates whether a read receipt is requested for the message. public bool? IsReadReceiptRequested { get; set; } /// The collection of multi-value extended properties defined for the message. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MultiValueExtendedProperties { get; set; } + public List? MultiValueExtendedProperties { get; set; } #nullable restore #else - public List MultiValueExtendedProperties { get; set; } + public List MultiValueExtendedProperties { get; set; } #endif - /// The parentFolderId property + /// The unique identifier for the message's parent mailFolder. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ParentFolderId { get; set; } @@ -132,35 +138,35 @@ public class Message : OutlookItem, IParsable { #else public string ParentFolderId { get; set; } #endif - /// The receivedDateTime property + /// The date and time the message was received. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? ReceivedDateTime { get; set; } - /// The replyTo property + /// The email addresses to use when replying. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ReplyTo { get; set; } + public List? ReplyTo { get; set; } #nullable restore #else - public List ReplyTo { get; set; } + public List ReplyTo { get; set; } #endif /// The sender property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Recipient? Sender { get; set; } + public global::ApiSdk.Models.Recipient? Sender { get; set; } #nullable restore #else - public Recipient Sender { get; set; } + public global::ApiSdk.Models.Recipient Sender { get; set; } #endif - /// The sentDateTime property + /// The date and time the message was sent. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? SentDateTime { get; set; } /// The collection of single-value extended properties defined for the message. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SingleValueExtendedProperties { get; set; } + public List? SingleValueExtendedProperties { get; set; } #nullable restore #else - public List SingleValueExtendedProperties { get; set; } + public List SingleValueExtendedProperties { get; set; } #endif - /// The subject property + /// The subject of the message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Subject { get; set; } @@ -168,23 +174,23 @@ public class Message : OutlookItem, IParsable { #else public string Subject { get; set; } #endif - /// The toRecipients property + /// The To: recipients for the message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ToRecipients { get; set; } + public List? ToRecipients { get; set; } #nullable restore #else - public List ToRecipients { get; set; } + public List ToRecipients { get; set; } #endif /// The uniqueBody property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemBody? UniqueBody { get; set; } + public global::ApiSdk.Models.ItemBody? UniqueBody { get; set; } #nullable restore #else - public ItemBody UniqueBody { get; set; } + public global::ApiSdk.Models.ItemBody UniqueBody { get; set; } #endif - /// The webLink property + /// The URL to open the message in Outlook on the web.You can append an ispopout argument to the end of the URL to change how the message is displayed. If ispopout is not present or if it is set to 1, then the message is shown in a popout window. If ispopout is set to 0, the browser shows the message in the Outlook on the web review pane.The message opens in the browser if you are signed in to your mailbox via Outlook on the web. You are prompted to sign in if you are not already signed in with the browser.This URL cannot be accessed from within an iFrame. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? WebLink { get; set; } @@ -195,85 +201,92 @@ public class Message : OutlookItem, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Message CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Message CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Message(); + return new global::ApiSdk.Models.Message(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"attachments", n => { Attachments = n.GetCollectionOfObjectValues(Attachment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"bccRecipients", n => { BccRecipients = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"body", n => { Body = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, - {"bodyPreview", n => { BodyPreview = n.GetStringValue(); } }, - {"ccRecipients", n => { CcRecipients = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"conversationId", n => { ConversationId = n.GetStringValue(); } }, - {"conversationIndex", n => { ConversationIndex = n.GetByteArrayValue(); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"flag", n => { Flag = n.GetObjectValue(FollowupFlag.CreateFromDiscriminatorValue); } }, - {"from", n => { From = n.GetObjectValue(Recipient.CreateFromDiscriminatorValue); } }, - {"hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, - {"importance", n => { Importance = n.GetEnumValue(); } }, - {"inferenceClassification", n => { InferenceClassification = n.GetEnumValue(); } }, - {"internetMessageHeaders", n => { InternetMessageHeaders = n.GetCollectionOfObjectValues(InternetMessageHeader.CreateFromDiscriminatorValue)?.ToList(); } }, - {"internetMessageId", n => { InternetMessageId = n.GetStringValue(); } }, - {"isDeliveryReceiptRequested", n => { IsDeliveryReceiptRequested = n.GetBoolValue(); } }, - {"isDraft", n => { IsDraft = n.GetBoolValue(); } }, - {"isRead", n => { IsRead = n.GetBoolValue(); } }, - {"isReadReceiptRequested", n => { IsReadReceiptRequested = n.GetBoolValue(); } }, - {"multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"parentFolderId", n => { ParentFolderId = n.GetStringValue(); } }, - {"receivedDateTime", n => { ReceivedDateTime = n.GetDateTimeOffsetValue(); } }, - {"replyTo", n => { ReplyTo = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sender", n => { Sender = n.GetObjectValue(Recipient.CreateFromDiscriminatorValue); } }, - {"sentDateTime", n => { SentDateTime = n.GetDateTimeOffsetValue(); } }, - {"singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"subject", n => { Subject = n.GetStringValue(); } }, - {"toRecipients", n => { ToRecipients = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"uniqueBody", n => { UniqueBody = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, - {"webLink", n => { WebLink = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "attachments", n => { Attachments = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Attachment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "bccRecipients", n => { BccRecipients = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "body", n => { Body = n.GetObjectValue(global::ApiSdk.Models.ItemBody.CreateFromDiscriminatorValue); } }, + { "bodyPreview", n => { BodyPreview = n.GetStringValue(); } }, + { "ccRecipients", n => { CcRecipients = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "conversationId", n => { ConversationId = n.GetStringValue(); } }, + { "conversationIndex", n => { ConversationIndex = n.GetByteArrayValue(); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "flag", n => { Flag = n.GetObjectValue(global::ApiSdk.Models.FollowupFlag.CreateFromDiscriminatorValue); } }, + { "from", n => { From = n.GetObjectValue(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue); } }, + { "hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, + { "importance", n => { Importance = n.GetEnumValue(); } }, + { "inferenceClassification", n => { InferenceClassification = n.GetEnumValue(); } }, + { "internetMessageHeaders", n => { InternetMessageHeaders = n.GetCollectionOfObjectValues(global::ApiSdk.Models.InternetMessageHeader.CreateFromDiscriminatorValue)?.AsList(); } }, + { "internetMessageId", n => { InternetMessageId = n.GetStringValue(); } }, + { "isDeliveryReceiptRequested", n => { IsDeliveryReceiptRequested = n.GetBoolValue(); } }, + { "isDraft", n => { IsDraft = n.GetBoolValue(); } }, + { "isRead", n => { IsRead = n.GetBoolValue(); } }, + { "isReadReceiptRequested", n => { IsReadReceiptRequested = n.GetBoolValue(); } }, + { "multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "parentFolderId", n => { ParentFolderId = n.GetStringValue(); } }, + { "receivedDateTime", n => { ReceivedDateTime = n.GetDateTimeOffsetValue(); } }, + { "replyTo", n => { ReplyTo = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sender", n => { Sender = n.GetObjectValue(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue); } }, + { "sentDateTime", n => { SentDateTime = n.GetDateTimeOffsetValue(); } }, + { "singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "subject", n => { Subject = n.GetStringValue(); } }, + { "toRecipients", n => { ToRecipients = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "uniqueBody", n => { UniqueBody = n.GetObjectValue(global::ApiSdk.Models.ItemBody.CreateFromDiscriminatorValue); } }, + { "webLink", n => { WebLink = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("attachments", Attachments); - writer.WriteCollectionOfObjectValues("bccRecipients", BccRecipients); - writer.WriteObjectValue("body", Body); + writer.WriteCollectionOfObjectValues("attachments", Attachments); + writer.WriteCollectionOfObjectValues("bccRecipients", BccRecipients); + writer.WriteObjectValue("body", Body); writer.WriteStringValue("bodyPreview", BodyPreview); - writer.WriteCollectionOfObjectValues("ccRecipients", CcRecipients); + writer.WriteCollectionOfObjectValues("ccRecipients", CcRecipients); writer.WriteStringValue("conversationId", ConversationId); writer.WriteByteArrayValue("conversationIndex", ConversationIndex); - writer.WriteCollectionOfObjectValues("extensions", Extensions); - writer.WriteObjectValue("flag", Flag); - writer.WriteObjectValue("from", From); + writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteObjectValue("flag", Flag); + writer.WriteObjectValue("from", From); writer.WriteBoolValue("hasAttachments", HasAttachments); - writer.WriteEnumValue("importance", Importance); - writer.WriteEnumValue("inferenceClassification", InferenceClassification); - writer.WriteCollectionOfObjectValues("internetMessageHeaders", InternetMessageHeaders); + writer.WriteEnumValue("importance", Importance); + writer.WriteEnumValue("inferenceClassification", InferenceClassification); + writer.WriteCollectionOfObjectValues("internetMessageHeaders", InternetMessageHeaders); writer.WriteStringValue("internetMessageId", InternetMessageId); writer.WriteBoolValue("isDeliveryReceiptRequested", IsDeliveryReceiptRequested); writer.WriteBoolValue("isDraft", IsDraft); writer.WriteBoolValue("isRead", IsRead); writer.WriteBoolValue("isReadReceiptRequested", IsReadReceiptRequested); - writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); + writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); writer.WriteStringValue("parentFolderId", ParentFolderId); writer.WriteDateTimeOffsetValue("receivedDateTime", ReceivedDateTime); - writer.WriteCollectionOfObjectValues("replyTo", ReplyTo); - writer.WriteObjectValue("sender", Sender); + writer.WriteCollectionOfObjectValues("replyTo", ReplyTo); + writer.WriteObjectValue("sender", Sender); writer.WriteDateTimeOffsetValue("sentDateTime", SentDateTime); - writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); + writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); writer.WriteStringValue("subject", Subject); - writer.WriteCollectionOfObjectValues("toRecipients", ToRecipients); - writer.WriteObjectValue("uniqueBody", UniqueBody); + writer.WriteCollectionOfObjectValues("toRecipients", ToRecipients); + writer.WriteObjectValue("uniqueBody", UniqueBody); writer.WriteStringValue("webLink", WebLink); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MessageActionFlag.cs b/src/sample/generated/Models/MessageActionFlag.cs index 0c6ef978..ee1b8df9 100644 --- a/src/sample/generated/Models/MessageActionFlag.cs +++ b/src/sample/generated/Models/MessageActionFlag.cs @@ -1,29 +1,56 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum MessageActionFlag { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum MessageActionFlag + #pragma warning restore CS1591 + { [EnumMember(Value = "any")] + #pragma warning disable CS1591 Any, + #pragma warning restore CS1591 [EnumMember(Value = "call")] + #pragma warning disable CS1591 Call, + #pragma warning restore CS1591 [EnumMember(Value = "doNotForward")] + #pragma warning disable CS1591 DoNotForward, + #pragma warning restore CS1591 [EnumMember(Value = "followUp")] + #pragma warning disable CS1591 FollowUp, + #pragma warning restore CS1591 [EnumMember(Value = "fyi")] + #pragma warning disable CS1591 Fyi, + #pragma warning restore CS1591 [EnumMember(Value = "forward")] + #pragma warning disable CS1591 Forward, + #pragma warning restore CS1591 [EnumMember(Value = "noResponseNecessary")] + #pragma warning disable CS1591 NoResponseNecessary, + #pragma warning restore CS1591 [EnumMember(Value = "read")] + #pragma warning disable CS1591 Read, + #pragma warning restore CS1591 [EnumMember(Value = "reply")] + #pragma warning disable CS1591 Reply, + #pragma warning restore CS1591 [EnumMember(Value = "replyToAll")] + #pragma warning disable CS1591 ReplyToAll, + #pragma warning restore CS1591 [EnumMember(Value = "review")] + #pragma warning disable CS1591 Review, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/MessageRule.cs b/src/sample/generated/Models/MessageRule.cs index 9eb11d94..a07597d6 100644 --- a/src/sample/generated/Models/MessageRule.cs +++ b/src/sample/generated/Models/MessageRule.cs @@ -1,26 +1,32 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MessageRule : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MessageRule : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The actions property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public MessageRuleActions? Actions { get; set; } + public global::ApiSdk.Models.MessageRuleActions? Actions { get; set; } #nullable restore #else - public MessageRuleActions Actions { get; set; } + public global::ApiSdk.Models.MessageRuleActions Actions { get; set; } #endif /// The conditions property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public MessageRulePredicates? Conditions { get; set; } + public global::ApiSdk.Models.MessageRulePredicates? Conditions { get; set; } #nullable restore #else - public MessageRulePredicates Conditions { get; set; } + public global::ApiSdk.Models.MessageRulePredicates Conditions { get; set; } #endif /// The display name of the rule. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,10 +39,10 @@ public class MessageRule : Entity, IParsable { /// The exceptions property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public MessageRulePredicates? Exceptions { get; set; } + public global::ApiSdk.Models.MessageRulePredicates? Exceptions { get; set; } #nullable restore #else - public MessageRulePredicates Exceptions { get; set; } + public global::ApiSdk.Models.MessageRulePredicates Exceptions { get; set; } #endif /// Indicates whether the rule is in an error condition. Read-only. public bool? HasError { get; set; } @@ -49,37 +55,43 @@ public class MessageRule : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new MessageRule CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.MessageRule CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MessageRule(); + return new global::ApiSdk.Models.MessageRule(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"actions", n => { Actions = n.GetObjectValue(MessageRuleActions.CreateFromDiscriminatorValue); } }, - {"conditions", n => { Conditions = n.GetObjectValue(MessageRulePredicates.CreateFromDiscriminatorValue); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"exceptions", n => { Exceptions = n.GetObjectValue(MessageRulePredicates.CreateFromDiscriminatorValue); } }, - {"hasError", n => { HasError = n.GetBoolValue(); } }, - {"isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, - {"isReadOnly", n => { IsReadOnly = n.GetBoolValue(); } }, - {"sequence", n => { Sequence = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "actions", n => { Actions = n.GetObjectValue(global::ApiSdk.Models.MessageRuleActions.CreateFromDiscriminatorValue); } }, + { "conditions", n => { Conditions = n.GetObjectValue(global::ApiSdk.Models.MessageRulePredicates.CreateFromDiscriminatorValue); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "exceptions", n => { Exceptions = n.GetObjectValue(global::ApiSdk.Models.MessageRulePredicates.CreateFromDiscriminatorValue); } }, + { "hasError", n => { HasError = n.GetBoolValue(); } }, + { "isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, + { "isReadOnly", n => { IsReadOnly = n.GetBoolValue(); } }, + { "sequence", n => { Sequence = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("actions", Actions); - writer.WriteObjectValue("conditions", Conditions); + writer.WriteObjectValue("actions", Actions); + writer.WriteObjectValue("conditions", Conditions); writer.WriteStringValue("displayName", DisplayName); - writer.WriteObjectValue("exceptions", Exceptions); + writer.WriteObjectValue("exceptions", Exceptions); writer.WriteBoolValue("hasError", HasError); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteBoolValue("isReadOnly", IsReadOnly); @@ -87,3 +99,4 @@ public class MessageRule : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MessageRuleActions.cs b/src/sample/generated/Models/MessageRuleActions.cs index 78f0a5ba..a77837b3 100644 --- a/src/sample/generated/Models/MessageRuleActions.cs +++ b/src/sample/generated/Models/MessageRuleActions.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MessageRuleActions : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MessageRuleActions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A list of categories to be assigned to a message. @@ -29,23 +35,23 @@ public class MessageRuleActions : IAdditionalDataHolder, IParsable { /// The email addresses of the recipients to which a message should be forwarded as an attachment. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ForwardAsAttachmentTo { get; set; } + public List? ForwardAsAttachmentTo { get; set; } #nullable restore #else - public List ForwardAsAttachmentTo { get; set; } + public List ForwardAsAttachmentTo { get; set; } #endif /// The email addresses of the recipients to which a message should be forwarded. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ForwardTo { get; set; } + public List? ForwardTo { get; set; } #nullable restore #else - public List ForwardTo { get; set; } + public List ForwardTo { get; set; } #endif /// Indicates whether a message should be marked as read. public bool? MarkAsRead { get; set; } /// The markImportance property - public Importance? MarkImportance { get; set; } + public global::ApiSdk.Models.Importance? MarkImportance { get; set; } /// The ID of the folder that a message will be moved to. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -59,63 +65,71 @@ public class MessageRuleActions : IAdditionalDataHolder, IParsable { /// The email addresses to which a message should be redirected. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? RedirectTo { get; set; } + public List? RedirectTo { get; set; } #nullable restore #else - public List RedirectTo { get; set; } + public List RedirectTo { get; set; } #endif /// Indicates whether subsequent rules should be evaluated. public bool? StopProcessingRules { get; set; } /// - /// Instantiates a new messageRuleActions and sets the default values. + /// Instantiates a new and sets the default values. /// - public MessageRuleActions() { + public MessageRuleActions() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static MessageRuleActions CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.MessageRuleActions CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MessageRuleActions(); + return new global::ApiSdk.Models.MessageRuleActions(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"assignCategories", n => { AssignCategories = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"copyToFolder", n => { CopyToFolder = n.GetStringValue(); } }, - {"delete", n => { Delete = n.GetBoolValue(); } }, - {"forwardAsAttachmentTo", n => { ForwardAsAttachmentTo = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"forwardTo", n => { ForwardTo = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"markAsRead", n => { MarkAsRead = n.GetBoolValue(); } }, - {"markImportance", n => { MarkImportance = n.GetEnumValue(); } }, - {"moveToFolder", n => { MoveToFolder = n.GetStringValue(); } }, - {"permanentDelete", n => { PermanentDelete = n.GetBoolValue(); } }, - {"redirectTo", n => { RedirectTo = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"stopProcessingRules", n => { StopProcessingRules = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "assignCategories", n => { AssignCategories = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "copyToFolder", n => { CopyToFolder = n.GetStringValue(); } }, + { "delete", n => { Delete = n.GetBoolValue(); } }, + { "forwardAsAttachmentTo", n => { ForwardAsAttachmentTo = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "forwardTo", n => { ForwardTo = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "markAsRead", n => { MarkAsRead = n.GetBoolValue(); } }, + { "markImportance", n => { MarkImportance = n.GetEnumValue(); } }, + { "moveToFolder", n => { MoveToFolder = n.GetStringValue(); } }, + { "permanentDelete", n => { PermanentDelete = n.GetBoolValue(); } }, + { "redirectTo", n => { RedirectTo = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "stopProcessingRules", n => { StopProcessingRules = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("assignCategories", AssignCategories); writer.WriteStringValue("copyToFolder", CopyToFolder); writer.WriteBoolValue("delete", Delete); - writer.WriteCollectionOfObjectValues("forwardAsAttachmentTo", ForwardAsAttachmentTo); - writer.WriteCollectionOfObjectValues("forwardTo", ForwardTo); + writer.WriteCollectionOfObjectValues("forwardAsAttachmentTo", ForwardAsAttachmentTo); + writer.WriteCollectionOfObjectValues("forwardTo", ForwardTo); writer.WriteBoolValue("markAsRead", MarkAsRead); - writer.WriteEnumValue("markImportance", MarkImportance); + writer.WriteEnumValue("markImportance", MarkImportance); writer.WriteStringValue("moveToFolder", MoveToFolder); writer.WriteBoolValue("permanentDelete", PermanentDelete); - writer.WriteCollectionOfObjectValues("redirectTo", RedirectTo); + writer.WriteCollectionOfObjectValues("redirectTo", RedirectTo); writer.WriteBoolValue("stopProcessingRules", StopProcessingRules); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MessageRulePredicates.cs b/src/sample/generated/Models/MessageRulePredicates.cs index 0d65c668..f813c64a 100644 --- a/src/sample/generated/Models/MessageRulePredicates.cs +++ b/src/sample/generated/Models/MessageRulePredicates.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MessageRulePredicates : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MessageRulePredicates : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Represents the strings that should appear in the body of an incoming message in order for the condition or exception to apply. @@ -35,10 +41,10 @@ public class MessageRulePredicates : IAdditionalDataHolder, IParsable { /// Represents the specific sender email addresses of an incoming message in order for the condition or exception to apply. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? FromAddresses { get; set; } + public List? FromAddresses { get; set; } #nullable restore #else - public List FromAddresses { get; set; } + public List FromAddresses { get; set; } #endif /// Indicates whether an incoming message must have attachments in order for the condition or exception to apply. public bool? HasAttachments { get; set; } @@ -51,7 +57,7 @@ public class MessageRulePredicates : IAdditionalDataHolder, IParsable { public List HeaderContains { get; set; } #endif /// The importance property - public ApiSdk.Models.Importance? Importance { get; set; } + public global::ApiSdk.Models.Importance? Importance { get; set; } /// Indicates whether an incoming message must be an approval request in order for the condition or exception to apply. public bool? IsApprovalRequest { get; set; } /// Indicates whether an incoming message must be automatically forwarded in order for the condition or exception to apply. @@ -75,7 +81,7 @@ public class MessageRulePredicates : IAdditionalDataHolder, IParsable { /// Indicates whether an incoming message must be a voice mail in order for the condition or exception to apply. public bool? IsVoicemail { get; set; } /// The messageActionFlag property - public ApiSdk.Models.MessageActionFlag? MessageActionFlag { get; set; } + public global::ApiSdk.Models.MessageActionFlag? MessageActionFlag { get; set; } /// Indicates whether the owner of the mailbox must not be a recipient of an incoming message in order for the condition or exception to apply. public bool? NotSentToMe { get; set; } /// Represents the strings that appear in either the toRecipients or ccRecipients properties of an incoming message in order for the condition or exception to apply. @@ -95,7 +101,7 @@ public class MessageRulePredicates : IAdditionalDataHolder, IParsable { public List SenderContains { get; set; } #endif /// The sensitivity property - public ApiSdk.Models.Sensitivity? Sensitivity { get; set; } + public global::ApiSdk.Models.Sensitivity? Sensitivity { get; set; } /// Indicates whether the owner of the mailbox must be in the ccRecipients property of an incoming message in order for the condition or exception to apply. public bool? SentCcMe { get; set; } /// Indicates whether the owner of the mailbox must be the only recipient in an incoming message in order for the condition or exception to apply. @@ -103,10 +109,10 @@ public class MessageRulePredicates : IAdditionalDataHolder, IParsable { /// Represents the email addresses that an incoming message must have been sent to in order for the condition or exception to apply. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SentToAddresses { get; set; } + public List? SentToAddresses { get; set; } #nullable restore #else - public List SentToAddresses { get; set; } + public List SentToAddresses { get; set; } #endif /// Indicates whether the owner of the mailbox must be in the toRecipients property of an incoming message in order for the condition or exception to apply. public bool? SentToMe { get; set; } @@ -123,75 +129,82 @@ public class MessageRulePredicates : IAdditionalDataHolder, IParsable { /// The withinSizeRange property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SizeRange? WithinSizeRange { get; set; } + public global::ApiSdk.Models.SizeRange? WithinSizeRange { get; set; } #nullable restore #else - public SizeRange WithinSizeRange { get; set; } + public global::ApiSdk.Models.SizeRange WithinSizeRange { get; set; } #endif /// - /// Instantiates a new messageRulePredicates and sets the default values. + /// Instantiates a new and sets the default values. /// - public MessageRulePredicates() { + public MessageRulePredicates() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static MessageRulePredicates CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.MessageRulePredicates CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MessageRulePredicates(); + return new global::ApiSdk.Models.MessageRulePredicates(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"bodyContains", n => { BodyContains = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"bodyOrSubjectContains", n => { BodyOrSubjectContains = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"categories", n => { Categories = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"fromAddresses", n => { FromAddresses = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, - {"headerContains", n => { HeaderContains = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"importance", n => { Importance = n.GetEnumValue(); } }, - {"isApprovalRequest", n => { IsApprovalRequest = n.GetBoolValue(); } }, - {"isAutomaticForward", n => { IsAutomaticForward = n.GetBoolValue(); } }, - {"isAutomaticReply", n => { IsAutomaticReply = n.GetBoolValue(); } }, - {"isEncrypted", n => { IsEncrypted = n.GetBoolValue(); } }, - {"isMeetingRequest", n => { IsMeetingRequest = n.GetBoolValue(); } }, - {"isMeetingResponse", n => { IsMeetingResponse = n.GetBoolValue(); } }, - {"isNonDeliveryReport", n => { IsNonDeliveryReport = n.GetBoolValue(); } }, - {"isPermissionControlled", n => { IsPermissionControlled = n.GetBoolValue(); } }, - {"isReadReceipt", n => { IsReadReceipt = n.GetBoolValue(); } }, - {"isSigned", n => { IsSigned = n.GetBoolValue(); } }, - {"isVoicemail", n => { IsVoicemail = n.GetBoolValue(); } }, - {"messageActionFlag", n => { MessageActionFlag = n.GetEnumValue(); } }, - {"notSentToMe", n => { NotSentToMe = n.GetBoolValue(); } }, - {"recipientContains", n => { RecipientContains = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"senderContains", n => { SenderContains = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"sensitivity", n => { Sensitivity = n.GetEnumValue(); } }, - {"sentCcMe", n => { SentCcMe = n.GetBoolValue(); } }, - {"sentOnlyToMe", n => { SentOnlyToMe = n.GetBoolValue(); } }, - {"sentToAddresses", n => { SentToAddresses = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sentToMe", n => { SentToMe = n.GetBoolValue(); } }, - {"sentToOrCcMe", n => { SentToOrCcMe = n.GetBoolValue(); } }, - {"subjectContains", n => { SubjectContains = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"withinSizeRange", n => { WithinSizeRange = n.GetObjectValue(SizeRange.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bodyContains", n => { BodyContains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "bodyOrSubjectContains", n => { BodyOrSubjectContains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "categories", n => { Categories = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "fromAddresses", n => { FromAddresses = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, + { "headerContains", n => { HeaderContains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "importance", n => { Importance = n.GetEnumValue(); } }, + { "isApprovalRequest", n => { IsApprovalRequest = n.GetBoolValue(); } }, + { "isAutomaticForward", n => { IsAutomaticForward = n.GetBoolValue(); } }, + { "isAutomaticReply", n => { IsAutomaticReply = n.GetBoolValue(); } }, + { "isEncrypted", n => { IsEncrypted = n.GetBoolValue(); } }, + { "isMeetingRequest", n => { IsMeetingRequest = n.GetBoolValue(); } }, + { "isMeetingResponse", n => { IsMeetingResponse = n.GetBoolValue(); } }, + { "isNonDeliveryReport", n => { IsNonDeliveryReport = n.GetBoolValue(); } }, + { "isPermissionControlled", n => { IsPermissionControlled = n.GetBoolValue(); } }, + { "isReadReceipt", n => { IsReadReceipt = n.GetBoolValue(); } }, + { "isSigned", n => { IsSigned = n.GetBoolValue(); } }, + { "isVoicemail", n => { IsVoicemail = n.GetBoolValue(); } }, + { "messageActionFlag", n => { MessageActionFlag = n.GetEnumValue(); } }, + { "notSentToMe", n => { NotSentToMe = n.GetBoolValue(); } }, + { "recipientContains", n => { RecipientContains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "senderContains", n => { SenderContains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "sensitivity", n => { Sensitivity = n.GetEnumValue(); } }, + { "sentCcMe", n => { SentCcMe = n.GetBoolValue(); } }, + { "sentOnlyToMe", n => { SentOnlyToMe = n.GetBoolValue(); } }, + { "sentToAddresses", n => { SentToAddresses = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sentToMe", n => { SentToMe = n.GetBoolValue(); } }, + { "sentToOrCcMe", n => { SentToOrCcMe = n.GetBoolValue(); } }, + { "subjectContains", n => { SubjectContains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "withinSizeRange", n => { WithinSizeRange = n.GetObjectValue(global::ApiSdk.Models.SizeRange.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("bodyContains", BodyContains); writer.WriteCollectionOfPrimitiveValues("bodyOrSubjectContains", BodyOrSubjectContains); writer.WriteCollectionOfPrimitiveValues("categories", Categories); - writer.WriteCollectionOfObjectValues("fromAddresses", FromAddresses); + writer.WriteCollectionOfObjectValues("fromAddresses", FromAddresses); writer.WriteBoolValue("hasAttachments", HasAttachments); writer.WriteCollectionOfPrimitiveValues("headerContains", HeaderContains); - writer.WriteEnumValue("importance", Importance); + writer.WriteEnumValue("importance", Importance); writer.WriteBoolValue("isApprovalRequest", IsApprovalRequest); writer.WriteBoolValue("isAutomaticForward", IsAutomaticForward); writer.WriteBoolValue("isAutomaticReply", IsAutomaticReply); @@ -203,19 +216,20 @@ public void Serialize(ISerializationWriter writer) { writer.WriteBoolValue("isReadReceipt", IsReadReceipt); writer.WriteBoolValue("isSigned", IsSigned); writer.WriteBoolValue("isVoicemail", IsVoicemail); - writer.WriteEnumValue("messageActionFlag", MessageActionFlag); + writer.WriteEnumValue("messageActionFlag", MessageActionFlag); writer.WriteBoolValue("notSentToMe", NotSentToMe); writer.WriteCollectionOfPrimitiveValues("recipientContains", RecipientContains); writer.WriteCollectionOfPrimitiveValues("senderContains", SenderContains); - writer.WriteEnumValue("sensitivity", Sensitivity); + writer.WriteEnumValue("sensitivity", Sensitivity); writer.WriteBoolValue("sentCcMe", SentCcMe); writer.WriteBoolValue("sentOnlyToMe", SentOnlyToMe); - writer.WriteCollectionOfObjectValues("sentToAddresses", SentToAddresses); + writer.WriteCollectionOfObjectValues("sentToAddresses", SentToAddresses); writer.WriteBoolValue("sentToMe", SentToMe); writer.WriteBoolValue("sentToOrCcMe", SentToOrCcMe); writer.WriteCollectionOfPrimitiveValues("subjectContains", SubjectContains); - writer.WriteObjectValue("withinSizeRange", WithinSizeRange); + writer.WriteObjectValue("withinSizeRange", WithinSizeRange); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MicrosoftAuthenticatorAuthenticationMethod.cs b/src/sample/generated/Models/MicrosoftAuthenticatorAuthenticationMethod.cs index 72c09b05..57151b8c 100644 --- a/src/sample/generated/Models/MicrosoftAuthenticatorAuthenticationMethod.cs +++ b/src/sample/generated/Models/MicrosoftAuthenticatorAuthenticationMethod.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MicrosoftAuthenticatorAuthenticationMethod : AuthenticationMethod, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MicrosoftAuthenticatorAuthenticationMethod : global::ApiSdk.Models.AuthenticationMethod, IParsable + #pragma warning restore CS1591 + { /// The date and time that this app was registered. This property is null if the device isn't registered for passwordless Phone Sign-In. public DateTimeOffset? CreatedDateTime { get; set; } /// The device property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Device? Device { get; set; } + public global::ApiSdk.Models.Device? Device { get; set; } #nullable restore #else - public ApiSdk.Models.Device Device { get; set; } + public global::ApiSdk.Models.Device Device { get; set; } #endif /// Tags containing app metadata. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -43,35 +49,42 @@ public class MicrosoftAuthenticatorAuthenticationMethod : AuthenticationMethod, /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new MicrosoftAuthenticatorAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.MicrosoftAuthenticatorAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MicrosoftAuthenticatorAuthenticationMethod(); + return new global::ApiSdk.Models.MicrosoftAuthenticatorAuthenticationMethod(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"device", n => { Device = n.GetObjectValue(ApiSdk.Models.Device.CreateFromDiscriminatorValue); } }, - {"deviceTag", n => { DeviceTag = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"phoneAppVersion", n => { PhoneAppVersion = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "device", n => { Device = n.GetObjectValue(global::ApiSdk.Models.Device.CreateFromDiscriminatorValue); } }, + { "deviceTag", n => { DeviceTag = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "phoneAppVersion", n => { PhoneAppVersion = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("device", Device); + writer.WriteObjectValue("device", Device); writer.WriteStringValue("deviceTag", DeviceTag); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("phoneAppVersion", PhoneAppVersion); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MobileAppIdentifier.cs b/src/sample/generated/Models/MobileAppIdentifier.cs index 6096acc1..a570cc90 100644 --- a/src/sample/generated/Models/MobileAppIdentifier.cs +++ b/src/sample/generated/Models/MobileAppIdentifier.cs @@ -1,44 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// The identifier for a mobile app. /// - public class MobileAppIdentifier : IAdditionalDataHolder, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MobileAppIdentifier : IAdditionalDataHolder, IParsable + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new mobileAppIdentifier and sets the default values. + /// Instantiates a new and sets the default values. /// - public MobileAppIdentifier() { + public MobileAppIdentifier() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static MobileAppIdentifier CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.MobileAppIdentifier CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MobileAppIdentifier(); + return new global::ApiSdk.Models.MobileAppIdentifier(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/MultiValueLegacyExtendedProperty.cs b/src/sample/generated/Models/MultiValueLegacyExtendedProperty.cs index 96dc3e42..6ac9fc65 100644 --- a/src/sample/generated/Models/MultiValueLegacyExtendedProperty.cs +++ b/src/sample/generated/Models/MultiValueLegacyExtendedProperty.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class MultiValueLegacyExtendedProperty : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MultiValueLegacyExtendedProperty : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// A collection of property values. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class MultiValueLegacyExtendedProperty : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new MultiValueLegacyExtendedProperty CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.MultiValueLegacyExtendedProperty CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MultiValueLegacyExtendedProperty(); + return new global::ApiSdk.Models.MultiValueLegacyExtendedProperty(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"value", n => { Value = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "value", n => { Value = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Mutability.cs b/src/sample/generated/Models/Mutability.cs index 9d890ae1..8d212fe5 100644 --- a/src/sample/generated/Models/Mutability.cs +++ b/src/sample/generated/Models/Mutability.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum Mutability { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum Mutability + #pragma warning restore CS1591 + { [EnumMember(Value = "ReadWrite")] + #pragma warning disable CS1591 ReadWrite, + #pragma warning restore CS1591 [EnumMember(Value = "ReadOnly")] + #pragma warning disable CS1591 ReadOnly, + #pragma warning restore CS1591 [EnumMember(Value = "Immutable")] + #pragma warning disable CS1591 Immutable, + #pragma warning restore CS1591 [EnumMember(Value = "WriteOnly")] + #pragma warning disable CS1591 WriteOnly, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/NativeAuthenticationApisEnabled.cs b/src/sample/generated/Models/NativeAuthenticationApisEnabled.cs new file mode 100644 index 00000000..2a5b1d9c --- /dev/null +++ b/src/sample/generated/Models/NativeAuthenticationApisEnabled.cs @@ -0,0 +1,25 @@ +// +using System.Runtime.Serialization; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + [Flags] + #pragma warning disable CS1591 + public enum NativeAuthenticationApisEnabled + #pragma warning restore CS1591 + { + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None = 1, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All = 2, + #pragma warning restore CS1591 + [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 + UnknownFutureValue = 4, + #pragma warning restore CS1591 + } +} diff --git a/src/sample/generated/Models/Notebook.cs b/src/sample/generated/Models/Notebook.cs index acbae49d..c7b13b25 100644 --- a/src/sample/generated/Models/Notebook.cs +++ b/src/sample/generated/Models/Notebook.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Notebook : OnenoteEntityHierarchyModel, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Notebook : global::ApiSdk.Models.OnenoteEntityHierarchyModel, IParsable + #pragma warning restore CS1591 + { /// Indicates whether this is the user's default notebook. Read-only. public bool? IsDefault { get; set; } /// Indicates whether the notebook is shared. If true, the contents of the notebook can be seen by people other than the owner. Read-only. @@ -13,18 +19,18 @@ public class Notebook : OnenoteEntityHierarchyModel, IParsable { /// The links property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public NotebookLinks? Links { get; set; } + public global::ApiSdk.Models.NotebookLinks? Links { get; set; } #nullable restore #else - public NotebookLinks Links { get; set; } + public global::ApiSdk.Models.NotebookLinks Links { get; set; } #endif /// The section groups in the notebook. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SectionGroups { get; set; } + public List? SectionGroups { get; set; } #nullable restore #else - public List SectionGroups { get; set; } + public List SectionGroups { get; set; } #endif /// The URL for the sectionGroups navigation property, which returns all the section groups in the notebook. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -37,10 +43,10 @@ public class Notebook : OnenoteEntityHierarchyModel, IParsable { /// The sections in the notebook. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Sections { get; set; } + public List? Sections { get; set; } #nullable restore #else - public List Sections { get; set; } + public List Sections { get; set; } #endif /// The URL for the sections navigation property, which returns all the sections in the notebook. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -51,45 +57,52 @@ public class Notebook : OnenoteEntityHierarchyModel, IParsable { public string SectionsUrl { get; set; } #endif /// The userRole property - public OnenoteUserRole? UserRole { get; set; } + public global::ApiSdk.Models.OnenoteUserRole? UserRole { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Notebook CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Notebook CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Notebook(); + return new global::ApiSdk.Models.Notebook(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"isDefault", n => { IsDefault = n.GetBoolValue(); } }, - {"isShared", n => { IsShared = n.GetBoolValue(); } }, - {"links", n => { Links = n.GetObjectValue(NotebookLinks.CreateFromDiscriminatorValue); } }, - {"sectionGroups", n => { SectionGroups = n.GetCollectionOfObjectValues(SectionGroup.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sectionGroupsUrl", n => { SectionGroupsUrl = n.GetStringValue(); } }, - {"sections", n => { Sections = n.GetCollectionOfObjectValues(OnenoteSection.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sectionsUrl", n => { SectionsUrl = n.GetStringValue(); } }, - {"userRole", n => { UserRole = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "isDefault", n => { IsDefault = n.GetBoolValue(); } }, + { "isShared", n => { IsShared = n.GetBoolValue(); } }, + { "links", n => { Links = n.GetObjectValue(global::ApiSdk.Models.NotebookLinks.CreateFromDiscriminatorValue); } }, + { "sectionGroups", n => { SectionGroups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SectionGroup.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sectionGroupsUrl", n => { SectionGroupsUrl = n.GetStringValue(); } }, + { "sections", n => { Sections = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnenoteSection.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sectionsUrl", n => { SectionsUrl = n.GetStringValue(); } }, + { "userRole", n => { UserRole = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isDefault", IsDefault); writer.WriteBoolValue("isShared", IsShared); - writer.WriteObjectValue("links", Links); - writer.WriteCollectionOfObjectValues("sectionGroups", SectionGroups); + writer.WriteObjectValue("links", Links); + writer.WriteCollectionOfObjectValues("sectionGroups", SectionGroups); writer.WriteStringValue("sectionGroupsUrl", SectionGroupsUrl); - writer.WriteCollectionOfObjectValues("sections", Sections); + writer.WriteCollectionOfObjectValues("sections", Sections); writer.WriteStringValue("sectionsUrl", SectionsUrl); - writer.WriteEnumValue("userRole", UserRole); + writer.WriteEnumValue("userRole", UserRole); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/NotebookLinks.cs b/src/sample/generated/Models/NotebookLinks.cs index b0b52a7a..c9601d4d 100644 --- a/src/sample/generated/Models/NotebookLinks.cs +++ b/src/sample/generated/Models/NotebookLinks.cs @@ -1,61 +1,75 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class NotebookLinks : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NotebookLinks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The oneNoteClientUrl property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ExternalLink? OneNoteClientUrl { get; set; } + public global::ApiSdk.Models.ExternalLink? OneNoteClientUrl { get; set; } #nullable restore #else - public ExternalLink OneNoteClientUrl { get; set; } + public global::ApiSdk.Models.ExternalLink OneNoteClientUrl { get; set; } #endif /// The oneNoteWebUrl property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ExternalLink? OneNoteWebUrl { get; set; } + public global::ApiSdk.Models.ExternalLink? OneNoteWebUrl { get; set; } #nullable restore #else - public ExternalLink OneNoteWebUrl { get; set; } + public global::ApiSdk.Models.ExternalLink OneNoteWebUrl { get; set; } #endif /// - /// Instantiates a new notebookLinks and sets the default values. + /// Instantiates a new and sets the default values. /// - public NotebookLinks() { + public NotebookLinks() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static NotebookLinks CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.NotebookLinks CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new NotebookLinks(); + return new global::ApiSdk.Models.NotebookLinks(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"oneNoteClientUrl", n => { OneNoteClientUrl = n.GetObjectValue(ExternalLink.CreateFromDiscriminatorValue); } }, - {"oneNoteWebUrl", n => { OneNoteWebUrl = n.GetObjectValue(ExternalLink.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "oneNoteClientUrl", n => { OneNoteClientUrl = n.GetObjectValue(global::ApiSdk.Models.ExternalLink.CreateFromDiscriminatorValue); } }, + { "oneNoteWebUrl", n => { OneNoteWebUrl = n.GetObjectValue(global::ApiSdk.Models.ExternalLink.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); - writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); + writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); + writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/NumberColumn.cs b/src/sample/generated/Models/NumberColumn.cs index bcbc701e..3b8705fc 100644 --- a/src/sample/generated/Models/NumberColumn.cs +++ b/src/sample/generated/Models/NumberColumn.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class NumberColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class NumberColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// How many decimal places to display. See below for information about the possible values. @@ -29,35 +35,42 @@ public class NumberColumn : IAdditionalDataHolder, IParsable { /// The minimum permitted value. public double? Minimum { get; set; } /// - /// Instantiates a new numberColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public NumberColumn() { + public NumberColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static NumberColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.NumberColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new NumberColumn(); + return new global::ApiSdk.Models.NumberColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"decimalPlaces", n => { DecimalPlaces = n.GetStringValue(); } }, - {"displayAs", n => { DisplayAs = n.GetStringValue(); } }, - {"maximum", n => { Maximum = n.GetDoubleValue(); } }, - {"minimum", n => { Minimum = n.GetDoubleValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "decimalPlaces", n => { DecimalPlaces = n.GetStringValue(); } }, + { "displayAs", n => { DisplayAs = n.GetStringValue(); } }, + { "maximum", n => { Maximum = n.GetDoubleValue(); } }, + { "minimum", n => { Minimum = n.GetDoubleValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decimalPlaces", DecimalPlaces); writer.WriteStringValue("displayAs", DisplayAs); @@ -67,3 +80,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OAuth2PermissionGrant.cs b/src/sample/generated/Models/OAuth2PermissionGrant.cs index 6d1744fd..a84977bd 100644 --- a/src/sample/generated/Models/OAuth2PermissionGrant.cs +++ b/src/sample/generated/Models/OAuth2PermissionGrant.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OAuth2PermissionGrant : Entity, IParsable { - /// The object id (not appId) of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OAuth2PermissionGrant : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The object id (not appId) of the client service principal for the application that's authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ClientId { get; set; } @@ -14,7 +20,7 @@ public class OAuth2PermissionGrant : Entity, IParsable { #else public string ClientId { get; set; } #endif - /// Indicates if authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only). + /// Indicates if authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Nonadmin users might be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ConsentType { get; set; } @@ -30,7 +36,7 @@ public class OAuth2PermissionGrant : Entity, IParsable { #else public string PrincipalId { get; set; } #endif - /// The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). + /// The id of the resource service principal to which access is authorized. This identifies the API that the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ResourceId { get; set; } @@ -38,7 +44,7 @@ public class OAuth2PermissionGrant : Entity, IParsable { #else public string ResourceId { get; set; } #endif - /// A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3850 characters in length. + /// A space-separated list of the claim values for delegated permissions that should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3,850 characters in length. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Scope { get; set; } @@ -49,28 +55,34 @@ public class OAuth2PermissionGrant : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OAuth2PermissionGrant CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OAuth2PermissionGrant CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OAuth2PermissionGrant(); + return new global::ApiSdk.Models.OAuth2PermissionGrant(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"clientId", n => { ClientId = n.GetStringValue(); } }, - {"consentType", n => { ConsentType = n.GetStringValue(); } }, - {"principalId", n => { PrincipalId = n.GetStringValue(); } }, - {"resourceId", n => { ResourceId = n.GetStringValue(); } }, - {"scope", n => { Scope = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "clientId", n => { ClientId = n.GetStringValue(); } }, + { "consentType", n => { ConsentType = n.GetStringValue(); } }, + { "principalId", n => { PrincipalId = n.GetStringValue(); } }, + { "resourceId", n => { ResourceId = n.GetStringValue(); } }, + { "scope", n => { Scope = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clientId", ClientId); @@ -81,3 +93,4 @@ public class OAuth2PermissionGrant : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OAuth2PermissionGrantCollectionResponse.cs b/src/sample/generated/Models/OAuth2PermissionGrantCollectionResponse.cs index ce9d88d9..5cc8ad88 100644 --- a/src/sample/generated/Models/OAuth2PermissionGrantCollectionResponse.cs +++ b/src/sample/generated/Models/OAuth2PermissionGrantCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OAuth2PermissionGrantCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OAuth2PermissionGrantCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class OAuth2PermissionGrantCollectionResponse : IAdditionalDataHolder, IP /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new oAuth2PermissionGrantCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public OAuth2PermissionGrantCollectionResponse() { + public OAuth2PermissionGrantCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OAuth2PermissionGrantCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OAuth2PermissionGrantCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OAuth2PermissionGrantCollectionResponse(); + return new global::ApiSdk.Models.OAuth2PermissionGrantCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(OAuth2PermissionGrant.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OAuth2PermissionGrant.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ODataErrors/ErrorDetails.cs b/src/sample/generated/Models/ODataErrors/ErrorDetails.cs index 1cd14bd1..2be07184 100644 --- a/src/sample/generated/Models/ODataErrors/ErrorDetails.cs +++ b/src/sample/generated/Models/ODataErrors/ErrorDetails.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.ODataErrors { - public class ErrorDetails : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models.ODataErrors +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ErrorDetails : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The code property @@ -33,34 +39,41 @@ public class ErrorDetails : IAdditionalDataHolder, IParsable { public string Target { get; set; } #endif /// - /// Instantiates a new ErrorDetails and sets the default values. + /// Instantiates a new and sets the default values. /// - public ErrorDetails() { + public ErrorDetails() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ErrorDetails CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ODataErrors.ErrorDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ErrorDetails(); + return new global::ApiSdk.Models.ODataErrors.ErrorDetails(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"message", n => { Message = n.GetStringValue(); } }, - {"target", n => { Target = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "target", n => { Target = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ODataErrors/InnerError.cs b/src/sample/generated/Models/ODataErrors/InnerError.cs index 9f4a230a..70bb6dd0 100644 --- a/src/sample/generated/Models/ODataErrors/InnerError.cs +++ b/src/sample/generated/Models/ODataErrors/InnerError.cs @@ -1,44 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.ODataErrors { +namespace ApiSdk.Models.ODataErrors +{ /// /// The structure of this object is service-specific /// - public class InnerError : IAdditionalDataHolder, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InnerError : IAdditionalDataHolder, IParsable + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new InnerError and sets the default values. + /// Instantiates a new and sets the default values. /// - public InnerError() { + public InnerError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static InnerError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ODataErrors.InnerError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new InnerError(); + return new global::ApiSdk.Models.ODataErrors.InnerError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ODataErrors/MainError.cs b/src/sample/generated/Models/ODataErrors/MainError.cs index 6da2a04e..c5df8a15 100644 --- a/src/sample/generated/Models/ODataErrors/MainError.cs +++ b/src/sample/generated/Models/ODataErrors/MainError.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.ODataErrors { - public class MainError : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models.ODataErrors +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MainError : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The code property @@ -19,18 +25,18 @@ public class MainError : IAdditionalDataHolder, IParsable { /// The details property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Details { get; set; } + public List? Details { get; set; } #nullable restore #else - public List Details { get; set; } + public List Details { get; set; } #endif /// The structure of this object is service-specific #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ODataErrors.InnerError? InnerError { get; set; } + public global::ApiSdk.Models.ODataErrors.InnerError? InnerError { get; set; } #nullable restore #else - public ApiSdk.Models.ODataErrors.InnerError InnerError { get; set; } + public global::ApiSdk.Models.ODataErrors.InnerError InnerError { get; set; } #endif /// The message property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -49,43 +55,51 @@ public class MainError : IAdditionalDataHolder, IParsable { public string Target { get; set; } #endif /// - /// Instantiates a new MainError and sets the default values. + /// Instantiates a new and sets the default values. /// - public MainError() { + public MainError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static MainError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ODataErrors.MainError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new MainError(); + return new global::ApiSdk.Models.ODataErrors.MainError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"details", n => { Details = n.GetCollectionOfObjectValues(ErrorDetails.CreateFromDiscriminatorValue)?.ToList(); } }, - {"innerError", n => { InnerError = n.GetObjectValue(ApiSdk.Models.ODataErrors.InnerError.CreateFromDiscriminatorValue); } }, - {"message", n => { Message = n.GetStringValue(); } }, - {"target", n => { Target = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "details", n => { Details = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ODataErrors.ErrorDetails.CreateFromDiscriminatorValue)?.AsList(); } }, + { "innerError", n => { InnerError = n.GetObjectValue(global::ApiSdk.Models.ODataErrors.InnerError.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "target", n => { Target = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); - writer.WriteCollectionOfObjectValues("details", Details); - writer.WriteObjectValue("innerError", InnerError); + writer.WriteCollectionOfObjectValues("details", Details); + writer.WriteObjectValue("innerError", InnerError); writer.WriteStringValue("message", Message); writer.WriteStringValue("target", Target); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ODataErrors/ODataError.cs b/src/sample/generated/Models/ODataErrors/ODataError.cs index 8d06dd51..b0236787 100644 --- a/src/sample/generated/Models/ODataErrors/ODataError.cs +++ b/src/sample/generated/Models/ODataErrors/ODataError.cs @@ -1,52 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.ODataErrors { - public class ODataError : ApiException, IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models.ODataErrors +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ODataError : ApiException, IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The error property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public MainError? Error { get; set; } + public global::ApiSdk.Models.ODataErrors.MainError? Error { get; set; } #nullable restore #else - public MainError Error { get; set; } + public global::ApiSdk.Models.ODataErrors.MainError Error { get; set; } #endif /// - /// Instantiates a new ODataError and sets the default values. + /// Instantiates a new and sets the default values. /// - public ODataError() { + public ODataError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ODataError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ODataErrors.ODataError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ODataError(); + return new global::ApiSdk.Models.ODataErrors.ODataError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"error", n => { Error = n.GetObjectValue(MainError.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "error", n => { Error = n.GetObjectValue(global::ApiSdk.Models.ODataErrors.MainError.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("error", Error); + writer.WriteObjectValue("error", Error); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ObjectDefinition.cs b/src/sample/generated/Models/ObjectDefinition.cs index b65e84a4..bc77e324 100644 --- a/src/sample/generated/Models/ObjectDefinition.cs +++ b/src/sample/generated/Models/ObjectDefinition.cs @@ -1,28 +1,34 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ObjectDefinition : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ObjectDefinition : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Defines attributes of the object. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Attributes { get; set; } + public List? Attributes { get; set; } #nullable restore #else - public List Attributes { get; set; } + public List Attributes { get; set; } #endif /// Metadata for the given object. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Metadata { get; set; } + public List? Metadata { get; set; } #nullable restore #else - public List Metadata { get; set; } + public List Metadata { get; set; } #endif /// Name of the object. Must be unique within a directory definition. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,41 +47,49 @@ public class ObjectDefinition : IAdditionalDataHolder, IParsable { public List SupportedApis { get; set; } #endif /// - /// Instantiates a new objectDefinition and sets the default values. + /// Instantiates a new and sets the default values. /// - public ObjectDefinition() { + public ObjectDefinition() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ObjectDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ObjectDefinition CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ObjectDefinition(); + return new global::ApiSdk.Models.ObjectDefinition(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"attributes", n => { Attributes = n.GetCollectionOfObjectValues(AttributeDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(ObjectDefinitionMetadataEntry.CreateFromDiscriminatorValue)?.ToList(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"supportedApis", n => { SupportedApis = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attributes", n => { Attributes = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AttributeDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "metadata", n => { Metadata = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ObjectDefinitionMetadataEntry.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "supportedApis", n => { SupportedApis = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("attributes", Attributes); - writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteCollectionOfObjectValues("attributes", Attributes); + writer.WriteCollectionOfObjectValues("metadata", Metadata); writer.WriteStringValue("name", Name); writer.WriteCollectionOfPrimitiveValues("supportedApis", SupportedApis); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ObjectDefinitionMetadata.cs b/src/sample/generated/Models/ObjectDefinitionMetadata.cs index 3a5d79bd..2dc74ac0 100644 --- a/src/sample/generated/Models/ObjectDefinitionMetadata.cs +++ b/src/sample/generated/Models/ObjectDefinitionMetadata.cs @@ -1,21 +1,40 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ObjectDefinitionMetadata { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ObjectDefinitionMetadata + #pragma warning restore CS1591 + { [EnumMember(Value = "PropertyNameAccountEnabled")] + #pragma warning disable CS1591 PropertyNameAccountEnabled, + #pragma warning restore CS1591 [EnumMember(Value = "PropertyNameSoftDeleted")] + #pragma warning disable CS1591 PropertyNameSoftDeleted, + #pragma warning restore CS1591 [EnumMember(Value = "IsSoftDeletionSupported")] + #pragma warning disable CS1591 IsSoftDeletionSupported, + #pragma warning restore CS1591 [EnumMember(Value = "IsSynchronizeAllSupported")] + #pragma warning disable CS1591 IsSynchronizeAllSupported, + #pragma warning restore CS1591 [EnumMember(Value = "ConnectorDataStorageRequired")] + #pragma warning disable CS1591 ConnectorDataStorageRequired, + #pragma warning restore CS1591 [EnumMember(Value = "Extensions")] + #pragma warning disable CS1591 Extensions, + #pragma warning restore CS1591 [EnumMember(Value = "BaseObjectName")] + #pragma warning disable CS1591 BaseObjectName, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ObjectDefinitionMetadataEntry.cs b/src/sample/generated/Models/ObjectDefinitionMetadataEntry.cs index e698d65f..056b5fe6 100644 --- a/src/sample/generated/Models/ObjectDefinitionMetadataEntry.cs +++ b/src/sample/generated/Models/ObjectDefinitionMetadataEntry.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ObjectDefinitionMetadataEntry : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ObjectDefinitionMetadataEntry : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The key property - public ObjectDefinitionMetadata? Key { get; set; } + public global::ApiSdk.Models.ObjectDefinitionMetadata? Key { get; set; } /// Value of the metadata property. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,37 +25,45 @@ public class ObjectDefinitionMetadataEntry : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new objectDefinitionMetadataEntry and sets the default values. + /// Instantiates a new and sets the default values. /// - public ObjectDefinitionMetadataEntry() { + public ObjectDefinitionMetadataEntry() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ObjectDefinitionMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ObjectDefinitionMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ObjectDefinitionMetadataEntry(); + return new global::ApiSdk.Models.ObjectDefinitionMetadataEntry(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"key", n => { Key = n.GetEnumValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetEnumValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("key", Key); + writer.WriteEnumValue("key", Key); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ObjectFlowTypes.cs b/src/sample/generated/Models/ObjectFlowTypes.cs index aaa3a659..6611fe4c 100644 --- a/src/sample/generated/Models/ObjectFlowTypes.cs +++ b/src/sample/generated/Models/ObjectFlowTypes.cs @@ -1,16 +1,29 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] [Flags] - public enum ObjectFlowTypes { + #pragma warning disable CS1591 + public enum ObjectFlowTypes + #pragma warning restore CS1591 + { [EnumMember(Value = "None")] + #pragma warning disable CS1591 None = 1, + #pragma warning restore CS1591 [EnumMember(Value = "Add")] + #pragma warning disable CS1591 Add = 2, + #pragma warning restore CS1591 [EnumMember(Value = "Update")] + #pragma warning disable CS1591 Update = 4, + #pragma warning restore CS1591 [EnumMember(Value = "Delete")] + #pragma warning disable CS1591 Delete = 8, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ObjectIdentity.cs b/src/sample/generated/Models/ObjectIdentity.cs index d19aec30..3a67aa87 100644 --- a/src/sample/generated/Models/ObjectIdentity.cs +++ b/src/sample/generated/Models/ObjectIdentity.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ObjectIdentity : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ObjectIdentity : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// Specifies the issuer of the identity, for example facebook.com.For local accounts (where signInType isn't federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com.For external users from other Azure AD organization, this is the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. + /// Specifies the issuer of the identity, for example facebook.com. 512 character limit. For local accounts (where signInType isn't federated), this property is the local default domain name for the tenant, for example contoso.com. For guests from other Microsoft Entra organizations, this is the domain of the federated organization, for example contoso.com. For more information about filtering behavior for this property, see Filtering on the identities property of a user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Issuer { get; set; } @@ -16,7 +22,7 @@ public class ObjectIdentity : IAdditionalDataHolder, IParsable { #else public string Issuer { get; set; } #endif - /// Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must begin with alphabetical character or number, and can only contain alphanumeric characters and the following symbols: - or Supports $filter. 64 character limit. + /// Specifies the unique identifier assigned to the user by the issuer. 64 character limit. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress (or a custom string that starts with emailAddress like emailAddress1), issuerAssignedId must be a valid email addressuserName, issuerAssignedId must begin with an alphabetical character or number, and can only contain alphanumeric characters and the following symbols: - or _ For more information about filtering behavior for this property, see Filtering on the identities property of a user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? IssuerAssignedId { get; set; } @@ -24,7 +30,7 @@ public class ObjectIdentity : IAdditionalDataHolder, IParsable { #else public string IssuerAssignedId { get; set; } #endif - /// Specifies the user sign-in types in your directory, such as emailAddress, userName, federated, or userPrincipalName. federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Setting or updating a userPrincipalName identity will update the value of the userPrincipalName property on the user object. The validations performed on the userPrincipalName property on the user object, for example, verified domains and acceptable characters, will be performed when setting or updating a userPrincipalName identity. Other validation is enforced on issuerAssignedId when the sign-in type is set to emailAddress or userName. This property can also be set to any custom string. + /// Specifies the user sign-in types in your directory, such as emailAddress, userName, federated, or userPrincipalName. federated represents a unique identifier for a user from an issuer that can be in any format chosen by the issuer. Setting or updating a userPrincipalName identity updates the value of the userPrincipalName property on the user object. The validations performed on the userPrincipalName property on the user object, for example, verified domains and acceptable characters, are performed when setting or updating a userPrincipalName identity. Extra validation is enforced on issuerAssignedId when the sign-in type is set to emailAddress or userName. This property can also be set to any custom string. For more information about filtering behavior for this property, see Filtering on the identities property of a user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SignInType { get; set; } @@ -33,34 +39,41 @@ public class ObjectIdentity : IAdditionalDataHolder, IParsable { public string SignInType { get; set; } #endif /// - /// Instantiates a new objectIdentity and sets the default values. + /// Instantiates a new and sets the default values. /// - public ObjectIdentity() { + public ObjectIdentity() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ObjectIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ObjectIdentity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ObjectIdentity(); + return new global::ApiSdk.Models.ObjectIdentity(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"issuer", n => { Issuer = n.GetStringValue(); } }, - {"issuerAssignedId", n => { IssuerAssignedId = n.GetStringValue(); } }, - {"signInType", n => { SignInType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "issuer", n => { Issuer = n.GetStringValue(); } }, + { "issuerAssignedId", n => { IssuerAssignedId = n.GetStringValue(); } }, + { "signInType", n => { SignInType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("issuer", Issuer); writer.WriteStringValue("issuerAssignedId", IssuerAssignedId); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ObjectMapping.cs b/src/sample/generated/Models/ObjectMapping.cs index f8bc5256..ff9413fb 100644 --- a/src/sample/generated/Models/ObjectMapping.cs +++ b/src/sample/generated/Models/ObjectMapping.cs @@ -1,32 +1,38 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ObjectMapping : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ObjectMapping : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Attribute mappings define which attributes to map from the source object into the target object and how they should flow. A number of functions are available to support the transformation of the original source values. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AttributeMappings { get; set; } + public List? AttributeMappings { get; set; } #nullable restore #else - public List AttributeMappings { get; set; } + public List AttributeMappings { get; set; } #endif /// When true, this object mapping will be processed during synchronization. When false, this object mapping will be skipped. public bool? Enabled { get; set; } /// The flowTypes property - public ObjectFlowTypes? FlowTypes { get; set; } + public global::ApiSdk.Models.ObjectFlowTypes? FlowTypes { get; set; } /// Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Metadata { get; set; } + public List? Metadata { get; set; } #nullable restore #else - public List Metadata { get; set; } + public List Metadata { get; set; } #endif /// Human-friendly name of the object mapping. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -39,10 +45,10 @@ public class ObjectMapping : IAdditionalDataHolder, IParsable { /// The scope property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Filter? Scope { get; set; } + public global::ApiSdk.Models.Filter? Scope { get; set; } #nullable restore #else - public Filter Scope { get; set; } + public global::ApiSdk.Models.Filter Scope { get; set; } #endif /// Name of the object in the source directory. Must match the object name from the source directory definition. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -61,49 +67,57 @@ public class ObjectMapping : IAdditionalDataHolder, IParsable { public string TargetObjectName { get; set; } #endif /// - /// Instantiates a new objectMapping and sets the default values. + /// Instantiates a new and sets the default values. /// - public ObjectMapping() { + public ObjectMapping() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ObjectMapping CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ObjectMapping CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ObjectMapping(); + return new global::ApiSdk.Models.ObjectMapping(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"attributeMappings", n => { AttributeMappings = n.GetCollectionOfObjectValues(AttributeMapping.CreateFromDiscriminatorValue)?.ToList(); } }, - {"enabled", n => { Enabled = n.GetBoolValue(); } }, - {"flowTypes", n => { FlowTypes = n.GetEnumValue(); } }, - {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(ObjectMappingMetadataEntry.CreateFromDiscriminatorValue)?.ToList(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"scope", n => { Scope = n.GetObjectValue(Filter.CreateFromDiscriminatorValue); } }, - {"sourceObjectName", n => { SourceObjectName = n.GetStringValue(); } }, - {"targetObjectName", n => { TargetObjectName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attributeMappings", n => { AttributeMappings = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AttributeMapping.CreateFromDiscriminatorValue)?.AsList(); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "flowTypes", n => { FlowTypes = n.GetEnumValue(); } }, + { "metadata", n => { Metadata = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ObjectMappingMetadataEntry.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "scope", n => { Scope = n.GetObjectValue(global::ApiSdk.Models.Filter.CreateFromDiscriminatorValue); } }, + { "sourceObjectName", n => { SourceObjectName = n.GetStringValue(); } }, + { "targetObjectName", n => { TargetObjectName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("attributeMappings", AttributeMappings); + writer.WriteCollectionOfObjectValues("attributeMappings", AttributeMappings); writer.WriteBoolValue("enabled", Enabled); - writer.WriteEnumValue("flowTypes", FlowTypes); - writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteEnumValue("flowTypes", FlowTypes); + writer.WriteCollectionOfObjectValues("metadata", Metadata); writer.WriteStringValue("name", Name); - writer.WriteObjectValue("scope", Scope); + writer.WriteObjectValue("scope", Scope); writer.WriteStringValue("sourceObjectName", SourceObjectName); writer.WriteStringValue("targetObjectName", TargetObjectName); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ObjectMappingMetadata.cs b/src/sample/generated/Models/ObjectMappingMetadata.cs index a94e53be..384187e1 100644 --- a/src/sample/generated/Models/ObjectMappingMetadata.cs +++ b/src/sample/generated/Models/ObjectMappingMetadata.cs @@ -1,21 +1,40 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ObjectMappingMetadata { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ObjectMappingMetadata + #pragma warning restore CS1591 + { [EnumMember(Value = "EscrowBehavior")] + #pragma warning disable CS1591 EscrowBehavior, + #pragma warning restore CS1591 [EnumMember(Value = "DisableMonitoringForChanges")] + #pragma warning disable CS1591 DisableMonitoringForChanges, + #pragma warning restore CS1591 [EnumMember(Value = "OriginalJoiningProperty")] + #pragma warning disable CS1591 OriginalJoiningProperty, + #pragma warning restore CS1591 [EnumMember(Value = "Disposition")] + #pragma warning disable CS1591 Disposition, + #pragma warning restore CS1591 [EnumMember(Value = "IsCustomerDefined")] + #pragma warning disable CS1591 IsCustomerDefined, + #pragma warning restore CS1591 [EnumMember(Value = "ExcludeFromReporting")] + #pragma warning disable CS1591 ExcludeFromReporting, + #pragma warning restore CS1591 [EnumMember(Value = "Unsynchronized")] + #pragma warning disable CS1591 Unsynchronized, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ObjectMappingMetadataEntry.cs b/src/sample/generated/Models/ObjectMappingMetadataEntry.cs index 6809320e..2e18913f 100644 --- a/src/sample/generated/Models/ObjectMappingMetadataEntry.cs +++ b/src/sample/generated/Models/ObjectMappingMetadataEntry.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ObjectMappingMetadataEntry : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ObjectMappingMetadataEntry : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The key property - public ObjectMappingMetadata? Key { get; set; } + public global::ApiSdk.Models.ObjectMappingMetadata? Key { get; set; } /// Value of the metadata property. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,37 +25,45 @@ public class ObjectMappingMetadataEntry : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new objectMappingMetadataEntry and sets the default values. + /// Instantiates a new and sets the default values. /// - public ObjectMappingMetadataEntry() { + public ObjectMappingMetadataEntry() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ObjectMappingMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ObjectMappingMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ObjectMappingMetadataEntry(); + return new global::ApiSdk.Models.ObjectMappingMetadataEntry(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"key", n => { Key = n.GetEnumValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetEnumValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("key", Key); + writer.WriteEnumValue("key", Key); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OfferShiftRequest.cs b/src/sample/generated/Models/OfferShiftRequest.cs index e1411971..e37c1dee 100644 --- a/src/sample/generated/Models/OfferShiftRequest.cs +++ b/src/sample/generated/Models/OfferShiftRequest.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OfferShiftRequest : ScheduleChangeRequest, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OfferShiftRequest : global::ApiSdk.Models.ScheduleChangeRequest, IParsable + #pragma warning restore CS1591 + { /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? RecipientActionDateTime { get; private set; } /// Custom message sent by recipient of the offer shift request. @@ -35,27 +41,33 @@ public class OfferShiftRequest : ScheduleChangeRequest, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OfferShiftRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OfferShiftRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OfferShiftRequest(); + return new global::ApiSdk.Models.OfferShiftRequest(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"recipientActionDateTime", n => { RecipientActionDateTime = n.GetDateTimeOffsetValue(); } }, - {"recipientActionMessage", n => { RecipientActionMessage = n.GetStringValue(); } }, - {"recipientUserId", n => { RecipientUserId = n.GetStringValue(); } }, - {"senderShiftId", n => { SenderShiftId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "recipientActionDateTime", n => { RecipientActionDateTime = n.GetDateTimeOffsetValue(); } }, + { "recipientActionMessage", n => { RecipientActionMessage = n.GetStringValue(); } }, + { "recipientUserId", n => { RecipientUserId = n.GetStringValue(); } }, + { "senderShiftId", n => { SenderShiftId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("recipientActionMessage", RecipientActionMessage); @@ -64,3 +76,4 @@ public class OfferShiftRequest : ScheduleChangeRequest, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OfficeGraphInsights.cs b/src/sample/generated/Models/OfficeGraphInsights.cs index cabc7046..dd16328c 100644 --- a/src/sample/generated/Models/OfficeGraphInsights.cs +++ b/src/sample/generated/Models/OfficeGraphInsights.cs @@ -1,63 +1,76 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OfficeGraphInsights : Entity, IParsable { - /// 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. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OfficeGraphInsights : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Shared { get; set; } + public List? Shared { get; set; } #nullable restore #else - public List Shared { get; set; } + public List Shared { get; set; } #endif - /// 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. + /// Calculated relationship that identifies 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 work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Trending { get; set; } + public List? Trending { get; set; } #nullable restore #else - public List Trending { get; set; } + public List Trending { get; set; } #endif - /// Calculated relationship identifying the latest documents viewed or modified by a user, including OneDrive for Business and SharePoint documents, ranked by recency of use. + /// Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Used { get; set; } + public List? Used { get; set; } #nullable restore #else - public List Used { get; set; } + public List Used { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OfficeGraphInsights CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OfficeGraphInsights CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OfficeGraphInsights(); + return new global::ApiSdk.Models.OfficeGraphInsights(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"shared", n => { Shared = n.GetCollectionOfObjectValues(SharedInsight.CreateFromDiscriminatorValue)?.ToList(); } }, - {"trending", n => { Trending = n.GetCollectionOfObjectValues(ApiSdk.Models.Trending.CreateFromDiscriminatorValue)?.ToList(); } }, - {"used", n => { Used = n.GetCollectionOfObjectValues(UsedInsight.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "shared", n => { Shared = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SharedInsight.CreateFromDiscriminatorValue)?.AsList(); } }, + { "trending", n => { Trending = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Trending.CreateFromDiscriminatorValue)?.AsList(); } }, + { "used", n => { Used = n.GetCollectionOfObjectValues(global::ApiSdk.Models.UsedInsight.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("shared", Shared); - writer.WriteCollectionOfObjectValues("trending", Trending); - writer.WriteCollectionOfObjectValues("used", Used); + writer.WriteCollectionOfObjectValues("shared", Shared); + writer.WriteCollectionOfObjectValues("trending", Trending); + writer.WriteCollectionOfObjectValues("used", Used); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnPremisesExtensionAttributes.cs b/src/sample/generated/Models/OnPremisesExtensionAttributes.cs index 7d7a6b9a..37d4418c 100644 --- a/src/sample/generated/Models/OnPremisesExtensionAttributes.cs +++ b/src/sample/generated/Models/OnPremisesExtensionAttributes.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnPremisesExtensionAttributes : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnPremisesExtensionAttributes : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// First customizable extension attribute. @@ -129,46 +135,53 @@ public class OnPremisesExtensionAttributes : IAdditionalDataHolder, IParsable { public string ExtensionAttribute9 { get; set; } #endif /// - /// Instantiates a new onPremisesExtensionAttributes and sets the default values. + /// Instantiates a new and sets the default values. /// - public OnPremisesExtensionAttributes() { + public OnPremisesExtensionAttributes() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OnPremisesExtensionAttributes CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OnPremisesExtensionAttributes CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnPremisesExtensionAttributes(); + return new global::ApiSdk.Models.OnPremisesExtensionAttributes(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"extensionAttribute1", n => { ExtensionAttribute1 = n.GetStringValue(); } }, - {"extensionAttribute10", n => { ExtensionAttribute10 = n.GetStringValue(); } }, - {"extensionAttribute11", n => { ExtensionAttribute11 = n.GetStringValue(); } }, - {"extensionAttribute12", n => { ExtensionAttribute12 = n.GetStringValue(); } }, - {"extensionAttribute13", n => { ExtensionAttribute13 = n.GetStringValue(); } }, - {"extensionAttribute14", n => { ExtensionAttribute14 = n.GetStringValue(); } }, - {"extensionAttribute15", n => { ExtensionAttribute15 = n.GetStringValue(); } }, - {"extensionAttribute2", n => { ExtensionAttribute2 = n.GetStringValue(); } }, - {"extensionAttribute3", n => { ExtensionAttribute3 = n.GetStringValue(); } }, - {"extensionAttribute4", n => { ExtensionAttribute4 = n.GetStringValue(); } }, - {"extensionAttribute5", n => { ExtensionAttribute5 = n.GetStringValue(); } }, - {"extensionAttribute6", n => { ExtensionAttribute6 = n.GetStringValue(); } }, - {"extensionAttribute7", n => { ExtensionAttribute7 = n.GetStringValue(); } }, - {"extensionAttribute8", n => { ExtensionAttribute8 = n.GetStringValue(); } }, - {"extensionAttribute9", n => { ExtensionAttribute9 = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "extensionAttribute1", n => { ExtensionAttribute1 = n.GetStringValue(); } }, + { "extensionAttribute10", n => { ExtensionAttribute10 = n.GetStringValue(); } }, + { "extensionAttribute11", n => { ExtensionAttribute11 = n.GetStringValue(); } }, + { "extensionAttribute12", n => { ExtensionAttribute12 = n.GetStringValue(); } }, + { "extensionAttribute13", n => { ExtensionAttribute13 = n.GetStringValue(); } }, + { "extensionAttribute14", n => { ExtensionAttribute14 = n.GetStringValue(); } }, + { "extensionAttribute15", n => { ExtensionAttribute15 = n.GetStringValue(); } }, + { "extensionAttribute2", n => { ExtensionAttribute2 = n.GetStringValue(); } }, + { "extensionAttribute3", n => { ExtensionAttribute3 = n.GetStringValue(); } }, + { "extensionAttribute4", n => { ExtensionAttribute4 = n.GetStringValue(); } }, + { "extensionAttribute5", n => { ExtensionAttribute5 = n.GetStringValue(); } }, + { "extensionAttribute6", n => { ExtensionAttribute6 = n.GetStringValue(); } }, + { "extensionAttribute7", n => { ExtensionAttribute7 = n.GetStringValue(); } }, + { "extensionAttribute8", n => { ExtensionAttribute8 = n.GetStringValue(); } }, + { "extensionAttribute9", n => { ExtensionAttribute9 = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("extensionAttribute1", ExtensionAttribute1); writer.WriteStringValue("extensionAttribute10", ExtensionAttribute10); @@ -189,3 +202,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnPremisesProvisioningError.cs b/src/sample/generated/Models/OnPremisesProvisioningError.cs index 2f22ab16..63e1bcb7 100644 --- a/src/sample/generated/Models/OnPremisesProvisioningError.cs +++ b/src/sample/generated/Models/OnPremisesProvisioningError.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnPremisesProvisioningError : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnPremisesProvisioningError : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. @@ -35,35 +41,42 @@ public class OnPremisesProvisioningError : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new onPremisesProvisioningError and sets the default values. + /// Instantiates a new and sets the default values. /// - public OnPremisesProvisioningError() { + public OnPremisesProvisioningError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OnPremisesProvisioningError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OnPremisesProvisioningError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnPremisesProvisioningError(); + return new global::ApiSdk.Models.OnPremisesProvisioningError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"category", n => { Category = n.GetStringValue(); } }, - {"occurredDateTime", n => { OccurredDateTime = n.GetDateTimeOffsetValue(); } }, - {"propertyCausingError", n => { PropertyCausingError = n.GetStringValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "category", n => { Category = n.GetStringValue(); } }, + { "occurredDateTime", n => { OccurredDateTime = n.GetDateTimeOffsetValue(); } }, + { "propertyCausingError", n => { PropertyCausingError = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("category", Category); writer.WriteDateTimeOffsetValue("occurredDateTime", OccurredDateTime); @@ -73,3 +86,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Onenote.cs b/src/sample/generated/Models/Onenote.cs index 279e8615..0628aad8 100644 --- a/src/sample/generated/Models/Onenote.cs +++ b/src/sample/generated/Models/Onenote.cs @@ -1,93 +1,106 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Onenote : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Onenote : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The collection of OneNote notebooks that are owned by the user or group. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Notebooks { get; set; } + public List? Notebooks { get; set; } #nullable restore #else - public List Notebooks { get; set; } + public List Notebooks { get; set; } #endif /// The status of OneNote operations. Getting an operations collection isn't supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Operations { get; set; } + public List? Operations { get; set; } #nullable restore #else - public List Operations { get; set; } + public List Operations { get; set; } #endif /// The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Pages { get; set; } + public List? Pages { get; set; } #nullable restore #else - public List Pages { get; set; } + public List Pages { get; set; } #endif /// The image and other file resources in OneNote pages. Getting a resources collection isn't supported, but you can get the binary content of a specific resource. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Resources { get; set; } + public List? Resources { get; set; } #nullable restore #else - public List Resources { get; set; } + public List Resources { get; set; } #endif /// The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SectionGroups { get; set; } + public List? SectionGroups { get; set; } #nullable restore #else - public List SectionGroups { get; set; } + public List SectionGroups { get; set; } #endif /// The sections in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Sections { get; set; } + public List? Sections { get; set; } #nullable restore #else - public List Sections { get; set; } + public List Sections { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Onenote CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Onenote CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Onenote(); + return new global::ApiSdk.Models.Onenote(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"notebooks", n => { Notebooks = n.GetCollectionOfObjectValues(Notebook.CreateFromDiscriminatorValue)?.ToList(); } }, - {"operations", n => { Operations = n.GetCollectionOfObjectValues(OnenoteOperation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"pages", n => { Pages = n.GetCollectionOfObjectValues(OnenotePage.CreateFromDiscriminatorValue)?.ToList(); } }, - {"resources", n => { Resources = n.GetCollectionOfObjectValues(OnenoteResource.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sectionGroups", n => { SectionGroups = n.GetCollectionOfObjectValues(SectionGroup.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sections", n => { Sections = n.GetCollectionOfObjectValues(OnenoteSection.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "notebooks", n => { Notebooks = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Notebook.CreateFromDiscriminatorValue)?.AsList(); } }, + { "operations", n => { Operations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnenoteOperation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pages", n => { Pages = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnenotePage.CreateFromDiscriminatorValue)?.AsList(); } }, + { "resources", n => { Resources = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnenoteResource.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sectionGroups", n => { SectionGroups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SectionGroup.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sections", n => { Sections = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnenoteSection.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("notebooks", Notebooks); - writer.WriteCollectionOfObjectValues("operations", Operations); - writer.WriteCollectionOfObjectValues("pages", Pages); - writer.WriteCollectionOfObjectValues("resources", Resources); - writer.WriteCollectionOfObjectValues("sectionGroups", SectionGroups); - writer.WriteCollectionOfObjectValues("sections", Sections); + writer.WriteCollectionOfObjectValues("notebooks", Notebooks); + writer.WriteCollectionOfObjectValues("operations", Operations); + writer.WriteCollectionOfObjectValues("pages", Pages); + writer.WriteCollectionOfObjectValues("resources", Resources); + writer.WriteCollectionOfObjectValues("sectionGroups", SectionGroups); + writer.WriteCollectionOfObjectValues("sections", Sections); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnenoteEntityBaseModel.cs b/src/sample/generated/Models/OnenoteEntityBaseModel.cs index 81624bc9..a2a364c9 100644 --- a/src/sample/generated/Models/OnenoteEntityBaseModel.cs +++ b/src/sample/generated/Models/OnenoteEntityBaseModel.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnenoteEntityBaseModel : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnenoteEntityBaseModel : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The endpoint where you can get details about the page. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class OnenoteEntityBaseModel : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OnenoteEntityBaseModel CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OnenoteEntityBaseModel CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnenoteEntityBaseModel(); + return new global::ApiSdk.Models.OnenoteEntityBaseModel(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"self", n => { Self = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "self", n => { Self = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("self", Self); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnenoteEntityHierarchyModel.cs b/src/sample/generated/Models/OnenoteEntityHierarchyModel.cs index a88780e3..3660fa4f 100644 --- a/src/sample/generated/Models/OnenoteEntityHierarchyModel.cs +++ b/src/sample/generated/Models/OnenoteEntityHierarchyModel.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnenoteEntityHierarchyModel : OnenoteEntitySchemaObjectModel, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnenoteEntityHierarchyModel : global::ApiSdk.Models.OnenoteEntitySchemaObjectModel, IParsable + #pragma warning restore CS1591 + { /// The createdBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? CreatedBy { get; set; } #nullable restore #else - public IdentitySet CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet CreatedBy { get; set; } #endif /// The name of the notebook. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,43 +31,50 @@ public class OnenoteEntityHierarchyModel : OnenoteEntitySchemaObjectModel, IPars /// The lastModifiedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? LastModifiedBy { get; set; } #nullable restore #else - public IdentitySet LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet LastModifiedBy { get; set; } #endif /// The date and time when the notebook was last modified. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. public DateTimeOffset? LastModifiedDateTime { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OnenoteEntityHierarchyModel CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OnenoteEntityHierarchyModel CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnenoteEntityHierarchyModel(); + return new global::ApiSdk.Models.OnenoteEntityHierarchyModel(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdBy", n => { CreatedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdBy", n => { CreatedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("createdBy", CreatedBy); + writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteStringValue("displayName", DisplayName); - writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); + writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnenoteEntitySchemaObjectModel.cs b/src/sample/generated/Models/OnenoteEntitySchemaObjectModel.cs index 6b466e07..b9d8793c 100644 --- a/src/sample/generated/Models/OnenoteEntitySchemaObjectModel.cs +++ b/src/sample/generated/Models/OnenoteEntitySchemaObjectModel.cs @@ -1,37 +1,50 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnenoteEntitySchemaObjectModel : OnenoteEntityBaseModel, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnenoteEntitySchemaObjectModel : global::ApiSdk.Models.OnenoteEntityBaseModel, IParsable + #pragma warning restore CS1591 + { /// The date and time when the page was created. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OnenoteEntitySchemaObjectModel CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OnenoteEntitySchemaObjectModel CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnenoteEntitySchemaObjectModel(); + return new global::ApiSdk.Models.OnenoteEntitySchemaObjectModel(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnenoteOperation.cs b/src/sample/generated/Models/OnenoteOperation.cs index 3e60df4e..6f7836ef 100644 --- a/src/sample/generated/Models/OnenoteOperation.cs +++ b/src/sample/generated/Models/OnenoteOperation.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnenoteOperation : Operation, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnenoteOperation : global::ApiSdk.Models.Operation, IParsable + #pragma warning restore CS1591 + { /// The error property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public OnenoteOperationError? Error { get; set; } + public global::ApiSdk.Models.OnenoteOperationError? Error { get; set; } #nullable restore #else - public OnenoteOperationError Error { get; set; } + public global::ApiSdk.Models.OnenoteOperationError Error { get; set; } #endif /// The operation percent complete if the operation is still in running status. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,33 +47,40 @@ public class OnenoteOperation : Operation, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OnenoteOperation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OnenoteOperation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnenoteOperation(); + return new global::ApiSdk.Models.OnenoteOperation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"error", n => { Error = n.GetObjectValue(OnenoteOperationError.CreateFromDiscriminatorValue); } }, - {"percentComplete", n => { PercentComplete = n.GetStringValue(); } }, - {"resourceId", n => { ResourceId = n.GetStringValue(); } }, - {"resourceLocation", n => { ResourceLocation = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "error", n => { Error = n.GetObjectValue(global::ApiSdk.Models.OnenoteOperationError.CreateFromDiscriminatorValue); } }, + { "percentComplete", n => { PercentComplete = n.GetStringValue(); } }, + { "resourceId", n => { ResourceId = n.GetStringValue(); } }, + { "resourceLocation", n => { ResourceLocation = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("error", Error); + writer.WriteObjectValue("error", Error); writer.WriteStringValue("percentComplete", PercentComplete); writer.WriteStringValue("resourceId", ResourceId); writer.WriteStringValue("resourceLocation", ResourceLocation); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnenoteOperationError.cs b/src/sample/generated/Models/OnenoteOperationError.cs index d2041a02..642848ab 100644 --- a/src/sample/generated/Models/OnenoteOperationError.cs +++ b/src/sample/generated/Models/OnenoteOperationError.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnenoteOperationError : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnenoteOperationError : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The error code. @@ -25,33 +31,40 @@ public class OnenoteOperationError : IAdditionalDataHolder, IParsable { public string Message { get; set; } #endif /// - /// Instantiates a new onenoteOperationError and sets the default values. + /// Instantiates a new and sets the default values. /// - public OnenoteOperationError() { + public OnenoteOperationError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OnenoteOperationError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OnenoteOperationError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnenoteOperationError(); + return new global::ApiSdk.Models.OnenoteOperationError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"message", n => { Message = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnenotePage.cs b/src/sample/generated/Models/OnenotePage.cs index 7b444ad6..30045a2e 100644 --- a/src/sample/generated/Models/OnenotePage.cs +++ b/src/sample/generated/Models/OnenotePage.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnenotePage : OnenoteEntitySchemaObjectModel, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnenotePage : global::ApiSdk.Models.OnenoteEntitySchemaObjectModel, IParsable + #pragma warning restore CS1591 + { /// The page's HTML content. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -37,28 +43,28 @@ public class OnenotePage : OnenoteEntitySchemaObjectModel, IParsable { /// The links property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PageLinks? Links { get; set; } + public global::ApiSdk.Models.PageLinks? Links { get; set; } #nullable restore #else - public PageLinks Links { get; set; } + public global::ApiSdk.Models.PageLinks Links { get; set; } #endif /// The order of the page within its parent section. Read-only. public int? Order { get; set; } /// The parentNotebook property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Notebook? ParentNotebook { get; set; } + public global::ApiSdk.Models.Notebook? ParentNotebook { get; set; } #nullable restore #else - public Notebook ParentNotebook { get; set; } + public global::ApiSdk.Models.Notebook ParentNotebook { get; set; } #endif /// The parentSection property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public OnenoteSection? ParentSection { get; set; } + public global::ApiSdk.Models.OnenoteSection? ParentSection { get; set; } #nullable restore #else - public OnenoteSection ParentSection { get; set; } + public global::ApiSdk.Models.OnenoteSection ParentSection { get; set; } #endif /// The title of the page. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -79,34 +85,40 @@ public class OnenotePage : OnenoteEntitySchemaObjectModel, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OnenotePage CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OnenotePage CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnenotePage(); + return new global::ApiSdk.Models.OnenotePage(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"content", n => { Content = n.GetByteArrayValue(); } }, - {"contentUrl", n => { ContentUrl = n.GetStringValue(); } }, - {"createdByAppId", n => { CreatedByAppId = n.GetStringValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"level", n => { Level = n.GetIntValue(); } }, - {"links", n => { Links = n.GetObjectValue(PageLinks.CreateFromDiscriminatorValue); } }, - {"order", n => { Order = n.GetIntValue(); } }, - {"parentNotebook", n => { ParentNotebook = n.GetObjectValue(Notebook.CreateFromDiscriminatorValue); } }, - {"parentSection", n => { ParentSection = n.GetObjectValue(OnenoteSection.CreateFromDiscriminatorValue); } }, - {"title", n => { Title = n.GetStringValue(); } }, - {"userTags", n => { UserTags = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "content", n => { Content = n.GetByteArrayValue(); } }, + { "contentUrl", n => { ContentUrl = n.GetStringValue(); } }, + { "createdByAppId", n => { CreatedByAppId = n.GetStringValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "level", n => { Level = n.GetIntValue(); } }, + { "links", n => { Links = n.GetObjectValue(global::ApiSdk.Models.PageLinks.CreateFromDiscriminatorValue); } }, + { "order", n => { Order = n.GetIntValue(); } }, + { "parentNotebook", n => { ParentNotebook = n.GetObjectValue(global::ApiSdk.Models.Notebook.CreateFromDiscriminatorValue); } }, + { "parentSection", n => { ParentSection = n.GetObjectValue(global::ApiSdk.Models.OnenoteSection.CreateFromDiscriminatorValue); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "userTags", n => { UserTags = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); @@ -114,12 +126,13 @@ public class OnenotePage : OnenoteEntitySchemaObjectModel, IParsable { writer.WriteStringValue("createdByAppId", CreatedByAppId); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteIntValue("level", Level); - writer.WriteObjectValue("links", Links); + writer.WriteObjectValue("links", Links); writer.WriteIntValue("order", Order); - writer.WriteObjectValue("parentNotebook", ParentNotebook); - writer.WriteObjectValue("parentSection", ParentSection); + writer.WriteObjectValue("parentNotebook", ParentNotebook); + writer.WriteObjectValue("parentSection", ParentSection); writer.WriteStringValue("title", Title); writer.WriteCollectionOfPrimitiveValues("userTags", UserTags); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnenoteResource.cs b/src/sample/generated/Models/OnenoteResource.cs index 32617a30..84e8539a 100644 --- a/src/sample/generated/Models/OnenoteResource.cs +++ b/src/sample/generated/Models/OnenoteResource.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnenoteResource : OnenoteEntityBaseModel, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnenoteResource : global::ApiSdk.Models.OnenoteEntityBaseModel, IParsable + #pragma warning restore CS1591 + { /// The content stream #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -25,25 +31,31 @@ public class OnenoteResource : OnenoteEntityBaseModel, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OnenoteResource CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OnenoteResource CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnenoteResource(); + return new global::ApiSdk.Models.OnenoteResource(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"content", n => { Content = n.GetByteArrayValue(); } }, - {"contentUrl", n => { ContentUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "content", n => { Content = n.GetByteArrayValue(); } }, + { "contentUrl", n => { ContentUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); @@ -51,3 +63,4 @@ public class OnenoteResource : OnenoteEntityBaseModel, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnenoteSection.cs b/src/sample/generated/Models/OnenoteSection.cs index 123d473f..8e01806f 100644 --- a/src/sample/generated/Models/OnenoteSection.cs +++ b/src/sample/generated/Models/OnenoteSection.cs @@ -1,28 +1,34 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnenoteSection : OnenoteEntityHierarchyModel, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnenoteSection : global::ApiSdk.Models.OnenoteEntityHierarchyModel, IParsable + #pragma warning restore CS1591 + { /// Indicates whether this is the user's default section. Read-only. public bool? IsDefault { get; set; } /// The links property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SectionLinks? Links { get; set; } + public global::ApiSdk.Models.SectionLinks? Links { get; set; } #nullable restore #else - public SectionLinks Links { get; set; } + public global::ApiSdk.Models.SectionLinks Links { get; set; } #endif /// The collection of pages in the section. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Pages { get; set; } + public List? Pages { get; set; } #nullable restore #else - public List Pages { get; set; } + public List Pages { get; set; } #endif /// The pages endpoint where you can get details for all the pages in the section. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -35,53 +41,60 @@ public class OnenoteSection : OnenoteEntityHierarchyModel, IParsable { /// The parentNotebook property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Notebook? ParentNotebook { get; set; } + public global::ApiSdk.Models.Notebook? ParentNotebook { get; set; } #nullable restore #else - public Notebook ParentNotebook { get; set; } + public global::ApiSdk.Models.Notebook ParentNotebook { get; set; } #endif /// The parentSectionGroup property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SectionGroup? ParentSectionGroup { get; set; } + public global::ApiSdk.Models.SectionGroup? ParentSectionGroup { get; set; } #nullable restore #else - public SectionGroup ParentSectionGroup { get; set; } + public global::ApiSdk.Models.SectionGroup ParentSectionGroup { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OnenoteSection CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OnenoteSection CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnenoteSection(); + return new global::ApiSdk.Models.OnenoteSection(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"isDefault", n => { IsDefault = n.GetBoolValue(); } }, - {"links", n => { Links = n.GetObjectValue(SectionLinks.CreateFromDiscriminatorValue); } }, - {"pages", n => { Pages = n.GetCollectionOfObjectValues(OnenotePage.CreateFromDiscriminatorValue)?.ToList(); } }, - {"pagesUrl", n => { PagesUrl = n.GetStringValue(); } }, - {"parentNotebook", n => { ParentNotebook = n.GetObjectValue(Notebook.CreateFromDiscriminatorValue); } }, - {"parentSectionGroup", n => { ParentSectionGroup = n.GetObjectValue(SectionGroup.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "isDefault", n => { IsDefault = n.GetBoolValue(); } }, + { "links", n => { Links = n.GetObjectValue(global::ApiSdk.Models.SectionLinks.CreateFromDiscriminatorValue); } }, + { "pages", n => { Pages = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnenotePage.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pagesUrl", n => { PagesUrl = n.GetStringValue(); } }, + { "parentNotebook", n => { ParentNotebook = n.GetObjectValue(global::ApiSdk.Models.Notebook.CreateFromDiscriminatorValue); } }, + { "parentSectionGroup", n => { ParentSectionGroup = n.GetObjectValue(global::ApiSdk.Models.SectionGroup.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isDefault", IsDefault); - writer.WriteObjectValue("links", Links); - writer.WriteCollectionOfObjectValues("pages", Pages); + writer.WriteObjectValue("links", Links); + writer.WriteCollectionOfObjectValues("pages", Pages); writer.WriteStringValue("pagesUrl", PagesUrl); - writer.WriteObjectValue("parentNotebook", ParentNotebook); - writer.WriteObjectValue("parentSectionGroup", ParentSectionGroup); + writer.WriteObjectValue("parentNotebook", ParentNotebook); + writer.WriteObjectValue("parentSectionGroup", ParentSectionGroup); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnenoteUserRole.cs b/src/sample/generated/Models/OnenoteUserRole.cs index ef974e4b..90e438a3 100644 --- a/src/sample/generated/Models/OnenoteUserRole.cs +++ b/src/sample/generated/Models/OnenoteUserRole.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum OnenoteUserRole { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum OnenoteUserRole + #pragma warning restore CS1591 + { [EnumMember(Value = "None")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "Owner")] + #pragma warning disable CS1591 Owner, + #pragma warning restore CS1591 [EnumMember(Value = "Contributor")] + #pragma warning disable CS1591 Contributor, + #pragma warning restore CS1591 [EnumMember(Value = "Reader")] + #pragma warning disable CS1591 Reader, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/OnlineMeeting.cs b/src/sample/generated/Models/OnlineMeeting.cs index e849bb64..cd6fc215 100644 --- a/src/sample/generated/Models/OnlineMeeting.cs +++ b/src/sample/generated/Models/OnlineMeeting.cs @@ -1,31 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnlineMeeting : Entity, IParsable { - /// Indicates whether attendees can turn on their camera. - public bool? AllowAttendeeToEnableCamera { get; set; } - /// Indicates whether attendees can turn on their microphone. - public bool? AllowAttendeeToEnableMic { get; set; } - /// The allowedPresenters property - public OnlineMeetingPresenters? AllowedPresenters { get; set; } - /// The allowMeetingChat property - public MeetingChatMode? AllowMeetingChat { get; set; } - /// Specifies if participants are allowed to rename themselves in an instance of the meeting. - public bool? AllowParticipantsToChangeName { get; set; } - /// Indicates whether Teams reactions are enabled for the meeting. - public bool? AllowTeamworkReactions { get; set; } - /// The attendance reports of an online meeting. Read-only. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public List? AttendanceReports { get; set; } -#nullable restore -#else - public List AttendanceReports { get; set; } -#endif +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnlineMeeting : global::ApiSdk.Models.OnlineMeetingBase, IParsable + #pragma warning restore CS1591 + { /// The content stream of the attendee report of a Microsoft Teams live event. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -33,34 +19,18 @@ public class OnlineMeeting : Entity, IParsable { #nullable restore #else public byte[] AttendeeReport { get; set; } -#endif - /// The audioConferencing property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public ApiSdk.Models.AudioConferencing? AudioConferencing { get; set; } -#nullable restore -#else - public ApiSdk.Models.AudioConferencing AudioConferencing { get; set; } #endif /// The broadcastSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public BroadcastMeetingSettings? BroadcastSettings { get; set; } -#nullable restore -#else - public BroadcastMeetingSettings BroadcastSettings { get; set; } -#endif - /// The chatInfo property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public ApiSdk.Models.ChatInfo? ChatInfo { get; set; } + public global::ApiSdk.Models.BroadcastMeetingSettings? BroadcastSettings { get; set; } #nullable restore #else - public ApiSdk.Models.ChatInfo ChatInfo { get; set; } + public global::ApiSdk.Models.BroadcastMeetingSettings BroadcastSettings { get; set; } #endif /// The meeting creation time in UTC. Read-only. public DateTimeOffset? CreationDateTime { get; set; } - /// The meeting end time in UTC. + /// The meeting end time in UTC. Required when you create an online meeting. public DateTimeOffset? EndDateTime { get; set; } /// The externalId property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -70,166 +40,83 @@ public class OnlineMeeting : Entity, IParsable { #else public string ExternalId { get; set; } #endif - /// Indicates if this is a Teams live event. + /// Indicates whether this meeting is a Teams live event. public bool? IsBroadcast { get; set; } - /// Indicates whether to announce when callers join or leave. - public bool? IsEntryExitAnnounced { get; set; } - /// The joinInformation property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public ItemBody? JoinInformation { get; set; } -#nullable restore -#else - public ItemBody JoinInformation { get; set; } -#endif - /// The joinMeetingIdSettings property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public ApiSdk.Models.JoinMeetingIdSettings? JoinMeetingIdSettings { get; set; } -#nullable restore -#else - public ApiSdk.Models.JoinMeetingIdSettings JoinMeetingIdSettings { get; set; } -#endif - /// The join URL of the online meeting. Read-only. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? JoinWebUrl { get; set; } -#nullable restore -#else - public string JoinWebUrl { get; set; } -#endif - /// The lobbyBypassSettings property + /// The participants property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.LobbyBypassSettings? LobbyBypassSettings { get; set; } + public global::ApiSdk.Models.MeetingParticipants? Participants { get; set; } #nullable restore #else - public ApiSdk.Models.LobbyBypassSettings LobbyBypassSettings { get; set; } + public global::ApiSdk.Models.MeetingParticipants Participants { get; set; } #endif - /// The participants property + /// The recordings of an online meeting. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public MeetingParticipants? Participants { get; set; } + public List? Recordings { get; set; } #nullable restore #else - public MeetingParticipants Participants { get; set; } + public List Recordings { get; set; } #endif - /// Indicates whether to record the meeting automatically. - public bool? RecordAutomatically { get; set; } - /// The shareMeetingChatHistoryDefault property - public MeetingChatHistoryDefaultMode? ShareMeetingChatHistoryDefault { get; set; } /// The meeting start time in UTC. public DateTimeOffset? StartDateTime { get; set; } - /// The subject of the online meeting. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? Subject { get; set; } -#nullable restore -#else - public string Subject { get; set; } -#endif - /// The transcripts property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public List? Transcripts { get; set; } -#nullable restore -#else - public List Transcripts { get; set; } -#endif - /// The video teleconferencing ID. Read-only. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? VideoTeleconferenceId { get; set; } -#nullable restore -#else - public string VideoTeleconferenceId { get; set; } -#endif - /// The watermarkProtection property + /// The transcripts of an online meeting. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WatermarkProtectionValues? WatermarkProtection { get; set; } + public List? Transcripts { get; set; } #nullable restore #else - public WatermarkProtectionValues WatermarkProtection { get; set; } + public List Transcripts { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OnlineMeeting CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OnlineMeeting CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnlineMeeting(); + return new global::ApiSdk.Models.OnlineMeeting(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"allowAttendeeToEnableCamera", n => { AllowAttendeeToEnableCamera = n.GetBoolValue(); } }, - {"allowAttendeeToEnableMic", n => { AllowAttendeeToEnableMic = n.GetBoolValue(); } }, - {"allowMeetingChat", n => { AllowMeetingChat = n.GetEnumValue(); } }, - {"allowParticipantsToChangeName", n => { AllowParticipantsToChangeName = n.GetBoolValue(); } }, - {"allowTeamworkReactions", n => { AllowTeamworkReactions = n.GetBoolValue(); } }, - {"allowedPresenters", n => { AllowedPresenters = n.GetEnumValue(); } }, - {"attendanceReports", n => { AttendanceReports = n.GetCollectionOfObjectValues(MeetingAttendanceReport.CreateFromDiscriminatorValue)?.ToList(); } }, - {"attendeeReport", n => { AttendeeReport = n.GetByteArrayValue(); } }, - {"audioConferencing", n => { AudioConferencing = n.GetObjectValue(ApiSdk.Models.AudioConferencing.CreateFromDiscriminatorValue); } }, - {"broadcastSettings", n => { BroadcastSettings = n.GetObjectValue(BroadcastMeetingSettings.CreateFromDiscriminatorValue); } }, - {"chatInfo", n => { ChatInfo = n.GetObjectValue(ApiSdk.Models.ChatInfo.CreateFromDiscriminatorValue); } }, - {"creationDateTime", n => { CreationDateTime = n.GetDateTimeOffsetValue(); } }, - {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, - {"externalId", n => { ExternalId = n.GetStringValue(); } }, - {"isBroadcast", n => { IsBroadcast = n.GetBoolValue(); } }, - {"isEntryExitAnnounced", n => { IsEntryExitAnnounced = n.GetBoolValue(); } }, - {"joinInformation", n => { JoinInformation = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, - {"joinMeetingIdSettings", n => { JoinMeetingIdSettings = n.GetObjectValue(ApiSdk.Models.JoinMeetingIdSettings.CreateFromDiscriminatorValue); } }, - {"joinWebUrl", n => { JoinWebUrl = n.GetStringValue(); } }, - {"lobbyBypassSettings", n => { LobbyBypassSettings = n.GetObjectValue(ApiSdk.Models.LobbyBypassSettings.CreateFromDiscriminatorValue); } }, - {"participants", n => { Participants = n.GetObjectValue(MeetingParticipants.CreateFromDiscriminatorValue); } }, - {"recordAutomatically", n => { RecordAutomatically = n.GetBoolValue(); } }, - {"shareMeetingChatHistoryDefault", n => { ShareMeetingChatHistoryDefault = n.GetEnumValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, - {"subject", n => { Subject = n.GetStringValue(); } }, - {"transcripts", n => { Transcripts = n.GetCollectionOfObjectValues(CallTranscript.CreateFromDiscriminatorValue)?.ToList(); } }, - {"videoTeleconferenceId", n => { VideoTeleconferenceId = n.GetStringValue(); } }, - {"watermarkProtection", n => { WatermarkProtection = n.GetObjectValue(WatermarkProtectionValues.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "attendeeReport", n => { AttendeeReport = n.GetByteArrayValue(); } }, + { "broadcastSettings", n => { BroadcastSettings = n.GetObjectValue(global::ApiSdk.Models.BroadcastMeetingSettings.CreateFromDiscriminatorValue); } }, + { "creationDateTime", n => { CreationDateTime = n.GetDateTimeOffsetValue(); } }, + { "endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + { "externalId", n => { ExternalId = n.GetStringValue(); } }, + { "isBroadcast", n => { IsBroadcast = n.GetBoolValue(); } }, + { "participants", n => { Participants = n.GetObjectValue(global::ApiSdk.Models.MeetingParticipants.CreateFromDiscriminatorValue); } }, + { "recordings", n => { Recordings = n.GetCollectionOfObjectValues(global::ApiSdk.Models.CallRecording.CreateFromDiscriminatorValue)?.AsList(); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + { "transcripts", n => { Transcripts = n.GetCollectionOfObjectValues(global::ApiSdk.Models.CallTranscript.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteBoolValue("allowAttendeeToEnableCamera", AllowAttendeeToEnableCamera); - writer.WriteBoolValue("allowAttendeeToEnableMic", AllowAttendeeToEnableMic); - writer.WriteEnumValue("allowedPresenters", AllowedPresenters); - writer.WriteEnumValue("allowMeetingChat", AllowMeetingChat); - writer.WriteBoolValue("allowParticipantsToChangeName", AllowParticipantsToChangeName); - writer.WriteBoolValue("allowTeamworkReactions", AllowTeamworkReactions); - writer.WriteCollectionOfObjectValues("attendanceReports", AttendanceReports); writer.WriteByteArrayValue("attendeeReport", AttendeeReport); - writer.WriteObjectValue("audioConferencing", AudioConferencing); - writer.WriteObjectValue("broadcastSettings", BroadcastSettings); - writer.WriteObjectValue("chatInfo", ChatInfo); + writer.WriteObjectValue("broadcastSettings", BroadcastSettings); writer.WriteDateTimeOffsetValue("creationDateTime", CreationDateTime); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("externalId", ExternalId); writer.WriteBoolValue("isBroadcast", IsBroadcast); - writer.WriteBoolValue("isEntryExitAnnounced", IsEntryExitAnnounced); - writer.WriteObjectValue("joinInformation", JoinInformation); - writer.WriteObjectValue("joinMeetingIdSettings", JoinMeetingIdSettings); - writer.WriteStringValue("joinWebUrl", JoinWebUrl); - writer.WriteObjectValue("lobbyBypassSettings", LobbyBypassSettings); - writer.WriteObjectValue("participants", Participants); - writer.WriteBoolValue("recordAutomatically", RecordAutomatically); - writer.WriteEnumValue("shareMeetingChatHistoryDefault", ShareMeetingChatHistoryDefault); + writer.WriteObjectValue("participants", Participants); + writer.WriteCollectionOfObjectValues("recordings", Recordings); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); - writer.WriteStringValue("subject", Subject); - writer.WriteCollectionOfObjectValues("transcripts", Transcripts); - writer.WriteStringValue("videoTeleconferenceId", VideoTeleconferenceId); - writer.WriteObjectValue("watermarkProtection", WatermarkProtection); + writer.WriteCollectionOfObjectValues("transcripts", Transcripts); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnlineMeetingBase.cs b/src/sample/generated/Models/OnlineMeetingBase.cs new file mode 100644 index 00000000..7ea930f8 --- /dev/null +++ b/src/sample/generated/Models/OnlineMeetingBase.cs @@ -0,0 +1,182 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnlineMeetingBase : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Indicates whether attendees can turn on their camera. + public bool? AllowAttendeeToEnableCamera { get; set; } + /// Indicates whether attendees can turn on their microphone. + public bool? AllowAttendeeToEnableMic { get; set; } + /// The allowedPresenters property + public global::ApiSdk.Models.OnlineMeetingPresenters? AllowedPresenters { get; set; } + /// The allowMeetingChat property + public global::ApiSdk.Models.MeetingChatMode? AllowMeetingChat { get; set; } + /// Specifies if participants are allowed to rename themselves in an instance of the meeting. + public bool? AllowParticipantsToChangeName { get; set; } + /// Indicates if Teams reactions are enabled for the meeting. + public bool? AllowTeamworkReactions { get; set; } + /// The attendance reports of an online meeting. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AttendanceReports { get; set; } +#nullable restore +#else + public List AttendanceReports { get; set; } +#endif + /// The audioConferencing property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.AudioConferencing? AudioConferencing { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.AudioConferencing AudioConferencing { get; set; } +#endif + /// The chatInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.ChatInfo? ChatInfo { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.ChatInfo ChatInfo { get; set; } +#endif + /// Indicates whether to announce when callers join or leave. + public bool? IsEntryExitAnnounced { get; set; } + /// The joinInformation property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.ItemBody? JoinInformation { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.ItemBody JoinInformation { get; set; } +#endif + /// The joinMeetingIdSettings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.JoinMeetingIdSettings? JoinMeetingIdSettings { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.JoinMeetingIdSettings JoinMeetingIdSettings { get; set; } +#endif + /// The join URL of the online meeting. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? JoinWebUrl { get; set; } +#nullable restore +#else + public string JoinWebUrl { get; set; } +#endif + /// The lobbyBypassSettings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.LobbyBypassSettings? LobbyBypassSettings { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.LobbyBypassSettings LobbyBypassSettings { get; set; } +#endif + /// Indicates whether to record the meeting automatically. + public bool? RecordAutomatically { get; set; } + /// The shareMeetingChatHistoryDefault property + public global::ApiSdk.Models.MeetingChatHistoryDefaultMode? ShareMeetingChatHistoryDefault { get; set; } + /// The subject of the online meeting. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Subject { get; set; } +#nullable restore +#else + public string Subject { get; set; } +#endif + /// The video teleconferencing ID. Read-only. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VideoTeleconferenceId { get; set; } +#nullable restore +#else + public string VideoTeleconferenceId { get; set; } +#endif + /// The watermarkProtection property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.WatermarkProtectionValues? WatermarkProtection { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.WatermarkProtectionValues WatermarkProtection { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.OnlineMeetingBase CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.OnlineMeetingBase(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "allowAttendeeToEnableCamera", n => { AllowAttendeeToEnableCamera = n.GetBoolValue(); } }, + { "allowAttendeeToEnableMic", n => { AllowAttendeeToEnableMic = n.GetBoolValue(); } }, + { "allowMeetingChat", n => { AllowMeetingChat = n.GetEnumValue(); } }, + { "allowParticipantsToChangeName", n => { AllowParticipantsToChangeName = n.GetBoolValue(); } }, + { "allowTeamworkReactions", n => { AllowTeamworkReactions = n.GetBoolValue(); } }, + { "allowedPresenters", n => { AllowedPresenters = n.GetEnumValue(); } }, + { "attendanceReports", n => { AttendanceReports = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MeetingAttendanceReport.CreateFromDiscriminatorValue)?.AsList(); } }, + { "audioConferencing", n => { AudioConferencing = n.GetObjectValue(global::ApiSdk.Models.AudioConferencing.CreateFromDiscriminatorValue); } }, + { "chatInfo", n => { ChatInfo = n.GetObjectValue(global::ApiSdk.Models.ChatInfo.CreateFromDiscriminatorValue); } }, + { "isEntryExitAnnounced", n => { IsEntryExitAnnounced = n.GetBoolValue(); } }, + { "joinInformation", n => { JoinInformation = n.GetObjectValue(global::ApiSdk.Models.ItemBody.CreateFromDiscriminatorValue); } }, + { "joinMeetingIdSettings", n => { JoinMeetingIdSettings = n.GetObjectValue(global::ApiSdk.Models.JoinMeetingIdSettings.CreateFromDiscriminatorValue); } }, + { "joinWebUrl", n => { JoinWebUrl = n.GetStringValue(); } }, + { "lobbyBypassSettings", n => { LobbyBypassSettings = n.GetObjectValue(global::ApiSdk.Models.LobbyBypassSettings.CreateFromDiscriminatorValue); } }, + { "recordAutomatically", n => { RecordAutomatically = n.GetBoolValue(); } }, + { "shareMeetingChatHistoryDefault", n => { ShareMeetingChatHistoryDefault = n.GetEnumValue(); } }, + { "subject", n => { Subject = n.GetStringValue(); } }, + { "videoTeleconferenceId", n => { VideoTeleconferenceId = n.GetStringValue(); } }, + { "watermarkProtection", n => { WatermarkProtection = n.GetObjectValue(global::ApiSdk.Models.WatermarkProtectionValues.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteBoolValue("allowAttendeeToEnableCamera", AllowAttendeeToEnableCamera); + writer.WriteBoolValue("allowAttendeeToEnableMic", AllowAttendeeToEnableMic); + writer.WriteEnumValue("allowedPresenters", AllowedPresenters); + writer.WriteEnumValue("allowMeetingChat", AllowMeetingChat); + writer.WriteBoolValue("allowParticipantsToChangeName", AllowParticipantsToChangeName); + writer.WriteBoolValue("allowTeamworkReactions", AllowTeamworkReactions); + writer.WriteCollectionOfObjectValues("attendanceReports", AttendanceReports); + writer.WriteObjectValue("audioConferencing", AudioConferencing); + writer.WriteObjectValue("chatInfo", ChatInfo); + writer.WriteBoolValue("isEntryExitAnnounced", IsEntryExitAnnounced); + writer.WriteObjectValue("joinInformation", JoinInformation); + writer.WriteObjectValue("joinMeetingIdSettings", JoinMeetingIdSettings); + writer.WriteStringValue("joinWebUrl", JoinWebUrl); + writer.WriteObjectValue("lobbyBypassSettings", LobbyBypassSettings); + writer.WriteBoolValue("recordAutomatically", RecordAutomatically); + writer.WriteEnumValue("shareMeetingChatHistoryDefault", ShareMeetingChatHistoryDefault); + writer.WriteStringValue("subject", Subject); + writer.WriteStringValue("videoTeleconferenceId", VideoTeleconferenceId); + writer.WriteObjectValue("watermarkProtection", WatermarkProtection); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnlineMeetingInfo.cs b/src/sample/generated/Models/OnlineMeetingInfo.cs index e61a63b3..c7312629 100644 --- a/src/sample/generated/Models/OnlineMeetingInfo.cs +++ b/src/sample/generated/Models/OnlineMeetingInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OnlineMeetingInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OnlineMeetingInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The ID of the conference. @@ -27,10 +33,10 @@ public class OnlineMeetingInfo : IAdditionalDataHolder, IParsable { /// All of the phone numbers associated with this conference. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Phones { get; set; } + public List? Phones { get; set; } #nullable restore #else - public List Phones { get; set; } + public List Phones { get; set; } #endif /// The preformatted quick dial for this call. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -57,41 +63,48 @@ public class OnlineMeetingInfo : IAdditionalDataHolder, IParsable { public string TollNumber { get; set; } #endif /// - /// Instantiates a new onlineMeetingInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public OnlineMeetingInfo() { + public OnlineMeetingInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OnlineMeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OnlineMeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OnlineMeetingInfo(); + return new global::ApiSdk.Models.OnlineMeetingInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"conferenceId", n => { ConferenceId = n.GetStringValue(); } }, - {"joinUrl", n => { JoinUrl = n.GetStringValue(); } }, - {"phones", n => { Phones = n.GetCollectionOfObjectValues(Phone.CreateFromDiscriminatorValue)?.ToList(); } }, - {"quickDial", n => { QuickDial = n.GetStringValue(); } }, - {"tollFreeNumbers", n => { TollFreeNumbers = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"tollNumber", n => { TollNumber = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "conferenceId", n => { ConferenceId = n.GetStringValue(); } }, + { "joinUrl", n => { JoinUrl = n.GetStringValue(); } }, + { "phones", n => { Phones = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Phone.CreateFromDiscriminatorValue)?.AsList(); } }, + { "quickDial", n => { QuickDial = n.GetStringValue(); } }, + { "tollFreeNumbers", n => { TollFreeNumbers = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "tollNumber", n => { TollNumber = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("conferenceId", ConferenceId); writer.WriteStringValue("joinUrl", JoinUrl); - writer.WriteCollectionOfObjectValues("phones", Phones); + writer.WriteCollectionOfObjectValues("phones", Phones); writer.WriteStringValue("quickDial", QuickDial); writer.WriteCollectionOfPrimitiveValues("tollFreeNumbers", TollFreeNumbers); writer.WriteStringValue("tollNumber", TollNumber); @@ -99,3 +112,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OnlineMeetingPresenters.cs b/src/sample/generated/Models/OnlineMeetingPresenters.cs index 98e864b7..dcc3c4ea 100644 --- a/src/sample/generated/Models/OnlineMeetingPresenters.cs +++ b/src/sample/generated/Models/OnlineMeetingPresenters.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum OnlineMeetingPresenters { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum OnlineMeetingPresenters + #pragma warning restore CS1591 + { [EnumMember(Value = "everyone")] + #pragma warning disable CS1591 Everyone, + #pragma warning restore CS1591 [EnumMember(Value = "organization")] + #pragma warning disable CS1591 Organization, + #pragma warning restore CS1591 [EnumMember(Value = "roleIsPresenter")] + #pragma warning disable CS1591 RoleIsPresenter, + #pragma warning restore CS1591 [EnumMember(Value = "organizer")] + #pragma warning disable CS1591 Organizer, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/OnlineMeetingProviderType.cs b/src/sample/generated/Models/OnlineMeetingProviderType.cs index 149f7d46..88bbd5e6 100644 --- a/src/sample/generated/Models/OnlineMeetingProviderType.cs +++ b/src/sample/generated/Models/OnlineMeetingProviderType.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum OnlineMeetingProviderType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum OnlineMeetingProviderType + #pragma warning restore CS1591 + { [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 Unknown, + #pragma warning restore CS1591 [EnumMember(Value = "skypeForBusiness")] + #pragma warning disable CS1591 SkypeForBusiness, + #pragma warning restore CS1591 [EnumMember(Value = "skypeForConsumer")] + #pragma warning disable CS1591 SkypeForConsumer, + #pragma warning restore CS1591 [EnumMember(Value = "teamsForBusiness")] + #pragma warning disable CS1591 TeamsForBusiness, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/OnlineMeetingRole.cs b/src/sample/generated/Models/OnlineMeetingRole.cs index 65ee6a86..e25ee53e 100644 --- a/src/sample/generated/Models/OnlineMeetingRole.cs +++ b/src/sample/generated/Models/OnlineMeetingRole.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum OnlineMeetingRole { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum OnlineMeetingRole + #pragma warning restore CS1591 + { [EnumMember(Value = "attendee")] + #pragma warning disable CS1591 Attendee, + #pragma warning restore CS1591 [EnumMember(Value = "presenter")] + #pragma warning disable CS1591 Presenter, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 [EnumMember(Value = "producer")] + #pragma warning disable CS1591 Producer, + #pragma warning restore CS1591 [EnumMember(Value = "coorganizer")] + #pragma warning disable CS1591 Coorganizer, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/OpenShift.cs b/src/sample/generated/Models/OpenShift.cs index 7a28aa5c..3660b605 100644 --- a/src/sample/generated/Models/OpenShift.cs +++ b/src/sample/generated/Models/OpenShift.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OpenShift : ChangeTrackedEntity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OpenShift : global::ApiSdk.Models.ChangeTrackedEntity, IParsable + #pragma warning restore CS1591 + { /// The draftOpenShift property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public OpenShiftItem? DraftOpenShift { get; set; } + public global::ApiSdk.Models.OpenShiftItem? DraftOpenShift { get; set; } #nullable restore #else - public OpenShiftItem DraftOpenShift { get; set; } + public global::ApiSdk.Models.OpenShiftItem DraftOpenShift { get; set; } #endif /// ID for the scheduling group that the open shift belongs to. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,39 +31,46 @@ public class OpenShift : ChangeTrackedEntity, IParsable { /// The sharedOpenShift property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public OpenShiftItem? SharedOpenShift { get; set; } + public global::ApiSdk.Models.OpenShiftItem? SharedOpenShift { get; set; } #nullable restore #else - public OpenShiftItem SharedOpenShift { get; set; } + public global::ApiSdk.Models.OpenShiftItem SharedOpenShift { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OpenShift CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OpenShift CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OpenShift(); + return new global::ApiSdk.Models.OpenShift(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"draftOpenShift", n => { DraftOpenShift = n.GetObjectValue(OpenShiftItem.CreateFromDiscriminatorValue); } }, - {"schedulingGroupId", n => { SchedulingGroupId = n.GetStringValue(); } }, - {"sharedOpenShift", n => { SharedOpenShift = n.GetObjectValue(OpenShiftItem.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "draftOpenShift", n => { DraftOpenShift = n.GetObjectValue(global::ApiSdk.Models.OpenShiftItem.CreateFromDiscriminatorValue); } }, + { "schedulingGroupId", n => { SchedulingGroupId = n.GetStringValue(); } }, + { "sharedOpenShift", n => { SharedOpenShift = n.GetObjectValue(global::ApiSdk.Models.OpenShiftItem.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("draftOpenShift", DraftOpenShift); + writer.WriteObjectValue("draftOpenShift", DraftOpenShift); writer.WriteStringValue("schedulingGroupId", SchedulingGroupId); - writer.WriteObjectValue("sharedOpenShift", SharedOpenShift); + writer.WriteObjectValue("sharedOpenShift", SharedOpenShift); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OpenShiftChangeRequest.cs b/src/sample/generated/Models/OpenShiftChangeRequest.cs index d8b23928..df0358d0 100644 --- a/src/sample/generated/Models/OpenShiftChangeRequest.cs +++ b/src/sample/generated/Models/OpenShiftChangeRequest.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OpenShiftChangeRequest : ScheduleChangeRequest, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OpenShiftChangeRequest : global::ApiSdk.Models.ScheduleChangeRequest, IParsable + #pragma warning restore CS1591 + { /// ID for the open shift. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class OpenShiftChangeRequest : ScheduleChangeRequest, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OpenShiftChangeRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OpenShiftChangeRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OpenShiftChangeRequest(); + return new global::ApiSdk.Models.OpenShiftChangeRequest(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"openShiftId", n => { OpenShiftId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "openShiftId", n => { OpenShiftId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("openShiftId", OpenShiftId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OpenShiftItem.cs b/src/sample/generated/Models/OpenShiftItem.cs index 4129e639..55055ba0 100644 --- a/src/sample/generated/Models/OpenShiftItem.cs +++ b/src/sample/generated/Models/OpenShiftItem.cs @@ -1,37 +1,50 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OpenShiftItem : ShiftItem, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OpenShiftItem : global::ApiSdk.Models.ShiftItem, IParsable + #pragma warning restore CS1591 + { /// Count of the number of slots for the given open shift. public int? OpenSlotCount { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OpenShiftItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OpenShiftItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OpenShiftItem(); + return new global::ApiSdk.Models.OpenShiftItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"openSlotCount", n => { OpenSlotCount = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "openSlotCount", n => { OpenSlotCount = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("openSlotCount", OpenSlotCount); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Operation.cs b/src/sample/generated/Models/Operation.cs index bc36acba..25e03a10 100644 --- a/src/sample/generated/Models/Operation.cs +++ b/src/sample/generated/Models/Operation.cs @@ -1,45 +1,58 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Operation : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Operation : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The start time of the operation. public DateTimeOffset? CreatedDateTime { get; set; } /// The time of the last action of the operation. public DateTimeOffset? LastActionDateTime { get; set; } /// The status property - public OperationStatus? Status { get; set; } + public global::ApiSdk.Models.OperationStatus? Status { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Operation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Operation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Operation(); + return new global::ApiSdk.Models.Operation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastActionDateTime", n => { LastActionDateTime = n.GetDateTimeOffsetValue(); } }, - {"status", n => { Status = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastActionDateTime", n => { LastActionDateTime = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastActionDateTime", LastActionDateTime); - writer.WriteEnumValue("status", Status); + writer.WriteEnumValue("status", Status); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OperationError.cs b/src/sample/generated/Models/OperationError.cs index ec3860ed..bd37bada 100644 --- a/src/sample/generated/Models/OperationError.cs +++ b/src/sample/generated/Models/OperationError.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OperationError : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OperationError : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Operation error code. @@ -25,33 +31,40 @@ public class OperationError : IAdditionalDataHolder, IParsable { public string Message { get; set; } #endif /// - /// Instantiates a new operationError and sets the default values. + /// Instantiates a new and sets the default values. /// - public OperationError() { + public OperationError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OperationError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OperationError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OperationError(); + return new global::ApiSdk.Models.OperationError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"message", n => { Message = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OperationStatus.cs b/src/sample/generated/Models/OperationStatus.cs index cdf4b9f7..91c8936c 100644 --- a/src/sample/generated/Models/OperationStatus.cs +++ b/src/sample/generated/Models/OperationStatus.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum OperationStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum OperationStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "NotStarted")] + #pragma warning disable CS1591 NotStarted, + #pragma warning restore CS1591 [EnumMember(Value = "Running")] + #pragma warning disable CS1591 Running, + #pragma warning restore CS1591 [EnumMember(Value = "Completed")] + #pragma warning disable CS1591 Completed, + #pragma warning restore CS1591 [EnumMember(Value = "Failed")] + #pragma warning disable CS1591 Failed, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/OptionalClaim.cs b/src/sample/generated/Models/OptionalClaim.cs index f1f59b09..1a164b03 100644 --- a/src/sample/generated/Models/OptionalClaim.cs +++ b/src/sample/generated/Models/OptionalClaim.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OptionalClaim : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OptionalClaim : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Additional properties of the claim. If a property exists in this collection, it modifies the behavior of the optional claim specified in the name property. @@ -35,35 +41,42 @@ public class OptionalClaim : IAdditionalDataHolder, IParsable { public string Source { get; set; } #endif /// - /// Instantiates a new optionalClaim and sets the default values. + /// Instantiates a new and sets the default values. /// - public OptionalClaim() { + public OptionalClaim() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OptionalClaim CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OptionalClaim CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OptionalClaim(); + return new global::ApiSdk.Models.OptionalClaim(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"additionalProperties", n => { AdditionalProperties = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"essential", n => { Essential = n.GetBoolValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"source", n => { Source = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "additionalProperties", n => { AdditionalProperties = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "essential", n => { Essential = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "source", n => { Source = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("additionalProperties", AdditionalProperties); writer.WriteBoolValue("essential", Essential); @@ -73,3 +86,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OptionalClaims.cs b/src/sample/generated/Models/OptionalClaims.cs index 82336a89..020230a8 100644 --- a/src/sample/generated/Models/OptionalClaims.cs +++ b/src/sample/generated/Models/OptionalClaims.cs @@ -1,71 +1,85 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OptionalClaims : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OptionalClaims : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// The optional claims returned in the JWT access token. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AccessToken { get; set; } + public List? AccessToken { get; set; } #nullable restore #else - public List AccessToken { get; set; } + public List AccessToken { get; set; } #endif /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The optional claims returned in the JWT ID token. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? IdToken { get; set; } + public List? IdToken { get; set; } #nullable restore #else - public List IdToken { get; set; } + public List IdToken { get; set; } #endif /// The optional claims returned in the SAML token. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Saml2Token { get; set; } + public List? Saml2Token { get; set; } #nullable restore #else - public List Saml2Token { get; set; } + public List Saml2Token { get; set; } #endif /// - /// Instantiates a new optionalClaims and sets the default values. + /// Instantiates a new and sets the default values. /// - public OptionalClaims() { + public OptionalClaims() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OptionalClaims CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OptionalClaims CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OptionalClaims(); + return new global::ApiSdk.Models.OptionalClaims(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"accessToken", n => { AccessToken = n.GetCollectionOfObjectValues(OptionalClaim.CreateFromDiscriminatorValue)?.ToList(); } }, - {"idToken", n => { IdToken = n.GetCollectionOfObjectValues(OptionalClaim.CreateFromDiscriminatorValue)?.ToList(); } }, - {"saml2Token", n => { Saml2Token = n.GetCollectionOfObjectValues(OptionalClaim.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "accessToken", n => { AccessToken = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OptionalClaim.CreateFromDiscriminatorValue)?.AsList(); } }, + { "idToken", n => { IdToken = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OptionalClaim.CreateFromDiscriminatorValue)?.AsList(); } }, + { "saml2Token", n => { Saml2Token = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OptionalClaim.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("accessToken", AccessToken); - writer.WriteCollectionOfObjectValues("idToken", IdToken); - writer.WriteCollectionOfObjectValues("saml2Token", Saml2Token); + writer.WriteCollectionOfObjectValues("accessToken", AccessToken); + writer.WriteCollectionOfObjectValues("idToken", IdToken); + writer.WriteCollectionOfObjectValues("saml2Token", Saml2Token); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OrgContact.cs b/src/sample/generated/Models/OrgContact.cs index 913a38a7..d0f810c3 100644 --- a/src/sample/generated/Models/OrgContact.cs +++ b/src/sample/generated/Models/OrgContact.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OrgContact : DirectoryObject, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrgContact : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { /// Postal addresses for this organizational contact. For now a contact can only have one physical address. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Addresses { get; set; } + public List? Addresses { get; set; } #nullable restore #else - public List Addresses { get; set; } + public List Addresses { get; set; } #endif /// Name of the company that this organizational contact belongs to. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,10 +39,10 @@ public class OrgContact : DirectoryObject, IParsable { /// The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DirectReports { get; set; } + public List? DirectReports { get; set; } #nullable restore #else - public List DirectReports { get; set; } + public List DirectReports { get; set; } #endif /// Display name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values), $search, and $orderby. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -62,7 +68,7 @@ public class OrgContact : DirectoryObject, IParsable { #else public string JobTitle { get; set; } #endif - /// The SMTP address for the contact, for example, 'jeff@contoso.onmicrosoft.com'. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). + /// The SMTP address for the contact, for example, 'jeff@contoso.com'. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Mail { get; set; } @@ -81,38 +87,38 @@ public class OrgContact : DirectoryObject, IParsable { /// The manager property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DirectoryObject? Manager { get; set; } + public global::ApiSdk.Models.DirectoryObject? Manager { get; set; } #nullable restore #else - public DirectoryObject Manager { get; set; } + public global::ApiSdk.Models.DirectoryObject Manager { get; set; } #endif /// Groups that this contact is a member of. Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MemberOf { get; set; } + public List? MemberOf { get; set; } #nullable restore #else - public List MemberOf { get; set; } + public List MemberOf { get; set; } #endif /// Date and time when this organizational contact was last synchronized from on-premises AD. This date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, not, ge, le, in). public DateTimeOffset? OnPremisesLastSyncDateTime { get; set; } /// List of any synchronization provisioning errors for this organizational contact. Supports $filter (eq, not for category and propertyCausingError), /$count eq 0, /$count ne 0. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OnPremisesProvisioningErrors { get; set; } + public List? OnPremisesProvisioningErrors { get; set; } #nullable restore #else - public List OnPremisesProvisioningErrors { get; set; } + public List OnPremisesProvisioningErrors { get; set; } #endif /// true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced and now mastered in Exchange; null if this object has never been synced from an on-premises directory (default). Supports $filter (eq, ne, not, in, and eq for null values). public bool? OnPremisesSyncEnabled { get; set; } /// List of phones for this organizational contact. Phone types can be mobile, business, and businessFax. Only one of each type can ever be present in the collection. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Phones { get; set; } + public List? Phones { get; set; } #nullable restore #else - public List Phones { get; set; } + public List Phones { get; set; } #endif /// For example: 'SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com'. The any operator is required for filter expressions on multi-valued properties. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -122,13 +128,13 @@ public class OrgContact : DirectoryObject, IParsable { #else public List ProxyAddresses { get; set; } #endif - /// The serviceProvisioningErrors property + /// Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from an organizational contact object . Supports $filter (eq, not, for isResolved and serviceInstance). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ServiceProvisioningErrors { get; set; } + public List? ServiceProvisioningErrors { get; set; } #nullable restore #else - public List ServiceProvisioningErrors { get; set; } + public List ServiceProvisioningErrors { get; set; } #endif /// Last name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -141,71 +147,78 @@ public class OrgContact : DirectoryObject, IParsable { /// Groups that this contact is a member of, including groups that the contact is nested under. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TransitiveMemberOf { get; set; } + public List? TransitiveMemberOf { get; set; } #nullable restore #else - public List TransitiveMemberOf { get; set; } + public List TransitiveMemberOf { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OrgContact CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OrgContact CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OrgContact(); + return new global::ApiSdk.Models.OrgContact(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"addresses", n => { Addresses = n.GetCollectionOfObjectValues(PhysicalOfficeAddress.CreateFromDiscriminatorValue)?.ToList(); } }, - {"companyName", n => { CompanyName = n.GetStringValue(); } }, - {"department", n => { Department = n.GetStringValue(); } }, - {"directReports", n => { DirectReports = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"givenName", n => { GivenName = n.GetStringValue(); } }, - {"jobTitle", n => { JobTitle = n.GetStringValue(); } }, - {"mail", n => { Mail = n.GetStringValue(); } }, - {"mailNickname", n => { MailNickname = n.GetStringValue(); } }, - {"manager", n => { Manager = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, - {"memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"onPremisesLastSyncDateTime", n => { OnPremisesLastSyncDateTime = n.GetDateTimeOffsetValue(); } }, - {"onPremisesProvisioningErrors", n => { OnPremisesProvisioningErrors = n.GetCollectionOfObjectValues(OnPremisesProvisioningError.CreateFromDiscriminatorValue)?.ToList(); } }, - {"onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, - {"phones", n => { Phones = n.GetCollectionOfObjectValues(Phone.CreateFromDiscriminatorValue)?.ToList(); } }, - {"proxyAddresses", n => { ProxyAddresses = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"serviceProvisioningErrors", n => { ServiceProvisioningErrors = n.GetCollectionOfObjectValues(ServiceProvisioningError.CreateFromDiscriminatorValue)?.ToList(); } }, - {"surname", n => { Surname = n.GetStringValue(); } }, - {"transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "addresses", n => { Addresses = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PhysicalOfficeAddress.CreateFromDiscriminatorValue)?.AsList(); } }, + { "companyName", n => { CompanyName = n.GetStringValue(); } }, + { "department", n => { Department = n.GetStringValue(); } }, + { "directReports", n => { DirectReports = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "givenName", n => { GivenName = n.GetStringValue(); } }, + { "jobTitle", n => { JobTitle = n.GetStringValue(); } }, + { "mail", n => { Mail = n.GetStringValue(); } }, + { "mailNickname", n => { MailNickname = n.GetStringValue(); } }, + { "manager", n => { Manager = n.GetObjectValue(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue); } }, + { "memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "onPremisesLastSyncDateTime", n => { OnPremisesLastSyncDateTime = n.GetDateTimeOffsetValue(); } }, + { "onPremisesProvisioningErrors", n => { OnPremisesProvisioningErrors = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnPremisesProvisioningError.CreateFromDiscriminatorValue)?.AsList(); } }, + { "onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, + { "phones", n => { Phones = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Phone.CreateFromDiscriminatorValue)?.AsList(); } }, + { "proxyAddresses", n => { ProxyAddresses = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "serviceProvisioningErrors", n => { ServiceProvisioningErrors = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ServiceProvisioningError.CreateFromDiscriminatorValue)?.AsList(); } }, + { "surname", n => { Surname = n.GetStringValue(); } }, + { "transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("addresses", Addresses); + writer.WriteCollectionOfObjectValues("addresses", Addresses); writer.WriteStringValue("companyName", CompanyName); writer.WriteStringValue("department", Department); - writer.WriteCollectionOfObjectValues("directReports", DirectReports); + writer.WriteCollectionOfObjectValues("directReports", DirectReports); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("givenName", GivenName); writer.WriteStringValue("jobTitle", JobTitle); writer.WriteStringValue("mail", Mail); writer.WriteStringValue("mailNickname", MailNickname); - writer.WriteObjectValue("manager", Manager); - writer.WriteCollectionOfObjectValues("memberOf", MemberOf); + writer.WriteObjectValue("manager", Manager); + writer.WriteCollectionOfObjectValues("memberOf", MemberOf); writer.WriteDateTimeOffsetValue("onPremisesLastSyncDateTime", OnPremisesLastSyncDateTime); - writer.WriteCollectionOfObjectValues("onPremisesProvisioningErrors", OnPremisesProvisioningErrors); + writer.WriteCollectionOfObjectValues("onPremisesProvisioningErrors", OnPremisesProvisioningErrors); writer.WriteBoolValue("onPremisesSyncEnabled", OnPremisesSyncEnabled); - writer.WriteCollectionOfObjectValues("phones", Phones); + writer.WriteCollectionOfObjectValues("phones", Phones); writer.WriteCollectionOfPrimitiveValues("proxyAddresses", ProxyAddresses); - writer.WriteCollectionOfObjectValues("serviceProvisioningErrors", ServiceProvisioningErrors); + writer.WriteCollectionOfObjectValues("serviceProvisioningErrors", ServiceProvisioningErrors); writer.WriteStringValue("surname", Surname); - writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); + writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OrgContactCollectionResponse.cs b/src/sample/generated/Models/OrgContactCollectionResponse.cs index fb800147..65024279 100644 --- a/src/sample/generated/Models/OrgContactCollectionResponse.cs +++ b/src/sample/generated/Models/OrgContactCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OrgContactCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OrgContactCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class OrgContactCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new orgContactCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public OrgContactCollectionResponse() { + public OrgContactCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OrgContactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OrgContactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OrgContactCollectionResponse(); + return new global::ApiSdk.Models.OrgContactCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(OrgContact.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OrgContact.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OutlookCategory.cs b/src/sample/generated/Models/OutlookCategory.cs index fb5b9de2..089a68e4 100644 --- a/src/sample/generated/Models/OutlookCategory.cs +++ b/src/sample/generated/Models/OutlookCategory.cs @@ -1,13 +1,19 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OutlookCategory : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OutlookCategory : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The color property - public CategoryColor? Color { get; set; } + public global::ApiSdk.Models.CategoryColor? Color { get; set; } /// A unique name that identifies a category in the user's mailbox. After a category is created, the name cannot be changed. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,29 +25,36 @@ public class OutlookCategory : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OutlookCategory CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OutlookCategory CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OutlookCategory(); + return new global::ApiSdk.Models.OutlookCategory(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"color", n => { Color = n.GetEnumValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "color", n => { Color = n.GetEnumValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("color", Color); + writer.WriteEnumValue("color", Color); writer.WriteStringValue("displayName", DisplayName); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OutlookCategoryCollectionResponse.cs b/src/sample/generated/Models/OutlookCategoryCollectionResponse.cs index 859b6f65..a8d75303 100644 --- a/src/sample/generated/Models/OutlookCategoryCollectionResponse.cs +++ b/src/sample/generated/Models/OutlookCategoryCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OutlookCategoryCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OutlookCategoryCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class OutlookCategoryCollectionResponse : IAdditionalDataHolder, IParsabl /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new outlookCategoryCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public OutlookCategoryCollectionResponse() { + public OutlookCategoryCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OutlookCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OutlookCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OutlookCategoryCollectionResponse(); + return new global::ApiSdk.Models.OutlookCategoryCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(OutlookCategory.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OutlookCategory.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OutlookGeoCoordinates.cs b/src/sample/generated/Models/OutlookGeoCoordinates.cs index 24fe7fea..b5844ea4 100644 --- a/src/sample/generated/Models/OutlookGeoCoordinates.cs +++ b/src/sample/generated/Models/OutlookGeoCoordinates.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OutlookGeoCoordinates : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OutlookGeoCoordinates : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// The accuracy of the latitude and longitude. As an example, the accuracy can be measured in meters, such as the latitude and longitude are accurate to within 50 meters. public double? Accuracy { get; set; } /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @@ -19,36 +25,43 @@ public class OutlookGeoCoordinates : IAdditionalDataHolder, IParsable { /// The longitude of the location. public double? Longitude { get; set; } /// - /// Instantiates a new outlookGeoCoordinates and sets the default values. + /// Instantiates a new and sets the default values. /// - public OutlookGeoCoordinates() { + public OutlookGeoCoordinates() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static OutlookGeoCoordinates CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.OutlookGeoCoordinates CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OutlookGeoCoordinates(); + return new global::ApiSdk.Models.OutlookGeoCoordinates(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"accuracy", n => { Accuracy = n.GetDoubleValue(); } }, - {"altitude", n => { Altitude = n.GetDoubleValue(); } }, - {"altitudeAccuracy", n => { AltitudeAccuracy = n.GetDoubleValue(); } }, - {"latitude", n => { Latitude = n.GetDoubleValue(); } }, - {"longitude", n => { Longitude = n.GetDoubleValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "accuracy", n => { Accuracy = n.GetDoubleValue(); } }, + { "altitude", n => { Altitude = n.GetDoubleValue(); } }, + { "altitudeAccuracy", n => { AltitudeAccuracy = n.GetDoubleValue(); } }, + { "latitude", n => { Latitude = n.GetDoubleValue(); } }, + { "longitude", n => { Longitude = n.GetDoubleValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDoubleValue("accuracy", Accuracy); writer.WriteDoubleValue("altitude", Altitude); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OutlookItem.cs b/src/sample/generated/Models/OutlookItem.cs index 9ca5b18e..b1177446 100644 --- a/src/sample/generated/Models/OutlookItem.cs +++ b/src/sample/generated/Models/OutlookItem.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OutlookItem : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OutlookItem : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The categories associated with the item #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -29,27 +35,33 @@ public class OutlookItem : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OutlookItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OutlookItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OutlookItem(); + return new global::ApiSdk.Models.OutlookItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"categories", n => { Categories = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"changeKey", n => { ChangeKey = n.GetStringValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "categories", n => { Categories = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "changeKey", n => { ChangeKey = n.GetStringValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("categories", Categories); @@ -59,3 +71,4 @@ public class OutlookItem : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/OutlookUser.cs b/src/sample/generated/Models/OutlookUser.cs index 08d763d4..edec540a 100644 --- a/src/sample/generated/Models/OutlookUser.cs +++ b/src/sample/generated/Models/OutlookUser.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class OutlookUser : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class OutlookUser : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// A list of categories defined for the user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MasterCategories { get; set; } + public List? MasterCategories { get; set; } #nullable restore #else - public List MasterCategories { get; set; } + public List MasterCategories { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new OutlookUser CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.OutlookUser CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new OutlookUser(); + return new global::ApiSdk.Models.OutlookUser(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"masterCategories", n => { MasterCategories = n.GetCollectionOfObjectValues(OutlookCategory.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "masterCategories", n => { MasterCategories = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OutlookCategory.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("masterCategories", MasterCategories); + writer.WriteCollectionOfObjectValues("masterCategories", MasterCategories); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Package.cs b/src/sample/generated/Models/Package.cs index 1bde300c..66f1ff68 100644 --- a/src/sample/generated/Models/Package.cs +++ b/src/sample/generated/Models/Package.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Package : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Package : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A string indicating the type of package. While oneNote is the only currently defined value, you should expect other package types to be returned and handle them accordingly. @@ -17,35 +23,43 @@ public class Package : IAdditionalDataHolder, IParsable { public string Type { get; set; } #endif /// - /// Instantiates a new package and sets the default values. + /// Instantiates a new and sets the default values. /// - public Package() { + public Package() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Package CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Package CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Package(); + return new global::ApiSdk.Models.Package(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"type", n => { Type = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "type", n => { Type = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PageLayoutType.cs b/src/sample/generated/Models/PageLayoutType.cs new file mode 100644 index 00000000..a6826968 --- /dev/null +++ b/src/sample/generated/Models/PageLayoutType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PageLayoutType + #pragma warning restore CS1591 + { + [EnumMember(Value = "microsoftReserved")] + #pragma warning disable CS1591 + MicrosoftReserved, + #pragma warning restore CS1591 + [EnumMember(Value = "article")] + #pragma warning disable CS1591 + Article, + #pragma warning restore CS1591 + [EnumMember(Value = "home")] + #pragma warning disable CS1591 + Home, + #pragma warning restore CS1591 + [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 + UnknownFutureValue, + #pragma warning restore CS1591 + } +} diff --git a/src/sample/generated/Models/PageLinks.cs b/src/sample/generated/Models/PageLinks.cs index b8251c94..4645fc15 100644 --- a/src/sample/generated/Models/PageLinks.cs +++ b/src/sample/generated/Models/PageLinks.cs @@ -1,61 +1,75 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PageLinks : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PageLinks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The oneNoteClientUrl property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ExternalLink? OneNoteClientUrl { get; set; } + public global::ApiSdk.Models.ExternalLink? OneNoteClientUrl { get; set; } #nullable restore #else - public ExternalLink OneNoteClientUrl { get; set; } + public global::ApiSdk.Models.ExternalLink OneNoteClientUrl { get; set; } #endif /// The oneNoteWebUrl property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ExternalLink? OneNoteWebUrl { get; set; } + public global::ApiSdk.Models.ExternalLink? OneNoteWebUrl { get; set; } #nullable restore #else - public ExternalLink OneNoteWebUrl { get; set; } + public global::ApiSdk.Models.ExternalLink OneNoteWebUrl { get; set; } #endif /// - /// Instantiates a new pageLinks and sets the default values. + /// Instantiates a new and sets the default values. /// - public PageLinks() { + public PageLinks() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PageLinks CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PageLinks CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PageLinks(); + return new global::ApiSdk.Models.PageLinks(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"oneNoteClientUrl", n => { OneNoteClientUrl = n.GetObjectValue(ExternalLink.CreateFromDiscriminatorValue); } }, - {"oneNoteWebUrl", n => { OneNoteWebUrl = n.GetObjectValue(ExternalLink.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "oneNoteClientUrl", n => { OneNoteClientUrl = n.GetObjectValue(global::ApiSdk.Models.ExternalLink.CreateFromDiscriminatorValue); } }, + { "oneNoteWebUrl", n => { OneNoteWebUrl = n.GetObjectValue(global::ApiSdk.Models.ExternalLink.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); - writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); + writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); + writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ParentalControlSettings.cs b/src/sample/generated/Models/ParentalControlSettings.cs index c873b9ad..c73649b3 100644 --- a/src/sample/generated/Models/ParentalControlSettings.cs +++ b/src/sample/generated/Models/ParentalControlSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ParentalControlSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ParentalControlSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Specifies the two-letter ISO country codes. Access to the application will be blocked for minors from the countries specified in this list. @@ -25,33 +31,40 @@ public class ParentalControlSettings : IAdditionalDataHolder, IParsable { public string LegalAgeGroupRule { get; set; } #endif /// - /// Instantiates a new parentalControlSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public ParentalControlSettings() { + public ParentalControlSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ParentalControlSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ParentalControlSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ParentalControlSettings(); + return new global::ApiSdk.Models.ParentalControlSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"countriesBlockedForMinors", n => { CountriesBlockedForMinors = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"legalAgeGroupRule", n => { LegalAgeGroupRule = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "countriesBlockedForMinors", n => { CountriesBlockedForMinors = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "legalAgeGroupRule", n => { LegalAgeGroupRule = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("countriesBlockedForMinors", CountriesBlockedForMinors); writer.WriteStringValue("legalAgeGroupRule", LegalAgeGroupRule); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PasswordAuthenticationMethod.cs b/src/sample/generated/Models/PasswordAuthenticationMethod.cs index 23de9d96..518b300d 100644 --- a/src/sample/generated/Models/PasswordAuthenticationMethod.cs +++ b/src/sample/generated/Models/PasswordAuthenticationMethod.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PasswordAuthenticationMethod : AuthenticationMethod, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PasswordAuthenticationMethod : global::ApiSdk.Models.AuthenticationMethod, IParsable + #pragma warning restore CS1591 + { /// The date and time when this password was last updated. This property is currently not populated. Read-only. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? CreatedDateTime { get; set; } /// For security, the password is always returned as null from a LIST or GET operation. @@ -19,25 +25,31 @@ public class PasswordAuthenticationMethod : AuthenticationMethod, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PasswordAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PasswordAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PasswordAuthenticationMethod(); + return new global::ApiSdk.Models.PasswordAuthenticationMethod(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"password", n => { Password = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "password", n => { Password = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); @@ -45,3 +57,4 @@ public class PasswordAuthenticationMethod : AuthenticationMethod, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PasswordCredential.cs b/src/sample/generated/Models/PasswordCredential.cs index 10817bf1..c0416b02 100644 --- a/src/sample/generated/Models/PasswordCredential.cs +++ b/src/sample/generated/Models/PasswordCredential.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PasswordCredential : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PasswordCredential : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Do not use. @@ -36,7 +42,7 @@ public class PasswordCredential : IAdditionalDataHolder, IParsable { #endif /// The unique identifier for the password. public Guid? KeyId { get; set; } - /// Read-only; Contains the strong passwords generated by Azure AD that are 16-64 characters in length. The generated password value is only returned during the initial POST request to addPassword. There is no way to retrieve this password in the future. + /// Read-only; Contains the strong passwords generated by Microsoft Entra ID that are 16-64 characters in length. The generated password value is only returned during the initial POST request to addPassword. There is no way to retrieve this password in the future. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SecretText { get; set; } @@ -47,38 +53,45 @@ public class PasswordCredential : IAdditionalDataHolder, IParsable { /// The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. public DateTimeOffset? StartDateTime { get; set; } /// - /// Instantiates a new passwordCredential and sets the default values. + /// Instantiates a new and sets the default values. /// - public PasswordCredential() { + public PasswordCredential() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PasswordCredential CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PasswordCredential CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PasswordCredential(); + return new global::ApiSdk.Models.PasswordCredential(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"customKeyIdentifier", n => { CustomKeyIdentifier = n.GetByteArrayValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, - {"hint", n => { Hint = n.GetStringValue(); } }, - {"keyId", n => { KeyId = n.GetGuidValue(); } }, - {"secretText", n => { SecretText = n.GetStringValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "customKeyIdentifier", n => { CustomKeyIdentifier = n.GetByteArrayValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + { "hint", n => { Hint = n.GetStringValue(); } }, + { "keyId", n => { KeyId = n.GetGuidValue(); } }, + { "secretText", n => { SecretText = n.GetStringValue(); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("customKeyIdentifier", CustomKeyIdentifier); writer.WriteStringValue("displayName", DisplayName); @@ -91,3 +104,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PasswordCredentialConfiguration.cs b/src/sample/generated/Models/PasswordCredentialConfiguration.cs index 662d5765..07a78134 100644 --- a/src/sample/generated/Models/PasswordCredentialConfiguration.cs +++ b/src/sample/generated/Models/PasswordCredentialConfiguration.cs @@ -1,53 +1,67 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PasswordCredentialConfiguration : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PasswordCredentialConfiguration : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The maxLifetime property + /// Value that can be used as the maximum number for setting password expiration time in days, hours, minutes or seconds. Defined in ISO 8601 format for Durations. For example, 'P4DT12H30M5S' represents a duration of four days, twelve hours, thirty minutes, and five seconds. This property is required when restriction type is set to passwordLifetime. public TimeSpan? MaxLifetime { get; set; } /// Enforces the policy for an app created on or after the enforcement date. For existing applications, the enforcement date would be back dated. To apply to all applications, enforcement datetime would be null. public DateTimeOffset? RestrictForAppsCreatedAfterDateTime { get; set; } /// The restrictionType property - public AppCredentialRestrictionType? RestrictionType { get; set; } + public global::ApiSdk.Models.AppCredentialRestrictionType? RestrictionType { get; set; } /// - /// Instantiates a new passwordCredentialConfiguration and sets the default values. + /// Instantiates a new and sets the default values. /// - public PasswordCredentialConfiguration() { + public PasswordCredentialConfiguration() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PasswordCredentialConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PasswordCredentialConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PasswordCredentialConfiguration(); + return new global::ApiSdk.Models.PasswordCredentialConfiguration(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"maxLifetime", n => { MaxLifetime = n.GetTimeSpanValue(); } }, - {"restrictForAppsCreatedAfterDateTime", n => { RestrictForAppsCreatedAfterDateTime = n.GetDateTimeOffsetValue(); } }, - {"restrictionType", n => { RestrictionType = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "maxLifetime", n => { MaxLifetime = n.GetTimeSpanValue(); } }, + { "restrictForAppsCreatedAfterDateTime", n => { RestrictForAppsCreatedAfterDateTime = n.GetDateTimeOffsetValue(); } }, + { "restrictionType", n => { RestrictionType = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteTimeSpanValue("maxLifetime", MaxLifetime); writer.WriteDateTimeOffsetValue("restrictForAppsCreatedAfterDateTime", RestrictForAppsCreatedAfterDateTime); - writer.WriteEnumValue("restrictionType", RestrictionType); + writer.WriteEnumValue("restrictionType", RestrictionType); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PasswordProfile.cs b/src/sample/generated/Models/PasswordProfile.cs index 1c8c7a67..cf7c045f 100644 --- a/src/sample/generated/Models/PasswordProfile.cs +++ b/src/sample/generated/Models/PasswordProfile.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PasswordProfile : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PasswordProfile : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// true if the user must change her password on the next login; otherwise false. + /// true if the user must change their password on the next sign-in; otherwise false. public bool? ForceChangePasswordNextSignIn { get; set; } - /// If true, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. + /// If true, at next sign-in, the user must perform a multifactor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multifactor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. public bool? ForceChangePasswordNextSignInWithMfa { get; set; } - /// The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required. + /// The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next sign-in. The password must satisfy minimum requirements as specified by the user's passwordPolicies property. By default, a strong password is required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Password { get; set; } @@ -21,34 +27,41 @@ public class PasswordProfile : IAdditionalDataHolder, IParsable { public string Password { get; set; } #endif /// - /// Instantiates a new passwordProfile and sets the default values. + /// Instantiates a new and sets the default values. /// - public PasswordProfile() { + public PasswordProfile() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PasswordProfile CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PasswordProfile CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PasswordProfile(); + return new global::ApiSdk.Models.PasswordProfile(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"forceChangePasswordNextSignIn", n => { ForceChangePasswordNextSignIn = n.GetBoolValue(); } }, - {"forceChangePasswordNextSignInWithMfa", n => { ForceChangePasswordNextSignInWithMfa = n.GetBoolValue(); } }, - {"password", n => { Password = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "forceChangePasswordNextSignIn", n => { ForceChangePasswordNextSignIn = n.GetBoolValue(); } }, + { "forceChangePasswordNextSignInWithMfa", n => { ForceChangePasswordNextSignInWithMfa = n.GetBoolValue(); } }, + { "password", n => { Password = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("forceChangePasswordNextSignIn", ForceChangePasswordNextSignIn); writer.WriteBoolValue("forceChangePasswordNextSignInWithMfa", ForceChangePasswordNextSignInWithMfa); @@ -57,3 +70,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PatternedRecurrence.cs b/src/sample/generated/Models/PatternedRecurrence.cs index 8b6b6306..24d2061d 100644 --- a/src/sample/generated/Models/PatternedRecurrence.cs +++ b/src/sample/generated/Models/PatternedRecurrence.cs @@ -1,61 +1,75 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PatternedRecurrence : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PatternedRecurrence : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The pattern property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RecurrencePattern? Pattern { get; set; } + public global::ApiSdk.Models.RecurrencePattern? Pattern { get; set; } #nullable restore #else - public RecurrencePattern Pattern { get; set; } + public global::ApiSdk.Models.RecurrencePattern Pattern { get; set; } #endif /// The range property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RecurrenceRange? Range { get; set; } + public global::ApiSdk.Models.RecurrenceRange? Range { get; set; } #nullable restore #else - public RecurrenceRange Range { get; set; } + public global::ApiSdk.Models.RecurrenceRange Range { get; set; } #endif /// - /// Instantiates a new patternedRecurrence and sets the default values. + /// Instantiates a new and sets the default values. /// - public PatternedRecurrence() { + public PatternedRecurrence() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PatternedRecurrence CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PatternedRecurrence CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PatternedRecurrence(); + return new global::ApiSdk.Models.PatternedRecurrence(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"pattern", n => { Pattern = n.GetObjectValue(RecurrencePattern.CreateFromDiscriminatorValue); } }, - {"range", n => { Range = n.GetObjectValue(RecurrenceRange.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pattern", n => { Pattern = n.GetObjectValue(global::ApiSdk.Models.RecurrencePattern.CreateFromDiscriminatorValue); } }, + { "range", n => { Range = n.GetObjectValue(global::ApiSdk.Models.RecurrenceRange.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("pattern", Pattern); - writer.WriteObjectValue("range", Range); + writer.WriteObjectValue("pattern", Pattern); + writer.WriteObjectValue("range", Range); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PendingContentUpdate.cs b/src/sample/generated/Models/PendingContentUpdate.cs index 812765e1..7542b771 100644 --- a/src/sample/generated/Models/PendingContentUpdate.cs +++ b/src/sample/generated/Models/PendingContentUpdate.cs @@ -1,45 +1,59 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PendingContentUpdate : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PendingContentUpdate : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Date and time the pending binary operation was queued in UTC time. Read-only. public DateTimeOffset? QueuedDateTime { get; set; } /// - /// Instantiates a new pendingContentUpdate and sets the default values. + /// Instantiates a new and sets the default values. /// - public PendingContentUpdate() { + public PendingContentUpdate() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PendingContentUpdate CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PendingContentUpdate CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PendingContentUpdate(); + return new global::ApiSdk.Models.PendingContentUpdate(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"queuedDateTime", n => { QueuedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "queuedDateTime", n => { QueuedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("queuedDateTime", QueuedDateTime); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PendingOperations.cs b/src/sample/generated/Models/PendingOperations.cs index c5c7ccd4..f3f64d9e 100644 --- a/src/sample/generated/Models/PendingOperations.cs +++ b/src/sample/generated/Models/PendingOperations.cs @@ -1,51 +1,65 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PendingOperations : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PendingOperations : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The pendingContentUpdate property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.PendingContentUpdate? PendingContentUpdate { get; set; } + public global::ApiSdk.Models.PendingContentUpdate? PendingContentUpdate { get; set; } #nullable restore #else - public ApiSdk.Models.PendingContentUpdate PendingContentUpdate { get; set; } + public global::ApiSdk.Models.PendingContentUpdate PendingContentUpdate { get; set; } #endif /// - /// Instantiates a new pendingOperations and sets the default values. + /// Instantiates a new and sets the default values. /// - public PendingOperations() { + public PendingOperations() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PendingOperations CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PendingOperations CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PendingOperations(); + return new global::ApiSdk.Models.PendingOperations(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"pendingContentUpdate", n => { PendingContentUpdate = n.GetObjectValue(ApiSdk.Models.PendingContentUpdate.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "pendingContentUpdate", n => { PendingContentUpdate = n.GetObjectValue(global::ApiSdk.Models.PendingContentUpdate.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("pendingContentUpdate", PendingContentUpdate); + writer.WriteObjectValue("pendingContentUpdate", PendingContentUpdate); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Permission.cs b/src/sample/generated/Models/Permission.cs index b53feb3c..6f6a2754 100644 --- a/src/sample/generated/Models/Permission.cs +++ b/src/sample/generated/Models/Permission.cs @@ -1,70 +1,76 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Permission : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Permission : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there's no expiration set for this permission. Optional. public DateTimeOffset? ExpirationDateTime { get; set; } /// The grantedTo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? GrantedTo { get; set; } + public global::ApiSdk.Models.IdentitySet? GrantedTo { get; set; } #nullable restore #else - public IdentitySet GrantedTo { get; set; } + public global::ApiSdk.Models.IdentitySet GrantedTo { get; set; } #endif - /// The grantedToIdentities property + /// For type permissions, the details of the users to whom permission was granted. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? GrantedToIdentities { get; set; } + public List? GrantedToIdentities { get; set; } #nullable restore #else - public List GrantedToIdentities { get; set; } + public List GrantedToIdentities { get; set; } #endif /// For link type permissions, the details of the users to whom permission was granted. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? GrantedToIdentitiesV2 { get; set; } + public List? GrantedToIdentitiesV2 { get; set; } #nullable restore #else - public List GrantedToIdentitiesV2 { get; set; } + public List GrantedToIdentitiesV2 { get; set; } #endif /// The grantedToV2 property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SharePointIdentitySet? GrantedToV2 { get; set; } + public global::ApiSdk.Models.SharePointIdentitySet? GrantedToV2 { get; set; } #nullable restore #else - public SharePointIdentitySet GrantedToV2 { get; set; } + public global::ApiSdk.Models.SharePointIdentitySet GrantedToV2 { get; set; } #endif /// Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only.. public bool? HasPassword { get; set; } /// The inheritedFrom property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemReference? InheritedFrom { get; set; } + public global::ApiSdk.Models.ItemReference? InheritedFrom { get; set; } #nullable restore #else - public ItemReference InheritedFrom { get; set; } + public global::ApiSdk.Models.ItemReference InheritedFrom { get; set; } #endif /// The invitation property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SharingInvitation? Invitation { get; set; } + public global::ApiSdk.Models.SharingInvitation? Invitation { get; set; } #nullable restore #else - public SharingInvitation Invitation { get; set; } + public global::ApiSdk.Models.SharingInvitation Invitation { get; set; } #endif /// The link property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SharingLink? Link { get; set; } + public global::ApiSdk.Models.SharingLink? Link { get; set; } #nullable restore #else - public SharingLink Link { get; set; } + public global::ApiSdk.Models.SharingLink Link { get; set; } #endif /// The type of permission, for example, read. See below for the full list of roles. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -85,47 +91,54 @@ public class Permission : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Permission CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Permission CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Permission(); + return new global::ApiSdk.Models.Permission(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"grantedTo", n => { GrantedTo = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"grantedToIdentities", n => { GrantedToIdentities = n.GetCollectionOfObjectValues(IdentitySet.CreateFromDiscriminatorValue)?.ToList(); } }, - {"grantedToIdentitiesV2", n => { GrantedToIdentitiesV2 = n.GetCollectionOfObjectValues(SharePointIdentitySet.CreateFromDiscriminatorValue)?.ToList(); } }, - {"grantedToV2", n => { GrantedToV2 = n.GetObjectValue(SharePointIdentitySet.CreateFromDiscriminatorValue); } }, - {"hasPassword", n => { HasPassword = n.GetBoolValue(); } }, - {"inheritedFrom", n => { InheritedFrom = n.GetObjectValue(ItemReference.CreateFromDiscriminatorValue); } }, - {"invitation", n => { Invitation = n.GetObjectValue(SharingInvitation.CreateFromDiscriminatorValue); } }, - {"link", n => { Link = n.GetObjectValue(SharingLink.CreateFromDiscriminatorValue); } }, - {"roles", n => { Roles = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"shareId", n => { ShareId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "grantedTo", n => { GrantedTo = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "grantedToIdentities", n => { GrantedToIdentities = n.GetCollectionOfObjectValues(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue)?.AsList(); } }, + { "grantedToIdentitiesV2", n => { GrantedToIdentitiesV2 = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SharePointIdentitySet.CreateFromDiscriminatorValue)?.AsList(); } }, + { "grantedToV2", n => { GrantedToV2 = n.GetObjectValue(global::ApiSdk.Models.SharePointIdentitySet.CreateFromDiscriminatorValue); } }, + { "hasPassword", n => { HasPassword = n.GetBoolValue(); } }, + { "inheritedFrom", n => { InheritedFrom = n.GetObjectValue(global::ApiSdk.Models.ItemReference.CreateFromDiscriminatorValue); } }, + { "invitation", n => { Invitation = n.GetObjectValue(global::ApiSdk.Models.SharingInvitation.CreateFromDiscriminatorValue); } }, + { "link", n => { Link = n.GetObjectValue(global::ApiSdk.Models.SharingLink.CreateFromDiscriminatorValue); } }, + { "roles", n => { Roles = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "shareId", n => { ShareId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); - writer.WriteObjectValue("grantedTo", GrantedTo); - writer.WriteCollectionOfObjectValues("grantedToIdentities", GrantedToIdentities); - writer.WriteCollectionOfObjectValues("grantedToIdentitiesV2", GrantedToIdentitiesV2); - writer.WriteObjectValue("grantedToV2", GrantedToV2); + writer.WriteObjectValue("grantedTo", GrantedTo); + writer.WriteCollectionOfObjectValues("grantedToIdentities", GrantedToIdentities); + writer.WriteCollectionOfObjectValues("grantedToIdentitiesV2", GrantedToIdentitiesV2); + writer.WriteObjectValue("grantedToV2", GrantedToV2); writer.WriteBoolValue("hasPassword", HasPassword); - writer.WriteObjectValue("inheritedFrom", InheritedFrom); - writer.WriteObjectValue("invitation", Invitation); - writer.WriteObjectValue("link", Link); + writer.WriteObjectValue("inheritedFrom", InheritedFrom); + writer.WriteObjectValue("invitation", Invitation); + writer.WriteObjectValue("link", Link); writer.WriteCollectionOfPrimitiveValues("roles", Roles); writer.WriteStringValue("shareId", ShareId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PermissionClassificationType.cs b/src/sample/generated/Models/PermissionClassificationType.cs index 6c101764..368e432c 100644 --- a/src/sample/generated/Models/PermissionClassificationType.cs +++ b/src/sample/generated/Models/PermissionClassificationType.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PermissionClassificationType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PermissionClassificationType + #pragma warning restore CS1591 + { [EnumMember(Value = "low")] + #pragma warning disable CS1591 Low, + #pragma warning restore CS1591 [EnumMember(Value = "medium")] + #pragma warning disable CS1591 Medium, + #pragma warning restore CS1591 [EnumMember(Value = "high")] + #pragma warning disable CS1591 High, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PermissionScope.cs b/src/sample/generated/Models/PermissionScope.cs index 5eae28c0..eb125e4e 100644 --- a/src/sample/generated/Models/PermissionScope.cs +++ b/src/sample/generated/Models/PermissionScope.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PermissionScope : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PermissionScope : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A description of the delegated permissions, intended to be read by an administrator granting the permission on behalf of all users. This text appears in tenant-wide admin consent experiences. @@ -69,40 +75,47 @@ public class PermissionScope : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new permissionScope and sets the default values. + /// Instantiates a new and sets the default values. /// - public PermissionScope() { + public PermissionScope() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PermissionScope CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PermissionScope CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PermissionScope(); + return new global::ApiSdk.Models.PermissionScope(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"adminConsentDescription", n => { AdminConsentDescription = n.GetStringValue(); } }, - {"adminConsentDisplayName", n => { AdminConsentDisplayName = n.GetStringValue(); } }, - {"id", n => { Id = n.GetGuidValue(); } }, - {"isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, - {"origin", n => { Origin = n.GetStringValue(); } }, - {"type", n => { Type = n.GetStringValue(); } }, - {"userConsentDescription", n => { UserConsentDescription = n.GetStringValue(); } }, - {"userConsentDisplayName", n => { UserConsentDisplayName = n.GetStringValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "adminConsentDescription", n => { AdminConsentDescription = n.GetStringValue(); } }, + { "adminConsentDisplayName", n => { AdminConsentDisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetGuidValue(); } }, + { "isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, + { "origin", n => { Origin = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "userConsentDescription", n => { UserConsentDescription = n.GetStringValue(); } }, + { "userConsentDisplayName", n => { UserConsentDisplayName = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("adminConsentDescription", AdminConsentDescription); writer.WriteStringValue("adminConsentDisplayName", AdminConsentDisplayName); @@ -117,3 +130,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Person.cs b/src/sample/generated/Models/Person.cs index 9c73a37a..a56a000e 100644 --- a/src/sample/generated/Models/Person.cs +++ b/src/sample/generated/Models/Person.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Person : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Person : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The person's birthday. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -83,26 +89,26 @@ public class Person : Entity, IParsable { /// The personType property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.PersonType? PersonType { get; set; } + public global::ApiSdk.Models.PersonType? PersonType { get; set; } #nullable restore #else - public ApiSdk.Models.PersonType PersonType { get; set; } + public global::ApiSdk.Models.PersonType PersonType { get; set; } #endif /// The person's phone numbers. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Phones { get; set; } + public List? Phones { get; set; } #nullable restore #else - public List Phones { get; set; } + public List Phones { get; set; } #endif /// The person's addresses. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PostalAddresses { get; set; } + public List? PostalAddresses { get; set; } #nullable restore #else - public List PostalAddresses { get; set; } + public List PostalAddresses { get; set; } #endif /// The person's profession. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -115,10 +121,10 @@ public class Person : Entity, IParsable { /// The person's email addresses. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ScoredEmailAddresses { get; set; } + public List? ScoredEmailAddresses { get; set; } #nullable restore #else - public List ScoredEmailAddresses { get; set; } + public List ScoredEmailAddresses { get; set; } #endif /// The person's surname. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -139,10 +145,10 @@ public class Person : Entity, IParsable { /// The person's websites. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Websites { get; set; } + public List? Websites { get; set; } #nullable restore #else - public List Websites { get; set; } + public List Websites { get; set; } #endif /// The phonetic Japanese name of the person's company. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -155,42 +161,48 @@ public class Person : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Person CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Person CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Person(); + return new global::ApiSdk.Models.Person(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"birthday", n => { Birthday = n.GetStringValue(); } }, - {"companyName", n => { CompanyName = n.GetStringValue(); } }, - {"department", n => { Department = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"givenName", n => { GivenName = n.GetStringValue(); } }, - {"imAddress", n => { ImAddress = n.GetStringValue(); } }, - {"isFavorite", n => { IsFavorite = n.GetBoolValue(); } }, - {"jobTitle", n => { JobTitle = n.GetStringValue(); } }, - {"officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, - {"personNotes", n => { PersonNotes = n.GetStringValue(); } }, - {"personType", n => { PersonType = n.GetObjectValue(ApiSdk.Models.PersonType.CreateFromDiscriminatorValue); } }, - {"phones", n => { Phones = n.GetCollectionOfObjectValues(Phone.CreateFromDiscriminatorValue)?.ToList(); } }, - {"postalAddresses", n => { PostalAddresses = n.GetCollectionOfObjectValues(Location.CreateFromDiscriminatorValue)?.ToList(); } }, - {"profession", n => { Profession = n.GetStringValue(); } }, - {"scoredEmailAddresses", n => { ScoredEmailAddresses = n.GetCollectionOfObjectValues(ScoredEmailAddress.CreateFromDiscriminatorValue)?.ToList(); } }, - {"surname", n => { Surname = n.GetStringValue(); } }, - {"userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, - {"websites", n => { Websites = n.GetCollectionOfObjectValues(Website.CreateFromDiscriminatorValue)?.ToList(); } }, - {"yomiCompany", n => { YomiCompany = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "birthday", n => { Birthday = n.GetStringValue(); } }, + { "companyName", n => { CompanyName = n.GetStringValue(); } }, + { "department", n => { Department = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "givenName", n => { GivenName = n.GetStringValue(); } }, + { "imAddress", n => { ImAddress = n.GetStringValue(); } }, + { "isFavorite", n => { IsFavorite = n.GetBoolValue(); } }, + { "jobTitle", n => { JobTitle = n.GetStringValue(); } }, + { "officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, + { "personNotes", n => { PersonNotes = n.GetStringValue(); } }, + { "personType", n => { PersonType = n.GetObjectValue(global::ApiSdk.Models.PersonType.CreateFromDiscriminatorValue); } }, + { "phones", n => { Phones = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Phone.CreateFromDiscriminatorValue)?.AsList(); } }, + { "postalAddresses", n => { PostalAddresses = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Location.CreateFromDiscriminatorValue)?.AsList(); } }, + { "profession", n => { Profession = n.GetStringValue(); } }, + { "scoredEmailAddresses", n => { ScoredEmailAddresses = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ScoredEmailAddress.CreateFromDiscriminatorValue)?.AsList(); } }, + { "surname", n => { Surname = n.GetStringValue(); } }, + { "userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, + { "websites", n => { Websites = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Website.CreateFromDiscriminatorValue)?.AsList(); } }, + { "yomiCompany", n => { YomiCompany = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("birthday", Birthday); @@ -203,15 +215,16 @@ public class Person : Entity, IParsable { writer.WriteStringValue("jobTitle", JobTitle); writer.WriteStringValue("officeLocation", OfficeLocation); writer.WriteStringValue("personNotes", PersonNotes); - writer.WriteObjectValue("personType", PersonType); - writer.WriteCollectionOfObjectValues("phones", Phones); - writer.WriteCollectionOfObjectValues("postalAddresses", PostalAddresses); + writer.WriteObjectValue("personType", PersonType); + writer.WriteCollectionOfObjectValues("phones", Phones); + writer.WriteCollectionOfObjectValues("postalAddresses", PostalAddresses); writer.WriteStringValue("profession", Profession); - writer.WriteCollectionOfObjectValues("scoredEmailAddresses", ScoredEmailAddresses); + writer.WriteCollectionOfObjectValues("scoredEmailAddresses", ScoredEmailAddresses); writer.WriteStringValue("surname", Surname); writer.WriteStringValue("userPrincipalName", UserPrincipalName); - writer.WriteCollectionOfObjectValues("websites", Websites); + writer.WriteCollectionOfObjectValues("websites", Websites); writer.WriteStringValue("yomiCompany", YomiCompany); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PersonOrGroupColumn.cs b/src/sample/generated/Models/PersonOrGroupColumn.cs index 5e751e2a..d298fe32 100644 --- a/src/sample/generated/Models/PersonOrGroupColumn.cs +++ b/src/sample/generated/Models/PersonOrGroupColumn.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PersonOrGroupColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonOrGroupColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Indicates whether multiple values can be selected from the source. @@ -27,34 +33,41 @@ public class PersonOrGroupColumn : IAdditionalDataHolder, IParsable { public string DisplayAs { get; set; } #endif /// - /// Instantiates a new personOrGroupColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public PersonOrGroupColumn() { + public PersonOrGroupColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PersonOrGroupColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PersonOrGroupColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PersonOrGroupColumn(); + return new global::ApiSdk.Models.PersonOrGroupColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowMultipleSelection", n => { AllowMultipleSelection = n.GetBoolValue(); } }, - {"chooseFromType", n => { ChooseFromType = n.GetStringValue(); } }, - {"displayAs", n => { DisplayAs = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowMultipleSelection", n => { AllowMultipleSelection = n.GetBoolValue(); } }, + { "chooseFromType", n => { ChooseFromType = n.GetStringValue(); } }, + { "displayAs", n => { DisplayAs = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowMultipleSelection", AllowMultipleSelection); writer.WriteStringValue("chooseFromType", ChooseFromType); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PersonType.cs b/src/sample/generated/Models/PersonType.cs index f08099eb..90b3f0c9 100644 --- a/src/sample/generated/Models/PersonType.cs +++ b/src/sample/generated/Models/PersonType.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PersonType : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PersonType : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The type of data source, such as Person. @@ -25,33 +31,40 @@ public class PersonType : IAdditionalDataHolder, IParsable { public string Subclass { get; set; } #endif /// - /// Instantiates a new personType and sets the default values. + /// Instantiates a new and sets the default values. /// - public PersonType() { + public PersonType() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PersonType CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PersonType CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PersonType(); + return new global::ApiSdk.Models.PersonType(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"class", n => { Class = n.GetStringValue(); } }, - {"subclass", n => { Subclass = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "class", n => { Class = n.GetStringValue(); } }, + { "subclass", n => { Subclass = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("class", Class); writer.WriteStringValue("subclass", Subclass); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Phone.cs b/src/sample/generated/Models/Phone.cs index d9938520..84d0f893 100644 --- a/src/sample/generated/Models/Phone.cs +++ b/src/sample/generated/Models/Phone.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Phone : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Phone : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The language property @@ -33,43 +39,51 @@ public class Phone : IAdditionalDataHolder, IParsable { public string Region { get; set; } #endif /// The type property - public PhoneType? Type { get; set; } + public global::ApiSdk.Models.PhoneType? Type { get; set; } /// - /// Instantiates a new phone and sets the default values. + /// Instantiates a new and sets the default values. /// - public Phone() { + public Phone() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Phone CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Phone CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Phone(); + return new global::ApiSdk.Models.Phone(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"language", n => { Language = n.GetStringValue(); } }, - {"number", n => { Number = n.GetStringValue(); } }, - {"region", n => { Region = n.GetStringValue(); } }, - {"type", n => { Type = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "language", n => { Language = n.GetStringValue(); } }, + { "number", n => { Number = n.GetStringValue(); } }, + { "region", n => { Region = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("language", Language); writer.WriteStringValue("number", Number); writer.WriteStringValue("region", Region); - writer.WriteEnumValue("type", Type); + writer.WriteEnumValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PhoneAuthenticationMethod.cs b/src/sample/generated/Models/PhoneAuthenticationMethod.cs index d0a2cce0..35d5b558 100644 --- a/src/sample/generated/Models/PhoneAuthenticationMethod.cs +++ b/src/sample/generated/Models/PhoneAuthenticationMethod.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PhoneAuthenticationMethod : AuthenticationMethod, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PhoneAuthenticationMethod : global::ApiSdk.Models.AuthenticationMethod, IParsable + #pragma warning restore CS1591 + { /// The phone number to text or call for authentication. Phone numbers use the format +{country code} {number}x{extension}, with extension optional. For example, +1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating or updating if they don't match the required format. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -15,37 +21,44 @@ public class PhoneAuthenticationMethod : AuthenticationMethod, IParsable { public string PhoneNumber { get; set; } #endif /// The phoneType property - public AuthenticationPhoneType? PhoneType { get; set; } + public global::ApiSdk.Models.AuthenticationPhoneType? PhoneType { get; set; } /// The smsSignInState property - public AuthenticationMethodSignInState? SmsSignInState { get; set; } + public global::ApiSdk.Models.AuthenticationMethodSignInState? SmsSignInState { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PhoneAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PhoneAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PhoneAuthenticationMethod(); + return new global::ApiSdk.Models.PhoneAuthenticationMethod(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"phoneNumber", n => { PhoneNumber = n.GetStringValue(); } }, - {"phoneType", n => { PhoneType = n.GetEnumValue(); } }, - {"smsSignInState", n => { SmsSignInState = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "phoneNumber", n => { PhoneNumber = n.GetStringValue(); } }, + { "phoneType", n => { PhoneType = n.GetEnumValue(); } }, + { "smsSignInState", n => { SmsSignInState = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("phoneNumber", PhoneNumber); - writer.WriteEnumValue("phoneType", PhoneType); - writer.WriteEnumValue("smsSignInState", SmsSignInState); + writer.WriteEnumValue("phoneType", PhoneType); + writer.WriteEnumValue("smsSignInState", SmsSignInState); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PhoneType.cs b/src/sample/generated/Models/PhoneType.cs index c2b72971..5ba0a8d0 100644 --- a/src/sample/generated/Models/PhoneType.cs +++ b/src/sample/generated/Models/PhoneType.cs @@ -1,27 +1,52 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PhoneType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PhoneType + #pragma warning restore CS1591 + { [EnumMember(Value = "home")] + #pragma warning disable CS1591 Home, + #pragma warning restore CS1591 [EnumMember(Value = "business")] + #pragma warning disable CS1591 Business, + #pragma warning restore CS1591 [EnumMember(Value = "mobile")] + #pragma warning disable CS1591 Mobile, + #pragma warning restore CS1591 [EnumMember(Value = "other")] + #pragma warning disable CS1591 Other, + #pragma warning restore CS1591 [EnumMember(Value = "assistant")] + #pragma warning disable CS1591 Assistant, + #pragma warning restore CS1591 [EnumMember(Value = "homeFax")] + #pragma warning disable CS1591 HomeFax, + #pragma warning restore CS1591 [EnumMember(Value = "businessFax")] + #pragma warning disable CS1591 BusinessFax, + #pragma warning restore CS1591 [EnumMember(Value = "otherFax")] + #pragma warning disable CS1591 OtherFax, + #pragma warning restore CS1591 [EnumMember(Value = "pager")] + #pragma warning disable CS1591 Pager, + #pragma warning restore CS1591 [EnumMember(Value = "radio")] + #pragma warning disable CS1591 Radio, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/Photo.cs b/src/sample/generated/Models/Photo.cs index a9ce72be..b610ea15 100644 --- a/src/sample/generated/Models/Photo.cs +++ b/src/sample/generated/Models/Photo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Photo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Photo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Camera manufacturer. Read-only. @@ -39,40 +45,47 @@ public class Photo : IAdditionalDataHolder, IParsable { /// Represents the date and time the photo was taken. Read-only. public DateTimeOffset? TakenDateTime { get; set; } /// - /// Instantiates a new photo and sets the default values. + /// Instantiates a new and sets the default values. /// - public Photo() { + public Photo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Photo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Photo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Photo(); + return new global::ApiSdk.Models.Photo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"cameraMake", n => { CameraMake = n.GetStringValue(); } }, - {"cameraModel", n => { CameraModel = n.GetStringValue(); } }, - {"exposureDenominator", n => { ExposureDenominator = n.GetDoubleValue(); } }, - {"exposureNumerator", n => { ExposureNumerator = n.GetDoubleValue(); } }, - {"fNumber", n => { FNumber = n.GetDoubleValue(); } }, - {"focalLength", n => { FocalLength = n.GetDoubleValue(); } }, - {"iso", n => { Iso = n.GetIntValue(); } }, - {"orientation", n => { Orientation = n.GetIntValue(); } }, - {"takenDateTime", n => { TakenDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cameraMake", n => { CameraMake = n.GetStringValue(); } }, + { "cameraModel", n => { CameraModel = n.GetStringValue(); } }, + { "exposureDenominator", n => { ExposureDenominator = n.GetDoubleValue(); } }, + { "exposureNumerator", n => { ExposureNumerator = n.GetDoubleValue(); } }, + { "fNumber", n => { FNumber = n.GetDoubleValue(); } }, + { "focalLength", n => { FocalLength = n.GetDoubleValue(); } }, + { "iso", n => { Iso = n.GetIntValue(); } }, + { "orientation", n => { Orientation = n.GetIntValue(); } }, + { "takenDateTime", n => { TakenDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cameraMake", CameraMake); writer.WriteStringValue("cameraModel", CameraModel); @@ -87,3 +100,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PhysicalAddress.cs b/src/sample/generated/Models/PhysicalAddress.cs index 4b61b770..83dc6825 100644 --- a/src/sample/generated/Models/PhysicalAddress.cs +++ b/src/sample/generated/Models/PhysicalAddress.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PhysicalAddress : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PhysicalAddress : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The city. @@ -49,36 +55,43 @@ public class PhysicalAddress : IAdditionalDataHolder, IParsable { public string Street { get; set; } #endif /// - /// Instantiates a new physicalAddress and sets the default values. + /// Instantiates a new and sets the default values. /// - public PhysicalAddress() { + public PhysicalAddress() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PhysicalAddress CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PhysicalAddress CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PhysicalAddress(); + return new global::ApiSdk.Models.PhysicalAddress(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"city", n => { City = n.GetStringValue(); } }, - {"countryOrRegion", n => { CountryOrRegion = n.GetStringValue(); } }, - {"postalCode", n => { PostalCode = n.GetStringValue(); } }, - {"state", n => { State = n.GetStringValue(); } }, - {"street", n => { Street = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "city", n => { City = n.GetStringValue(); } }, + { "countryOrRegion", n => { CountryOrRegion = n.GetStringValue(); } }, + { "postalCode", n => { PostalCode = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "street", n => { Street = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("city", City); writer.WriteStringValue("countryOrRegion", CountryOrRegion); @@ -89,3 +102,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PhysicalOfficeAddress.cs b/src/sample/generated/Models/PhysicalOfficeAddress.cs index 2aaf9b8b..625fcc5a 100644 --- a/src/sample/generated/Models/PhysicalOfficeAddress.cs +++ b/src/sample/generated/Models/PhysicalOfficeAddress.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PhysicalOfficeAddress : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PhysicalOfficeAddress : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The city. @@ -57,37 +63,44 @@ public class PhysicalOfficeAddress : IAdditionalDataHolder, IParsable { public string Street { get; set; } #endif /// - /// Instantiates a new physicalOfficeAddress and sets the default values. + /// Instantiates a new and sets the default values. /// - public PhysicalOfficeAddress() { + public PhysicalOfficeAddress() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PhysicalOfficeAddress CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PhysicalOfficeAddress CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PhysicalOfficeAddress(); + return new global::ApiSdk.Models.PhysicalOfficeAddress(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"city", n => { City = n.GetStringValue(); } }, - {"countryOrRegion", n => { CountryOrRegion = n.GetStringValue(); } }, - {"officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, - {"postalCode", n => { PostalCode = n.GetStringValue(); } }, - {"state", n => { State = n.GetStringValue(); } }, - {"street", n => { Street = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "city", n => { City = n.GetStringValue(); } }, + { "countryOrRegion", n => { CountryOrRegion = n.GetStringValue(); } }, + { "officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, + { "postalCode", n => { PostalCode = n.GetStringValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "street", n => { Street = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("city", City); writer.WriteStringValue("countryOrRegion", CountryOrRegion); @@ -99,3 +112,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PinnedChatMessageInfo.cs b/src/sample/generated/Models/PinnedChatMessageInfo.cs index 6d16b01a..c23edf48 100644 --- a/src/sample/generated/Models/PinnedChatMessageInfo.cs +++ b/src/sample/generated/Models/PinnedChatMessageInfo.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PinnedChatMessageInfo : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PinnedChatMessageInfo : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The message property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ChatMessage? Message { get; set; } + public global::ApiSdk.Models.ChatMessage? Message { get; set; } #nullable restore #else - public ChatMessage Message { get; set; } + public global::ApiSdk.Models.ChatMessage Message { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PinnedChatMessageInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PinnedChatMessageInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PinnedChatMessageInfo(); + return new global::ApiSdk.Models.PinnedChatMessageInfo(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"message", n => { Message = n.GetObjectValue(ChatMessage.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "message", n => { Message = n.GetObjectValue(global::ApiSdk.Models.ChatMessage.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("message", Message); + writer.WriteObjectValue("message", Message); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerAppliedCategories.cs b/src/sample/generated/Models/PlannerAppliedCategories.cs index b07c17a4..d7801713 100644 --- a/src/sample/generated/Models/PlannerAppliedCategories.cs +++ b/src/sample/generated/Models/PlannerAppliedCategories.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerAppliedCategories : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerAppliedCategories : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new plannerAppliedCategories and sets the default values. + /// Instantiates a new and sets the default values. /// - public PlannerAppliedCategories() { + public PlannerAppliedCategories() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PlannerAppliedCategories CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PlannerAppliedCategories CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerAppliedCategories(); + return new global::ApiSdk.Models.PlannerAppliedCategories(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerAssignedToTaskBoardTaskFormat.cs b/src/sample/generated/Models/PlannerAssignedToTaskBoardTaskFormat.cs index c2ab1407..71ef717c 100644 --- a/src/sample/generated/Models/PlannerAssignedToTaskBoardTaskFormat.cs +++ b/src/sample/generated/Models/PlannerAssignedToTaskBoardTaskFormat.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerAssignedToTaskBoardTaskFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerAssignedToTaskBoardTaskFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The orderHintsByAssignee property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerOrderHintsByAssignee? OrderHintsByAssignee { get; set; } + public global::ApiSdk.Models.PlannerOrderHintsByAssignee? OrderHintsByAssignee { get; set; } #nullable restore #else - public PlannerOrderHintsByAssignee OrderHintsByAssignee { get; set; } + public global::ApiSdk.Models.PlannerOrderHintsByAssignee OrderHintsByAssignee { get; set; } #endif /// Hint value used to order the task on the AssignedTo view of the Task Board when the task isn't assigned to anyone, or if the orderHintsByAssignee dictionary doesn't provide an order hint for the user the task is assigned to. The format is defined as outlined here. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,29 +31,36 @@ public class PlannerAssignedToTaskBoardTaskFormat : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerAssignedToTaskBoardTaskFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerAssignedToTaskBoardTaskFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerAssignedToTaskBoardTaskFormat(); + return new global::ApiSdk.Models.PlannerAssignedToTaskBoardTaskFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"orderHintsByAssignee", n => { OrderHintsByAssignee = n.GetObjectValue(PlannerOrderHintsByAssignee.CreateFromDiscriminatorValue); } }, - {"unassignedOrderHint", n => { UnassignedOrderHint = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "orderHintsByAssignee", n => { OrderHintsByAssignee = n.GetObjectValue(global::ApiSdk.Models.PlannerOrderHintsByAssignee.CreateFromDiscriminatorValue); } }, + { "unassignedOrderHint", n => { UnassignedOrderHint = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("orderHintsByAssignee", OrderHintsByAssignee); + writer.WriteObjectValue("orderHintsByAssignee", OrderHintsByAssignee); writer.WriteStringValue("unassignedOrderHint", UnassignedOrderHint); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerAssignments.cs b/src/sample/generated/Models/PlannerAssignments.cs index 80d55e11..6fc237d8 100644 --- a/src/sample/generated/Models/PlannerAssignments.cs +++ b/src/sample/generated/Models/PlannerAssignments.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerAssignments : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerAssignments : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new plannerAssignments and sets the default values. + /// Instantiates a new and sets the default values. /// - public PlannerAssignments() { + public PlannerAssignments() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PlannerAssignments CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PlannerAssignments CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerAssignments(); + return new global::ApiSdk.Models.PlannerAssignments(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerBucket.cs b/src/sample/generated/Models/PlannerBucket.cs index 01c517e6..1d34e4e0 100644 --- a/src/sample/generated/Models/PlannerBucket.cs +++ b/src/sample/generated/Models/PlannerBucket.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerBucket : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerBucket : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Name of the bucket. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -33,41 +39,48 @@ public class PlannerBucket : Entity, IParsable { /// Read-only. Nullable. The collection of tasks in the bucket. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tasks { get; set; } + public List? Tasks { get; set; } #nullable restore #else - public List Tasks { get; set; } + public List Tasks { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerBucket CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerBucket CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerBucket(); + return new global::ApiSdk.Models.PlannerBucket(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"name", n => { Name = n.GetStringValue(); } }, - {"orderHint", n => { OrderHint = n.GetStringValue(); } }, - {"planId", n => { PlanId = n.GetStringValue(); } }, - {"tasks", n => { Tasks = n.GetCollectionOfObjectValues(PlannerTask.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "name", n => { Name = n.GetStringValue(); } }, + { "orderHint", n => { OrderHint = n.GetStringValue(); } }, + { "planId", n => { PlanId = n.GetStringValue(); } }, + { "tasks", n => { Tasks = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PlannerTask.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteStringValue("orderHint", OrderHint); writer.WriteStringValue("planId", PlanId); - writer.WriteCollectionOfObjectValues("tasks", Tasks); + writer.WriteCollectionOfObjectValues("tasks", Tasks); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerBucketTaskBoardTaskFormat.cs b/src/sample/generated/Models/PlannerBucketTaskBoardTaskFormat.cs index 8c44540a..f7399c01 100644 --- a/src/sample/generated/Models/PlannerBucketTaskBoardTaskFormat.cs +++ b/src/sample/generated/Models/PlannerBucketTaskBoardTaskFormat.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerBucketTaskBoardTaskFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerBucketTaskBoardTaskFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Hint used to order tasks in the bucket view of the task board. For details about the supported format, see Using order hints in Planner. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class PlannerBucketTaskBoardTaskFormat : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerBucketTaskBoardTaskFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerBucketTaskBoardTaskFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerBucketTaskBoardTaskFormat(); + return new global::ApiSdk.Models.PlannerBucketTaskBoardTaskFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"orderHint", n => { OrderHint = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "orderHint", n => { OrderHint = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("orderHint", OrderHint); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerCategoryDescriptions.cs b/src/sample/generated/Models/PlannerCategoryDescriptions.cs index 711574d0..4abdf803 100644 --- a/src/sample/generated/Models/PlannerCategoryDescriptions.cs +++ b/src/sample/generated/Models/PlannerCategoryDescriptions.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerCategoryDescriptions : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerCategoryDescriptions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The label associated with Category 1 @@ -209,56 +215,63 @@ public class PlannerCategoryDescriptions : IAdditionalDataHolder, IParsable { public string Category9 { get; set; } #endif /// - /// Instantiates a new plannerCategoryDescriptions and sets the default values. + /// Instantiates a new and sets the default values. /// - public PlannerCategoryDescriptions() { + public PlannerCategoryDescriptions() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PlannerCategoryDescriptions CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PlannerCategoryDescriptions CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerCategoryDescriptions(); + return new global::ApiSdk.Models.PlannerCategoryDescriptions(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"category1", n => { Category1 = n.GetStringValue(); } }, - {"category10", n => { Category10 = n.GetStringValue(); } }, - {"category11", n => { Category11 = n.GetStringValue(); } }, - {"category12", n => { Category12 = n.GetStringValue(); } }, - {"category13", n => { Category13 = n.GetStringValue(); } }, - {"category14", n => { Category14 = n.GetStringValue(); } }, - {"category15", n => { Category15 = n.GetStringValue(); } }, - {"category16", n => { Category16 = n.GetStringValue(); } }, - {"category17", n => { Category17 = n.GetStringValue(); } }, - {"category18", n => { Category18 = n.GetStringValue(); } }, - {"category19", n => { Category19 = n.GetStringValue(); } }, - {"category2", n => { Category2 = n.GetStringValue(); } }, - {"category20", n => { Category20 = n.GetStringValue(); } }, - {"category21", n => { Category21 = n.GetStringValue(); } }, - {"category22", n => { Category22 = n.GetStringValue(); } }, - {"category23", n => { Category23 = n.GetStringValue(); } }, - {"category24", n => { Category24 = n.GetStringValue(); } }, - {"category25", n => { Category25 = n.GetStringValue(); } }, - {"category3", n => { Category3 = n.GetStringValue(); } }, - {"category4", n => { Category4 = n.GetStringValue(); } }, - {"category5", n => { Category5 = n.GetStringValue(); } }, - {"category6", n => { Category6 = n.GetStringValue(); } }, - {"category7", n => { Category7 = n.GetStringValue(); } }, - {"category8", n => { Category8 = n.GetStringValue(); } }, - {"category9", n => { Category9 = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "category1", n => { Category1 = n.GetStringValue(); } }, + { "category10", n => { Category10 = n.GetStringValue(); } }, + { "category11", n => { Category11 = n.GetStringValue(); } }, + { "category12", n => { Category12 = n.GetStringValue(); } }, + { "category13", n => { Category13 = n.GetStringValue(); } }, + { "category14", n => { Category14 = n.GetStringValue(); } }, + { "category15", n => { Category15 = n.GetStringValue(); } }, + { "category16", n => { Category16 = n.GetStringValue(); } }, + { "category17", n => { Category17 = n.GetStringValue(); } }, + { "category18", n => { Category18 = n.GetStringValue(); } }, + { "category19", n => { Category19 = n.GetStringValue(); } }, + { "category2", n => { Category2 = n.GetStringValue(); } }, + { "category20", n => { Category20 = n.GetStringValue(); } }, + { "category21", n => { Category21 = n.GetStringValue(); } }, + { "category22", n => { Category22 = n.GetStringValue(); } }, + { "category23", n => { Category23 = n.GetStringValue(); } }, + { "category24", n => { Category24 = n.GetStringValue(); } }, + { "category25", n => { Category25 = n.GetStringValue(); } }, + { "category3", n => { Category3 = n.GetStringValue(); } }, + { "category4", n => { Category4 = n.GetStringValue(); } }, + { "category5", n => { Category5 = n.GetStringValue(); } }, + { "category6", n => { Category6 = n.GetStringValue(); } }, + { "category7", n => { Category7 = n.GetStringValue(); } }, + { "category8", n => { Category8 = n.GetStringValue(); } }, + { "category9", n => { Category9 = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("category1", Category1); writer.WriteStringValue("category10", Category10); @@ -289,3 +302,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerChecklistItems.cs b/src/sample/generated/Models/PlannerChecklistItems.cs index 0ef257d5..941746d7 100644 --- a/src/sample/generated/Models/PlannerChecklistItems.cs +++ b/src/sample/generated/Models/PlannerChecklistItems.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerChecklistItems : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerChecklistItems : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new plannerChecklistItems and sets the default values. + /// Instantiates a new and sets the default values. /// - public PlannerChecklistItems() { + public PlannerChecklistItems() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PlannerChecklistItems CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PlannerChecklistItems CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerChecklistItems(); + return new global::ApiSdk.Models.PlannerChecklistItems(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerContainerType.cs b/src/sample/generated/Models/PlannerContainerType.cs index 96b24989..7e97631d 100644 --- a/src/sample/generated/Models/PlannerContainerType.cs +++ b/src/sample/generated/Models/PlannerContainerType.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PlannerContainerType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PlannerContainerType + #pragma warning restore CS1591 + { [EnumMember(Value = "group")] + #pragma warning disable CS1591 Group, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 [EnumMember(Value = "roster")] + #pragma warning disable CS1591 Roster, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PlannerExternalReferences.cs b/src/sample/generated/Models/PlannerExternalReferences.cs index d6d589dd..b852d03f 100644 --- a/src/sample/generated/Models/PlannerExternalReferences.cs +++ b/src/sample/generated/Models/PlannerExternalReferences.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerExternalReferences : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerExternalReferences : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new plannerExternalReferences and sets the default values. + /// Instantiates a new and sets the default values. /// - public PlannerExternalReferences() { + public PlannerExternalReferences() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PlannerExternalReferences CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PlannerExternalReferences CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerExternalReferences(); + return new global::ApiSdk.Models.PlannerExternalReferences(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerGroup.cs b/src/sample/generated/Models/PlannerGroup.cs index ef3dc99c..7ce25f06 100644 --- a/src/sample/generated/Models/PlannerGroup.cs +++ b/src/sample/generated/Models/PlannerGroup.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerGroup : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerGroup : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Read-only. Nullable. Returns the plannerPlans owned by the group. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Plans { get; set; } + public List? Plans { get; set; } #nullable restore #else - public List Plans { get; set; } + public List Plans { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerGroup CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerGroup CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerGroup(); + return new global::ApiSdk.Models.PlannerGroup(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"plans", n => { Plans = n.GetCollectionOfObjectValues(PlannerPlan.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "plans", n => { Plans = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PlannerPlan.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("plans", Plans); + writer.WriteCollectionOfObjectValues("plans", Plans); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerOrderHintsByAssignee.cs b/src/sample/generated/Models/PlannerOrderHintsByAssignee.cs index 15f9b253..7a25974e 100644 --- a/src/sample/generated/Models/PlannerOrderHintsByAssignee.cs +++ b/src/sample/generated/Models/PlannerOrderHintsByAssignee.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerOrderHintsByAssignee : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerOrderHintsByAssignee : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new plannerOrderHintsByAssignee and sets the default values. + /// Instantiates a new and sets the default values. /// - public PlannerOrderHintsByAssignee() { + public PlannerOrderHintsByAssignee() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PlannerOrderHintsByAssignee CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PlannerOrderHintsByAssignee CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerOrderHintsByAssignee(); + return new global::ApiSdk.Models.PlannerOrderHintsByAssignee(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerPlan.cs b/src/sample/generated/Models/PlannerPlan.cs index 9dd322b4..6823bf49 100644 --- a/src/sample/generated/Models/PlannerPlan.cs +++ b/src/sample/generated/Models/PlannerPlan.cs @@ -1,46 +1,52 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerPlan : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerPlan : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Read-only. Nullable. Collection of buckets in the plan. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Buckets { get; set; } + public List? Buckets { get; set; } #nullable restore #else - public List Buckets { get; set; } + public List Buckets { get; set; } #endif /// The container property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerPlanContainer? Container { get; set; } + public global::ApiSdk.Models.PlannerPlanContainer? Container { get; set; } #nullable restore #else - public PlannerPlanContainer Container { get; set; } + public global::ApiSdk.Models.PlannerPlanContainer Container { get; set; } #endif /// The createdBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? CreatedBy { get; set; } #nullable restore #else - public IdentitySet CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet CreatedBy { get; set; } #endif /// Read-only. Date and time at which the plan is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? CreatedDateTime { get; set; } /// The details property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerPlanDetails? Details { get; set; } + public global::ApiSdk.Models.PlannerPlanDetails? Details { get; set; } #nullable restore #else - public PlannerPlanDetails Details { get; set; } + public global::ApiSdk.Models.PlannerPlanDetails Details { get; set; } #endif - /// The owner property + /// Use the container property instead. ID of the group that owns the plan. After it's set, this property can’t be updated. This property won't return a valid group ID if the container of the plan isn't a group. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Owner { get; set; } @@ -51,10 +57,10 @@ public class PlannerPlan : Entity, IParsable { /// Read-only. Nullable. Collection of tasks in the plan. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tasks { get; set; } + public List? Tasks { get; set; } #nullable restore #else - public List Tasks { get; set; } + public List Tasks { get; set; } #endif /// Required. Title of the plan. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -67,41 +73,48 @@ public class PlannerPlan : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerPlan CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerPlan CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerPlan(); + return new global::ApiSdk.Models.PlannerPlan(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"buckets", n => { Buckets = n.GetCollectionOfObjectValues(PlannerBucket.CreateFromDiscriminatorValue)?.ToList(); } }, - {"container", n => { Container = n.GetObjectValue(PlannerPlanContainer.CreateFromDiscriminatorValue); } }, - {"createdBy", n => { CreatedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"details", n => { Details = n.GetObjectValue(PlannerPlanDetails.CreateFromDiscriminatorValue); } }, - {"owner", n => { Owner = n.GetStringValue(); } }, - {"tasks", n => { Tasks = n.GetCollectionOfObjectValues(PlannerTask.CreateFromDiscriminatorValue)?.ToList(); } }, - {"title", n => { Title = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "buckets", n => { Buckets = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PlannerBucket.CreateFromDiscriminatorValue)?.AsList(); } }, + { "container", n => { Container = n.GetObjectValue(global::ApiSdk.Models.PlannerPlanContainer.CreateFromDiscriminatorValue); } }, + { "createdBy", n => { CreatedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "details", n => { Details = n.GetObjectValue(global::ApiSdk.Models.PlannerPlanDetails.CreateFromDiscriminatorValue); } }, + { "owner", n => { Owner = n.GetStringValue(); } }, + { "tasks", n => { Tasks = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PlannerTask.CreateFromDiscriminatorValue)?.AsList(); } }, + { "title", n => { Title = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("buckets", Buckets); - writer.WriteObjectValue("container", Container); - writer.WriteObjectValue("createdBy", CreatedBy); + writer.WriteCollectionOfObjectValues("buckets", Buckets); + writer.WriteObjectValue("container", Container); + writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("details", Details); + writer.WriteObjectValue("details", Details); writer.WriteStringValue("owner", Owner); - writer.WriteCollectionOfObjectValues("tasks", Tasks); + writer.WriteCollectionOfObjectValues("tasks", Tasks); writer.WriteStringValue("title", Title); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerPlanContainer.cs b/src/sample/generated/Models/PlannerPlanContainer.cs index 5f686315..967c35dc 100644 --- a/src/sample/generated/Models/PlannerPlanContainer.cs +++ b/src/sample/generated/Models/PlannerPlanContainer.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerPlanContainer : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerPlanContainer : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The identifier of the resource that contains the plan. Optional. @@ -17,7 +23,7 @@ public class PlannerPlanContainer : IAdditionalDataHolder, IParsable { public string ContainerId { get; set; } #endif /// The type property - public PlannerContainerType? Type { get; set; } + public global::ApiSdk.Models.PlannerContainerType? Type { get; set; } /// The full canonical URL of the container. Optional. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -27,39 +33,47 @@ public class PlannerPlanContainer : IAdditionalDataHolder, IParsable { public string Url { get; set; } #endif /// - /// Instantiates a new plannerPlanContainer and sets the default values. + /// Instantiates a new and sets the default values. /// - public PlannerPlanContainer() { + public PlannerPlanContainer() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PlannerPlanContainer CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PlannerPlanContainer CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerPlanContainer(); + return new global::ApiSdk.Models.PlannerPlanContainer(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"containerId", n => { ContainerId = n.GetStringValue(); } }, - {"type", n => { Type = n.GetEnumValue(); } }, - {"url", n => { Url = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "containerId", n => { ContainerId = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("containerId", ContainerId); - writer.WriteEnumValue("type", Type); + writer.WriteEnumValue("type", Type); writer.WriteStringValue("url", Url); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerPlanDetails.cs b/src/sample/generated/Models/PlannerPlanDetails.cs index 6acd29e6..cd8db7a4 100644 --- a/src/sample/generated/Models/PlannerPlanDetails.cs +++ b/src/sample/generated/Models/PlannerPlanDetails.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerPlanDetails : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerPlanDetails : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The categoryDescriptions property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerCategoryDescriptions? CategoryDescriptions { get; set; } + public global::ApiSdk.Models.PlannerCategoryDescriptions? CategoryDescriptions { get; set; } #nullable restore #else - public PlannerCategoryDescriptions CategoryDescriptions { get; set; } + public global::ApiSdk.Models.PlannerCategoryDescriptions CategoryDescriptions { get; set; } #endif /// The sharedWith property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerUserIds? SharedWith { get; set; } + public global::ApiSdk.Models.PlannerUserIds? SharedWith { get; set; } #nullable restore #else - public PlannerUserIds SharedWith { get; set; } + public global::ApiSdk.Models.PlannerUserIds SharedWith { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerPlanDetails CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerPlanDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerPlanDetails(); + return new global::ApiSdk.Models.PlannerPlanDetails(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"categoryDescriptions", n => { CategoryDescriptions = n.GetObjectValue(PlannerCategoryDescriptions.CreateFromDiscriminatorValue); } }, - {"sharedWith", n => { SharedWith = n.GetObjectValue(PlannerUserIds.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "categoryDescriptions", n => { CategoryDescriptions = n.GetObjectValue(global::ApiSdk.Models.PlannerCategoryDescriptions.CreateFromDiscriminatorValue); } }, + { "sharedWith", n => { SharedWith = n.GetObjectValue(global::ApiSdk.Models.PlannerUserIds.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("categoryDescriptions", CategoryDescriptions); - writer.WriteObjectValue("sharedWith", SharedWith); + writer.WriteObjectValue("categoryDescriptions", CategoryDescriptions); + writer.WriteObjectValue("sharedWith", SharedWith); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerPreviewType.cs b/src/sample/generated/Models/PlannerPreviewType.cs index af286359..d7e9f2dd 100644 --- a/src/sample/generated/Models/PlannerPreviewType.cs +++ b/src/sample/generated/Models/PlannerPreviewType.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PlannerPreviewType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PlannerPreviewType + #pragma warning restore CS1591 + { [EnumMember(Value = "automatic")] + #pragma warning disable CS1591 Automatic, + #pragma warning restore CS1591 [EnumMember(Value = "noPreview")] + #pragma warning disable CS1591 NoPreview, + #pragma warning restore CS1591 [EnumMember(Value = "checklist")] + #pragma warning disable CS1591 Checklist, + #pragma warning restore CS1591 [EnumMember(Value = "description")] + #pragma warning disable CS1591 Description, + #pragma warning restore CS1591 [EnumMember(Value = "reference")] + #pragma warning disable CS1591 Reference, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PlannerProgressTaskBoardTaskFormat.cs b/src/sample/generated/Models/PlannerProgressTaskBoardTaskFormat.cs index 703f121e..edc6f403 100644 --- a/src/sample/generated/Models/PlannerProgressTaskBoardTaskFormat.cs +++ b/src/sample/generated/Models/PlannerProgressTaskBoardTaskFormat.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerProgressTaskBoardTaskFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerProgressTaskBoardTaskFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Hint value used to order the task on the progress view of the task board. For details about the supported format, see Using order hints in Planner. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class PlannerProgressTaskBoardTaskFormat : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerProgressTaskBoardTaskFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerProgressTaskBoardTaskFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerProgressTaskBoardTaskFormat(); + return new global::ApiSdk.Models.PlannerProgressTaskBoardTaskFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"orderHint", n => { OrderHint = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "orderHint", n => { OrderHint = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("orderHint", OrderHint); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerTask.cs b/src/sample/generated/Models/PlannerTask.cs index fc5bba6d..1219aefa 100644 --- a/src/sample/generated/Models/PlannerTask.cs +++ b/src/sample/generated/Models/PlannerTask.cs @@ -1,28 +1,34 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerTask : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerTask : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Number of checklist items with value set to false, representing incomplete items. public int? ActiveChecklistItemCount { get; set; } /// The appliedCategories property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerAppliedCategories? AppliedCategories { get; set; } + public global::ApiSdk.Models.PlannerAppliedCategories? AppliedCategories { get; set; } #nullable restore #else - public PlannerAppliedCategories AppliedCategories { get; set; } + public global::ApiSdk.Models.PlannerAppliedCategories AppliedCategories { get; set; } #endif /// The assignedToTaskBoardFormat property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerAssignedToTaskBoardTaskFormat? AssignedToTaskBoardFormat { get; set; } + public global::ApiSdk.Models.PlannerAssignedToTaskBoardTaskFormat? AssignedToTaskBoardFormat { get; set; } #nullable restore #else - public PlannerAssignedToTaskBoardTaskFormat AssignedToTaskBoardFormat { get; set; } + public global::ApiSdk.Models.PlannerAssignedToTaskBoardTaskFormat AssignedToTaskBoardFormat { get; set; } #endif /// Hint used to order items of this type in a list view. The format is defined as outlined here. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -35,12 +41,12 @@ public class PlannerTask : Entity, IParsable { /// The assignments property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerAssignments? Assignments { get; set; } + public global::ApiSdk.Models.PlannerAssignments? Assignments { get; set; } #nullable restore #else - public PlannerAssignments Assignments { get; set; } + public global::ApiSdk.Models.PlannerAssignments Assignments { get; set; } #endif - /// Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It is 28 characters long and case-sensitive. Format validation is done on the service. + /// Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It's 28 characters long and case-sensitive. Format validation is done on the service. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? BucketId { get; set; } @@ -51,20 +57,20 @@ public class PlannerTask : Entity, IParsable { /// The bucketTaskBoardFormat property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerBucketTaskBoardTaskFormat? BucketTaskBoardFormat { get; set; } + public global::ApiSdk.Models.PlannerBucketTaskBoardTaskFormat? BucketTaskBoardFormat { get; set; } #nullable restore #else - public PlannerBucketTaskBoardTaskFormat BucketTaskBoardFormat { get; set; } + public global::ApiSdk.Models.PlannerBucketTaskBoardTaskFormat BucketTaskBoardFormat { get; set; } #endif /// Number of checklist items that are present on the task. public int? ChecklistItemCount { get; set; } /// The completedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? CompletedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? CompletedBy { get; set; } #nullable restore #else - public IdentitySet CompletedBy { get; set; } + public global::ApiSdk.Models.IdentitySet CompletedBy { get; set; } #endif /// Read-only. Date and time at which the 'percentComplete' of the task is set to '100'. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? CompletedDateTime { get; set; } @@ -79,24 +85,24 @@ public class PlannerTask : Entity, IParsable { /// The createdBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? CreatedBy { get; set; } #nullable restore #else - public IdentitySet CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet CreatedBy { get; set; } #endif /// Read-only. Date and time at which the task is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? CreatedDateTime { get; set; } /// The details property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerTaskDetails? Details { get; set; } + public global::ApiSdk.Models.PlannerTaskDetails? Details { get; set; } #nullable restore #else - public PlannerTaskDetails Details { get; set; } + public global::ApiSdk.Models.PlannerTaskDetails Details { get; set; } #endif /// Date and time at which the task is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? DueDateTime { get; set; } - /// Read-only. Value is true if the details object of the task has a non-empty description and false otherwise. + /// Read-only. Value is true if the details object of the task has a nonempty description and false otherwise. public bool? HasDescription { get; set; } /// Hint used to order items of this type in a list view. The format is defined as outlined here. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -117,16 +123,16 @@ public class PlannerTask : Entity, IParsable { public string PlanId { get; set; } #endif /// The previewType property - public PlannerPreviewType? PreviewType { get; set; } + public global::ApiSdk.Models.PlannerPreviewType? PreviewType { get; set; } /// Priority of the task. The valid range of values is between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority). Currently, Planner interprets values 0 and 1 as 'urgent', 2, 3 and 4 as 'important', 5, 6, and 7 as 'medium', and 8, 9, and 10 as 'low'. Additionally, Planner sets the value 1 for 'urgent', 3 for 'important', 5 for 'medium', and 9 for 'low'. public int? Priority { get; set; } /// The progressTaskBoardFormat property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerProgressTaskBoardTaskFormat? ProgressTaskBoardFormat { get; set; } + public global::ApiSdk.Models.PlannerProgressTaskBoardTaskFormat? ProgressTaskBoardFormat { get; set; } #nullable restore #else - public PlannerProgressTaskBoardTaskFormat ProgressTaskBoardFormat { get; set; } + public global::ApiSdk.Models.PlannerProgressTaskBoardTaskFormat ProgressTaskBoardFormat { get; set; } #endif /// Number of external references that exist on the task. public int? ReferenceCount { get; set; } @@ -143,75 +149,82 @@ public class PlannerTask : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerTask CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerTask CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerTask(); + return new global::ApiSdk.Models.PlannerTask(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"activeChecklistItemCount", n => { ActiveChecklistItemCount = n.GetIntValue(); } }, - {"appliedCategories", n => { AppliedCategories = n.GetObjectValue(PlannerAppliedCategories.CreateFromDiscriminatorValue); } }, - {"assignedToTaskBoardFormat", n => { AssignedToTaskBoardFormat = n.GetObjectValue(PlannerAssignedToTaskBoardTaskFormat.CreateFromDiscriminatorValue); } }, - {"assigneePriority", n => { AssigneePriority = n.GetStringValue(); } }, - {"assignments", n => { Assignments = n.GetObjectValue(PlannerAssignments.CreateFromDiscriminatorValue); } }, - {"bucketId", n => { BucketId = n.GetStringValue(); } }, - {"bucketTaskBoardFormat", n => { BucketTaskBoardFormat = n.GetObjectValue(PlannerBucketTaskBoardTaskFormat.CreateFromDiscriminatorValue); } }, - {"checklistItemCount", n => { ChecklistItemCount = n.GetIntValue(); } }, - {"completedBy", n => { CompletedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"completedDateTime", n => { CompletedDateTime = n.GetDateTimeOffsetValue(); } }, - {"conversationThreadId", n => { ConversationThreadId = n.GetStringValue(); } }, - {"createdBy", n => { CreatedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"details", n => { Details = n.GetObjectValue(PlannerTaskDetails.CreateFromDiscriminatorValue); } }, - {"dueDateTime", n => { DueDateTime = n.GetDateTimeOffsetValue(); } }, - {"hasDescription", n => { HasDescription = n.GetBoolValue(); } }, - {"orderHint", n => { OrderHint = n.GetStringValue(); } }, - {"percentComplete", n => { PercentComplete = n.GetIntValue(); } }, - {"planId", n => { PlanId = n.GetStringValue(); } }, - {"previewType", n => { PreviewType = n.GetEnumValue(); } }, - {"priority", n => { Priority = n.GetIntValue(); } }, - {"progressTaskBoardFormat", n => { ProgressTaskBoardFormat = n.GetObjectValue(PlannerProgressTaskBoardTaskFormat.CreateFromDiscriminatorValue); } }, - {"referenceCount", n => { ReferenceCount = n.GetIntValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, - {"title", n => { Title = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "activeChecklistItemCount", n => { ActiveChecklistItemCount = n.GetIntValue(); } }, + { "appliedCategories", n => { AppliedCategories = n.GetObjectValue(global::ApiSdk.Models.PlannerAppliedCategories.CreateFromDiscriminatorValue); } }, + { "assignedToTaskBoardFormat", n => { AssignedToTaskBoardFormat = n.GetObjectValue(global::ApiSdk.Models.PlannerAssignedToTaskBoardTaskFormat.CreateFromDiscriminatorValue); } }, + { "assigneePriority", n => { AssigneePriority = n.GetStringValue(); } }, + { "assignments", n => { Assignments = n.GetObjectValue(global::ApiSdk.Models.PlannerAssignments.CreateFromDiscriminatorValue); } }, + { "bucketId", n => { BucketId = n.GetStringValue(); } }, + { "bucketTaskBoardFormat", n => { BucketTaskBoardFormat = n.GetObjectValue(global::ApiSdk.Models.PlannerBucketTaskBoardTaskFormat.CreateFromDiscriminatorValue); } }, + { "checklistItemCount", n => { ChecklistItemCount = n.GetIntValue(); } }, + { "completedBy", n => { CompletedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "completedDateTime", n => { CompletedDateTime = n.GetDateTimeOffsetValue(); } }, + { "conversationThreadId", n => { ConversationThreadId = n.GetStringValue(); } }, + { "createdBy", n => { CreatedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "details", n => { Details = n.GetObjectValue(global::ApiSdk.Models.PlannerTaskDetails.CreateFromDiscriminatorValue); } }, + { "dueDateTime", n => { DueDateTime = n.GetDateTimeOffsetValue(); } }, + { "hasDescription", n => { HasDescription = n.GetBoolValue(); } }, + { "orderHint", n => { OrderHint = n.GetStringValue(); } }, + { "percentComplete", n => { PercentComplete = n.GetIntValue(); } }, + { "planId", n => { PlanId = n.GetStringValue(); } }, + { "previewType", n => { PreviewType = n.GetEnumValue(); } }, + { "priority", n => { Priority = n.GetIntValue(); } }, + { "progressTaskBoardFormat", n => { ProgressTaskBoardFormat = n.GetObjectValue(global::ApiSdk.Models.PlannerProgressTaskBoardTaskFormat.CreateFromDiscriminatorValue); } }, + { "referenceCount", n => { ReferenceCount = n.GetIntValue(); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeChecklistItemCount", ActiveChecklistItemCount); - writer.WriteObjectValue("appliedCategories", AppliedCategories); - writer.WriteObjectValue("assignedToTaskBoardFormat", AssignedToTaskBoardFormat); + writer.WriteObjectValue("appliedCategories", AppliedCategories); + writer.WriteObjectValue("assignedToTaskBoardFormat", AssignedToTaskBoardFormat); writer.WriteStringValue("assigneePriority", AssigneePriority); - writer.WriteObjectValue("assignments", Assignments); + writer.WriteObjectValue("assignments", Assignments); writer.WriteStringValue("bucketId", BucketId); - writer.WriteObjectValue("bucketTaskBoardFormat", BucketTaskBoardFormat); + writer.WriteObjectValue("bucketTaskBoardFormat", BucketTaskBoardFormat); writer.WriteIntValue("checklistItemCount", ChecklistItemCount); - writer.WriteObjectValue("completedBy", CompletedBy); + writer.WriteObjectValue("completedBy", CompletedBy); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteStringValue("conversationThreadId", ConversationThreadId); - writer.WriteObjectValue("createdBy", CreatedBy); + writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("details", Details); + writer.WriteObjectValue("details", Details); writer.WriteDateTimeOffsetValue("dueDateTime", DueDateTime); writer.WriteBoolValue("hasDescription", HasDescription); writer.WriteStringValue("orderHint", OrderHint); writer.WriteIntValue("percentComplete", PercentComplete); writer.WriteStringValue("planId", PlanId); - writer.WriteEnumValue("previewType", PreviewType); + writer.WriteEnumValue("previewType", PreviewType); writer.WriteIntValue("priority", Priority); - writer.WriteObjectValue("progressTaskBoardFormat", ProgressTaskBoardFormat); + writer.WriteObjectValue("progressTaskBoardFormat", ProgressTaskBoardFormat); writer.WriteIntValue("referenceCount", ReferenceCount); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); writer.WriteStringValue("title", Title); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerTaskDetails.cs b/src/sample/generated/Models/PlannerTaskDetails.cs index ebeaeb90..ea425483 100644 --- a/src/sample/generated/Models/PlannerTaskDetails.cs +++ b/src/sample/generated/Models/PlannerTaskDetails.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerTaskDetails : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerTaskDetails : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The checklist property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerChecklistItems? Checklist { get; set; } + public global::ApiSdk.Models.PlannerChecklistItems? Checklist { get; set; } #nullable restore #else - public PlannerChecklistItems Checklist { get; set; } + public global::ApiSdk.Models.PlannerChecklistItems Checklist { get; set; } #endif /// Description of the task. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -23,45 +29,52 @@ public class PlannerTaskDetails : Entity, IParsable { public string Description { get; set; } #endif /// The previewType property - public PlannerPreviewType? PreviewType { get; set; } + public global::ApiSdk.Models.PlannerPreviewType? PreviewType { get; set; } /// The references property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerExternalReferences? References { get; set; } + public global::ApiSdk.Models.PlannerExternalReferences? References { get; set; } #nullable restore #else - public PlannerExternalReferences References { get; set; } + public global::ApiSdk.Models.PlannerExternalReferences References { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerTaskDetails CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerTaskDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerTaskDetails(); + return new global::ApiSdk.Models.PlannerTaskDetails(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"checklist", n => { Checklist = n.GetObjectValue(PlannerChecklistItems.CreateFromDiscriminatorValue); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"previewType", n => { PreviewType = n.GetEnumValue(); } }, - {"references", n => { References = n.GetObjectValue(PlannerExternalReferences.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "checklist", n => { Checklist = n.GetObjectValue(global::ApiSdk.Models.PlannerChecklistItems.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "previewType", n => { PreviewType = n.GetEnumValue(); } }, + { "references", n => { References = n.GetObjectValue(global::ApiSdk.Models.PlannerExternalReferences.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("checklist", Checklist); + writer.WriteObjectValue("checklist", Checklist); writer.WriteStringValue("description", Description); - writer.WriteEnumValue("previewType", PreviewType); - writer.WriteObjectValue("references", References); + writer.WriteEnumValue("previewType", PreviewType); + writer.WriteObjectValue("references", References); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerUser.cs b/src/sample/generated/Models/PlannerUser.cs index 9389252d..f2aec07d 100644 --- a/src/sample/generated/Models/PlannerUser.cs +++ b/src/sample/generated/Models/PlannerUser.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerUser : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerUser : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Read-only. Nullable. Returns the plannerTasks assigned to the user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Plans { get; set; } + public List? Plans { get; set; } #nullable restore #else - public List Plans { get; set; } + public List Plans { get; set; } #endif /// Read-only. Nullable. Returns the plannerPlans shared with the user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tasks { get; set; } + public List? Tasks { get; set; } #nullable restore #else - public List Tasks { get; set; } + public List Tasks { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PlannerUser CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PlannerUser CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerUser(); + return new global::ApiSdk.Models.PlannerUser(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"plans", n => { Plans = n.GetCollectionOfObjectValues(PlannerPlan.CreateFromDiscriminatorValue)?.ToList(); } }, - {"tasks", n => { Tasks = n.GetCollectionOfObjectValues(PlannerTask.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "plans", n => { Plans = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PlannerPlan.CreateFromDiscriminatorValue)?.AsList(); } }, + { "tasks", n => { Tasks = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PlannerTask.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("plans", Plans); - writer.WriteCollectionOfObjectValues("tasks", Tasks); + writer.WriteCollectionOfObjectValues("plans", Plans); + writer.WriteCollectionOfObjectValues("tasks", Tasks); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PlannerUserIds.cs b/src/sample/generated/Models/PlannerUserIds.cs index 26c34e0d..2945c448 100644 --- a/src/sample/generated/Models/PlannerUserIds.cs +++ b/src/sample/generated/Models/PlannerUserIds.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PlannerUserIds : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PlannerUserIds : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new plannerUserIds and sets the default values. + /// Instantiates a new and sets the default values. /// - public PlannerUserIds() { + public PlannerUserIds() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PlannerUserIds CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PlannerUserIds CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PlannerUserIds(); + return new global::ApiSdk.Models.PlannerUserIds(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PolicyBase.cs b/src/sample/generated/Models/PolicyBase.cs index 4bfc11d3..c6d5eab6 100644 --- a/src/sample/generated/Models/PolicyBase.cs +++ b/src/sample/generated/Models/PolicyBase.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PolicyBase : DirectoryObject, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PolicyBase : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { /// Description for this policy. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -25,25 +31,31 @@ public class PolicyBase : DirectoryObject, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PolicyBase CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PolicyBase CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PolicyBase(); + return new global::ApiSdk.Models.PolicyBase(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); @@ -51,3 +63,4 @@ public class PolicyBase : DirectoryObject, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PolicyPlatformType.cs b/src/sample/generated/Models/PolicyPlatformType.cs index 4050da63..9aae2941 100644 --- a/src/sample/generated/Models/PolicyPlatformType.cs +++ b/src/sample/generated/Models/PolicyPlatformType.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Supported platform types for policies. - public enum PolicyPlatformType { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum PolicyPlatformType + { /// Android. [EnumMember(Value = "android")] Android, diff --git a/src/sample/generated/Models/Post.cs b/src/sample/generated/Models/Post.cs index f1b5f994..d9fcd6b6 100644 --- a/src/sample/generated/Models/Post.cs +++ b/src/sample/generated/Models/Post.cs @@ -1,26 +1,32 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Post : OutlookItem, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Post : global::ApiSdk.Models.OutlookItem, IParsable + #pragma warning restore CS1591 + { /// Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Attachments { get; set; } + public List? Attachments { get; set; } #nullable restore #else - public List Attachments { get; set; } + public List Attachments { get; set; } #endif /// The body property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemBody? Body { get; set; } + public global::ApiSdk.Models.ItemBody? Body { get; set; } #nullable restore #else - public ItemBody Body { get; set; } + public global::ApiSdk.Models.ItemBody Body { get; set; } #endif /// Unique ID of the conversation. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,111 +47,118 @@ public class Post : OutlookItem, IParsable { /// The collection of open extensions defined for the post. Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif /// The from property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Recipient? From { get; set; } + public global::ApiSdk.Models.Recipient? From { get; set; } #nullable restore #else - public Recipient From { get; set; } + public global::ApiSdk.Models.Recipient From { get; set; } #endif /// Indicates whether the post has at least one attachment. This is a default property. public bool? HasAttachments { get; set; } /// The inReplyTo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Post? InReplyTo { get; set; } + public global::ApiSdk.Models.Post? InReplyTo { get; set; } #nullable restore #else - public Post InReplyTo { get; set; } + public global::ApiSdk.Models.Post InReplyTo { get; set; } #endif /// The collection of multi-value extended properties defined for the post. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MultiValueExtendedProperties { get; set; } + public List? MultiValueExtendedProperties { get; set; } #nullable restore #else - public List MultiValueExtendedProperties { get; set; } + public List MultiValueExtendedProperties { get; set; } #endif /// Conversation participants that were added to the thread as part of this post. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? NewParticipants { get; set; } + public List? NewParticipants { get; set; } #nullable restore #else - public List NewParticipants { get; set; } + public List NewParticipants { get; set; } #endif /// Specifies when the post was received. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? ReceivedDateTime { get; set; } /// The sender property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Recipient? Sender { get; set; } + public global::ApiSdk.Models.Recipient? Sender { get; set; } #nullable restore #else - public Recipient Sender { get; set; } + public global::ApiSdk.Models.Recipient Sender { get; set; } #endif /// The collection of single-value extended properties defined for the post. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SingleValueExtendedProperties { get; set; } + public List? SingleValueExtendedProperties { get; set; } #nullable restore #else - public List SingleValueExtendedProperties { get; set; } + public List SingleValueExtendedProperties { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Post CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Post CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Post(); + return new global::ApiSdk.Models.Post(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"attachments", n => { Attachments = n.GetCollectionOfObjectValues(Attachment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"body", n => { Body = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, - {"conversationId", n => { ConversationId = n.GetStringValue(); } }, - {"conversationThreadId", n => { ConversationThreadId = n.GetStringValue(); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"from", n => { From = n.GetObjectValue(Recipient.CreateFromDiscriminatorValue); } }, - {"hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, - {"inReplyTo", n => { InReplyTo = n.GetObjectValue(Post.CreateFromDiscriminatorValue); } }, - {"multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, - {"newParticipants", n => { NewParticipants = n.GetCollectionOfObjectValues(Recipient.CreateFromDiscriminatorValue)?.ToList(); } }, - {"receivedDateTime", n => { ReceivedDateTime = n.GetDateTimeOffsetValue(); } }, - {"sender", n => { Sender = n.GetObjectValue(Recipient.CreateFromDiscriminatorValue); } }, - {"singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "attachments", n => { Attachments = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Attachment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "body", n => { Body = n.GetObjectValue(global::ApiSdk.Models.ItemBody.CreateFromDiscriminatorValue); } }, + { "conversationId", n => { ConversationId = n.GetStringValue(); } }, + { "conversationThreadId", n => { ConversationThreadId = n.GetStringValue(); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "from", n => { From = n.GetObjectValue(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue); } }, + { "hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, + { "inReplyTo", n => { InReplyTo = n.GetObjectValue(global::ApiSdk.Models.Post.CreateFromDiscriminatorValue); } }, + { "multiValueExtendedProperties", n => { MultiValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MultiValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + { "newParticipants", n => { NewParticipants = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue)?.AsList(); } }, + { "receivedDateTime", n => { ReceivedDateTime = n.GetDateTimeOffsetValue(); } }, + { "sender", n => { Sender = n.GetObjectValue(global::ApiSdk.Models.Recipient.CreateFromDiscriminatorValue); } }, + { "singleValueExtendedProperties", n => { SingleValueExtendedProperties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SingleValueLegacyExtendedProperty.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("attachments", Attachments); - writer.WriteObjectValue("body", Body); + writer.WriteCollectionOfObjectValues("attachments", Attachments); + writer.WriteObjectValue("body", Body); writer.WriteStringValue("conversationId", ConversationId); writer.WriteStringValue("conversationThreadId", ConversationThreadId); - writer.WriteCollectionOfObjectValues("extensions", Extensions); - writer.WriteObjectValue("from", From); + writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteObjectValue("from", From); writer.WriteBoolValue("hasAttachments", HasAttachments); - writer.WriteObjectValue("inReplyTo", InReplyTo); - writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); - writer.WriteCollectionOfObjectValues("newParticipants", NewParticipants); + writer.WriteObjectValue("inReplyTo", InReplyTo); + writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); + writer.WriteCollectionOfObjectValues("newParticipants", NewParticipants); writer.WriteDateTimeOffsetValue("receivedDateTime", ReceivedDateTime); - writer.WriteObjectValue("sender", Sender); - writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); + writer.WriteObjectValue("sender", Sender); + writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PreAuthorizedApplication.cs b/src/sample/generated/Models/PreAuthorizedApplication.cs index 8eebe2da..999c1045 100644 --- a/src/sample/generated/Models/PreAuthorizedApplication.cs +++ b/src/sample/generated/Models/PreAuthorizedApplication.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PreAuthorizedApplication : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PreAuthorizedApplication : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The unique identifier for the application. @@ -25,33 +31,40 @@ public class PreAuthorizedApplication : IAdditionalDataHolder, IParsable { public List DelegatedPermissionIds { get; set; } #endif /// - /// Instantiates a new preAuthorizedApplication and sets the default values. + /// Instantiates a new and sets the default values. /// - public PreAuthorizedApplication() { + public PreAuthorizedApplication() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PreAuthorizedApplication CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PreAuthorizedApplication CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PreAuthorizedApplication(); + return new global::ApiSdk.Models.PreAuthorizedApplication(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"appId", n => { AppId = n.GetStringValue(); } }, - {"delegatedPermissionIds", n => { DelegatedPermissionIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "appId", n => { AppId = n.GetStringValue(); } }, + { "delegatedPermissionIds", n => { DelegatedPermissionIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteCollectionOfPrimitiveValues("delegatedPermissionIds", DelegatedPermissionIds); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Presence.cs b/src/sample/generated/Models/Presence.cs index 018668d6..2bdd2509 100644 --- a/src/sample/generated/Models/Presence.cs +++ b/src/sample/generated/Models/Presence.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Presence : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Presence : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The supplemental information to a user's availability. Possible values are Available, Away, BeRightBack, Busy, DoNotDisturb, InACall, InAConferenceCall, Inactive, InAMeeting, Offline, OffWork, OutOfOffice, PresenceUnknown, Presenting, UrgentInterruptionsOnly. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -25,39 +31,46 @@ public class Presence : Entity, IParsable { /// The statusMessage property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PresenceStatusMessage? StatusMessage { get; set; } + public global::ApiSdk.Models.PresenceStatusMessage? StatusMessage { get; set; } #nullable restore #else - public PresenceStatusMessage StatusMessage { get; set; } + public global::ApiSdk.Models.PresenceStatusMessage StatusMessage { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Presence CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Presence CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Presence(); + return new global::ApiSdk.Models.Presence(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"activity", n => { Activity = n.GetStringValue(); } }, - {"availability", n => { Availability = n.GetStringValue(); } }, - {"statusMessage", n => { StatusMessage = n.GetObjectValue(PresenceStatusMessage.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "activity", n => { Activity = n.GetStringValue(); } }, + { "availability", n => { Availability = n.GetStringValue(); } }, + { "statusMessage", n => { StatusMessage = n.GetObjectValue(global::ApiSdk.Models.PresenceStatusMessage.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activity", Activity); writer.WriteStringValue("availability", Availability); - writer.WriteObjectValue("statusMessage", StatusMessage); + writer.WriteObjectValue("statusMessage", StatusMessage); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PresenceStatusMessage.cs b/src/sample/generated/Models/PresenceStatusMessage.cs index 61adf802..d06f7188 100644 --- a/src/sample/generated/Models/PresenceStatusMessage.cs +++ b/src/sample/generated/Models/PresenceStatusMessage.cs @@ -1,65 +1,79 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PresenceStatusMessage : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PresenceStatusMessage : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The expiryDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? ExpiryDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? ExpiryDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone ExpiryDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone ExpiryDateTime { get; set; } #endif /// The message property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemBody? Message { get; set; } + public global::ApiSdk.Models.ItemBody? Message { get; set; } #nullable restore #else - public ItemBody Message { get; set; } + public global::ApiSdk.Models.ItemBody Message { get; set; } #endif - /// Time in which the status message was published.Read-only.publishedDateTime is not available when you request the presence of another user. + /// Time in which the status message was published.Read-only.publishedDateTime isn't available when you request the presence of another user. public DateTimeOffset? PublishedDateTime { get; set; } /// - /// Instantiates a new presenceStatusMessage and sets the default values. + /// Instantiates a new and sets the default values. /// - public PresenceStatusMessage() { + public PresenceStatusMessage() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PresenceStatusMessage CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PresenceStatusMessage CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PresenceStatusMessage(); + return new global::ApiSdk.Models.PresenceStatusMessage(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"expiryDateTime", n => { ExpiryDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"message", n => { Message = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, - {"publishedDateTime", n => { PublishedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "expiryDateTime", n => { ExpiryDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetObjectValue(global::ApiSdk.Models.ItemBody.CreateFromDiscriminatorValue); } }, + { "publishedDateTime", n => { PublishedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("expiryDateTime", ExpiryDateTime); - writer.WriteObjectValue("message", Message); + writer.WriteObjectValue("expiryDateTime", ExpiryDateTime); + writer.WriteObjectValue("message", Message); writer.WriteDateTimeOffsetValue("publishedDateTime", PublishedDateTime); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintColorMode.cs b/src/sample/generated/Models/PrintColorMode.cs index b0277335..81d7cbed 100644 --- a/src/sample/generated/Models/PrintColorMode.cs +++ b/src/sample/generated/Models/PrintColorMode.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintColorMode { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintColorMode + #pragma warning restore CS1591 + { [EnumMember(Value = "blackAndWhite")] + #pragma warning disable CS1591 BlackAndWhite, + #pragma warning restore CS1591 [EnumMember(Value = "grayscale")] + #pragma warning disable CS1591 Grayscale, + #pragma warning restore CS1591 [EnumMember(Value = "color")] + #pragma warning disable CS1591 Color, + #pragma warning restore CS1591 [EnumMember(Value = "auto")] + #pragma warning disable CS1591 Auto, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintConnector.cs b/src/sample/generated/Models/PrintConnector.cs index c341bcaf..09dc7101 100644 --- a/src/sample/generated/Models/PrintConnector.cs +++ b/src/sample/generated/Models/PrintConnector.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintConnector : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintConnector : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The connector's version. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -33,10 +39,10 @@ public class PrintConnector : Entity, IParsable { /// The location property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrinterLocation? Location { get; set; } + public global::ApiSdk.Models.PrinterLocation? Location { get; set; } #nullable restore #else - public PrinterLocation Location { get; set; } + public global::ApiSdk.Models.PrinterLocation Location { get; set; } #endif /// The connector machine's operating system version. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -51,37 +57,44 @@ public class PrintConnector : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PrintConnector CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PrintConnector CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintConnector(); + return new global::ApiSdk.Models.PrintConnector(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"appVersion", n => { AppVersion = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"fullyQualifiedDomainName", n => { FullyQualifiedDomainName = n.GetStringValue(); } }, - {"location", n => { Location = n.GetObjectValue(PrinterLocation.CreateFromDiscriminatorValue); } }, - {"operatingSystem", n => { OperatingSystem = n.GetStringValue(); } }, - {"registeredDateTime", n => { RegisteredDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "appVersion", n => { AppVersion = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "fullyQualifiedDomainName", n => { FullyQualifiedDomainName = n.GetStringValue(); } }, + { "location", n => { Location = n.GetObjectValue(global::ApiSdk.Models.PrinterLocation.CreateFromDiscriminatorValue); } }, + { "operatingSystem", n => { OperatingSystem = n.GetStringValue(); } }, + { "registeredDateTime", n => { RegisteredDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appVersion", AppVersion); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("fullyQualifiedDomainName", FullyQualifiedDomainName); - writer.WriteObjectValue("location", Location); + writer.WriteObjectValue("location", Location); writer.WriteStringValue("operatingSystem", OperatingSystem); writer.WriteDateTimeOffsetValue("registeredDateTime", RegisteredDateTime); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintDocument.cs b/src/sample/generated/Models/PrintDocument.cs index 40d37160..4d601f76 100644 --- a/src/sample/generated/Models/PrintDocument.cs +++ b/src/sample/generated/Models/PrintDocument.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintDocument : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintDocument : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The document's content (MIME) type. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -27,26 +33,32 @@ public class PrintDocument : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PrintDocument CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PrintDocument CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintDocument(); + return new global::ApiSdk.Models.PrintDocument(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"contentType", n => { ContentType = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"size", n => { Size = n.GetLongValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "contentType", n => { ContentType = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "size", n => { Size = n.GetLongValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentType", ContentType); @@ -55,3 +67,4 @@ public class PrintDocument : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintDuplexMode.cs b/src/sample/generated/Models/PrintDuplexMode.cs index f7107a0a..32566a06 100644 --- a/src/sample/generated/Models/PrintDuplexMode.cs +++ b/src/sample/generated/Models/PrintDuplexMode.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintDuplexMode { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintDuplexMode + #pragma warning restore CS1591 + { [EnumMember(Value = "flipOnLongEdge")] + #pragma warning disable CS1591 FlipOnLongEdge, + #pragma warning restore CS1591 [EnumMember(Value = "flipOnShortEdge")] + #pragma warning disable CS1591 FlipOnShortEdge, + #pragma warning restore CS1591 [EnumMember(Value = "oneSided")] + #pragma warning disable CS1591 OneSided, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintEvent.cs b/src/sample/generated/Models/PrintEvent.cs index 8d026ef9..8efd5bdf 100644 --- a/src/sample/generated/Models/PrintEvent.cs +++ b/src/sample/generated/Models/PrintEvent.cs @@ -1,11 +1,20 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintEvent { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintEvent + #pragma warning restore CS1591 + { [EnumMember(Value = "jobStarted")] + #pragma warning disable CS1591 JobStarted, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintFinishing.cs b/src/sample/generated/Models/PrintFinishing.cs index 5168bd21..a899c950 100644 --- a/src/sample/generated/Models/PrintFinishing.cs +++ b/src/sample/generated/Models/PrintFinishing.cs @@ -1,47 +1,276 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintFinishing { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintFinishing + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "staple")] + #pragma warning disable CS1591 Staple, + #pragma warning restore CS1591 [EnumMember(Value = "punch")] + #pragma warning disable CS1591 Punch, + #pragma warning restore CS1591 [EnumMember(Value = "cover")] + #pragma warning disable CS1591 Cover, + #pragma warning restore CS1591 [EnumMember(Value = "bind")] + #pragma warning disable CS1591 Bind, + #pragma warning restore CS1591 [EnumMember(Value = "saddleStitch")] + #pragma warning disable CS1591 SaddleStitch, + #pragma warning restore CS1591 [EnumMember(Value = "stitchEdge")] + #pragma warning disable CS1591 StitchEdge, + #pragma warning restore CS1591 [EnumMember(Value = "stapleTopLeft")] + #pragma warning disable CS1591 StapleTopLeft, + #pragma warning restore CS1591 [EnumMember(Value = "stapleBottomLeft")] + #pragma warning disable CS1591 StapleBottomLeft, + #pragma warning restore CS1591 [EnumMember(Value = "stapleTopRight")] + #pragma warning disable CS1591 StapleTopRight, + #pragma warning restore CS1591 [EnumMember(Value = "stapleBottomRight")] + #pragma warning disable CS1591 StapleBottomRight, + #pragma warning restore CS1591 [EnumMember(Value = "stitchLeftEdge")] + #pragma warning disable CS1591 StitchLeftEdge, + #pragma warning restore CS1591 [EnumMember(Value = "stitchTopEdge")] + #pragma warning disable CS1591 StitchTopEdge, + #pragma warning restore CS1591 [EnumMember(Value = "stitchRightEdge")] + #pragma warning disable CS1591 StitchRightEdge, + #pragma warning restore CS1591 [EnumMember(Value = "stitchBottomEdge")] + #pragma warning disable CS1591 StitchBottomEdge, + #pragma warning restore CS1591 [EnumMember(Value = "stapleDualLeft")] + #pragma warning disable CS1591 StapleDualLeft, + #pragma warning restore CS1591 [EnumMember(Value = "stapleDualTop")] + #pragma warning disable CS1591 StapleDualTop, + #pragma warning restore CS1591 [EnumMember(Value = "stapleDualRight")] + #pragma warning disable CS1591 StapleDualRight, + #pragma warning restore CS1591 [EnumMember(Value = "stapleDualBottom")] + #pragma warning disable CS1591 StapleDualBottom, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 + [EnumMember(Value = "stapleTripleLeft")] + #pragma warning disable CS1591 + StapleTripleLeft, + #pragma warning restore CS1591 + [EnumMember(Value = "stapleTripleTop")] + #pragma warning disable CS1591 + StapleTripleTop, + #pragma warning restore CS1591 + [EnumMember(Value = "stapleTripleRight")] + #pragma warning disable CS1591 + StapleTripleRight, + #pragma warning restore CS1591 + [EnumMember(Value = "stapleTripleBottom")] + #pragma warning disable CS1591 + StapleTripleBottom, + #pragma warning restore CS1591 + [EnumMember(Value = "bindLeft")] + #pragma warning disable CS1591 + BindLeft, + #pragma warning restore CS1591 + [EnumMember(Value = "bindTop")] + #pragma warning disable CS1591 + BindTop, + #pragma warning restore CS1591 + [EnumMember(Value = "bindRight")] + #pragma warning disable CS1591 + BindRight, + #pragma warning restore CS1591 + [EnumMember(Value = "bindBottom")] + #pragma warning disable CS1591 + BindBottom, + #pragma warning restore CS1591 + [EnumMember(Value = "foldAccordion")] + #pragma warning disable CS1591 + FoldAccordion, + #pragma warning restore CS1591 + [EnumMember(Value = "foldDoubleGate")] + #pragma warning disable CS1591 + FoldDoubleGate, + #pragma warning restore CS1591 + [EnumMember(Value = "foldGate")] + #pragma warning disable CS1591 + FoldGate, + #pragma warning restore CS1591 + [EnumMember(Value = "foldHalf")] + #pragma warning disable CS1591 + FoldHalf, + #pragma warning restore CS1591 + [EnumMember(Value = "foldHalfZ")] + #pragma warning disable CS1591 + FoldHalfZ, + #pragma warning restore CS1591 + [EnumMember(Value = "foldLeftGate")] + #pragma warning disable CS1591 + FoldLeftGate, + #pragma warning restore CS1591 + [EnumMember(Value = "foldLetter")] + #pragma warning disable CS1591 + FoldLetter, + #pragma warning restore CS1591 + [EnumMember(Value = "foldParallel")] + #pragma warning disable CS1591 + FoldParallel, + #pragma warning restore CS1591 + [EnumMember(Value = "foldPoster")] + #pragma warning disable CS1591 + FoldPoster, + #pragma warning restore CS1591 + [EnumMember(Value = "foldRightGate")] + #pragma warning disable CS1591 + FoldRightGate, + #pragma warning restore CS1591 + [EnumMember(Value = "foldZ")] + #pragma warning disable CS1591 + FoldZ, + #pragma warning restore CS1591 + [EnumMember(Value = "foldEngineeringZ")] + #pragma warning disable CS1591 + FoldEngineeringZ, + #pragma warning restore CS1591 + [EnumMember(Value = "punchTopLeft")] + #pragma warning disable CS1591 + PunchTopLeft, + #pragma warning restore CS1591 + [EnumMember(Value = "punchBottomLeft")] + #pragma warning disable CS1591 + PunchBottomLeft, + #pragma warning restore CS1591 + [EnumMember(Value = "punchTopRight")] + #pragma warning disable CS1591 + PunchTopRight, + #pragma warning restore CS1591 + [EnumMember(Value = "punchBottomRight")] + #pragma warning disable CS1591 + PunchBottomRight, + #pragma warning restore CS1591 + [EnumMember(Value = "punchDualLeft")] + #pragma warning disable CS1591 + PunchDualLeft, + #pragma warning restore CS1591 + [EnumMember(Value = "punchDualTop")] + #pragma warning disable CS1591 + PunchDualTop, + #pragma warning restore CS1591 + [EnumMember(Value = "punchDualRight")] + #pragma warning disable CS1591 + PunchDualRight, + #pragma warning restore CS1591 + [EnumMember(Value = "punchDualBottom")] + #pragma warning disable CS1591 + PunchDualBottom, + #pragma warning restore CS1591 + [EnumMember(Value = "punchTripleLeft")] + #pragma warning disable CS1591 + PunchTripleLeft, + #pragma warning restore CS1591 + [EnumMember(Value = "punchTripleTop")] + #pragma warning disable CS1591 + PunchTripleTop, + #pragma warning restore CS1591 + [EnumMember(Value = "punchTripleRight")] + #pragma warning disable CS1591 + PunchTripleRight, + #pragma warning restore CS1591 + [EnumMember(Value = "punchTripleBottom")] + #pragma warning disable CS1591 + PunchTripleBottom, + #pragma warning restore CS1591 + [EnumMember(Value = "punchQuadLeft")] + #pragma warning disable CS1591 + PunchQuadLeft, + #pragma warning restore CS1591 + [EnumMember(Value = "punchQuadTop")] + #pragma warning disable CS1591 + PunchQuadTop, + #pragma warning restore CS1591 + [EnumMember(Value = "punchQuadRight")] + #pragma warning disable CS1591 + PunchQuadRight, + #pragma warning restore CS1591 + [EnumMember(Value = "punchQuadBottom")] + #pragma warning disable CS1591 + PunchQuadBottom, + #pragma warning restore CS1591 + [EnumMember(Value = "fold")] + #pragma warning disable CS1591 + Fold, + #pragma warning restore CS1591 + [EnumMember(Value = "trim")] + #pragma warning disable CS1591 + Trim, + #pragma warning restore CS1591 + [EnumMember(Value = "bale")] + #pragma warning disable CS1591 + Bale, + #pragma warning restore CS1591 + [EnumMember(Value = "bookletMaker")] + #pragma warning disable CS1591 + BookletMaker, + #pragma warning restore CS1591 + [EnumMember(Value = "coat")] + #pragma warning disable CS1591 + Coat, + #pragma warning restore CS1591 + [EnumMember(Value = "laminate")] + #pragma warning disable CS1591 + Laminate, + #pragma warning restore CS1591 + [EnumMember(Value = "trimAfterPages")] + #pragma warning disable CS1591 + TrimAfterPages, + #pragma warning restore CS1591 + [EnumMember(Value = "trimAfterDocuments")] + #pragma warning disable CS1591 + TrimAfterDocuments, + #pragma warning restore CS1591 + [EnumMember(Value = "trimAfterCopies")] + #pragma warning disable CS1591 + TrimAfterCopies, + #pragma warning restore CS1591 + [EnumMember(Value = "trimAfterJob")] + #pragma warning disable CS1591 + TrimAfterJob, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintJob.cs b/src/sample/generated/Models/PrintJob.cs index fc525489..d53069e3 100644 --- a/src/sample/generated/Models/PrintJob.cs +++ b/src/sample/generated/Models/PrintJob.cs @@ -1,36 +1,42 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintJob : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintJob : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The configuration property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrintJobConfiguration? Configuration { get; set; } + public global::ApiSdk.Models.PrintJobConfiguration? Configuration { get; set; } #nullable restore #else - public PrintJobConfiguration Configuration { get; set; } + public global::ApiSdk.Models.PrintJobConfiguration Configuration { get; set; } #endif /// The createdBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public UserIdentity? CreatedBy { get; set; } + public global::ApiSdk.Models.UserIdentity? CreatedBy { get; set; } #nullable restore #else - public UserIdentity CreatedBy { get; set; } + public global::ApiSdk.Models.UserIdentity CreatedBy { get; set; } #endif /// The DateTimeOffset when the job was created. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } /// The documents property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Documents { get; set; } + public List? Documents { get; set; } #nullable restore #else - public List Documents { get; set; } + public List Documents { get; set; } #endif /// If true, document can be fetched by printer. public bool? IsFetchable { get; set; } @@ -53,59 +59,66 @@ public class PrintJob : Entity, IParsable { /// The status property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrintJobStatus? Status { get; set; } + public global::ApiSdk.Models.PrintJobStatus? Status { get; set; } #nullable restore #else - public PrintJobStatus Status { get; set; } + public global::ApiSdk.Models.PrintJobStatus Status { get; set; } #endif /// A list of printTasks that were triggered by this print job. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tasks { get; set; } + public List? Tasks { get; set; } #nullable restore #else - public List Tasks { get; set; } + public List Tasks { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PrintJob CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PrintJob CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintJob(); + return new global::ApiSdk.Models.PrintJob(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"configuration", n => { Configuration = n.GetObjectValue(PrintJobConfiguration.CreateFromDiscriminatorValue); } }, - {"createdBy", n => { CreatedBy = n.GetObjectValue(UserIdentity.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"documents", n => { Documents = n.GetCollectionOfObjectValues(PrintDocument.CreateFromDiscriminatorValue)?.ToList(); } }, - {"isFetchable", n => { IsFetchable = n.GetBoolValue(); } }, - {"redirectedFrom", n => { RedirectedFrom = n.GetStringValue(); } }, - {"redirectedTo", n => { RedirectedTo = n.GetStringValue(); } }, - {"status", n => { Status = n.GetObjectValue(PrintJobStatus.CreateFromDiscriminatorValue); } }, - {"tasks", n => { Tasks = n.GetCollectionOfObjectValues(PrintTask.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "configuration", n => { Configuration = n.GetObjectValue(global::ApiSdk.Models.PrintJobConfiguration.CreateFromDiscriminatorValue); } }, + { "createdBy", n => { CreatedBy = n.GetObjectValue(global::ApiSdk.Models.UserIdentity.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "documents", n => { Documents = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PrintDocument.CreateFromDiscriminatorValue)?.AsList(); } }, + { "isFetchable", n => { IsFetchable = n.GetBoolValue(); } }, + { "redirectedFrom", n => { RedirectedFrom = n.GetStringValue(); } }, + { "redirectedTo", n => { RedirectedTo = n.GetStringValue(); } }, + { "status", n => { Status = n.GetObjectValue(global::ApiSdk.Models.PrintJobStatus.CreateFromDiscriminatorValue); } }, + { "tasks", n => { Tasks = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PrintTask.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("configuration", Configuration); - writer.WriteObjectValue("createdBy", CreatedBy); + writer.WriteObjectValue("configuration", Configuration); + writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteCollectionOfObjectValues("documents", Documents); + writer.WriteCollectionOfObjectValues("documents", Documents); writer.WriteBoolValue("isFetchable", IsFetchable); writer.WriteStringValue("redirectedFrom", RedirectedFrom); writer.WriteStringValue("redirectedTo", RedirectedTo); - writer.WriteObjectValue("status", Status); - writer.WriteCollectionOfObjectValues("tasks", Tasks); + writer.WriteObjectValue("status", Status); + writer.WriteCollectionOfObjectValues("tasks", Tasks); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintJobConfiguration.cs b/src/sample/generated/Models/PrintJobConfiguration.cs index e0fc9d94..2fd7191d 100644 --- a/src/sample/generated/Models/PrintJobConfiguration.cs +++ b/src/sample/generated/Models/PrintJobConfiguration.cs @@ -1,34 +1,40 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintJobConfiguration : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintJobConfiguration : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Whether the printer should collate pages wehen printing multiple copies of a multi-page document. public bool? Collate { get; set; } /// The colorMode property - public PrintColorMode? ColorMode { get; set; } + public global::ApiSdk.Models.PrintColorMode? ColorMode { get; set; } /// The number of copies that should be printed. Read-only. public int? Copies { get; set; } /// The resolution to use when printing the job, expressed in dots per inch (DPI). Read-only. public int? Dpi { get; set; } /// The duplexMode property - public PrintDuplexMode? DuplexMode { get; set; } + public global::ApiSdk.Models.PrintDuplexMode? DuplexMode { get; set; } /// The feedOrientation property - public PrinterFeedOrientation? FeedOrientation { get; set; } + public global::ApiSdk.Models.PrinterFeedOrientation? FeedOrientation { get; set; } /// Finishing processes to use when printing. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Finishings { get; set; } + public List? Finishings { get; set; } #nullable restore #else - public List Finishings { get; set; } + public List Finishings { get; set; } #endif - /// The fitPdfToPage property + /// True to fit each page of a PDF document to a physical sheet of media; false to let the printer decide how to lay out impressions. public bool? FitPdfToPage { get; set; } /// The input bin (tray) to use when printing. See the printer's capabilities for a list of supported input bins. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,12 +47,12 @@ public class PrintJobConfiguration : IAdditionalDataHolder, IParsable { /// The margin property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrintMargin? Margin { get; set; } + public global::ApiSdk.Models.PrintMargin? Margin { get; set; } #nullable restore #else - public PrintMargin Margin { get; set; } + public global::ApiSdk.Models.PrintMargin Margin { get; set; } #endif - /// The media size to use when printing. Supports standard size names for ISO and ANSI media sizes. + /// The media size to use when printing. Supports standard size names for ISO and ANSI media sizes. Valid values listed in the printerCapabilities topic. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? MediaSize { get; set; } @@ -54,7 +60,7 @@ public class PrintJobConfiguration : IAdditionalDataHolder, IParsable { #else public string MediaSize { get; set; } #endif - /// The mediaType property + /// The default media (such as paper) type to print the document on. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? MediaType { get; set; } @@ -63,10 +69,10 @@ public class PrintJobConfiguration : IAdditionalDataHolder, IParsable { public string MediaType { get; set; } #endif /// The multipageLayout property - public PrintMultipageLayout? MultipageLayout { get; set; } + public global::ApiSdk.Models.PrintMultipageLayout? MultipageLayout { get; set; } /// The orientation property - public PrintOrientation? Orientation { get; set; } - /// The outputBin property + public global::ApiSdk.Models.PrintOrientation? Orientation { get; set; } + /// The output bin to place completed prints into. See the printer's capabilities for a list of supported output bins. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OutputBin { get; set; } @@ -74,86 +80,94 @@ public class PrintJobConfiguration : IAdditionalDataHolder, IParsable { #else public string OutputBin { get; set; } #endif - /// The pageRanges property + /// The page ranges to print. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PageRanges { get; set; } + public List? PageRanges { get; set; } #nullable restore #else - public List PageRanges { get; set; } + public List PageRanges { get; set; } #endif - /// The pagesPerSheet property + /// The number of document pages to print on each sheet. public int? PagesPerSheet { get; set; } /// The quality property - public PrintQuality? Quality { get; set; } + public global::ApiSdk.Models.PrintQuality? Quality { get; set; } /// The scaling property - public PrintScaling? Scaling { get; set; } + public global::ApiSdk.Models.PrintScaling? Scaling { get; set; } /// - /// Instantiates a new printJobConfiguration and sets the default values. + /// Instantiates a new and sets the default values. /// - public PrintJobConfiguration() { + public PrintJobConfiguration() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PrintJobConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PrintJobConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintJobConfiguration(); + return new global::ApiSdk.Models.PrintJobConfiguration(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"collate", n => { Collate = n.GetBoolValue(); } }, - {"colorMode", n => { ColorMode = n.GetEnumValue(); } }, - {"copies", n => { Copies = n.GetIntValue(); } }, - {"dpi", n => { Dpi = n.GetIntValue(); } }, - {"duplexMode", n => { DuplexMode = n.GetEnumValue(); } }, - {"feedOrientation", n => { FeedOrientation = n.GetEnumValue(); } }, - {"finishings", n => { Finishings = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"fitPdfToPage", n => { FitPdfToPage = n.GetBoolValue(); } }, - {"inputBin", n => { InputBin = n.GetStringValue(); } }, - {"margin", n => { Margin = n.GetObjectValue(PrintMargin.CreateFromDiscriminatorValue); } }, - {"mediaSize", n => { MediaSize = n.GetStringValue(); } }, - {"mediaType", n => { MediaType = n.GetStringValue(); } }, - {"multipageLayout", n => { MultipageLayout = n.GetEnumValue(); } }, - {"orientation", n => { Orientation = n.GetEnumValue(); } }, - {"outputBin", n => { OutputBin = n.GetStringValue(); } }, - {"pageRanges", n => { PageRanges = n.GetCollectionOfObjectValues(IntegerRange.CreateFromDiscriminatorValue)?.ToList(); } }, - {"pagesPerSheet", n => { PagesPerSheet = n.GetIntValue(); } }, - {"quality", n => { Quality = n.GetEnumValue(); } }, - {"scaling", n => { Scaling = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "collate", n => { Collate = n.GetBoolValue(); } }, + { "colorMode", n => { ColorMode = n.GetEnumValue(); } }, + { "copies", n => { Copies = n.GetIntValue(); } }, + { "dpi", n => { Dpi = n.GetIntValue(); } }, + { "duplexMode", n => { DuplexMode = n.GetEnumValue(); } }, + { "feedOrientation", n => { FeedOrientation = n.GetEnumValue(); } }, + { "finishings", n => { Finishings = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "fitPdfToPage", n => { FitPdfToPage = n.GetBoolValue(); } }, + { "inputBin", n => { InputBin = n.GetStringValue(); } }, + { "margin", n => { Margin = n.GetObjectValue(global::ApiSdk.Models.PrintMargin.CreateFromDiscriminatorValue); } }, + { "mediaSize", n => { MediaSize = n.GetStringValue(); } }, + { "mediaType", n => { MediaType = n.GetStringValue(); } }, + { "multipageLayout", n => { MultipageLayout = n.GetEnumValue(); } }, + { "orientation", n => { Orientation = n.GetEnumValue(); } }, + { "outputBin", n => { OutputBin = n.GetStringValue(); } }, + { "pageRanges", n => { PageRanges = n.GetCollectionOfObjectValues(global::ApiSdk.Models.IntegerRange.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pagesPerSheet", n => { PagesPerSheet = n.GetIntValue(); } }, + { "quality", n => { Quality = n.GetEnumValue(); } }, + { "scaling", n => { Scaling = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("collate", Collate); - writer.WriteEnumValue("colorMode", ColorMode); + writer.WriteEnumValue("colorMode", ColorMode); writer.WriteIntValue("copies", Copies); writer.WriteIntValue("dpi", Dpi); - writer.WriteEnumValue("duplexMode", DuplexMode); - writer.WriteEnumValue("feedOrientation", FeedOrientation); - writer.WriteCollectionOfEnumValues("finishings", Finishings); + writer.WriteEnumValue("duplexMode", DuplexMode); + writer.WriteEnumValue("feedOrientation", FeedOrientation); + writer.WriteCollectionOfEnumValues("finishings", Finishings); writer.WriteBoolValue("fitPdfToPage", FitPdfToPage); writer.WriteStringValue("inputBin", InputBin); - writer.WriteObjectValue("margin", Margin); + writer.WriteObjectValue("margin", Margin); writer.WriteStringValue("mediaSize", MediaSize); writer.WriteStringValue("mediaType", MediaType); - writer.WriteEnumValue("multipageLayout", MultipageLayout); - writer.WriteEnumValue("orientation", Orientation); + writer.WriteEnumValue("multipageLayout", MultipageLayout); + writer.WriteEnumValue("orientation", Orientation); writer.WriteStringValue("outputBin", OutputBin); - writer.WriteCollectionOfObjectValues("pageRanges", PageRanges); + writer.WriteCollectionOfObjectValues("pageRanges", PageRanges); writer.WriteIntValue("pagesPerSheet", PagesPerSheet); - writer.WriteEnumValue("quality", Quality); - writer.WriteEnumValue("scaling", Scaling); + writer.WriteEnumValue("quality", Quality); + writer.WriteEnumValue("scaling", Scaling); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintJobProcessingState.cs b/src/sample/generated/Models/PrintJobProcessingState.cs index 8ab0e9d7..476dc0e5 100644 --- a/src/sample/generated/Models/PrintJobProcessingState.cs +++ b/src/sample/generated/Models/PrintJobProcessingState.cs @@ -1,25 +1,48 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintJobProcessingState { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintJobProcessingState + #pragma warning restore CS1591 + { [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 Unknown, + #pragma warning restore CS1591 [EnumMember(Value = "pending")] + #pragma warning disable CS1591 Pending, + #pragma warning restore CS1591 [EnumMember(Value = "processing")] + #pragma warning disable CS1591 Processing, + #pragma warning restore CS1591 [EnumMember(Value = "paused")] + #pragma warning disable CS1591 Paused, + #pragma warning restore CS1591 [EnumMember(Value = "stopped")] + #pragma warning disable CS1591 Stopped, + #pragma warning restore CS1591 [EnumMember(Value = "completed")] + #pragma warning disable CS1591 Completed, + #pragma warning restore CS1591 [EnumMember(Value = "canceled")] + #pragma warning disable CS1591 Canceled, + #pragma warning restore CS1591 [EnumMember(Value = "aborted")] + #pragma warning disable CS1591 Aborted, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintJobStateDetail.cs b/src/sample/generated/Models/PrintJobStateDetail.cs index f2e5af84..d3475214 100644 --- a/src/sample/generated/Models/PrintJobStateDetail.cs +++ b/src/sample/generated/Models/PrintJobStateDetail.cs @@ -1,23 +1,44 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintJobStateDetail { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintJobStateDetail + #pragma warning restore CS1591 + { [EnumMember(Value = "uploadPending")] + #pragma warning disable CS1591 UploadPending, + #pragma warning restore CS1591 [EnumMember(Value = "transforming")] + #pragma warning disable CS1591 Transforming, + #pragma warning restore CS1591 [EnumMember(Value = "completedSuccessfully")] + #pragma warning disable CS1591 CompletedSuccessfully, + #pragma warning restore CS1591 [EnumMember(Value = "completedWithWarnings")] + #pragma warning disable CS1591 CompletedWithWarnings, + #pragma warning restore CS1591 [EnumMember(Value = "completedWithErrors")] + #pragma warning disable CS1591 CompletedWithErrors, + #pragma warning restore CS1591 [EnumMember(Value = "releaseWait")] + #pragma warning disable CS1591 ReleaseWait, + #pragma warning restore CS1591 [EnumMember(Value = "interpreting")] + #pragma warning disable CS1591 Interpreting, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintJobStatus.cs b/src/sample/generated/Models/PrintJobStatus.cs index 90af409b..866f1cb1 100644 --- a/src/sample/generated/Models/PrintJobStatus.cs +++ b/src/sample/generated/Models/PrintJobStatus.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintJobStatus : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintJobStatus : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A human-readable description of the print job's current processing state. Read-only. @@ -19,51 +25,59 @@ public class PrintJobStatus : IAdditionalDataHolder, IParsable { /// Additional details for print job state. Valid values are described in the following table. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Details { get; set; } + public List? Details { get; set; } #nullable restore #else - public List Details { get; set; } + public List Details { get; set; } #endif /// True if the job was acknowledged by a printer; false otherwise. Read-only. public bool? IsAcquiredByPrinter { get; set; } /// The state property - public PrintJobProcessingState? State { get; set; } + public global::ApiSdk.Models.PrintJobProcessingState? State { get; set; } /// - /// Instantiates a new printJobStatus and sets the default values. + /// Instantiates a new and sets the default values. /// - public PrintJobStatus() { + public PrintJobStatus() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PrintJobStatus CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PrintJobStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintJobStatus(); + return new global::ApiSdk.Models.PrintJobStatus(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"description", n => { Description = n.GetStringValue(); } }, - {"details", n => { Details = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"isAcquiredByPrinter", n => { IsAcquiredByPrinter = n.GetBoolValue(); } }, - {"state", n => { State = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "details", n => { Details = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "isAcquiredByPrinter", n => { IsAcquiredByPrinter = n.GetBoolValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); - writer.WriteCollectionOfEnumValues("details", Details); + writer.WriteCollectionOfEnumValues("details", Details); writer.WriteBoolValue("isAcquiredByPrinter", IsAcquiredByPrinter); - writer.WriteEnumValue("state", State); + writer.WriteEnumValue("state", State); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintMargin.cs b/src/sample/generated/Models/PrintMargin.cs index ecbc7cbf..5b915e6e 100644 --- a/src/sample/generated/Models/PrintMargin.cs +++ b/src/sample/generated/Models/PrintMargin.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintMargin : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintMargin : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The margin in microns from the bottom edge. @@ -17,35 +23,42 @@ public class PrintMargin : IAdditionalDataHolder, IParsable { /// The margin in microns from the top edge. public int? Top { get; set; } /// - /// Instantiates a new printMargin and sets the default values. + /// Instantiates a new and sets the default values. /// - public PrintMargin() { + public PrintMargin() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PrintMargin CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PrintMargin CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintMargin(); + return new global::ApiSdk.Models.PrintMargin(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"bottom", n => { Bottom = n.GetIntValue(); } }, - {"left", n => { Left = n.GetIntValue(); } }, - {"right", n => { Right = n.GetIntValue(); } }, - {"top", n => { Top = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bottom", n => { Bottom = n.GetIntValue(); } }, + { "left", n => { Left = n.GetIntValue(); } }, + { "right", n => { Right = n.GetIntValue(); } }, + { "top", n => { Top = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("bottom", Bottom); writer.WriteIntValue("left", Left); @@ -55,3 +68,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintMultipageLayout.cs b/src/sample/generated/Models/PrintMultipageLayout.cs index abb78543..bec0a547 100644 --- a/src/sample/generated/Models/PrintMultipageLayout.cs +++ b/src/sample/generated/Models/PrintMultipageLayout.cs @@ -1,25 +1,48 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintMultipageLayout { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintMultipageLayout + #pragma warning restore CS1591 + { [EnumMember(Value = "clockwiseFromTopLeft")] + #pragma warning disable CS1591 ClockwiseFromTopLeft, + #pragma warning restore CS1591 [EnumMember(Value = "counterclockwiseFromTopLeft")] + #pragma warning disable CS1591 CounterclockwiseFromTopLeft, + #pragma warning restore CS1591 [EnumMember(Value = "counterclockwiseFromTopRight")] + #pragma warning disable CS1591 CounterclockwiseFromTopRight, + #pragma warning restore CS1591 [EnumMember(Value = "clockwiseFromTopRight")] + #pragma warning disable CS1591 ClockwiseFromTopRight, + #pragma warning restore CS1591 [EnumMember(Value = "counterclockwiseFromBottomLeft")] + #pragma warning disable CS1591 CounterclockwiseFromBottomLeft, + #pragma warning restore CS1591 [EnumMember(Value = "clockwiseFromBottomLeft")] + #pragma warning disable CS1591 ClockwiseFromBottomLeft, + #pragma warning restore CS1591 [EnumMember(Value = "counterclockwiseFromBottomRight")] + #pragma warning disable CS1591 CounterclockwiseFromBottomRight, + #pragma warning restore CS1591 [EnumMember(Value = "clockwiseFromBottomRight")] + #pragma warning disable CS1591 ClockwiseFromBottomRight, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintOrientation.cs b/src/sample/generated/Models/PrintOrientation.cs index 3464c155..0620a456 100644 --- a/src/sample/generated/Models/PrintOrientation.cs +++ b/src/sample/generated/Models/PrintOrientation.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintOrientation { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintOrientation + #pragma warning restore CS1591 + { [EnumMember(Value = "portrait")] + #pragma warning disable CS1591 Portrait, + #pragma warning restore CS1591 [EnumMember(Value = "landscape")] + #pragma warning disable CS1591 Landscape, + #pragma warning restore CS1591 [EnumMember(Value = "reverseLandscape")] + #pragma warning disable CS1591 ReverseLandscape, + #pragma warning restore CS1591 [EnumMember(Value = "reversePortrait")] + #pragma warning disable CS1591 ReversePortrait, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintQuality.cs b/src/sample/generated/Models/PrintQuality.cs index 54dff77e..37b780a4 100644 --- a/src/sample/generated/Models/PrintQuality.cs +++ b/src/sample/generated/Models/PrintQuality.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintQuality { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintQuality + #pragma warning restore CS1591 + { [EnumMember(Value = "low")] + #pragma warning disable CS1591 Low, + #pragma warning restore CS1591 [EnumMember(Value = "medium")] + #pragma warning disable CS1591 Medium, + #pragma warning restore CS1591 [EnumMember(Value = "high")] + #pragma warning disable CS1591 High, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintScaling.cs b/src/sample/generated/Models/PrintScaling.cs index f50ebdb3..a32c6245 100644 --- a/src/sample/generated/Models/PrintScaling.cs +++ b/src/sample/generated/Models/PrintScaling.cs @@ -1,19 +1,36 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintScaling { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintScaling + #pragma warning restore CS1591 + { [EnumMember(Value = "auto")] + #pragma warning disable CS1591 Auto, + #pragma warning restore CS1591 [EnumMember(Value = "shrinkToFit")] + #pragma warning disable CS1591 ShrinkToFit, + #pragma warning restore CS1591 [EnumMember(Value = "fill")] + #pragma warning disable CS1591 Fill, + #pragma warning restore CS1591 [EnumMember(Value = "fit")] + #pragma warning disable CS1591 Fit, + #pragma warning restore CS1591 [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintTask.cs b/src/sample/generated/Models/PrintTask.cs index 8118433c..8cb6a97d 100644 --- a/src/sample/generated/Models/PrintTask.cs +++ b/src/sample/generated/Models/PrintTask.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintTask : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintTask : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The definition property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrintTaskDefinition? Definition { get; set; } + public global::ApiSdk.Models.PrintTaskDefinition? Definition { get; set; } #nullable restore #else - public PrintTaskDefinition Definition { get; set; } + public global::ApiSdk.Models.PrintTaskDefinition Definition { get; set; } #endif /// The URL for the print entity that triggered this task. For example, https://graph.microsoft.com/v1.0/print/printers/{printerId}/jobs/{jobId}. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,49 +31,56 @@ public class PrintTask : Entity, IParsable { /// The status property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrintTaskStatus? Status { get; set; } + public global::ApiSdk.Models.PrintTaskStatus? Status { get; set; } #nullable restore #else - public PrintTaskStatus Status { get; set; } + public global::ApiSdk.Models.PrintTaskStatus Status { get; set; } #endif /// The trigger property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrintTaskTrigger? Trigger { get; set; } + public global::ApiSdk.Models.PrintTaskTrigger? Trigger { get; set; } #nullable restore #else - public PrintTaskTrigger Trigger { get; set; } + public global::ApiSdk.Models.PrintTaskTrigger Trigger { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PrintTask CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PrintTask CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintTask(); + return new global::ApiSdk.Models.PrintTask(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"definition", n => { Definition = n.GetObjectValue(PrintTaskDefinition.CreateFromDiscriminatorValue); } }, - {"parentUrl", n => { ParentUrl = n.GetStringValue(); } }, - {"status", n => { Status = n.GetObjectValue(PrintTaskStatus.CreateFromDiscriminatorValue); } }, - {"trigger", n => { Trigger = n.GetObjectValue(PrintTaskTrigger.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "definition", n => { Definition = n.GetObjectValue(global::ApiSdk.Models.PrintTaskDefinition.CreateFromDiscriminatorValue); } }, + { "parentUrl", n => { ParentUrl = n.GetStringValue(); } }, + { "status", n => { Status = n.GetObjectValue(global::ApiSdk.Models.PrintTaskStatus.CreateFromDiscriminatorValue); } }, + { "trigger", n => { Trigger = n.GetObjectValue(global::ApiSdk.Models.PrintTaskTrigger.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("definition", Definition); + writer.WriteObjectValue("definition", Definition); writer.WriteStringValue("parentUrl", ParentUrl); - writer.WriteObjectValue("status", Status); - writer.WriteObjectValue("trigger", Trigger); + writer.WriteObjectValue("status", Status); + writer.WriteObjectValue("trigger", Trigger); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintTaskDefinition.cs b/src/sample/generated/Models/PrintTaskDefinition.cs index 71ec4dee..9e3ebee6 100644 --- a/src/sample/generated/Models/PrintTaskDefinition.cs +++ b/src/sample/generated/Models/PrintTaskDefinition.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintTaskDefinition : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintTaskDefinition : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The createdBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public AppIdentity? CreatedBy { get; set; } + public global::ApiSdk.Models.AppIdentity? CreatedBy { get; set; } #nullable restore #else - public AppIdentity CreatedBy { get; set; } + public global::ApiSdk.Models.AppIdentity CreatedBy { get; set; } #endif /// The name of the printTaskDefinition. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,39 +31,46 @@ public class PrintTaskDefinition : Entity, IParsable { /// A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tasks { get; set; } + public List? Tasks { get; set; } #nullable restore #else - public List Tasks { get; set; } + public List Tasks { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PrintTaskDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PrintTaskDefinition CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintTaskDefinition(); + return new global::ApiSdk.Models.PrintTaskDefinition(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdBy", n => { CreatedBy = n.GetObjectValue(AppIdentity.CreateFromDiscriminatorValue); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"tasks", n => { Tasks = n.GetCollectionOfObjectValues(PrintTask.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdBy", n => { CreatedBy = n.GetObjectValue(global::ApiSdk.Models.AppIdentity.CreateFromDiscriminatorValue); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "tasks", n => { Tasks = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PrintTask.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("createdBy", CreatedBy); + writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteStringValue("displayName", DisplayName); - writer.WriteCollectionOfObjectValues("tasks", Tasks); + writer.WriteCollectionOfObjectValues("tasks", Tasks); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintTaskProcessingState.cs b/src/sample/generated/Models/PrintTaskProcessingState.cs index ac791849..2ad27d08 100644 --- a/src/sample/generated/Models/PrintTaskProcessingState.cs +++ b/src/sample/generated/Models/PrintTaskProcessingState.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrintTaskProcessingState { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrintTaskProcessingState + #pragma warning restore CS1591 + { [EnumMember(Value = "pending")] + #pragma warning disable CS1591 Pending, + #pragma warning restore CS1591 [EnumMember(Value = "processing")] + #pragma warning disable CS1591 Processing, + #pragma warning restore CS1591 [EnumMember(Value = "completed")] + #pragma warning disable CS1591 Completed, + #pragma warning restore CS1591 [EnumMember(Value = "aborted")] + #pragma warning disable CS1591 Aborted, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrintTaskStatus.cs b/src/sample/generated/Models/PrintTaskStatus.cs index 95fee302..e72cf69a 100644 --- a/src/sample/generated/Models/PrintTaskStatus.cs +++ b/src/sample/generated/Models/PrintTaskStatus.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintTaskStatus : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintTaskStatus : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A human-readable description of the current processing state of the printTask. @@ -17,39 +23,47 @@ public class PrintTaskStatus : IAdditionalDataHolder, IParsable { public string Description { get; set; } #endif /// The state property - public PrintTaskProcessingState? State { get; set; } + public global::ApiSdk.Models.PrintTaskProcessingState? State { get; set; } /// - /// Instantiates a new printTaskStatus and sets the default values. + /// Instantiates a new and sets the default values. /// - public PrintTaskStatus() { + public PrintTaskStatus() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PrintTaskStatus CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PrintTaskStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintTaskStatus(); + return new global::ApiSdk.Models.PrintTaskStatus(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"description", n => { Description = n.GetStringValue(); } }, - {"state", n => { State = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); - writer.WriteEnumValue("state", State); + writer.WriteEnumValue("state", State); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrintTaskTrigger.cs b/src/sample/generated/Models/PrintTaskTrigger.cs index 981487a5..759afab8 100644 --- a/src/sample/generated/Models/PrintTaskTrigger.cs +++ b/src/sample/generated/Models/PrintTaskTrigger.cs @@ -1,47 +1,60 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrintTaskTrigger : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrintTaskTrigger : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The definition property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrintTaskDefinition? Definition { get; set; } + public global::ApiSdk.Models.PrintTaskDefinition? Definition { get; set; } #nullable restore #else - public PrintTaskDefinition Definition { get; set; } + public global::ApiSdk.Models.PrintTaskDefinition Definition { get; set; } #endif /// The event property - public PrintEvent? Event { get; set; } + public global::ApiSdk.Models.PrintEvent? Event { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PrintTaskTrigger CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PrintTaskTrigger CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrintTaskTrigger(); + return new global::ApiSdk.Models.PrintTaskTrigger(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"definition", n => { Definition = n.GetObjectValue(PrintTaskDefinition.CreateFromDiscriminatorValue); } }, - {"event", n => { Event = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "definition", n => { Definition = n.GetObjectValue(global::ApiSdk.Models.PrintTaskDefinition.CreateFromDiscriminatorValue); } }, + { "event", n => { Event = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("definition", Definition); - writer.WriteEnumValue("event", Event); + writer.WriteObjectValue("definition", Definition); + writer.WriteEnumValue("event", Event); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Printer.cs b/src/sample/generated/Models/Printer.cs index 3e244ac5..a8a5003d 100644 --- a/src/sample/generated/Models/Printer.cs +++ b/src/sample/generated/Models/Printer.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Printer : PrinterBase, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Printer : global::ApiSdk.Models.PrinterBase, IParsable + #pragma warning restore CS1591 + { /// The connectors that are associated with the printer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Connectors { get; set; } + public List? Connectors { get; set; } #nullable restore #else - public List Connectors { get; set; } + public List Connectors { get; set; } #endif /// True if the printer has a physical device for printing. Read-only. public bool? HasPhysicalDevice { get; set; } @@ -25,55 +31,62 @@ public class Printer : PrinterBase, IParsable { /// The list of printerShares that are associated with the printer. Currently, only one printerShare can be associated with the printer. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Shares { get; set; } + public List? Shares { get; set; } #nullable restore #else - public List Shares { get; set; } + public List Shares { get; set; } #endif /// A list of task triggers that are associated with the printer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TaskTriggers { get; set; } + public List? TaskTriggers { get; set; } #nullable restore #else - public List TaskTriggers { get; set; } + public List TaskTriggers { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Printer CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Printer CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Printer(); + return new global::ApiSdk.Models.Printer(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"connectors", n => { Connectors = n.GetCollectionOfObjectValues(PrintConnector.CreateFromDiscriminatorValue)?.ToList(); } }, - {"hasPhysicalDevice", n => { HasPhysicalDevice = n.GetBoolValue(); } }, - {"isShared", n => { IsShared = n.GetBoolValue(); } }, - {"lastSeenDateTime", n => { LastSeenDateTime = n.GetDateTimeOffsetValue(); } }, - {"registeredDateTime", n => { RegisteredDateTime = n.GetDateTimeOffsetValue(); } }, - {"shares", n => { Shares = n.GetCollectionOfObjectValues(PrinterShare.CreateFromDiscriminatorValue)?.ToList(); } }, - {"taskTriggers", n => { TaskTriggers = n.GetCollectionOfObjectValues(PrintTaskTrigger.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "connectors", n => { Connectors = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PrintConnector.CreateFromDiscriminatorValue)?.AsList(); } }, + { "hasPhysicalDevice", n => { HasPhysicalDevice = n.GetBoolValue(); } }, + { "isShared", n => { IsShared = n.GetBoolValue(); } }, + { "lastSeenDateTime", n => { LastSeenDateTime = n.GetDateTimeOffsetValue(); } }, + { "registeredDateTime", n => { RegisteredDateTime = n.GetDateTimeOffsetValue(); } }, + { "shares", n => { Shares = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PrinterShare.CreateFromDiscriminatorValue)?.AsList(); } }, + { "taskTriggers", n => { TaskTriggers = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PrintTaskTrigger.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("connectors", Connectors); + writer.WriteCollectionOfObjectValues("connectors", Connectors); writer.WriteBoolValue("hasPhysicalDevice", HasPhysicalDevice); writer.WriteBoolValue("isShared", IsShared); writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); writer.WriteDateTimeOffsetValue("registeredDateTime", RegisteredDateTime); - writer.WriteCollectionOfObjectValues("shares", Shares); - writer.WriteCollectionOfObjectValues("taskTriggers", TaskTriggers); + writer.WriteCollectionOfObjectValues("shares", Shares); + writer.WriteCollectionOfObjectValues("taskTriggers", TaskTriggers); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrinterBase.cs b/src/sample/generated/Models/PrinterBase.cs index d69b353e..68e32a68 100644 --- a/src/sample/generated/Models/PrinterBase.cs +++ b/src/sample/generated/Models/PrinterBase.cs @@ -1,26 +1,32 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrinterBase : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrinterBase : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The capabilities property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrinterCapabilities? Capabilities { get; set; } + public global::ApiSdk.Models.PrinterCapabilities? Capabilities { get; set; } #nullable restore #else - public PrinterCapabilities Capabilities { get; set; } + public global::ApiSdk.Models.PrinterCapabilities Capabilities { get; set; } #endif /// The defaults property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrinterDefaults? Defaults { get; set; } + public global::ApiSdk.Models.PrinterDefaults? Defaults { get; set; } #nullable restore #else - public PrinterDefaults Defaults { get; set; } + public global::ApiSdk.Models.PrinterDefaults Defaults { get; set; } #endif /// The name of the printer/printerShare. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -35,18 +41,18 @@ public class PrinterBase : Entity, IParsable { /// The list of jobs that are queued for printing by the printer/printerShare. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Jobs { get; set; } + public List? Jobs { get; set; } #nullable restore #else - public List Jobs { get; set; } + public List Jobs { get; set; } #endif /// The location property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrinterLocation? Location { get; set; } + public global::ApiSdk.Models.PrinterLocation? Location { get; set; } #nullable restore #else - public PrinterLocation Location { get; set; } + public global::ApiSdk.Models.PrinterLocation Location { get; set; } #endif /// The manufacturer of the printer/printerShare. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -67,51 +73,58 @@ public class PrinterBase : Entity, IParsable { /// The status property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrinterStatus? Status { get; set; } + public global::ApiSdk.Models.PrinterStatus? Status { get; set; } #nullable restore #else - public PrinterStatus Status { get; set; } + public global::ApiSdk.Models.PrinterStatus Status { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PrinterBase CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PrinterBase CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrinterBase(); + return new global::ApiSdk.Models.PrinterBase(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"capabilities", n => { Capabilities = n.GetObjectValue(PrinterCapabilities.CreateFromDiscriminatorValue); } }, - {"defaults", n => { Defaults = n.GetObjectValue(PrinterDefaults.CreateFromDiscriminatorValue); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"isAcceptingJobs", n => { IsAcceptingJobs = n.GetBoolValue(); } }, - {"jobs", n => { Jobs = n.GetCollectionOfObjectValues(PrintJob.CreateFromDiscriminatorValue)?.ToList(); } }, - {"location", n => { Location = n.GetObjectValue(PrinterLocation.CreateFromDiscriminatorValue); } }, - {"manufacturer", n => { Manufacturer = n.GetStringValue(); } }, - {"model", n => { Model = n.GetStringValue(); } }, - {"status", n => { Status = n.GetObjectValue(PrinterStatus.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "capabilities", n => { Capabilities = n.GetObjectValue(global::ApiSdk.Models.PrinterCapabilities.CreateFromDiscriminatorValue); } }, + { "defaults", n => { Defaults = n.GetObjectValue(global::ApiSdk.Models.PrinterDefaults.CreateFromDiscriminatorValue); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "isAcceptingJobs", n => { IsAcceptingJobs = n.GetBoolValue(); } }, + { "jobs", n => { Jobs = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PrintJob.CreateFromDiscriminatorValue)?.AsList(); } }, + { "location", n => { Location = n.GetObjectValue(global::ApiSdk.Models.PrinterLocation.CreateFromDiscriminatorValue); } }, + { "manufacturer", n => { Manufacturer = n.GetStringValue(); } }, + { "model", n => { Model = n.GetStringValue(); } }, + { "status", n => { Status = n.GetObjectValue(global::ApiSdk.Models.PrinterStatus.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("capabilities", Capabilities); - writer.WriteObjectValue("defaults", Defaults); + writer.WriteObjectValue("capabilities", Capabilities); + writer.WriteObjectValue("defaults", Defaults); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("isAcceptingJobs", IsAcceptingJobs); - writer.WriteCollectionOfObjectValues("jobs", Jobs); - writer.WriteObjectValue("location", Location); + writer.WriteCollectionOfObjectValues("jobs", Jobs); + writer.WriteObjectValue("location", Location); writer.WriteStringValue("manufacturer", Manufacturer); writer.WriteStringValue("model", Model); - writer.WriteObjectValue("status", Status); + writer.WriteObjectValue("status", Status); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrinterCapabilities.cs b/src/sample/generated/Models/PrinterCapabilities.cs index 43993ba6..ba665506 100644 --- a/src/sample/generated/Models/PrinterCapabilities.cs +++ b/src/sample/generated/Models/PrinterCapabilities.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrinterCapabilities : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrinterCapabilities : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A list of supported bottom margins(in microns) for the printer. @@ -21,10 +27,10 @@ public class PrinterCapabilities : IAdditionalDataHolder, IParsable { /// The color modes supported by the printer. Valid values are described in the following table. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ColorModes { get; set; } + public List? ColorModes { get; set; } #nullable restore #else - public List ColorModes { get; set; } + public List ColorModes { get; set; } #endif /// A list of supported content (MIME) types that the printer supports. It is not guaranteed that the Universal Print service supports printing all of these MIME types. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -37,10 +43,10 @@ public class PrinterCapabilities : IAdditionalDataHolder, IParsable { /// The copiesPerJob property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IntegerRange? CopiesPerJob { get; set; } + public global::ApiSdk.Models.IntegerRange? CopiesPerJob { get; set; } #nullable restore #else - public IntegerRange CopiesPerJob { get; set; } + public global::ApiSdk.Models.IntegerRange CopiesPerJob { get; set; } #endif /// The list of print resolutions in DPI that are supported by the printer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -53,26 +59,26 @@ public class PrinterCapabilities : IAdditionalDataHolder, IParsable { /// The list of duplex modes that are supported by the printer. Valid values are described in the following table. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DuplexModes { get; set; } + public List? DuplexModes { get; set; } #nullable restore #else - public List DuplexModes { get; set; } + public List DuplexModes { get; set; } #endif /// The list of feed orientations that are supported by the printer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? FeedOrientations { get; set; } + public List? FeedOrientations { get; set; } #nullable restore #else - public List FeedOrientations { get; set; } + public List FeedOrientations { get; set; } #endif /// Finishing processes the printer supports for a printed document. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Finishings { get; set; } + public List? Finishings { get; set; } #nullable restore #else - public List Finishings { get; set; } + public List Finishings { get; set; } #endif /// Supported input bins for the printer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -121,18 +127,18 @@ public class PrinterCapabilities : IAdditionalDataHolder, IParsable { /// The presentation directions supported by the printer. Supported values are described in the following table. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MultipageLayouts { get; set; } + public List? MultipageLayouts { get; set; } #nullable restore #else - public List MultipageLayouts { get; set; } + public List MultipageLayouts { get; set; } #endif /// The print orientations supported by the printer. Valid values are described in the following table. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Orientations { get; set; } + public List? Orientations { get; set; } #nullable restore #else - public List Orientations { get; set; } + public List Orientations { get; set; } #endif /// The printer's supported output bins (trays). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -153,10 +159,10 @@ public class PrinterCapabilities : IAdditionalDataHolder, IParsable { /// The print qualities supported by the printer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Qualities { get; set; } + public List? Qualities { get; set; } #nullable restore #else - public List Qualities { get; set; } + public List Qualities { get; set; } #endif /// A list of supported right margins(in microns) for the printer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -169,10 +175,10 @@ public class PrinterCapabilities : IAdditionalDataHolder, IParsable { /// Supported print scalings. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Scalings { get; set; } + public List? Scalings { get; set; } #nullable restore #else - public List Scalings { get; set; } + public List Scalings { get; set; } #endif /// True if the printer supports scaling PDF pages to match the print media size; false otherwise. public bool? SupportsFitPdfToPage { get; set; } @@ -185,66 +191,73 @@ public class PrinterCapabilities : IAdditionalDataHolder, IParsable { public List TopMargins { get; set; } #endif /// - /// Instantiates a new printerCapabilities and sets the default values. + /// Instantiates a new and sets the default values. /// - public PrinterCapabilities() { + public PrinterCapabilities() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PrinterCapabilities CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PrinterCapabilities CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrinterCapabilities(); + return new global::ApiSdk.Models.PrinterCapabilities(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"bottomMargins", n => { BottomMargins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"collation", n => { Collation = n.GetBoolValue(); } }, - {"colorModes", n => { ColorModes = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"contentTypes", n => { ContentTypes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"copiesPerJob", n => { CopiesPerJob = n.GetObjectValue(IntegerRange.CreateFromDiscriminatorValue); } }, - {"dpis", n => { Dpis = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"duplexModes", n => { DuplexModes = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"feedOrientations", n => { FeedOrientations = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"finishings", n => { Finishings = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"inputBins", n => { InputBins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"isColorPrintingSupported", n => { IsColorPrintingSupported = n.GetBoolValue(); } }, - {"isPageRangeSupported", n => { IsPageRangeSupported = n.GetBoolValue(); } }, - {"leftMargins", n => { LeftMargins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"mediaColors", n => { MediaColors = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"mediaSizes", n => { MediaSizes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"mediaTypes", n => { MediaTypes = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"multipageLayouts", n => { MultipageLayouts = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"orientations", n => { Orientations = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"outputBins", n => { OutputBins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"pagesPerSheet", n => { PagesPerSheet = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"qualities", n => { Qualities = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"rightMargins", n => { RightMargins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"scalings", n => { Scalings = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"supportsFitPdfToPage", n => { SupportsFitPdfToPage = n.GetBoolValue(); } }, - {"topMargins", n => { TopMargins = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bottomMargins", n => { BottomMargins = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "collation", n => { Collation = n.GetBoolValue(); } }, + { "colorModes", n => { ColorModes = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "contentTypes", n => { ContentTypes = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "copiesPerJob", n => { CopiesPerJob = n.GetObjectValue(global::ApiSdk.Models.IntegerRange.CreateFromDiscriminatorValue); } }, + { "dpis", n => { Dpis = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "duplexModes", n => { DuplexModes = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "feedOrientations", n => { FeedOrientations = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "finishings", n => { Finishings = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "inputBins", n => { InputBins = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "isColorPrintingSupported", n => { IsColorPrintingSupported = n.GetBoolValue(); } }, + { "isPageRangeSupported", n => { IsPageRangeSupported = n.GetBoolValue(); } }, + { "leftMargins", n => { LeftMargins = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "mediaColors", n => { MediaColors = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "mediaSizes", n => { MediaSizes = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "mediaTypes", n => { MediaTypes = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "multipageLayouts", n => { MultipageLayouts = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "orientations", n => { Orientations = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "outputBins", n => { OutputBins = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "pagesPerSheet", n => { PagesPerSheet = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "qualities", n => { Qualities = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "rightMargins", n => { RightMargins = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "scalings", n => { Scalings = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "supportsFitPdfToPage", n => { SupportsFitPdfToPage = n.GetBoolValue(); } }, + { "topMargins", n => { TopMargins = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("bottomMargins", BottomMargins); writer.WriteBoolValue("collation", Collation); - writer.WriteCollectionOfEnumValues("colorModes", ColorModes); + writer.WriteCollectionOfEnumValues("colorModes", ColorModes); writer.WriteCollectionOfPrimitiveValues("contentTypes", ContentTypes); - writer.WriteObjectValue("copiesPerJob", CopiesPerJob); + writer.WriteObjectValue("copiesPerJob", CopiesPerJob); writer.WriteCollectionOfPrimitiveValues("dpis", Dpis); - writer.WriteCollectionOfEnumValues("duplexModes", DuplexModes); - writer.WriteCollectionOfEnumValues("feedOrientations", FeedOrientations); - writer.WriteCollectionOfEnumValues("finishings", Finishings); + writer.WriteCollectionOfEnumValues("duplexModes", DuplexModes); + writer.WriteCollectionOfEnumValues("feedOrientations", FeedOrientations); + writer.WriteCollectionOfEnumValues("finishings", Finishings); writer.WriteCollectionOfPrimitiveValues("inputBins", InputBins); writer.WriteBoolValue("isColorPrintingSupported", IsColorPrintingSupported); writer.WriteBoolValue("isPageRangeSupported", IsPageRangeSupported); @@ -252,16 +265,17 @@ public void Serialize(ISerializationWriter writer) { writer.WriteCollectionOfPrimitiveValues("mediaColors", MediaColors); writer.WriteCollectionOfPrimitiveValues("mediaSizes", MediaSizes); writer.WriteCollectionOfPrimitiveValues("mediaTypes", MediaTypes); - writer.WriteCollectionOfEnumValues("multipageLayouts", MultipageLayouts); - writer.WriteCollectionOfEnumValues("orientations", Orientations); + writer.WriteCollectionOfEnumValues("multipageLayouts", MultipageLayouts); + writer.WriteCollectionOfEnumValues("orientations", Orientations); writer.WriteCollectionOfPrimitiveValues("outputBins", OutputBins); writer.WriteCollectionOfPrimitiveValues("pagesPerSheet", PagesPerSheet); - writer.WriteCollectionOfEnumValues("qualities", Qualities); + writer.WriteCollectionOfEnumValues("qualities", Qualities); writer.WriteCollectionOfPrimitiveValues("rightMargins", RightMargins); - writer.WriteCollectionOfEnumValues("scalings", Scalings); + writer.WriteCollectionOfEnumValues("scalings", Scalings); writer.WriteBoolValue("supportsFitPdfToPage", SupportsFitPdfToPage); writer.WriteCollectionOfPrimitiveValues("topMargins", TopMargins); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrinterDefaults.cs b/src/sample/generated/Models/PrinterDefaults.cs index 25d833ab..2726a0c9 100644 --- a/src/sample/generated/Models/PrinterDefaults.cs +++ b/src/sample/generated/Models/PrinterDefaults.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrinterDefaults : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrinterDefaults : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The colorMode property - public PrintColorMode? ColorMode { get; set; } + public global::ApiSdk.Models.PrintColorMode? ColorMode { get; set; } /// The default content (MIME) type to use when processing documents. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -23,18 +29,18 @@ public class PrinterDefaults : IAdditionalDataHolder, IParsable { /// The default resolution in DPI to use when printing the job. public int? Dpi { get; set; } /// The duplexMode property - public PrintDuplexMode? DuplexMode { get; set; } + public global::ApiSdk.Models.PrintDuplexMode? DuplexMode { get; set; } /// The default set of finishings to apply to print jobs. Valid values are described in the following table. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Finishings { get; set; } + public List? Finishings { get; set; } #nullable restore #else - public List Finishings { get; set; } + public List Finishings { get; set; } #endif /// The default fitPdfToPage setting. True to fit each page of a PDF document to a physical sheet of media; false to let the printer decide how to lay out impressions. public bool? FitPdfToPage { get; set; } - /// The inputBin property + /// The default input bin that serves as the paper source. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? InputBin { get; set; } @@ -67,9 +73,9 @@ public class PrinterDefaults : IAdditionalDataHolder, IParsable { public string MediaType { get; set; } #endif /// The multipageLayout property - public PrintMultipageLayout? MultipageLayout { get; set; } + public global::ApiSdk.Models.PrintMultipageLayout? MultipageLayout { get; set; } /// The orientation property - public PrintOrientation? Orientation { get; set; } + public global::ApiSdk.Models.PrintOrientation? Orientation { get; set; } /// The default output bin to place completed prints into. See the printer's capabilities for a list of supported output bins. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -81,71 +87,79 @@ public class PrinterDefaults : IAdditionalDataHolder, IParsable { /// The default number of document pages to print on each sheet. public int? PagesPerSheet { get; set; } /// The quality property - public PrintQuality? Quality { get; set; } + public global::ApiSdk.Models.PrintQuality? Quality { get; set; } /// The scaling property - public PrintScaling? Scaling { get; set; } + public global::ApiSdk.Models.PrintScaling? Scaling { get; set; } /// - /// Instantiates a new printerDefaults and sets the default values. + /// Instantiates a new and sets the default values. /// - public PrinterDefaults() { + public PrinterDefaults() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PrinterDefaults CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PrinterDefaults CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrinterDefaults(); + return new global::ApiSdk.Models.PrinterDefaults(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"colorMode", n => { ColorMode = n.GetEnumValue(); } }, - {"contentType", n => { ContentType = n.GetStringValue(); } }, - {"copiesPerJob", n => { CopiesPerJob = n.GetIntValue(); } }, - {"dpi", n => { Dpi = n.GetIntValue(); } }, - {"duplexMode", n => { DuplexMode = n.GetEnumValue(); } }, - {"finishings", n => { Finishings = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"fitPdfToPage", n => { FitPdfToPage = n.GetBoolValue(); } }, - {"inputBin", n => { InputBin = n.GetStringValue(); } }, - {"mediaColor", n => { MediaColor = n.GetStringValue(); } }, - {"mediaSize", n => { MediaSize = n.GetStringValue(); } }, - {"mediaType", n => { MediaType = n.GetStringValue(); } }, - {"multipageLayout", n => { MultipageLayout = n.GetEnumValue(); } }, - {"orientation", n => { Orientation = n.GetEnumValue(); } }, - {"outputBin", n => { OutputBin = n.GetStringValue(); } }, - {"pagesPerSheet", n => { PagesPerSheet = n.GetIntValue(); } }, - {"quality", n => { Quality = n.GetEnumValue(); } }, - {"scaling", n => { Scaling = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "colorMode", n => { ColorMode = n.GetEnumValue(); } }, + { "contentType", n => { ContentType = n.GetStringValue(); } }, + { "copiesPerJob", n => { CopiesPerJob = n.GetIntValue(); } }, + { "dpi", n => { Dpi = n.GetIntValue(); } }, + { "duplexMode", n => { DuplexMode = n.GetEnumValue(); } }, + { "finishings", n => { Finishings = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "fitPdfToPage", n => { FitPdfToPage = n.GetBoolValue(); } }, + { "inputBin", n => { InputBin = n.GetStringValue(); } }, + { "mediaColor", n => { MediaColor = n.GetStringValue(); } }, + { "mediaSize", n => { MediaSize = n.GetStringValue(); } }, + { "mediaType", n => { MediaType = n.GetStringValue(); } }, + { "multipageLayout", n => { MultipageLayout = n.GetEnumValue(); } }, + { "orientation", n => { Orientation = n.GetEnumValue(); } }, + { "outputBin", n => { OutputBin = n.GetStringValue(); } }, + { "pagesPerSheet", n => { PagesPerSheet = n.GetIntValue(); } }, + { "quality", n => { Quality = n.GetEnumValue(); } }, + { "scaling", n => { Scaling = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("colorMode", ColorMode); + writer.WriteEnumValue("colorMode", ColorMode); writer.WriteStringValue("contentType", ContentType); writer.WriteIntValue("copiesPerJob", CopiesPerJob); writer.WriteIntValue("dpi", Dpi); - writer.WriteEnumValue("duplexMode", DuplexMode); - writer.WriteCollectionOfEnumValues("finishings", Finishings); + writer.WriteEnumValue("duplexMode", DuplexMode); + writer.WriteCollectionOfEnumValues("finishings", Finishings); writer.WriteBoolValue("fitPdfToPage", FitPdfToPage); writer.WriteStringValue("inputBin", InputBin); writer.WriteStringValue("mediaColor", MediaColor); writer.WriteStringValue("mediaSize", MediaSize); writer.WriteStringValue("mediaType", MediaType); - writer.WriteEnumValue("multipageLayout", MultipageLayout); - writer.WriteEnumValue("orientation", Orientation); + writer.WriteEnumValue("multipageLayout", MultipageLayout); + writer.WriteEnumValue("orientation", Orientation); writer.WriteStringValue("outputBin", OutputBin); writer.WriteIntValue("pagesPerSheet", PagesPerSheet); - writer.WriteEnumValue("quality", Quality); - writer.WriteEnumValue("scaling", Scaling); + writer.WriteEnumValue("quality", Quality); + writer.WriteEnumValue("scaling", Scaling); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrinterFeedOrientation.cs b/src/sample/generated/Models/PrinterFeedOrientation.cs index 7905e67d..b68b8a27 100644 --- a/src/sample/generated/Models/PrinterFeedOrientation.cs +++ b/src/sample/generated/Models/PrinterFeedOrientation.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrinterFeedOrientation { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrinterFeedOrientation + #pragma warning restore CS1591 + { [EnumMember(Value = "longEdgeFirst")] + #pragma warning disable CS1591 LongEdgeFirst, + #pragma warning restore CS1591 [EnumMember(Value = "shortEdgeFirst")] + #pragma warning disable CS1591 ShortEdgeFirst, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrinterLocation.cs b/src/sample/generated/Models/PrinterLocation.cs index eed52406..37c4a082 100644 --- a/src/sample/generated/Models/PrinterLocation.cs +++ b/src/sample/generated/Models/PrinterLocation.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrinterLocation : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrinterLocation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The altitude, in meters, that the printer is located at. @@ -127,48 +133,55 @@ public class PrinterLocation : IAdditionalDataHolder, IParsable { public List Subunit { get; set; } #endif /// - /// Instantiates a new printerLocation and sets the default values. + /// Instantiates a new and sets the default values. /// - public PrinterLocation() { + public PrinterLocation() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PrinterLocation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PrinterLocation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrinterLocation(); + return new global::ApiSdk.Models.PrinterLocation(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"altitudeInMeters", n => { AltitudeInMeters = n.GetIntValue(); } }, - {"building", n => { Building = n.GetStringValue(); } }, - {"city", n => { City = n.GetStringValue(); } }, - {"countryOrRegion", n => { CountryOrRegion = n.GetStringValue(); } }, - {"floor", n => { Floor = n.GetStringValue(); } }, - {"floorDescription", n => { FloorDescription = n.GetStringValue(); } }, - {"latitude", n => { Latitude = n.GetDoubleValue(); } }, - {"longitude", n => { Longitude = n.GetDoubleValue(); } }, - {"organization", n => { Organization = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"postalCode", n => { PostalCode = n.GetStringValue(); } }, - {"roomDescription", n => { RoomDescription = n.GetStringValue(); } }, - {"roomName", n => { RoomName = n.GetStringValue(); } }, - {"site", n => { Site = n.GetStringValue(); } }, - {"stateOrProvince", n => { StateOrProvince = n.GetStringValue(); } }, - {"streetAddress", n => { StreetAddress = n.GetStringValue(); } }, - {"subdivision", n => { Subdivision = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"subunit", n => { Subunit = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "altitudeInMeters", n => { AltitudeInMeters = n.GetIntValue(); } }, + { "building", n => { Building = n.GetStringValue(); } }, + { "city", n => { City = n.GetStringValue(); } }, + { "countryOrRegion", n => { CountryOrRegion = n.GetStringValue(); } }, + { "floor", n => { Floor = n.GetStringValue(); } }, + { "floorDescription", n => { FloorDescription = n.GetStringValue(); } }, + { "latitude", n => { Latitude = n.GetDoubleValue(); } }, + { "longitude", n => { Longitude = n.GetDoubleValue(); } }, + { "organization", n => { Organization = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "postalCode", n => { PostalCode = n.GetStringValue(); } }, + { "roomDescription", n => { RoomDescription = n.GetStringValue(); } }, + { "roomName", n => { RoomName = n.GetStringValue(); } }, + { "site", n => { Site = n.GetStringValue(); } }, + { "stateOrProvince", n => { StateOrProvince = n.GetStringValue(); } }, + { "streetAddress", n => { StreetAddress = n.GetStringValue(); } }, + { "subdivision", n => { Subdivision = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "subunit", n => { Subunit = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("altitudeInMeters", AltitudeInMeters); writer.WriteStringValue("building", Building); @@ -191,3 +204,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrinterProcessingState.cs b/src/sample/generated/Models/PrinterProcessingState.cs index 216545cd..fb425518 100644 --- a/src/sample/generated/Models/PrinterProcessingState.cs +++ b/src/sample/generated/Models/PrinterProcessingState.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrinterProcessingState { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrinterProcessingState + #pragma warning restore CS1591 + { [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 Unknown, + #pragma warning restore CS1591 [EnumMember(Value = "idle")] + #pragma warning disable CS1591 Idle, + #pragma warning restore CS1591 [EnumMember(Value = "processing")] + #pragma warning disable CS1591 Processing, + #pragma warning restore CS1591 [EnumMember(Value = "stopped")] + #pragma warning disable CS1591 Stopped, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrinterProcessingStateDetail.cs b/src/sample/generated/Models/PrinterProcessingStateDetail.cs index f293322e..3934553a 100644 --- a/src/sample/generated/Models/PrinterProcessingStateDetail.cs +++ b/src/sample/generated/Models/PrinterProcessingStateDetail.cs @@ -1,1659 +1,3316 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum PrinterProcessingStateDetail { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum PrinterProcessingStateDetail + #pragma warning restore CS1591 + { [EnumMember(Value = "paused")] + #pragma warning disable CS1591 Paused, + #pragma warning restore CS1591 [EnumMember(Value = "mediaJam")] + #pragma warning disable CS1591 MediaJam, + #pragma warning restore CS1591 [EnumMember(Value = "mediaNeeded")] + #pragma warning disable CS1591 MediaNeeded, + #pragma warning restore CS1591 [EnumMember(Value = "mediaLow")] + #pragma warning disable CS1591 MediaLow, + #pragma warning restore CS1591 [EnumMember(Value = "mediaEmpty")] + #pragma warning disable CS1591 MediaEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "coverOpen")] + #pragma warning disable CS1591 CoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "interlockOpen")] + #pragma warning disable CS1591 InterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "outputTrayMissing")] + #pragma warning disable CS1591 OutputTrayMissing, + #pragma warning restore CS1591 [EnumMember(Value = "outputAreaFull")] + #pragma warning disable CS1591 OutputAreaFull, + #pragma warning restore CS1591 [EnumMember(Value = "markerSupplyLow")] + #pragma warning disable CS1591 MarkerSupplyLow, + #pragma warning restore CS1591 [EnumMember(Value = "markerSupplyEmpty")] + #pragma warning disable CS1591 MarkerSupplyEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "inputTrayMissing")] + #pragma warning disable CS1591 InputTrayMissing, + #pragma warning restore CS1591 [EnumMember(Value = "outputAreaAlmostFull")] + #pragma warning disable CS1591 OutputAreaAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "markerWasteAlmostFull")] + #pragma warning disable CS1591 MarkerWasteAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "markerWasteFull")] + #pragma warning disable CS1591 MarkerWasteFull, + #pragma warning restore CS1591 [EnumMember(Value = "fuserOverTemp")] + #pragma warning disable CS1591 FuserOverTemp, + #pragma warning restore CS1591 [EnumMember(Value = "fuserUnderTemp")] + #pragma warning disable CS1591 FuserUnderTemp, + #pragma warning restore CS1591 [EnumMember(Value = "other")] + #pragma warning disable CS1591 Other, + #pragma warning restore CS1591 [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "movingToPaused")] + #pragma warning disable CS1591 MovingToPaused, + #pragma warning restore CS1591 [EnumMember(Value = "shutdown")] + #pragma warning disable CS1591 Shutdown, + #pragma warning restore CS1591 [EnumMember(Value = "connectingToDevice")] + #pragma warning disable CS1591 ConnectingToDevice, + #pragma warning restore CS1591 [EnumMember(Value = "timedOut")] + #pragma warning disable CS1591 TimedOut, + #pragma warning restore CS1591 [EnumMember(Value = "stopping")] + #pragma warning disable CS1591 Stopping, + #pragma warning restore CS1591 [EnumMember(Value = "stoppedPartially")] + #pragma warning disable CS1591 StoppedPartially, + #pragma warning restore CS1591 [EnumMember(Value = "tonerLow")] + #pragma warning disable CS1591 TonerLow, + #pragma warning restore CS1591 [EnumMember(Value = "tonerEmpty")] + #pragma warning disable CS1591 TonerEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "spoolAreaFull")] + #pragma warning disable CS1591 SpoolAreaFull, + #pragma warning restore CS1591 [EnumMember(Value = "doorOpen")] + #pragma warning disable CS1591 DoorOpen, + #pragma warning restore CS1591 [EnumMember(Value = "opticalPhotoConductorNearEndOfLife")] + #pragma warning disable CS1591 OpticalPhotoConductorNearEndOfLife, + #pragma warning restore CS1591 [EnumMember(Value = "opticalPhotoConductorLifeOver")] + #pragma warning disable CS1591 OpticalPhotoConductorLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "developerLow")] + #pragma warning disable CS1591 DeveloperLow, + #pragma warning restore CS1591 [EnumMember(Value = "developerEmpty")] + #pragma warning disable CS1591 DeveloperEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "interpreterResourceUnavailable")] + #pragma warning disable CS1591 InterpreterResourceUnavailable, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 [EnumMember(Value = "alertRemovalOfBinaryChangeEntry")] + #pragma warning disable CS1591 AlertRemovalOfBinaryChangeEntry, + #pragma warning restore CS1591 [EnumMember(Value = "banderAdded")] + #pragma warning disable CS1591 BanderAdded, + #pragma warning restore CS1591 [EnumMember(Value = "banderAlmostEmpty")] + #pragma warning disable CS1591 BanderAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "banderAlmostFull")] + #pragma warning disable CS1591 BanderAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "banderAtLimit")] + #pragma warning disable CS1591 BanderAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "banderClosed")] + #pragma warning disable CS1591 BanderClosed, + #pragma warning restore CS1591 [EnumMember(Value = "banderConfigurationChange")] + #pragma warning disable CS1591 BanderConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "banderCoverClosed")] + #pragma warning disable CS1591 BanderCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "banderCoverOpen")] + #pragma warning disable CS1591 BanderCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "banderEmpty")] + #pragma warning disable CS1591 BanderEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "banderFull")] + #pragma warning disable CS1591 BanderFull, + #pragma warning restore CS1591 [EnumMember(Value = "banderInterlockClosed")] + #pragma warning disable CS1591 BanderInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "banderInterlockOpen")] + #pragma warning disable CS1591 BanderInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "banderJam")] + #pragma warning disable CS1591 BanderJam, + #pragma warning restore CS1591 [EnumMember(Value = "banderLifeAlmostOver")] + #pragma warning disable CS1591 BanderLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "banderLifeOver")] + #pragma warning disable CS1591 BanderLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "banderMemoryExhausted")] + #pragma warning disable CS1591 BanderMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "banderMissing")] + #pragma warning disable CS1591 BanderMissing, + #pragma warning restore CS1591 [EnumMember(Value = "banderMotorFailure")] + #pragma warning disable CS1591 BanderMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "banderNearLimit")] + #pragma warning disable CS1591 BanderNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "banderOffline")] + #pragma warning disable CS1591 BanderOffline, + #pragma warning restore CS1591 [EnumMember(Value = "banderOpened")] + #pragma warning disable CS1591 BanderOpened, + #pragma warning restore CS1591 [EnumMember(Value = "banderOverTemperature")] + #pragma warning disable CS1591 BanderOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "banderPowerSaver")] + #pragma warning disable CS1591 BanderPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "banderRecoverableFailure")] + #pragma warning disable CS1591 BanderRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "banderRecoverableStorage")] + #pragma warning disable CS1591 BanderRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "banderRemoved")] + #pragma warning disable CS1591 BanderRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "banderResourceAdded")] + #pragma warning disable CS1591 BanderResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "banderResourceRemoved")] + #pragma warning disable CS1591 BanderResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "banderThermistorFailure")] + #pragma warning disable CS1591 BanderThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "banderTimingFailure")] + #pragma warning disable CS1591 BanderTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "banderTurnedOff")] + #pragma warning disable CS1591 BanderTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "banderTurnedOn")] + #pragma warning disable CS1591 BanderTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "banderUnderTemperature")] + #pragma warning disable CS1591 BanderUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "banderUnrecoverableFailure")] + #pragma warning disable CS1591 BanderUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "banderUnrecoverableStorageError")] + #pragma warning disable CS1591 BanderUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "banderWarmingUp")] + #pragma warning disable CS1591 BanderWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "binderAdded")] + #pragma warning disable CS1591 BinderAdded, + #pragma warning restore CS1591 [EnumMember(Value = "binderAlmostEmpty")] + #pragma warning disable CS1591 BinderAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "binderAlmostFull")] + #pragma warning disable CS1591 BinderAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "binderAtLimit")] + #pragma warning disable CS1591 BinderAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "binderClosed")] + #pragma warning disable CS1591 BinderClosed, + #pragma warning restore CS1591 [EnumMember(Value = "binderConfigurationChange")] + #pragma warning disable CS1591 BinderConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "binderCoverClosed")] + #pragma warning disable CS1591 BinderCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "binderCoverOpen")] + #pragma warning disable CS1591 BinderCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "binderEmpty")] + #pragma warning disable CS1591 BinderEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "binderFull")] + #pragma warning disable CS1591 BinderFull, + #pragma warning restore CS1591 [EnumMember(Value = "binderInterlockClosed")] + #pragma warning disable CS1591 BinderInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "binderInterlockOpen")] + #pragma warning disable CS1591 BinderInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "binderJam")] + #pragma warning disable CS1591 BinderJam, + #pragma warning restore CS1591 [EnumMember(Value = "binderLifeAlmostOver")] + #pragma warning disable CS1591 BinderLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "binderLifeOver")] + #pragma warning disable CS1591 BinderLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "binderMemoryExhausted")] + #pragma warning disable CS1591 BinderMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "binderMissing")] + #pragma warning disable CS1591 BinderMissing, + #pragma warning restore CS1591 [EnumMember(Value = "binderMotorFailure")] + #pragma warning disable CS1591 BinderMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "binderNearLimit")] + #pragma warning disable CS1591 BinderNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "binderOffline")] + #pragma warning disable CS1591 BinderOffline, + #pragma warning restore CS1591 [EnumMember(Value = "binderOpened")] + #pragma warning disable CS1591 BinderOpened, + #pragma warning restore CS1591 [EnumMember(Value = "binderOverTemperature")] + #pragma warning disable CS1591 BinderOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "binderPowerSaver")] + #pragma warning disable CS1591 BinderPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "binderRecoverableFailure")] + #pragma warning disable CS1591 BinderRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "binderRecoverableStorage")] + #pragma warning disable CS1591 BinderRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "binderRemoved")] + #pragma warning disable CS1591 BinderRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "binderResourceAdded")] + #pragma warning disable CS1591 BinderResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "binderResourceRemoved")] + #pragma warning disable CS1591 BinderResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "binderThermistorFailure")] + #pragma warning disable CS1591 BinderThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "binderTimingFailure")] + #pragma warning disable CS1591 BinderTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "binderTurnedOff")] + #pragma warning disable CS1591 BinderTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "binderTurnedOn")] + #pragma warning disable CS1591 BinderTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "binderUnderTemperature")] + #pragma warning disable CS1591 BinderUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "binderUnrecoverableFailure")] + #pragma warning disable CS1591 BinderUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "binderUnrecoverableStorageError")] + #pragma warning disable CS1591 BinderUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "binderWarmingUp")] + #pragma warning disable CS1591 BinderWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "cameraFailure")] + #pragma warning disable CS1591 CameraFailure, + #pragma warning restore CS1591 [EnumMember(Value = "chamberCooling")] + #pragma warning disable CS1591 ChamberCooling, + #pragma warning restore CS1591 [EnumMember(Value = "chamberFailure")] + #pragma warning disable CS1591 ChamberFailure, + #pragma warning restore CS1591 [EnumMember(Value = "chamberHeating")] + #pragma warning disable CS1591 ChamberHeating, + #pragma warning restore CS1591 [EnumMember(Value = "chamberTemperatureHigh")] + #pragma warning disable CS1591 ChamberTemperatureHigh, + #pragma warning restore CS1591 [EnumMember(Value = "chamberTemperatureLow")] + #pragma warning disable CS1591 ChamberTemperatureLow, + #pragma warning restore CS1591 [EnumMember(Value = "cleanerLifeAlmostOver")] + #pragma warning disable CS1591 CleanerLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "cleanerLifeOver")] + #pragma warning disable CS1591 CleanerLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "configurationChange")] + #pragma warning disable CS1591 ConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "deactivated")] + #pragma warning disable CS1591 Deactivated, + #pragma warning restore CS1591 [EnumMember(Value = "deleted")] + #pragma warning disable CS1591 Deleted, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterAdded")] + #pragma warning disable CS1591 DieCutterAdded, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterAlmostEmpty")] + #pragma warning disable CS1591 DieCutterAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterAlmostFull")] + #pragma warning disable CS1591 DieCutterAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterAtLimit")] + #pragma warning disable CS1591 DieCutterAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterClosed")] + #pragma warning disable CS1591 DieCutterClosed, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterConfigurationChange")] + #pragma warning disable CS1591 DieCutterConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterCoverClosed")] + #pragma warning disable CS1591 DieCutterCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterCoverOpen")] + #pragma warning disable CS1591 DieCutterCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterEmpty")] + #pragma warning disable CS1591 DieCutterEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterFull")] + #pragma warning disable CS1591 DieCutterFull, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterInterlockClosed")] + #pragma warning disable CS1591 DieCutterInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterInterlockOpen")] + #pragma warning disable CS1591 DieCutterInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterJam")] + #pragma warning disable CS1591 DieCutterJam, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterLifeAlmostOver")] + #pragma warning disable CS1591 DieCutterLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterLifeOver")] + #pragma warning disable CS1591 DieCutterLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterMemoryExhausted")] + #pragma warning disable CS1591 DieCutterMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterMissing")] + #pragma warning disable CS1591 DieCutterMissing, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterMotorFailure")] + #pragma warning disable CS1591 DieCutterMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterNearLimit")] + #pragma warning disable CS1591 DieCutterNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterOffline")] + #pragma warning disable CS1591 DieCutterOffline, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterOpened")] + #pragma warning disable CS1591 DieCutterOpened, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterOverTemperature")] + #pragma warning disable CS1591 DieCutterOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterPowerSaver")] + #pragma warning disable CS1591 DieCutterPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterRecoverableFailure")] + #pragma warning disable CS1591 DieCutterRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterRecoverableStorage")] + #pragma warning disable CS1591 DieCutterRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterRemoved")] + #pragma warning disable CS1591 DieCutterRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterResourceAdded")] + #pragma warning disable CS1591 DieCutterResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterResourceRemoved")] + #pragma warning disable CS1591 DieCutterResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterThermistorFailure")] + #pragma warning disable CS1591 DieCutterThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterTimingFailure")] + #pragma warning disable CS1591 DieCutterTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterTurnedOff")] + #pragma warning disable CS1591 DieCutterTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterTurnedOn")] + #pragma warning disable CS1591 DieCutterTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterUnderTemperature")] + #pragma warning disable CS1591 DieCutterUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterUnrecoverableFailure")] + #pragma warning disable CS1591 DieCutterUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterUnrecoverableStorageError")] + #pragma warning disable CS1591 DieCutterUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "dieCutterWarmingUp")] + #pragma warning disable CS1591 DieCutterWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "extruderCooling")] + #pragma warning disable CS1591 ExtruderCooling, + #pragma warning restore CS1591 [EnumMember(Value = "extruderFailure")] + #pragma warning disable CS1591 ExtruderFailure, + #pragma warning restore CS1591 [EnumMember(Value = "extruderHeating")] + #pragma warning disable CS1591 ExtruderHeating, + #pragma warning restore CS1591 [EnumMember(Value = "extruderJam")] + #pragma warning disable CS1591 ExtruderJam, + #pragma warning restore CS1591 [EnumMember(Value = "extruderTemperatureHigh")] + #pragma warning disable CS1591 ExtruderTemperatureHigh, + #pragma warning restore CS1591 [EnumMember(Value = "extruderTemperatureLow")] + #pragma warning disable CS1591 ExtruderTemperatureLow, + #pragma warning restore CS1591 [EnumMember(Value = "fanFailure")] + #pragma warning disable CS1591 FanFailure, + #pragma warning restore CS1591 [EnumMember(Value = "faxModemLifeAlmostOver")] + #pragma warning disable CS1591 FaxModemLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "faxModemLifeOver")] + #pragma warning disable CS1591 FaxModemLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "faxModemMissing")] + #pragma warning disable CS1591 FaxModemMissing, + #pragma warning restore CS1591 [EnumMember(Value = "faxModemTurnedOff")] + #pragma warning disable CS1591 FaxModemTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "faxModemTurnedOn")] + #pragma warning disable CS1591 FaxModemTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "folderAdded")] + #pragma warning disable CS1591 FolderAdded, + #pragma warning restore CS1591 [EnumMember(Value = "folderAlmostEmpty")] + #pragma warning disable CS1591 FolderAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "folderAlmostFull")] + #pragma warning disable CS1591 FolderAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "folderAtLimit")] + #pragma warning disable CS1591 FolderAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "folderClosed")] + #pragma warning disable CS1591 FolderClosed, + #pragma warning restore CS1591 [EnumMember(Value = "folderConfigurationChange")] + #pragma warning disable CS1591 FolderConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "folderCoverClosed")] + #pragma warning disable CS1591 FolderCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "folderCoverOpen")] + #pragma warning disable CS1591 FolderCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "folderEmpty")] + #pragma warning disable CS1591 FolderEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "folderFull")] + #pragma warning disable CS1591 FolderFull, + #pragma warning restore CS1591 [EnumMember(Value = "folderInterlockClosed")] + #pragma warning disable CS1591 FolderInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "folderInterlockOpen")] + #pragma warning disable CS1591 FolderInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "folderJam")] + #pragma warning disable CS1591 FolderJam, + #pragma warning restore CS1591 [EnumMember(Value = "folderLifeAlmostOver")] + #pragma warning disable CS1591 FolderLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "folderLifeOver")] + #pragma warning disable CS1591 FolderLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "folderMemoryExhausted")] + #pragma warning disable CS1591 FolderMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "folderMissing")] + #pragma warning disable CS1591 FolderMissing, + #pragma warning restore CS1591 [EnumMember(Value = "folderMotorFailure")] + #pragma warning disable CS1591 FolderMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "folderNearLimit")] + #pragma warning disable CS1591 FolderNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "folderOffline")] + #pragma warning disable CS1591 FolderOffline, + #pragma warning restore CS1591 [EnumMember(Value = "folderOpened")] + #pragma warning disable CS1591 FolderOpened, + #pragma warning restore CS1591 [EnumMember(Value = "folderOverTemperature")] + #pragma warning disable CS1591 FolderOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "folderPowerSaver")] + #pragma warning disable CS1591 FolderPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "folderRecoverableFailure")] + #pragma warning disable CS1591 FolderRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "folderRecoverableStorage")] + #pragma warning disable CS1591 FolderRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "folderRemoved")] + #pragma warning disable CS1591 FolderRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "folderResourceAdded")] + #pragma warning disable CS1591 FolderResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "folderResourceRemoved")] + #pragma warning disable CS1591 FolderResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "folderThermistorFailure")] + #pragma warning disable CS1591 FolderThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "folderTimingFailure")] + #pragma warning disable CS1591 FolderTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "folderTurnedOff")] + #pragma warning disable CS1591 FolderTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "folderTurnedOn")] + #pragma warning disable CS1591 FolderTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "folderUnderTemperature")] + #pragma warning disable CS1591 FolderUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "folderUnrecoverableFailure")] + #pragma warning disable CS1591 FolderUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "folderUnrecoverableStorageError")] + #pragma warning disable CS1591 FolderUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "folderWarmingUp")] + #pragma warning disable CS1591 FolderWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "hibernate")] + #pragma warning disable CS1591 Hibernate, + #pragma warning restore CS1591 [EnumMember(Value = "holdNewJobs")] + #pragma warning disable CS1591 HoldNewJobs, + #pragma warning restore CS1591 [EnumMember(Value = "identifyPrinterRequested")] + #pragma warning disable CS1591 IdentifyPrinterRequested, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterAdded")] + #pragma warning disable CS1591 ImprinterAdded, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterAlmostEmpty")] + #pragma warning disable CS1591 ImprinterAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterAlmostFull")] + #pragma warning disable CS1591 ImprinterAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterAtLimit")] + #pragma warning disable CS1591 ImprinterAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterClosed")] + #pragma warning disable CS1591 ImprinterClosed, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterConfigurationChange")] + #pragma warning disable CS1591 ImprinterConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterCoverClosed")] + #pragma warning disable CS1591 ImprinterCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterCoverOpen")] + #pragma warning disable CS1591 ImprinterCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterEmpty")] + #pragma warning disable CS1591 ImprinterEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterFull")] + #pragma warning disable CS1591 ImprinterFull, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterInterlockClosed")] + #pragma warning disable CS1591 ImprinterInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterInterlockOpen")] + #pragma warning disable CS1591 ImprinterInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterJam")] + #pragma warning disable CS1591 ImprinterJam, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterLifeAlmostOver")] + #pragma warning disable CS1591 ImprinterLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterLifeOver")] + #pragma warning disable CS1591 ImprinterLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterMemoryExhausted")] + #pragma warning disable CS1591 ImprinterMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterMissing")] + #pragma warning disable CS1591 ImprinterMissing, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterMotorFailure")] + #pragma warning disable CS1591 ImprinterMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterNearLimit")] + #pragma warning disable CS1591 ImprinterNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterOffline")] + #pragma warning disable CS1591 ImprinterOffline, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterOpened")] + #pragma warning disable CS1591 ImprinterOpened, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterOverTemperature")] + #pragma warning disable CS1591 ImprinterOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterPowerSaver")] + #pragma warning disable CS1591 ImprinterPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterRecoverableFailure")] + #pragma warning disable CS1591 ImprinterRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterRecoverableStorage")] + #pragma warning disable CS1591 ImprinterRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterRemoved")] + #pragma warning disable CS1591 ImprinterRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterResourceAdded")] + #pragma warning disable CS1591 ImprinterResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterResourceRemoved")] + #pragma warning disable CS1591 ImprinterResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterThermistorFailure")] + #pragma warning disable CS1591 ImprinterThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterTimingFailure")] + #pragma warning disable CS1591 ImprinterTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterTurnedOff")] + #pragma warning disable CS1591 ImprinterTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterTurnedOn")] + #pragma warning disable CS1591 ImprinterTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterUnderTemperature")] + #pragma warning disable CS1591 ImprinterUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterUnrecoverableFailure")] + #pragma warning disable CS1591 ImprinterUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterUnrecoverableStorageError")] + #pragma warning disable CS1591 ImprinterUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "imprinterWarmingUp")] + #pragma warning disable CS1591 ImprinterWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "inputCannotFeedSizeSelected")] + #pragma warning disable CS1591 InputCannotFeedSizeSelected, + #pragma warning restore CS1591 [EnumMember(Value = "inputManualInputRequest")] + #pragma warning disable CS1591 InputManualInputRequest, + #pragma warning restore CS1591 [EnumMember(Value = "inputMediaColorChange")] + #pragma warning disable CS1591 InputMediaColorChange, + #pragma warning restore CS1591 [EnumMember(Value = "inputMediaFormPartsChange")] + #pragma warning disable CS1591 InputMediaFormPartsChange, + #pragma warning restore CS1591 [EnumMember(Value = "inputMediaSizeChange")] + #pragma warning disable CS1591 InputMediaSizeChange, + #pragma warning restore CS1591 [EnumMember(Value = "inputMediaTrayFailure")] + #pragma warning disable CS1591 InputMediaTrayFailure, + #pragma warning restore CS1591 [EnumMember(Value = "inputMediaTrayFeedError")] + #pragma warning disable CS1591 InputMediaTrayFeedError, + #pragma warning restore CS1591 [EnumMember(Value = "inputMediaTrayJam")] + #pragma warning disable CS1591 InputMediaTrayJam, + #pragma warning restore CS1591 [EnumMember(Value = "inputMediaTypeChange")] + #pragma warning disable CS1591 InputMediaTypeChange, + #pragma warning restore CS1591 [EnumMember(Value = "inputMediaWeightChange")] + #pragma warning disable CS1591 InputMediaWeightChange, + #pragma warning restore CS1591 [EnumMember(Value = "inputPickRollerFailure")] + #pragma warning disable CS1591 InputPickRollerFailure, + #pragma warning restore CS1591 [EnumMember(Value = "inputPickRollerLifeOver")] + #pragma warning disable CS1591 InputPickRollerLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "inputPickRollerLifeWarn")] + #pragma warning disable CS1591 InputPickRollerLifeWarn, + #pragma warning restore CS1591 [EnumMember(Value = "inputPickRollerMissing")] + #pragma warning disable CS1591 InputPickRollerMissing, + #pragma warning restore CS1591 [EnumMember(Value = "inputTrayElevationFailure")] + #pragma warning disable CS1591 InputTrayElevationFailure, + #pragma warning restore CS1591 [EnumMember(Value = "inputTrayPositionFailure")] + #pragma warning disable CS1591 InputTrayPositionFailure, + #pragma warning restore CS1591 [EnumMember(Value = "inserterAdded")] + #pragma warning disable CS1591 InserterAdded, + #pragma warning restore CS1591 [EnumMember(Value = "inserterAlmostEmpty")] + #pragma warning disable CS1591 InserterAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "inserterAlmostFull")] + #pragma warning disable CS1591 InserterAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "inserterAtLimit")] + #pragma warning disable CS1591 InserterAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "inserterClosed")] + #pragma warning disable CS1591 InserterClosed, + #pragma warning restore CS1591 [EnumMember(Value = "inserterConfigurationChange")] + #pragma warning disable CS1591 InserterConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "inserterCoverClosed")] + #pragma warning disable CS1591 InserterCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "inserterCoverOpen")] + #pragma warning disable CS1591 InserterCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "inserterEmpty")] + #pragma warning disable CS1591 InserterEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "inserterFull")] + #pragma warning disable CS1591 InserterFull, + #pragma warning restore CS1591 [EnumMember(Value = "inserterInterlockClosed")] + #pragma warning disable CS1591 InserterInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "inserterInterlockOpen")] + #pragma warning disable CS1591 InserterInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "inserterJam")] + #pragma warning disable CS1591 InserterJam, + #pragma warning restore CS1591 [EnumMember(Value = "inserterLifeAlmostOver")] + #pragma warning disable CS1591 InserterLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "inserterLifeOver")] + #pragma warning disable CS1591 InserterLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "inserterMemoryExhausted")] + #pragma warning disable CS1591 InserterMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "inserterMissing")] + #pragma warning disable CS1591 InserterMissing, + #pragma warning restore CS1591 [EnumMember(Value = "inserterMotorFailure")] + #pragma warning disable CS1591 InserterMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "inserterNearLimit")] + #pragma warning disable CS1591 InserterNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "inserterOffline")] + #pragma warning disable CS1591 InserterOffline, + #pragma warning restore CS1591 [EnumMember(Value = "inserterOpened")] + #pragma warning disable CS1591 InserterOpened, + #pragma warning restore CS1591 [EnumMember(Value = "inserterOverTemperature")] + #pragma warning disable CS1591 InserterOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "inserterPowerSaver")] + #pragma warning disable CS1591 InserterPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "inserterRecoverableFailure")] + #pragma warning disable CS1591 InserterRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "inserterRecoverableStorage")] + #pragma warning disable CS1591 InserterRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "inserterRemoved")] + #pragma warning disable CS1591 InserterRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "inserterResourceAdded")] + #pragma warning disable CS1591 InserterResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "inserterResourceRemoved")] + #pragma warning disable CS1591 InserterResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "inserterThermistorFailure")] + #pragma warning disable CS1591 InserterThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "inserterTimingFailure")] + #pragma warning disable CS1591 InserterTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "inserterTurnedOff")] + #pragma warning disable CS1591 InserterTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "inserterTurnedOn")] + #pragma warning disable CS1591 InserterTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "inserterUnderTemperature")] + #pragma warning disable CS1591 InserterUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "inserterUnrecoverableFailure")] + #pragma warning disable CS1591 InserterUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "inserterUnrecoverableStorageError")] + #pragma warning disable CS1591 InserterUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "inserterWarmingUp")] + #pragma warning disable CS1591 InserterWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "interlockClosed")] + #pragma warning disable CS1591 InterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "interpreterCartridgeAdded")] + #pragma warning disable CS1591 InterpreterCartridgeAdded, + #pragma warning restore CS1591 [EnumMember(Value = "interpreterCartridgeDeleted")] + #pragma warning disable CS1591 InterpreterCartridgeDeleted, + #pragma warning restore CS1591 [EnumMember(Value = "interpreterComplexPageEncountered")] + #pragma warning disable CS1591 InterpreterComplexPageEncountered, + #pragma warning restore CS1591 [EnumMember(Value = "interpreterMemoryDecrease")] + #pragma warning disable CS1591 InterpreterMemoryDecrease, + #pragma warning restore CS1591 [EnumMember(Value = "interpreterMemoryIncrease")] + #pragma warning disable CS1591 InterpreterMemoryIncrease, + #pragma warning restore CS1591 [EnumMember(Value = "interpreterResourceAdded")] + #pragma warning disable CS1591 InterpreterResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "interpreterResourceDeleted")] + #pragma warning disable CS1591 InterpreterResourceDeleted, + #pragma warning restore CS1591 [EnumMember(Value = "lampAtEol")] + #pragma warning disable CS1591 LampAtEol, + #pragma warning restore CS1591 [EnumMember(Value = "lampFailure")] + #pragma warning disable CS1591 LampFailure, + #pragma warning restore CS1591 [EnumMember(Value = "lampNearEol")] + #pragma warning disable CS1591 LampNearEol, + #pragma warning restore CS1591 [EnumMember(Value = "laserAtEol")] + #pragma warning disable CS1591 LaserAtEol, + #pragma warning restore CS1591 [EnumMember(Value = "laserFailure")] + #pragma warning disable CS1591 LaserFailure, + #pragma warning restore CS1591 [EnumMember(Value = "laserNearEol")] + #pragma warning disable CS1591 LaserNearEol, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeAdded")] + #pragma warning disable CS1591 MakeEnvelopeAdded, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeAlmostEmpty")] + #pragma warning disable CS1591 MakeEnvelopeAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeAlmostFull")] + #pragma warning disable CS1591 MakeEnvelopeAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeAtLimit")] + #pragma warning disable CS1591 MakeEnvelopeAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeClosed")] + #pragma warning disable CS1591 MakeEnvelopeClosed, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeConfigurationChange")] + #pragma warning disable CS1591 MakeEnvelopeConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeCoverClosed")] + #pragma warning disable CS1591 MakeEnvelopeCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeCoverOpen")] + #pragma warning disable CS1591 MakeEnvelopeCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeEmpty")] + #pragma warning disable CS1591 MakeEnvelopeEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeFull")] + #pragma warning disable CS1591 MakeEnvelopeFull, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeInterlockClosed")] + #pragma warning disable CS1591 MakeEnvelopeInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeInterlockOpen")] + #pragma warning disable CS1591 MakeEnvelopeInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeJam")] + #pragma warning disable CS1591 MakeEnvelopeJam, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeLifeAlmostOver")] + #pragma warning disable CS1591 MakeEnvelopeLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeLifeOver")] + #pragma warning disable CS1591 MakeEnvelopeLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeMemoryExhausted")] + #pragma warning disable CS1591 MakeEnvelopeMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeMissing")] + #pragma warning disable CS1591 MakeEnvelopeMissing, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeMotorFailure")] + #pragma warning disable CS1591 MakeEnvelopeMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeNearLimit")] + #pragma warning disable CS1591 MakeEnvelopeNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeOffline")] + #pragma warning disable CS1591 MakeEnvelopeOffline, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeOpened")] + #pragma warning disable CS1591 MakeEnvelopeOpened, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeOverTemperature")] + #pragma warning disable CS1591 MakeEnvelopeOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopePowerSaver")] + #pragma warning disable CS1591 MakeEnvelopePowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeRecoverableFailure")] + #pragma warning disable CS1591 MakeEnvelopeRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeRecoverableStorage")] + #pragma warning disable CS1591 MakeEnvelopeRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeRemoved")] + #pragma warning disable CS1591 MakeEnvelopeRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeResourceAdded")] + #pragma warning disable CS1591 MakeEnvelopeResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeResourceRemoved")] + #pragma warning disable CS1591 MakeEnvelopeResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeThermistorFailure")] + #pragma warning disable CS1591 MakeEnvelopeThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeTimingFailure")] + #pragma warning disable CS1591 MakeEnvelopeTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeTurnedOff")] + #pragma warning disable CS1591 MakeEnvelopeTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeTurnedOn")] + #pragma warning disable CS1591 MakeEnvelopeTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeUnderTemperature")] + #pragma warning disable CS1591 MakeEnvelopeUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeUnrecoverableFailure")] + #pragma warning disable CS1591 MakeEnvelopeUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeUnrecoverableStorageError")] + #pragma warning disable CS1591 MakeEnvelopeUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "makeEnvelopeWarmingUp")] + #pragma warning disable CS1591 MakeEnvelopeWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "markerAdjustingPrintQuality")] + #pragma warning disable CS1591 MarkerAdjustingPrintQuality, + #pragma warning restore CS1591 [EnumMember(Value = "markerCleanerMissing")] + #pragma warning disable CS1591 MarkerCleanerMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerDeveloperAlmostEmpty")] + #pragma warning disable CS1591 MarkerDeveloperAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "markerDeveloperEmpty")] + #pragma warning disable CS1591 MarkerDeveloperEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "markerDeveloperMissing")] + #pragma warning disable CS1591 MarkerDeveloperMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerFuserMissing")] + #pragma warning disable CS1591 MarkerFuserMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerFuserThermistorFailure")] + #pragma warning disable CS1591 MarkerFuserThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "markerFuserTimingFailure")] + #pragma warning disable CS1591 MarkerFuserTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "markerInkAlmostEmpty")] + #pragma warning disable CS1591 MarkerInkAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "markerInkEmpty")] + #pragma warning disable CS1591 MarkerInkEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "markerInkMissing")] + #pragma warning disable CS1591 MarkerInkMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerOpcMissing")] + #pragma warning disable CS1591 MarkerOpcMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerPrintRibbonAlmostEmpty")] + #pragma warning disable CS1591 MarkerPrintRibbonAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "markerPrintRibbonEmpty")] + #pragma warning disable CS1591 MarkerPrintRibbonEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "markerPrintRibbonMissing")] + #pragma warning disable CS1591 MarkerPrintRibbonMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerSupplyAlmostEmpty")] + #pragma warning disable CS1591 MarkerSupplyAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "markerSupplyMissing")] + #pragma warning disable CS1591 MarkerSupplyMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerTonerCartridgeMissing")] + #pragma warning disable CS1591 MarkerTonerCartridgeMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerTonerMissing")] + #pragma warning disable CS1591 MarkerTonerMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerWasteInkReceptacleAlmostFull")] + #pragma warning disable CS1591 MarkerWasteInkReceptacleAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "markerWasteInkReceptacleFull")] + #pragma warning disable CS1591 MarkerWasteInkReceptacleFull, + #pragma warning restore CS1591 [EnumMember(Value = "markerWasteInkReceptacleMissing")] + #pragma warning disable CS1591 MarkerWasteInkReceptacleMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerWasteMissing")] + #pragma warning disable CS1591 MarkerWasteMissing, + #pragma warning restore CS1591 [EnumMember(Value = "markerWasteTonerReceptacleAlmostFull")] + #pragma warning disable CS1591 MarkerWasteTonerReceptacleAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "markerWasteTonerReceptacleFull")] + #pragma warning disable CS1591 MarkerWasteTonerReceptacleFull, + #pragma warning restore CS1591 [EnumMember(Value = "markerWasteTonerReceptacleMissing")] + #pragma warning disable CS1591 MarkerWasteTonerReceptacleMissing, + #pragma warning restore CS1591 [EnumMember(Value = "materialEmpty")] + #pragma warning disable CS1591 MaterialEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "materialLow")] + #pragma warning disable CS1591 MaterialLow, + #pragma warning restore CS1591 [EnumMember(Value = "materialNeeded")] + #pragma warning disable CS1591 MaterialNeeded, + #pragma warning restore CS1591 [EnumMember(Value = "mediaDrying")] + #pragma warning disable CS1591 MediaDrying, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathCannotDuplexMediaSelected")] + #pragma warning disable CS1591 MediaPathCannotDuplexMediaSelected, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathFailure")] + #pragma warning disable CS1591 MediaPathFailure, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathInputEmpty")] + #pragma warning disable CS1591 MediaPathInputEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathInputFeedError")] + #pragma warning disable CS1591 MediaPathInputFeedError, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathInputJam")] + #pragma warning disable CS1591 MediaPathInputJam, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathInputRequest")] + #pragma warning disable CS1591 MediaPathInputRequest, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathJam")] + #pragma warning disable CS1591 MediaPathJam, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathMediaTrayAlmostFull")] + #pragma warning disable CS1591 MediaPathMediaTrayAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathMediaTrayFull")] + #pragma warning disable CS1591 MediaPathMediaTrayFull, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathMediaTrayMissing")] + #pragma warning disable CS1591 MediaPathMediaTrayMissing, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathOutputFeedError")] + #pragma warning disable CS1591 MediaPathOutputFeedError, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathOutputFull")] + #pragma warning disable CS1591 MediaPathOutputFull, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathOutputJam")] + #pragma warning disable CS1591 MediaPathOutputJam, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathPickRollerFailure")] + #pragma warning disable CS1591 MediaPathPickRollerFailure, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathPickRollerLifeOver")] + #pragma warning disable CS1591 MediaPathPickRollerLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathPickRollerLifeWarn")] + #pragma warning disable CS1591 MediaPathPickRollerLifeWarn, + #pragma warning restore CS1591 [EnumMember(Value = "mediaPathPickRollerMissing")] + #pragma warning disable CS1591 MediaPathPickRollerMissing, + #pragma warning restore CS1591 [EnumMember(Value = "motorFailure")] + #pragma warning disable CS1591 MotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "outputMailboxSelectFailure")] + #pragma warning disable CS1591 OutputMailboxSelectFailure, + #pragma warning restore CS1591 [EnumMember(Value = "outputMediaTrayFailure")] + #pragma warning disable CS1591 OutputMediaTrayFailure, + #pragma warning restore CS1591 [EnumMember(Value = "outputMediaTrayFeedError")] + #pragma warning disable CS1591 OutputMediaTrayFeedError, + #pragma warning restore CS1591 [EnumMember(Value = "outputMediaTrayJam")] + #pragma warning disable CS1591 OutputMediaTrayJam, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterAdded")] + #pragma warning disable CS1591 PerforaterAdded, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterAlmostEmpty")] + #pragma warning disable CS1591 PerforaterAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterAlmostFull")] + #pragma warning disable CS1591 PerforaterAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterAtLimit")] + #pragma warning disable CS1591 PerforaterAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterClosed")] + #pragma warning disable CS1591 PerforaterClosed, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterConfigurationChange")] + #pragma warning disable CS1591 PerforaterConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterCoverClosed")] + #pragma warning disable CS1591 PerforaterCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterCoverOpen")] + #pragma warning disable CS1591 PerforaterCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterEmpty")] + #pragma warning disable CS1591 PerforaterEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterFull")] + #pragma warning disable CS1591 PerforaterFull, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterInterlockClosed")] + #pragma warning disable CS1591 PerforaterInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterInterlockOpen")] + #pragma warning disable CS1591 PerforaterInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterJam")] + #pragma warning disable CS1591 PerforaterJam, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterLifeAlmostOver")] + #pragma warning disable CS1591 PerforaterLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterLifeOver")] + #pragma warning disable CS1591 PerforaterLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterMemoryExhausted")] + #pragma warning disable CS1591 PerforaterMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterMissing")] + #pragma warning disable CS1591 PerforaterMissing, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterMotorFailure")] + #pragma warning disable CS1591 PerforaterMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterNearLimit")] + #pragma warning disable CS1591 PerforaterNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterOffline")] + #pragma warning disable CS1591 PerforaterOffline, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterOpened")] + #pragma warning disable CS1591 PerforaterOpened, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterOverTemperature")] + #pragma warning disable CS1591 PerforaterOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterPowerSaver")] + #pragma warning disable CS1591 PerforaterPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterRecoverableFailure")] + #pragma warning disable CS1591 PerforaterRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterRecoverableStorage")] + #pragma warning disable CS1591 PerforaterRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterRemoved")] + #pragma warning disable CS1591 PerforaterRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterResourceAdded")] + #pragma warning disable CS1591 PerforaterResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterResourceRemoved")] + #pragma warning disable CS1591 PerforaterResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterThermistorFailure")] + #pragma warning disable CS1591 PerforaterThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterTimingFailure")] + #pragma warning disable CS1591 PerforaterTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterTurnedOff")] + #pragma warning disable CS1591 PerforaterTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterTurnedOn")] + #pragma warning disable CS1591 PerforaterTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterUnderTemperature")] + #pragma warning disable CS1591 PerforaterUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterUnrecoverableFailure")] + #pragma warning disable CS1591 PerforaterUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterUnrecoverableStorageError")] + #pragma warning disable CS1591 PerforaterUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "perforaterWarmingUp")] + #pragma warning disable CS1591 PerforaterWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "platformCooling")] + #pragma warning disable CS1591 PlatformCooling, + #pragma warning restore CS1591 [EnumMember(Value = "platformFailure")] + #pragma warning disable CS1591 PlatformFailure, + #pragma warning restore CS1591 [EnumMember(Value = "platformHeating")] + #pragma warning disable CS1591 PlatformHeating, + #pragma warning restore CS1591 [EnumMember(Value = "platformTemperatureHigh")] + #pragma warning disable CS1591 PlatformTemperatureHigh, + #pragma warning restore CS1591 [EnumMember(Value = "platformTemperatureLow")] + #pragma warning disable CS1591 PlatformTemperatureLow, + #pragma warning restore CS1591 [EnumMember(Value = "powerDown")] + #pragma warning disable CS1591 PowerDown, + #pragma warning restore CS1591 [EnumMember(Value = "powerUp")] + #pragma warning disable CS1591 PowerUp, + #pragma warning restore CS1591 [EnumMember(Value = "printerManualReset")] + #pragma warning disable CS1591 PrinterManualReset, + #pragma warning restore CS1591 [EnumMember(Value = "printerNmsReset")] + #pragma warning disable CS1591 PrinterNmsReset, + #pragma warning restore CS1591 [EnumMember(Value = "printerReadyToPrint")] + #pragma warning disable CS1591 PrinterReadyToPrint, + #pragma warning restore CS1591 [EnumMember(Value = "puncherAdded")] + #pragma warning disable CS1591 PuncherAdded, + #pragma warning restore CS1591 [EnumMember(Value = "puncherAlmostEmpty")] + #pragma warning disable CS1591 PuncherAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "puncherAlmostFull")] + #pragma warning disable CS1591 PuncherAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "puncherAtLimit")] + #pragma warning disable CS1591 PuncherAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "puncherClosed")] + #pragma warning disable CS1591 PuncherClosed, + #pragma warning restore CS1591 [EnumMember(Value = "puncherConfigurationChange")] + #pragma warning disable CS1591 PuncherConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "puncherCoverClosed")] + #pragma warning disable CS1591 PuncherCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "puncherCoverOpen")] + #pragma warning disable CS1591 PuncherCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "puncherEmpty")] + #pragma warning disable CS1591 PuncherEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "puncherFull")] + #pragma warning disable CS1591 PuncherFull, + #pragma warning restore CS1591 [EnumMember(Value = "puncherInterlockClosed")] + #pragma warning disable CS1591 PuncherInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "puncherInterlockOpen")] + #pragma warning disable CS1591 PuncherInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "puncherJam")] + #pragma warning disable CS1591 PuncherJam, + #pragma warning restore CS1591 [EnumMember(Value = "puncherLifeAlmostOver")] + #pragma warning disable CS1591 PuncherLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "puncherLifeOver")] + #pragma warning disable CS1591 PuncherLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "puncherMemoryExhausted")] + #pragma warning disable CS1591 PuncherMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "puncherMissing")] + #pragma warning disable CS1591 PuncherMissing, + #pragma warning restore CS1591 [EnumMember(Value = "puncherMotorFailure")] + #pragma warning disable CS1591 PuncherMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "puncherNearLimit")] + #pragma warning disable CS1591 PuncherNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "puncherOffline")] + #pragma warning disable CS1591 PuncherOffline, + #pragma warning restore CS1591 [EnumMember(Value = "puncherOpened")] + #pragma warning disable CS1591 PuncherOpened, + #pragma warning restore CS1591 [EnumMember(Value = "puncherOverTemperature")] + #pragma warning disable CS1591 PuncherOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "puncherPowerSaver")] + #pragma warning disable CS1591 PuncherPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "puncherRecoverableFailure")] + #pragma warning disable CS1591 PuncherRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "puncherRecoverableStorage")] + #pragma warning disable CS1591 PuncherRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "puncherRemoved")] + #pragma warning disable CS1591 PuncherRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "puncherResourceAdded")] + #pragma warning disable CS1591 PuncherResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "puncherResourceRemoved")] + #pragma warning disable CS1591 PuncherResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "puncherThermistorFailure")] + #pragma warning disable CS1591 PuncherThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "puncherTimingFailure")] + #pragma warning disable CS1591 PuncherTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "puncherTurnedOff")] + #pragma warning disable CS1591 PuncherTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "puncherTurnedOn")] + #pragma warning disable CS1591 PuncherTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "puncherUnderTemperature")] + #pragma warning disable CS1591 PuncherUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "puncherUnrecoverableFailure")] + #pragma warning disable CS1591 PuncherUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "puncherUnrecoverableStorageError")] + #pragma warning disable CS1591 PuncherUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "puncherWarmingUp")] + #pragma warning disable CS1591 PuncherWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "resuming")] + #pragma warning disable CS1591 Resuming, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathFailure")] + #pragma warning disable CS1591 ScanMediaPathFailure, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathInputEmpty")] + #pragma warning disable CS1591 ScanMediaPathInputEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathInputFeedError")] + #pragma warning disable CS1591 ScanMediaPathInputFeedError, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathInputJam")] + #pragma warning disable CS1591 ScanMediaPathInputJam, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathInputRequest")] + #pragma warning disable CS1591 ScanMediaPathInputRequest, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathJam")] + #pragma warning disable CS1591 ScanMediaPathJam, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathOutputFeedError")] + #pragma warning disable CS1591 ScanMediaPathOutputFeedError, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathOutputFull")] + #pragma warning disable CS1591 ScanMediaPathOutputFull, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathOutputJam")] + #pragma warning disable CS1591 ScanMediaPathOutputJam, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathPickRollerFailure")] + #pragma warning disable CS1591 ScanMediaPathPickRollerFailure, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathPickRollerLifeOver")] + #pragma warning disable CS1591 ScanMediaPathPickRollerLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathPickRollerLifeWarn")] + #pragma warning disable CS1591 ScanMediaPathPickRollerLifeWarn, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathPickRollerMissing")] + #pragma warning disable CS1591 ScanMediaPathPickRollerMissing, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathTrayAlmostFull")] + #pragma warning disable CS1591 ScanMediaPathTrayAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathTrayFull")] + #pragma warning disable CS1591 ScanMediaPathTrayFull, + #pragma warning restore CS1591 [EnumMember(Value = "scanMediaPathTrayMissing")] + #pragma warning disable CS1591 ScanMediaPathTrayMissing, + #pragma warning restore CS1591 [EnumMember(Value = "scannerLightFailure")] + #pragma warning disable CS1591 ScannerLightFailure, + #pragma warning restore CS1591 [EnumMember(Value = "scannerLightLifeAlmostOver")] + #pragma warning disable CS1591 ScannerLightLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "scannerLightLifeOver")] + #pragma warning disable CS1591 ScannerLightLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "scannerLightMissing")] + #pragma warning disable CS1591 ScannerLightMissing, + #pragma warning restore CS1591 [EnumMember(Value = "scannerSensorFailure")] + #pragma warning disable CS1591 ScannerSensorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "scannerSensorLifeAlmostOver")] + #pragma warning disable CS1591 ScannerSensorLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "scannerSensorLifeOver")] + #pragma warning disable CS1591 ScannerSensorLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "scannerSensorMissing")] + #pragma warning disable CS1591 ScannerSensorMissing, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterAdded")] + #pragma warning disable CS1591 SeparationCutterAdded, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterAlmostEmpty")] + #pragma warning disable CS1591 SeparationCutterAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterAlmostFull")] + #pragma warning disable CS1591 SeparationCutterAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterAtLimit")] + #pragma warning disable CS1591 SeparationCutterAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterClosed")] + #pragma warning disable CS1591 SeparationCutterClosed, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterConfigurationChange")] + #pragma warning disable CS1591 SeparationCutterConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterCoverClosed")] + #pragma warning disable CS1591 SeparationCutterCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterCoverOpen")] + #pragma warning disable CS1591 SeparationCutterCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterEmpty")] + #pragma warning disable CS1591 SeparationCutterEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterFull")] + #pragma warning disable CS1591 SeparationCutterFull, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterInterlockClosed")] + #pragma warning disable CS1591 SeparationCutterInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterInterlockOpen")] + #pragma warning disable CS1591 SeparationCutterInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterJam")] + #pragma warning disable CS1591 SeparationCutterJam, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterLifeAlmostOver")] + #pragma warning disable CS1591 SeparationCutterLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterLifeOver")] + #pragma warning disable CS1591 SeparationCutterLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterMemoryExhausted")] + #pragma warning disable CS1591 SeparationCutterMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterMissing")] + #pragma warning disable CS1591 SeparationCutterMissing, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterMotorFailure")] + #pragma warning disable CS1591 SeparationCutterMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterNearLimit")] + #pragma warning disable CS1591 SeparationCutterNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterOffline")] + #pragma warning disable CS1591 SeparationCutterOffline, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterOpened")] + #pragma warning disable CS1591 SeparationCutterOpened, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterOverTemperature")] + #pragma warning disable CS1591 SeparationCutterOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterPowerSaver")] + #pragma warning disable CS1591 SeparationCutterPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterRecoverableFailure")] + #pragma warning disable CS1591 SeparationCutterRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterRecoverableStorage")] + #pragma warning disable CS1591 SeparationCutterRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterRemoved")] + #pragma warning disable CS1591 SeparationCutterRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterResourceAdded")] + #pragma warning disable CS1591 SeparationCutterResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterResourceRemoved")] + #pragma warning disable CS1591 SeparationCutterResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterThermistorFailure")] + #pragma warning disable CS1591 SeparationCutterThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterTimingFailure")] + #pragma warning disable CS1591 SeparationCutterTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterTurnedOff")] + #pragma warning disable CS1591 SeparationCutterTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterTurnedOn")] + #pragma warning disable CS1591 SeparationCutterTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterUnderTemperature")] + #pragma warning disable CS1591 SeparationCutterUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterUnrecoverableFailure")] + #pragma warning disable CS1591 SeparationCutterUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterUnrecoverableStorageError")] + #pragma warning disable CS1591 SeparationCutterUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "separationCutterWarmingUp")] + #pragma warning disable CS1591 SeparationCutterWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorAdded")] + #pragma warning disable CS1591 SheetRotatorAdded, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorAlmostEmpty")] + #pragma warning disable CS1591 SheetRotatorAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorAlmostFull")] + #pragma warning disable CS1591 SheetRotatorAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorAtLimit")] + #pragma warning disable CS1591 SheetRotatorAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorClosed")] + #pragma warning disable CS1591 SheetRotatorClosed, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorConfigurationChange")] + #pragma warning disable CS1591 SheetRotatorConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorCoverClosed")] + #pragma warning disable CS1591 SheetRotatorCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorCoverOpen")] + #pragma warning disable CS1591 SheetRotatorCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorEmpty")] + #pragma warning disable CS1591 SheetRotatorEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorFull")] + #pragma warning disable CS1591 SheetRotatorFull, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorInterlockClosed")] + #pragma warning disable CS1591 SheetRotatorInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorInterlockOpen")] + #pragma warning disable CS1591 SheetRotatorInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorJam")] + #pragma warning disable CS1591 SheetRotatorJam, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorLifeAlmostOver")] + #pragma warning disable CS1591 SheetRotatorLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorLifeOver")] + #pragma warning disable CS1591 SheetRotatorLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorMemoryExhausted")] + #pragma warning disable CS1591 SheetRotatorMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorMissing")] + #pragma warning disable CS1591 SheetRotatorMissing, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorMotorFailure")] + #pragma warning disable CS1591 SheetRotatorMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorNearLimit")] + #pragma warning disable CS1591 SheetRotatorNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorOffline")] + #pragma warning disable CS1591 SheetRotatorOffline, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorOpened")] + #pragma warning disable CS1591 SheetRotatorOpened, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorOverTemperature")] + #pragma warning disable CS1591 SheetRotatorOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorPowerSaver")] + #pragma warning disable CS1591 SheetRotatorPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorRecoverableFailure")] + #pragma warning disable CS1591 SheetRotatorRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorRecoverableStorage")] + #pragma warning disable CS1591 SheetRotatorRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorRemoved")] + #pragma warning disable CS1591 SheetRotatorRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorResourceAdded")] + #pragma warning disable CS1591 SheetRotatorResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorResourceRemoved")] + #pragma warning disable CS1591 SheetRotatorResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorThermistorFailure")] + #pragma warning disable CS1591 SheetRotatorThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorTimingFailure")] + #pragma warning disable CS1591 SheetRotatorTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorTurnedOff")] + #pragma warning disable CS1591 SheetRotatorTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorTurnedOn")] + #pragma warning disable CS1591 SheetRotatorTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorUnderTemperature")] + #pragma warning disable CS1591 SheetRotatorUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorUnrecoverableFailure")] + #pragma warning disable CS1591 SheetRotatorUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorUnrecoverableStorageError")] + #pragma warning disable CS1591 SheetRotatorUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "sheetRotatorWarmingUp")] + #pragma warning disable CS1591 SheetRotatorWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "slitterAdded")] + #pragma warning disable CS1591 SlitterAdded, + #pragma warning restore CS1591 [EnumMember(Value = "slitterAlmostEmpty")] + #pragma warning disable CS1591 SlitterAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "slitterAlmostFull")] + #pragma warning disable CS1591 SlitterAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "slitterAtLimit")] + #pragma warning disable CS1591 SlitterAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "slitterClosed")] + #pragma warning disable CS1591 SlitterClosed, + #pragma warning restore CS1591 [EnumMember(Value = "slitterConfigurationChange")] + #pragma warning disable CS1591 SlitterConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "slitterCoverClosed")] + #pragma warning disable CS1591 SlitterCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "slitterCoverOpen")] + #pragma warning disable CS1591 SlitterCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "slitterEmpty")] + #pragma warning disable CS1591 SlitterEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "slitterFull")] + #pragma warning disable CS1591 SlitterFull, + #pragma warning restore CS1591 [EnumMember(Value = "slitterInterlockClosed")] + #pragma warning disable CS1591 SlitterInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "slitterInterlockOpen")] + #pragma warning disable CS1591 SlitterInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "slitterJam")] + #pragma warning disable CS1591 SlitterJam, + #pragma warning restore CS1591 [EnumMember(Value = "slitterLifeAlmostOver")] + #pragma warning disable CS1591 SlitterLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "slitterLifeOver")] + #pragma warning disable CS1591 SlitterLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "slitterMemoryExhausted")] + #pragma warning disable CS1591 SlitterMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "slitterMissing")] + #pragma warning disable CS1591 SlitterMissing, + #pragma warning restore CS1591 [EnumMember(Value = "slitterMotorFailure")] + #pragma warning disable CS1591 SlitterMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "slitterNearLimit")] + #pragma warning disable CS1591 SlitterNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "slitterOffline")] + #pragma warning disable CS1591 SlitterOffline, + #pragma warning restore CS1591 [EnumMember(Value = "slitterOpened")] + #pragma warning disable CS1591 SlitterOpened, + #pragma warning restore CS1591 [EnumMember(Value = "slitterOverTemperature")] + #pragma warning disable CS1591 SlitterOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "slitterPowerSaver")] + #pragma warning disable CS1591 SlitterPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "slitterRecoverableFailure")] + #pragma warning disable CS1591 SlitterRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "slitterRecoverableStorage")] + #pragma warning disable CS1591 SlitterRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "slitterRemoved")] + #pragma warning disable CS1591 SlitterRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "slitterResourceAdded")] + #pragma warning disable CS1591 SlitterResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "slitterResourceRemoved")] + #pragma warning disable CS1591 SlitterResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "slitterThermistorFailure")] + #pragma warning disable CS1591 SlitterThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "slitterTimingFailure")] + #pragma warning disable CS1591 SlitterTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "slitterTurnedOff")] + #pragma warning disable CS1591 SlitterTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "slitterTurnedOn")] + #pragma warning disable CS1591 SlitterTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "slitterUnderTemperature")] + #pragma warning disable CS1591 SlitterUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "slitterUnrecoverableFailure")] + #pragma warning disable CS1591 SlitterUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "slitterUnrecoverableStorageError")] + #pragma warning disable CS1591 SlitterUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "slitterWarmingUp")] + #pragma warning disable CS1591 SlitterWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "stackerAdded")] + #pragma warning disable CS1591 StackerAdded, + #pragma warning restore CS1591 [EnumMember(Value = "stackerAlmostEmpty")] + #pragma warning disable CS1591 StackerAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "stackerAlmostFull")] + #pragma warning disable CS1591 StackerAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "stackerAtLimit")] + #pragma warning disable CS1591 StackerAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "stackerClosed")] + #pragma warning disable CS1591 StackerClosed, + #pragma warning restore CS1591 [EnumMember(Value = "stackerConfigurationChange")] + #pragma warning disable CS1591 StackerConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "stackerCoverClosed")] + #pragma warning disable CS1591 StackerCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "stackerCoverOpen")] + #pragma warning disable CS1591 StackerCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "stackerEmpty")] + #pragma warning disable CS1591 StackerEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "stackerFull")] + #pragma warning disable CS1591 StackerFull, + #pragma warning restore CS1591 [EnumMember(Value = "stackerInterlockClosed")] + #pragma warning disable CS1591 StackerInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "stackerInterlockOpen")] + #pragma warning disable CS1591 StackerInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "stackerJam")] + #pragma warning disable CS1591 StackerJam, + #pragma warning restore CS1591 [EnumMember(Value = "stackerLifeAlmostOver")] + #pragma warning disable CS1591 StackerLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "stackerLifeOver")] + #pragma warning disable CS1591 StackerLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "stackerMemoryExhausted")] + #pragma warning disable CS1591 StackerMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "stackerMissing")] + #pragma warning disable CS1591 StackerMissing, + #pragma warning restore CS1591 [EnumMember(Value = "stackerMotorFailure")] + #pragma warning disable CS1591 StackerMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stackerNearLimit")] + #pragma warning disable CS1591 StackerNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "stackerOffline")] + #pragma warning disable CS1591 StackerOffline, + #pragma warning restore CS1591 [EnumMember(Value = "stackerOpened")] + #pragma warning disable CS1591 StackerOpened, + #pragma warning restore CS1591 [EnumMember(Value = "stackerOverTemperature")] + #pragma warning disable CS1591 StackerOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "stackerPowerSaver")] + #pragma warning disable CS1591 StackerPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "stackerRecoverableFailure")] + #pragma warning disable CS1591 StackerRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stackerRecoverableStorage")] + #pragma warning disable CS1591 StackerRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "stackerRemoved")] + #pragma warning disable CS1591 StackerRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "stackerResourceAdded")] + #pragma warning disable CS1591 StackerResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "stackerResourceRemoved")] + #pragma warning disable CS1591 StackerResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "stackerThermistorFailure")] + #pragma warning disable CS1591 StackerThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stackerTimingFailure")] + #pragma warning disable CS1591 StackerTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stackerTurnedOff")] + #pragma warning disable CS1591 StackerTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "stackerTurnedOn")] + #pragma warning disable CS1591 StackerTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "stackerUnderTemperature")] + #pragma warning disable CS1591 StackerUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "stackerUnrecoverableFailure")] + #pragma warning disable CS1591 StackerUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stackerUnrecoverableStorageError")] + #pragma warning disable CS1591 StackerUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "stackerWarmingUp")] + #pragma warning disable CS1591 StackerWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "standby")] + #pragma warning disable CS1591 Standby, + #pragma warning restore CS1591 [EnumMember(Value = "staplerAdded")] + #pragma warning disable CS1591 StaplerAdded, + #pragma warning restore CS1591 [EnumMember(Value = "staplerAlmostEmpty")] + #pragma warning disable CS1591 StaplerAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "staplerAlmostFull")] + #pragma warning disable CS1591 StaplerAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "staplerAtLimit")] + #pragma warning disable CS1591 StaplerAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "staplerClosed")] + #pragma warning disable CS1591 StaplerClosed, + #pragma warning restore CS1591 [EnumMember(Value = "staplerConfigurationChange")] + #pragma warning disable CS1591 StaplerConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "staplerCoverClosed")] + #pragma warning disable CS1591 StaplerCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "staplerCoverOpen")] + #pragma warning disable CS1591 StaplerCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "staplerEmpty")] + #pragma warning disable CS1591 StaplerEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "staplerFull")] + #pragma warning disable CS1591 StaplerFull, + #pragma warning restore CS1591 [EnumMember(Value = "staplerInterlockClosed")] + #pragma warning disable CS1591 StaplerInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "staplerInterlockOpen")] + #pragma warning disable CS1591 StaplerInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "staplerJam")] + #pragma warning disable CS1591 StaplerJam, + #pragma warning restore CS1591 [EnumMember(Value = "staplerLifeAlmostOver")] + #pragma warning disable CS1591 StaplerLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "staplerLifeOver")] + #pragma warning disable CS1591 StaplerLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "staplerMemoryExhausted")] + #pragma warning disable CS1591 StaplerMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "staplerMissing")] + #pragma warning disable CS1591 StaplerMissing, + #pragma warning restore CS1591 [EnumMember(Value = "staplerMotorFailure")] + #pragma warning disable CS1591 StaplerMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "staplerNearLimit")] + #pragma warning disable CS1591 StaplerNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "staplerOffline")] + #pragma warning disable CS1591 StaplerOffline, + #pragma warning restore CS1591 [EnumMember(Value = "staplerOpened")] + #pragma warning disable CS1591 StaplerOpened, + #pragma warning restore CS1591 [EnumMember(Value = "staplerOverTemperature")] + #pragma warning disable CS1591 StaplerOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "staplerPowerSaver")] + #pragma warning disable CS1591 StaplerPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "staplerRecoverableFailure")] + #pragma warning disable CS1591 StaplerRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "staplerRecoverableStorage")] + #pragma warning disable CS1591 StaplerRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "staplerRemoved")] + #pragma warning disable CS1591 StaplerRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "staplerResourceAdded")] + #pragma warning disable CS1591 StaplerResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "staplerResourceRemoved")] + #pragma warning disable CS1591 StaplerResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "staplerThermistorFailure")] + #pragma warning disable CS1591 StaplerThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "staplerTimingFailure")] + #pragma warning disable CS1591 StaplerTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "staplerTurnedOff")] + #pragma warning disable CS1591 StaplerTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "staplerTurnedOn")] + #pragma warning disable CS1591 StaplerTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "staplerUnderTemperature")] + #pragma warning disable CS1591 StaplerUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "staplerUnrecoverableFailure")] + #pragma warning disable CS1591 StaplerUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "staplerUnrecoverableStorageError")] + #pragma warning disable CS1591 StaplerUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "staplerWarmingUp")] + #pragma warning disable CS1591 StaplerWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherAdded")] + #pragma warning disable CS1591 StitcherAdded, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherAlmostEmpty")] + #pragma warning disable CS1591 StitcherAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherAlmostFull")] + #pragma warning disable CS1591 StitcherAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherAtLimit")] + #pragma warning disable CS1591 StitcherAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherClosed")] + #pragma warning disable CS1591 StitcherClosed, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherConfigurationChange")] + #pragma warning disable CS1591 StitcherConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherCoverClosed")] + #pragma warning disable CS1591 StitcherCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherCoverOpen")] + #pragma warning disable CS1591 StitcherCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherEmpty")] + #pragma warning disable CS1591 StitcherEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherFull")] + #pragma warning disable CS1591 StitcherFull, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherInterlockClosed")] + #pragma warning disable CS1591 StitcherInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherInterlockOpen")] + #pragma warning disable CS1591 StitcherInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherJam")] + #pragma warning disable CS1591 StitcherJam, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherLifeAlmostOver")] + #pragma warning disable CS1591 StitcherLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherLifeOver")] + #pragma warning disable CS1591 StitcherLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherMemoryExhausted")] + #pragma warning disable CS1591 StitcherMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherMissing")] + #pragma warning disable CS1591 StitcherMissing, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherMotorFailure")] + #pragma warning disable CS1591 StitcherMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherNearLimit")] + #pragma warning disable CS1591 StitcherNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherOffline")] + #pragma warning disable CS1591 StitcherOffline, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherOpened")] + #pragma warning disable CS1591 StitcherOpened, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherOverTemperature")] + #pragma warning disable CS1591 StitcherOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherPowerSaver")] + #pragma warning disable CS1591 StitcherPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherRecoverableFailure")] + #pragma warning disable CS1591 StitcherRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherRecoverableStorage")] + #pragma warning disable CS1591 StitcherRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherRemoved")] + #pragma warning disable CS1591 StitcherRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherResourceAdded")] + #pragma warning disable CS1591 StitcherResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherResourceRemoved")] + #pragma warning disable CS1591 StitcherResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherThermistorFailure")] + #pragma warning disable CS1591 StitcherThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherTimingFailure")] + #pragma warning disable CS1591 StitcherTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherTurnedOff")] + #pragma warning disable CS1591 StitcherTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherTurnedOn")] + #pragma warning disable CS1591 StitcherTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherUnderTemperature")] + #pragma warning disable CS1591 StitcherUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherUnrecoverableFailure")] + #pragma warning disable CS1591 StitcherUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherUnrecoverableStorageError")] + #pragma warning disable CS1591 StitcherUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "stitcherWarmingUp")] + #pragma warning disable CS1591 StitcherWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "subunitAdded")] + #pragma warning disable CS1591 SubunitAdded, + #pragma warning restore CS1591 [EnumMember(Value = "subunitAlmostEmpty")] + #pragma warning disable CS1591 SubunitAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "subunitAlmostFull")] + #pragma warning disable CS1591 SubunitAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "subunitAtLimit")] + #pragma warning disable CS1591 SubunitAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "subunitClosed")] + #pragma warning disable CS1591 SubunitClosed, + #pragma warning restore CS1591 [EnumMember(Value = "subunitCoolingDown")] + #pragma warning disable CS1591 SubunitCoolingDown, + #pragma warning restore CS1591 [EnumMember(Value = "subunitEmpty")] + #pragma warning disable CS1591 SubunitEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "subunitFull")] + #pragma warning disable CS1591 SubunitFull, + #pragma warning restore CS1591 [EnumMember(Value = "subunitLifeAlmostOver")] + #pragma warning disable CS1591 SubunitLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "subunitLifeOver")] + #pragma warning disable CS1591 SubunitLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "subunitMemoryExhausted")] + #pragma warning disable CS1591 SubunitMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "subunitMissing")] + #pragma warning disable CS1591 SubunitMissing, + #pragma warning restore CS1591 [EnumMember(Value = "subunitMotorFailure")] + #pragma warning disable CS1591 SubunitMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "subunitNearLimit")] + #pragma warning disable CS1591 SubunitNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "subunitOffline")] + #pragma warning disable CS1591 SubunitOffline, + #pragma warning restore CS1591 [EnumMember(Value = "subunitOpened")] + #pragma warning disable CS1591 SubunitOpened, + #pragma warning restore CS1591 [EnumMember(Value = "subunitOverTemperature")] + #pragma warning disable CS1591 SubunitOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "subunitPowerSaver")] + #pragma warning disable CS1591 SubunitPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "subunitRecoverableFailure")] + #pragma warning disable CS1591 SubunitRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "subunitRecoverableStorage")] + #pragma warning disable CS1591 SubunitRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "subunitRemoved")] + #pragma warning disable CS1591 SubunitRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "subunitResourceAdded")] + #pragma warning disable CS1591 SubunitResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "subunitResourceRemoved")] + #pragma warning disable CS1591 SubunitResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "subunitThermistorFailure")] + #pragma warning disable CS1591 SubunitThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "subunitTimingFailure")] + #pragma warning disable CS1591 SubunitTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "subunitTurnedOff")] + #pragma warning disable CS1591 SubunitTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "subunitTurnedOn")] + #pragma warning disable CS1591 SubunitTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "subunitUnderTemperature")] + #pragma warning disable CS1591 SubunitUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "subunitUnrecoverableFailure")] + #pragma warning disable CS1591 SubunitUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "subunitUnrecoverableStorage")] + #pragma warning disable CS1591 SubunitUnrecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "subunitWarmingUp")] + #pragma warning disable CS1591 SubunitWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "suspend")] + #pragma warning disable CS1591 Suspend, + #pragma warning restore CS1591 [EnumMember(Value = "testing")] + #pragma warning disable CS1591 Testing, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerAdded")] + #pragma warning disable CS1591 TrimmerAdded, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerAlmostEmpty")] + #pragma warning disable CS1591 TrimmerAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerAlmostFull")] + #pragma warning disable CS1591 TrimmerAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerAtLimit")] + #pragma warning disable CS1591 TrimmerAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerClosed")] + #pragma warning disable CS1591 TrimmerClosed, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerConfigurationChange")] + #pragma warning disable CS1591 TrimmerConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerCoverClosed")] + #pragma warning disable CS1591 TrimmerCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerCoverOpen")] + #pragma warning disable CS1591 TrimmerCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerEmpty")] + #pragma warning disable CS1591 TrimmerEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerFull")] + #pragma warning disable CS1591 TrimmerFull, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerInterlockClosed")] + #pragma warning disable CS1591 TrimmerInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerInterlockOpen")] + #pragma warning disable CS1591 TrimmerInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerJam")] + #pragma warning disable CS1591 TrimmerJam, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerLifeAlmostOver")] + #pragma warning disable CS1591 TrimmerLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerLifeOver")] + #pragma warning disable CS1591 TrimmerLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerMemoryExhausted")] + #pragma warning disable CS1591 TrimmerMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerMissing")] + #pragma warning disable CS1591 TrimmerMissing, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerMotorFailure")] + #pragma warning disable CS1591 TrimmerMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerNearLimit")] + #pragma warning disable CS1591 TrimmerNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerOffline")] + #pragma warning disable CS1591 TrimmerOffline, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerOpened")] + #pragma warning disable CS1591 TrimmerOpened, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerOverTemperature")] + #pragma warning disable CS1591 TrimmerOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerPowerSaver")] + #pragma warning disable CS1591 TrimmerPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerRecoverableFailure")] + #pragma warning disable CS1591 TrimmerRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerRecoverableStorage")] + #pragma warning disable CS1591 TrimmerRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerRemoved")] + #pragma warning disable CS1591 TrimmerRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerResourceAdded")] + #pragma warning disable CS1591 TrimmerResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerResourceRemoved")] + #pragma warning disable CS1591 TrimmerResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerThermistorFailure")] + #pragma warning disable CS1591 TrimmerThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerTimingFailure")] + #pragma warning disable CS1591 TrimmerTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerTurnedOff")] + #pragma warning disable CS1591 TrimmerTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerTurnedOn")] + #pragma warning disable CS1591 TrimmerTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerUnderTemperature")] + #pragma warning disable CS1591 TrimmerUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerUnrecoverableFailure")] + #pragma warning disable CS1591 TrimmerUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerUnrecoverableStorageError")] + #pragma warning disable CS1591 TrimmerUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "trimmerWarmingUp")] + #pragma warning disable CS1591 TrimmerWarmingUp, + #pragma warning restore CS1591 [EnumMember(Value = "unknown")] + #pragma warning disable CS1591 Unknown, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperAdded")] + #pragma warning disable CS1591 WrapperAdded, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperAlmostEmpty")] + #pragma warning disable CS1591 WrapperAlmostEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperAlmostFull")] + #pragma warning disable CS1591 WrapperAlmostFull, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperAtLimit")] + #pragma warning disable CS1591 WrapperAtLimit, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperClosed")] + #pragma warning disable CS1591 WrapperClosed, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperConfigurationChange")] + #pragma warning disable CS1591 WrapperConfigurationChange, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperCoverClosed")] + #pragma warning disable CS1591 WrapperCoverClosed, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperCoverOpen")] + #pragma warning disable CS1591 WrapperCoverOpen, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperEmpty")] + #pragma warning disable CS1591 WrapperEmpty, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperFull")] + #pragma warning disable CS1591 WrapperFull, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperInterlockClosed")] + #pragma warning disable CS1591 WrapperInterlockClosed, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperInterlockOpen")] + #pragma warning disable CS1591 WrapperInterlockOpen, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperJam")] + #pragma warning disable CS1591 WrapperJam, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperLifeAlmostOver")] + #pragma warning disable CS1591 WrapperLifeAlmostOver, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperLifeOver")] + #pragma warning disable CS1591 WrapperLifeOver, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperMemoryExhausted")] + #pragma warning disable CS1591 WrapperMemoryExhausted, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperMissing")] + #pragma warning disable CS1591 WrapperMissing, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperMotorFailure")] + #pragma warning disable CS1591 WrapperMotorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperNearLimit")] + #pragma warning disable CS1591 WrapperNearLimit, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperOffline")] + #pragma warning disable CS1591 WrapperOffline, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperOpened")] + #pragma warning disable CS1591 WrapperOpened, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperOverTemperature")] + #pragma warning disable CS1591 WrapperOverTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperPowerSaver")] + #pragma warning disable CS1591 WrapperPowerSaver, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperRecoverableFailure")] + #pragma warning disable CS1591 WrapperRecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperRecoverableStorage")] + #pragma warning disable CS1591 WrapperRecoverableStorage, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperRemoved")] + #pragma warning disable CS1591 WrapperRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperResourceAdded")] + #pragma warning disable CS1591 WrapperResourceAdded, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperResourceRemoved")] + #pragma warning disable CS1591 WrapperResourceRemoved, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperThermistorFailure")] + #pragma warning disable CS1591 WrapperThermistorFailure, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperTimingFailure")] + #pragma warning disable CS1591 WrapperTimingFailure, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperTurnedOff")] + #pragma warning disable CS1591 WrapperTurnedOff, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperTurnedOn")] + #pragma warning disable CS1591 WrapperTurnedOn, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperUnderTemperature")] + #pragma warning disable CS1591 WrapperUnderTemperature, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperUnrecoverableFailure")] + #pragma warning disable CS1591 WrapperUnrecoverableFailure, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperUnrecoverableStorageError")] + #pragma warning disable CS1591 WrapperUnrecoverableStorageError, + #pragma warning restore CS1591 [EnumMember(Value = "wrapperWarmingUp")] + #pragma warning disable CS1591 WrapperWarmingUp, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/PrinterShare.cs b/src/sample/generated/Models/PrinterShare.cs index 55803fa8..e4837e02 100644 --- a/src/sample/generated/Models/PrinterShare.cs +++ b/src/sample/generated/Models/PrinterShare.cs @@ -1,81 +1,94 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrinterShare : PrinterBase, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrinterShare : global::ApiSdk.Models.PrinterBase, IParsable + #pragma warning restore CS1591 + { /// If true, all users and groups will be granted access to this printer share. This supersedes the allow lists defined by the allowedUsers and allowedGroups navigation properties. public bool? AllowAllUsers { get; set; } /// The groups whose users have access to print using the printer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AllowedGroups { get; set; } + public List? AllowedGroups { get; set; } #nullable restore #else - public List AllowedGroups { get; set; } + public List AllowedGroups { get; set; } #endif /// The users who have access to print using the printer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AllowedUsers { get; set; } + public List? AllowedUsers { get; set; } #nullable restore #else - public List AllowedUsers { get; set; } + public List AllowedUsers { get; set; } #endif /// The DateTimeOffset when the printer share was created. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } /// The printer property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Printer? Printer { get; set; } + public global::ApiSdk.Models.Printer? Printer { get; set; } #nullable restore #else - public ApiSdk.Models.Printer Printer { get; set; } + public global::ApiSdk.Models.Printer Printer { get; set; } #endif /// The viewPoint property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PrinterShareViewpoint? ViewPoint { get; set; } + public global::ApiSdk.Models.PrinterShareViewpoint? ViewPoint { get; set; } #nullable restore #else - public PrinterShareViewpoint ViewPoint { get; set; } + public global::ApiSdk.Models.PrinterShareViewpoint ViewPoint { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new PrinterShare CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.PrinterShare CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrinterShare(); + return new global::ApiSdk.Models.PrinterShare(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"allowAllUsers", n => { AllowAllUsers = n.GetBoolValue(); } }, - {"allowedGroups", n => { AllowedGroups = n.GetCollectionOfObjectValues(Group.CreateFromDiscriminatorValue)?.ToList(); } }, - {"allowedUsers", n => { AllowedUsers = n.GetCollectionOfObjectValues(User.CreateFromDiscriminatorValue)?.ToList(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"printer", n => { Printer = n.GetObjectValue(ApiSdk.Models.Printer.CreateFromDiscriminatorValue); } }, - {"viewPoint", n => { ViewPoint = n.GetObjectValue(PrinterShareViewpoint.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "allowAllUsers", n => { AllowAllUsers = n.GetBoolValue(); } }, + { "allowedGroups", n => { AllowedGroups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Group.CreateFromDiscriminatorValue)?.AsList(); } }, + { "allowedUsers", n => { AllowedUsers = n.GetCollectionOfObjectValues(global::ApiSdk.Models.User.CreateFromDiscriminatorValue)?.AsList(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "printer", n => { Printer = n.GetObjectValue(global::ApiSdk.Models.Printer.CreateFromDiscriminatorValue); } }, + { "viewPoint", n => { ViewPoint = n.GetObjectValue(global::ApiSdk.Models.PrinterShareViewpoint.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowAllUsers", AllowAllUsers); - writer.WriteCollectionOfObjectValues("allowedGroups", AllowedGroups); - writer.WriteCollectionOfObjectValues("allowedUsers", AllowedUsers); + writer.WriteCollectionOfObjectValues("allowedGroups", AllowedGroups); + writer.WriteCollectionOfObjectValues("allowedUsers", AllowedUsers); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("printer", Printer); - writer.WriteObjectValue("viewPoint", ViewPoint); + writer.WriteObjectValue("printer", Printer); + writer.WriteObjectValue("viewPoint", ViewPoint); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrinterShareViewpoint.cs b/src/sample/generated/Models/PrinterShareViewpoint.cs index a91f141f..a162969c 100644 --- a/src/sample/generated/Models/PrinterShareViewpoint.cs +++ b/src/sample/generated/Models/PrinterShareViewpoint.cs @@ -1,45 +1,59 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrinterShareViewpoint : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrinterShareViewpoint : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Date and time when the printer was last used by the signed-in user. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? LastUsedDateTime { get; set; } /// - /// Instantiates a new printerShareViewpoint and sets the default values. + /// Instantiates a new and sets the default values. /// - public PrinterShareViewpoint() { + public PrinterShareViewpoint() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PrinterShareViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PrinterShareViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrinterShareViewpoint(); + return new global::ApiSdk.Models.PrinterShareViewpoint(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"lastUsedDateTime", n => { LastUsedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "lastUsedDateTime", n => { LastUsedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastUsedDateTime", LastUsedDateTime); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PrinterStatus.cs b/src/sample/generated/Models/PrinterStatus.cs index 242ce660..88388865 100644 --- a/src/sample/generated/Models/PrinterStatus.cs +++ b/src/sample/generated/Models/PrinterStatus.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PrinterStatus : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PrinterStatus : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A human-readable description of the printer's current processing state. Read-only. @@ -19,47 +25,55 @@ public class PrinterStatus : IAdditionalDataHolder, IParsable { /// The list of details describing why the printer is in the current state. Valid values are described in the following table. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Details { get; set; } + public List? Details { get; set; } #nullable restore #else - public List Details { get; set; } + public List Details { get; set; } #endif /// The state property - public PrinterProcessingState? State { get; set; } + public global::ApiSdk.Models.PrinterProcessingState? State { get; set; } /// - /// Instantiates a new printerStatus and sets the default values. + /// Instantiates a new and sets the default values. /// - public PrinterStatus() { + public PrinterStatus() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PrinterStatus CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PrinterStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PrinterStatus(); + return new global::ApiSdk.Models.PrinterStatus(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"description", n => { Description = n.GetStringValue(); } }, - {"details", n => { Details = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"state", n => { State = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "details", n => { Details = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "state", n => { State = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); - writer.WriteCollectionOfEnumValues("details", Details); - writer.WriteEnumValue("state", State); + writer.WriteCollectionOfEnumValues("details", Details); + writer.WriteEnumValue("state", State); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ProfilePhoto.cs b/src/sample/generated/Models/ProfilePhoto.cs index 36398635..d926a3db 100644 --- a/src/sample/generated/Models/ProfilePhoto.cs +++ b/src/sample/generated/Models/ProfilePhoto.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ProfilePhoto : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProfilePhoto : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The height of the photo. Read-only. public int? Height { get; set; } /// The width of the photo. Read-only. @@ -13,25 +19,31 @@ public class ProfilePhoto : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ProfilePhoto CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ProfilePhoto CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ProfilePhoto(); + return new global::ApiSdk.Models.ProfilePhoto(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"height", n => { Height = n.GetIntValue(); } }, - {"width", n => { Width = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "height", n => { Height = n.GetIntValue(); } }, + { "width", n => { Width = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("height", Height); @@ -39,3 +51,4 @@ public class ProfilePhoto : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ProfilePhotoCollectionResponse.cs b/src/sample/generated/Models/ProfilePhotoCollectionResponse.cs index 83b7adbf..1a464d7e 100644 --- a/src/sample/generated/Models/ProfilePhotoCollectionResponse.cs +++ b/src/sample/generated/Models/ProfilePhotoCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ProfilePhotoCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProfilePhotoCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class ProfilePhotoCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new profilePhotoCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public ProfilePhotoCollectionResponse() { + public ProfilePhotoCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ProfilePhotoCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ProfilePhotoCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ProfilePhotoCollectionResponse(); + return new global::ApiSdk.Models.ProfilePhotoCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(ProfilePhoto.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ProfilePhoto.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ProvisionedPlan.cs b/src/sample/generated/Models/ProvisionedPlan.cs index 6882b4d6..49d8b97f 100644 --- a/src/sample/generated/Models/ProvisionedPlan.cs +++ b/src/sample/generated/Models/ProvisionedPlan.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ProvisionedPlan : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ProvisionedPlan : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// For example, 'Enabled'. @@ -33,34 +39,41 @@ public class ProvisionedPlan : IAdditionalDataHolder, IParsable { public string Service { get; set; } #endif /// - /// Instantiates a new provisionedPlan and sets the default values. + /// Instantiates a new and sets the default values. /// - public ProvisionedPlan() { + public ProvisionedPlan() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ProvisionedPlan CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ProvisionedPlan CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ProvisionedPlan(); + return new global::ApiSdk.Models.ProvisionedPlan(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"capabilityStatus", n => { CapabilityStatus = n.GetStringValue(); } }, - {"provisioningStatus", n => { ProvisioningStatus = n.GetStringValue(); } }, - {"service", n => { Service = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "capabilityStatus", n => { CapabilityStatus = n.GetStringValue(); } }, + { "provisioningStatus", n => { ProvisioningStatus = n.GetStringValue(); } }, + { "service", n => { Service = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("capabilityStatus", CapabilityStatus); writer.WriteStringValue("provisioningStatus", ProvisioningStatus); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PublicClientApplication.cs b/src/sample/generated/Models/PublicClientApplication.cs index 8bbd7cfd..46dac721 100644 --- a/src/sample/generated/Models/PublicClientApplication.cs +++ b/src/sample/generated/Models/PublicClientApplication.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PublicClientApplication : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PublicClientApplication : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// Specifies the URLs where user tokens are sent for sign-in, or the redirect URIs where OAuth 2.0 authorization codes and access tokens are sent. + /// Specifies the URLs where user tokens are sent for sign-in, or the redirect URIs where OAuth 2.0 authorization codes and access tokens are sent. For iOS and macOS apps, specify the value following the syntax msauth.{BUNDLEID}://auth, replacing '{BUNDLEID}'. For example, if the bundle ID is com.microsoft.identitysample.MSALiOS, the URI is msauth.com.microsoft.identitysample.MSALiOS://auth. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? RedirectUris { get; set; } @@ -17,35 +23,43 @@ public class PublicClientApplication : IAdditionalDataHolder, IParsable { public List RedirectUris { get; set; } #endif /// - /// Instantiates a new publicClientApplication and sets the default values. + /// Instantiates a new and sets the default values. /// - public PublicClientApplication() { + public PublicClientApplication() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PublicClientApplication CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PublicClientApplication CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PublicClientApplication(); + return new global::ApiSdk.Models.PublicClientApplication(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("redirectUris", RedirectUris); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PublicError.cs b/src/sample/generated/Models/PublicError.cs index 39b8e47f..81950238 100644 --- a/src/sample/generated/Models/PublicError.cs +++ b/src/sample/generated/Models/PublicError.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PublicError : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PublicError : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Represents the error code. @@ -19,18 +25,18 @@ public class PublicError : IAdditionalDataHolder, IParsable { /// Details of the error. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Details { get; set; } + public List? Details { get; set; } #nullable restore #else - public List Details { get; set; } + public List Details { get; set; } #endif /// The innerError property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PublicInnerError? InnerError { get; set; } + public global::ApiSdk.Models.PublicInnerError? InnerError { get; set; } #nullable restore #else - public PublicInnerError InnerError { get; set; } + public global::ApiSdk.Models.PublicInnerError InnerError { get; set; } #endif /// A non-localized message for the developer. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -49,43 +55,51 @@ public class PublicError : IAdditionalDataHolder, IParsable { public string Target { get; set; } #endif /// - /// Instantiates a new publicError and sets the default values. + /// Instantiates a new and sets the default values. /// - public PublicError() { + public PublicError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PublicError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PublicError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PublicError(); + return new global::ApiSdk.Models.PublicError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"details", n => { Details = n.GetCollectionOfObjectValues(PublicErrorDetail.CreateFromDiscriminatorValue)?.ToList(); } }, - {"innerError", n => { InnerError = n.GetObjectValue(PublicInnerError.CreateFromDiscriminatorValue); } }, - {"message", n => { Message = n.GetStringValue(); } }, - {"target", n => { Target = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "details", n => { Details = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PublicErrorDetail.CreateFromDiscriminatorValue)?.AsList(); } }, + { "innerError", n => { InnerError = n.GetObjectValue(global::ApiSdk.Models.PublicInnerError.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "target", n => { Target = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); - writer.WriteCollectionOfObjectValues("details", Details); - writer.WriteObjectValue("innerError", InnerError); + writer.WriteCollectionOfObjectValues("details", Details); + writer.WriteObjectValue("innerError", InnerError); writer.WriteStringValue("message", Message); writer.WriteStringValue("target", Target); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PublicErrorDetail.cs b/src/sample/generated/Models/PublicErrorDetail.cs index e24a139f..8d2d9128 100644 --- a/src/sample/generated/Models/PublicErrorDetail.cs +++ b/src/sample/generated/Models/PublicErrorDetail.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PublicErrorDetail : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PublicErrorDetail : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The error code. @@ -33,34 +39,41 @@ public class PublicErrorDetail : IAdditionalDataHolder, IParsable { public string Target { get; set; } #endif /// - /// Instantiates a new publicErrorDetail and sets the default values. + /// Instantiates a new and sets the default values. /// - public PublicErrorDetail() { + public PublicErrorDetail() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PublicErrorDetail CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PublicErrorDetail CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PublicErrorDetail(); + return new global::ApiSdk.Models.PublicErrorDetail(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"message", n => { Message = n.GetStringValue(); } }, - {"target", n => { Target = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "target", n => { Target = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PublicInnerError.cs b/src/sample/generated/Models/PublicInnerError.cs index fb0fbd88..bc731f96 100644 --- a/src/sample/generated/Models/PublicInnerError.cs +++ b/src/sample/generated/Models/PublicInnerError.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PublicInnerError : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PublicInnerError : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The error code. @@ -19,10 +25,10 @@ public class PublicInnerError : IAdditionalDataHolder, IParsable { /// A collection of error details. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Details { get; set; } + public List? Details { get; set; } #nullable restore #else - public List Details { get; set; } + public List Details { get; set; } #endif /// The error message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,41 +47,49 @@ public class PublicInnerError : IAdditionalDataHolder, IParsable { public string Target { get; set; } #endif /// - /// Instantiates a new publicInnerError and sets the default values. + /// Instantiates a new and sets the default values. /// - public PublicInnerError() { + public PublicInnerError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PublicInnerError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PublicInnerError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PublicInnerError(); + return new global::ApiSdk.Models.PublicInnerError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"details", n => { Details = n.GetCollectionOfObjectValues(PublicErrorDetail.CreateFromDiscriminatorValue)?.ToList(); } }, - {"message", n => { Message = n.GetStringValue(); } }, - {"target", n => { Target = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "details", n => { Details = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PublicErrorDetail.CreateFromDiscriminatorValue)?.AsList(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "target", n => { Target = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); - writer.WriteCollectionOfObjectValues("details", Details); + writer.WriteCollectionOfObjectValues("details", Details); writer.WriteStringValue("message", Message); writer.WriteStringValue("target", Target); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/PublicationFacet.cs b/src/sample/generated/Models/PublicationFacet.cs index 5c6a1822..3954af30 100644 --- a/src/sample/generated/Models/PublicationFacet.cs +++ b/src/sample/generated/Models/PublicationFacet.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class PublicationFacet : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class PublicationFacet : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The checkedOutBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? CheckedOutBy { get; set; } + public global::ApiSdk.Models.IdentitySet? CheckedOutBy { get; set; } #nullable restore #else - public IdentitySet CheckedOutBy { get; set; } + public global::ApiSdk.Models.IdentitySet CheckedOutBy { get; set; } #endif /// The state of publication for this document. Either published or checkout. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,39 +39,47 @@ public class PublicationFacet : IAdditionalDataHolder, IParsable { public string VersionId { get; set; } #endif /// - /// Instantiates a new publicationFacet and sets the default values. + /// Instantiates a new and sets the default values. /// - public PublicationFacet() { + public PublicationFacet() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static PublicationFacet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.PublicationFacet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new PublicationFacet(); + return new global::ApiSdk.Models.PublicationFacet(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"checkedOutBy", n => { CheckedOutBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"level", n => { Level = n.GetStringValue(); } }, - {"versionId", n => { VersionId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "checkedOutBy", n => { CheckedOutBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "level", n => { Level = n.GetStringValue(); } }, + { "versionId", n => { VersionId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("checkedOutBy", CheckedOutBy); + writer.WriteObjectValue("checkedOutBy", CheckedOutBy); writer.WriteStringValue("level", Level); writer.WriteStringValue("versionId", VersionId); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/QuarantineReason.cs b/src/sample/generated/Models/QuarantineReason.cs index 4da85f92..34614987 100644 --- a/src/sample/generated/Models/QuarantineReason.cs +++ b/src/sample/generated/Models/QuarantineReason.cs @@ -1,23 +1,44 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum QuarantineReason { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum QuarantineReason + #pragma warning restore CS1591 + { [EnumMember(Value = "EncounteredBaseEscrowThreshold")] + #pragma warning disable CS1591 EncounteredBaseEscrowThreshold, + #pragma warning restore CS1591 [EnumMember(Value = "EncounteredTotalEscrowThreshold")] + #pragma warning disable CS1591 EncounteredTotalEscrowThreshold, + #pragma warning restore CS1591 [EnumMember(Value = "EncounteredEscrowProportionThreshold")] + #pragma warning disable CS1591 EncounteredEscrowProportionThreshold, + #pragma warning restore CS1591 [EnumMember(Value = "EncounteredQuarantineException")] + #pragma warning disable CS1591 EncounteredQuarantineException, + #pragma warning restore CS1591 [EnumMember(Value = "Unknown")] + #pragma warning disable CS1591 Unknown, + #pragma warning restore CS1591 [EnumMember(Value = "QuarantinedOnDemand")] + #pragma warning disable CS1591 QuarantinedOnDemand, + #pragma warning restore CS1591 [EnumMember(Value = "TooManyDeletes")] + #pragma warning disable CS1591 TooManyDeletes, + #pragma warning restore CS1591 [EnumMember(Value = "IngestionInterrupted")] + #pragma warning disable CS1591 IngestionInterrupted, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/Quota.cs b/src/sample/generated/Models/Quota.cs index 79f17325..540334d9 100644 --- a/src/sample/generated/Models/Quota.cs +++ b/src/sample/generated/Models/Quota.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Quota : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Quota : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Total space consumed by files in the recycle bin, in bytes. Read-only. @@ -23,55 +29,63 @@ public class Quota : IAdditionalDataHolder, IParsable { /// The storagePlanInformation property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.StoragePlanInformation? StoragePlanInformation { get; set; } + public global::ApiSdk.Models.StoragePlanInformation? StoragePlanInformation { get; set; } #nullable restore #else - public ApiSdk.Models.StoragePlanInformation StoragePlanInformation { get; set; } + public global::ApiSdk.Models.StoragePlanInformation StoragePlanInformation { get; set; } #endif /// Total allowed storage space, in bytes. Read-only. public long? Total { get; set; } /// Total space used, in bytes. Read-only. public long? Used { get; set; } /// - /// Instantiates a new quota and sets the default values. + /// Instantiates a new and sets the default values. /// - public Quota() { + public Quota() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Quota CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Quota CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Quota(); + return new global::ApiSdk.Models.Quota(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"deleted", n => { Deleted = n.GetLongValue(); } }, - {"remaining", n => { Remaining = n.GetLongValue(); } }, - {"state", n => { State = n.GetStringValue(); } }, - {"storagePlanInformation", n => { StoragePlanInformation = n.GetObjectValue(ApiSdk.Models.StoragePlanInformation.CreateFromDiscriminatorValue); } }, - {"total", n => { Total = n.GetLongValue(); } }, - {"used", n => { Used = n.GetLongValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "deleted", n => { Deleted = n.GetLongValue(); } }, + { "remaining", n => { Remaining = n.GetLongValue(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "storagePlanInformation", n => { StoragePlanInformation = n.GetObjectValue(global::ApiSdk.Models.StoragePlanInformation.CreateFromDiscriminatorValue); } }, + { "total", n => { Total = n.GetLongValue(); } }, + { "used", n => { Used = n.GetLongValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("deleted", Deleted); writer.WriteLongValue("remaining", Remaining); writer.WriteStringValue("state", State); - writer.WriteObjectValue("storagePlanInformation", StoragePlanInformation); + writer.WriteObjectValue("storagePlanInformation", StoragePlanInformation); writer.WriteLongValue("total", Total); writer.WriteLongValue("used", Used); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Recipient.cs b/src/sample/generated/Models/Recipient.cs index a5d9c9b2..5f7be284 100644 --- a/src/sample/generated/Models/Recipient.cs +++ b/src/sample/generated/Models/Recipient.cs @@ -1,51 +1,65 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Recipient : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Recipient : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The emailAddress property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.EmailAddress? EmailAddress { get; set; } + public global::ApiSdk.Models.EmailAddress? EmailAddress { get; set; } #nullable restore #else - public ApiSdk.Models.EmailAddress EmailAddress { get; set; } + public global::ApiSdk.Models.EmailAddress EmailAddress { get; set; } #endif /// - /// Instantiates a new recipient and sets the default values. + /// Instantiates a new and sets the default values. /// - public Recipient() { + public Recipient() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Recipient CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Recipient CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Recipient(); + return new global::ApiSdk.Models.Recipient(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"emailAddress", n => { EmailAddress = n.GetObjectValue(ApiSdk.Models.EmailAddress.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "emailAddress", n => { EmailAddress = n.GetObjectValue(global::ApiSdk.Models.EmailAddress.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("emailAddress", EmailAddress); + writer.WriteObjectValue("emailAddress", EmailAddress); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/RecurrencePattern.cs b/src/sample/generated/Models/RecurrencePattern.cs index 47f08a47..9b9f2f01 100644 --- a/src/sample/generated/Models/RecurrencePattern.cs +++ b/src/sample/generated/Models/RecurrencePattern.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class RecurrencePattern : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RecurrencePattern : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The day of the month on which the event occurs. Required if type is absoluteMonthly or absoluteYearly. @@ -13,63 +19,71 @@ public class RecurrencePattern : IAdditionalDataHolder, IParsable { /// A collection of the days of the week on which the event occurs. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. If type is relativeMonthly or relativeYearly, and daysOfWeek specifies more than one day, the event falls on the first day that satisfies the pattern. Required if type is weekly, relativeMonthly, or relativeYearly. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DaysOfWeek { get; set; } + public List? DaysOfWeek { get; set; } #nullable restore #else - public List DaysOfWeek { get; set; } + public List DaysOfWeek { get; set; } #endif /// The firstDayOfWeek property - public DayOfWeekObject? FirstDayOfWeek { get; set; } + public global::ApiSdk.Models.DayOfWeekObject? FirstDayOfWeek { get; set; } /// The index property - public WeekIndex? Index { get; set; } + public global::ApiSdk.Models.WeekIndex? Index { get; set; } /// The number of units between occurrences, where units can be in days, weeks, months, or years, depending on the type. Required. public int? Interval { get; set; } /// The month in which the event occurs. This is a number from 1 to 12. public int? Month { get; set; } /// The type property - public RecurrencePatternType? Type { get; set; } + public global::ApiSdk.Models.RecurrencePatternType? Type { get; set; } /// - /// Instantiates a new recurrencePattern and sets the default values. + /// Instantiates a new and sets the default values. /// - public RecurrencePattern() { + public RecurrencePattern() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static RecurrencePattern CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.RecurrencePattern CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new RecurrencePattern(); + return new global::ApiSdk.Models.RecurrencePattern(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"dayOfMonth", n => { DayOfMonth = n.GetIntValue(); } }, - {"daysOfWeek", n => { DaysOfWeek = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"firstDayOfWeek", n => { FirstDayOfWeek = n.GetEnumValue(); } }, - {"index", n => { Index = n.GetEnumValue(); } }, - {"interval", n => { Interval = n.GetIntValue(); } }, - {"month", n => { Month = n.GetIntValue(); } }, - {"type", n => { Type = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "dayOfMonth", n => { DayOfMonth = n.GetIntValue(); } }, + { "daysOfWeek", n => { DaysOfWeek = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "firstDayOfWeek", n => { FirstDayOfWeek = n.GetEnumValue(); } }, + { "index", n => { Index = n.GetEnumValue(); } }, + { "interval", n => { Interval = n.GetIntValue(); } }, + { "month", n => { Month = n.GetIntValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("dayOfMonth", DayOfMonth); - writer.WriteCollectionOfEnumValues("daysOfWeek", DaysOfWeek); - writer.WriteEnumValue("firstDayOfWeek", FirstDayOfWeek); - writer.WriteEnumValue("index", Index); + writer.WriteCollectionOfEnumValues("daysOfWeek", DaysOfWeek); + writer.WriteEnumValue("firstDayOfWeek", FirstDayOfWeek); + writer.WriteEnumValue("index", Index); writer.WriteIntValue("interval", Interval); writer.WriteIntValue("month", Month); - writer.WriteEnumValue("type", Type); + writer.WriteEnumValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/RecurrencePatternType.cs b/src/sample/generated/Models/RecurrencePatternType.cs index 750be3ce..f29e6226 100644 --- a/src/sample/generated/Models/RecurrencePatternType.cs +++ b/src/sample/generated/Models/RecurrencePatternType.cs @@ -1,19 +1,36 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum RecurrencePatternType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RecurrencePatternType + #pragma warning restore CS1591 + { [EnumMember(Value = "daily")] + #pragma warning disable CS1591 Daily, + #pragma warning restore CS1591 [EnumMember(Value = "weekly")] + #pragma warning disable CS1591 Weekly, + #pragma warning restore CS1591 [EnumMember(Value = "absoluteMonthly")] + #pragma warning disable CS1591 AbsoluteMonthly, + #pragma warning restore CS1591 [EnumMember(Value = "relativeMonthly")] + #pragma warning disable CS1591 RelativeMonthly, + #pragma warning restore CS1591 [EnumMember(Value = "absoluteYearly")] + #pragma warning disable CS1591 AbsoluteYearly, + #pragma warning restore CS1591 [EnumMember(Value = "relativeYearly")] + #pragma warning disable CS1591 RelativeYearly, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/RecurrenceRange.cs b/src/sample/generated/Models/RecurrenceRange.cs index 930ad235..8e3fb8d7 100644 --- a/src/sample/generated/Models/RecurrenceRange.cs +++ b/src/sample/generated/Models/RecurrenceRange.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class RecurrenceRange : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RecurrenceRange : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The date to stop applying the recurrence pattern. Depending on the recurrence pattern of the event, the last occurrence of the meeting may not be this date. Required if type is endDate. @@ -24,45 +30,53 @@ public class RecurrenceRange : IAdditionalDataHolder, IParsable { /// The date to start applying the recurrence pattern. The first occurrence of the meeting may be this date or later, depending on the recurrence pattern of the event. Must be the same value as the start property of the recurring event. Required. public Date? StartDate { get; set; } /// The type property - public RecurrenceRangeType? Type { get; set; } + public global::ApiSdk.Models.RecurrenceRangeType? Type { get; set; } /// - /// Instantiates a new recurrenceRange and sets the default values. + /// Instantiates a new and sets the default values. /// - public RecurrenceRange() { + public RecurrenceRange() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static RecurrenceRange CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.RecurrenceRange CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new RecurrenceRange(); + return new global::ApiSdk.Models.RecurrenceRange(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"endDate", n => { EndDate = n.GetDateValue(); } }, - {"numberOfOccurrences", n => { NumberOfOccurrences = n.GetIntValue(); } }, - {"recurrenceTimeZone", n => { RecurrenceTimeZone = n.GetStringValue(); } }, - {"startDate", n => { StartDate = n.GetDateValue(); } }, - {"type", n => { Type = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "endDate", n => { EndDate = n.GetDateValue(); } }, + { "numberOfOccurrences", n => { NumberOfOccurrences = n.GetIntValue(); } }, + { "recurrenceTimeZone", n => { RecurrenceTimeZone = n.GetStringValue(); } }, + { "startDate", n => { StartDate = n.GetDateValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateValue("endDate", EndDate); writer.WriteIntValue("numberOfOccurrences", NumberOfOccurrences); writer.WriteStringValue("recurrenceTimeZone", RecurrenceTimeZone); writer.WriteDateValue("startDate", StartDate); - writer.WriteEnumValue("type", Type); + writer.WriteEnumValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/RecurrenceRangeType.cs b/src/sample/generated/Models/RecurrenceRangeType.cs index ccc766a9..9ab42b43 100644 --- a/src/sample/generated/Models/RecurrenceRangeType.cs +++ b/src/sample/generated/Models/RecurrenceRangeType.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum RecurrenceRangeType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RecurrenceRangeType + #pragma warning restore CS1591 + { [EnumMember(Value = "endDate")] + #pragma warning disable CS1591 EndDate, + #pragma warning restore CS1591 [EnumMember(Value = "noEnd")] + #pragma warning disable CS1591 NoEnd, + #pragma warning restore CS1591 [EnumMember(Value = "numbered")] + #pragma warning disable CS1591 Numbered, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/RedirectUriSettings.cs b/src/sample/generated/Models/RedirectUriSettings.cs index e97445b8..d1ab4da2 100644 --- a/src/sample/generated/Models/RedirectUriSettings.cs +++ b/src/sample/generated/Models/RedirectUriSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class RedirectUriSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RedirectUriSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The index property @@ -19,33 +25,40 @@ public class RedirectUriSettings : IAdditionalDataHolder, IParsable { public string Uri { get; set; } #endif /// - /// Instantiates a new redirectUriSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public RedirectUriSettings() { + public RedirectUriSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static RedirectUriSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.RedirectUriSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new RedirectUriSettings(); + return new global::ApiSdk.Models.RedirectUriSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"index", n => { Index = n.GetIntValue(); } }, - {"uri", n => { Uri = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "index", n => { Index = n.GetIntValue(); } }, + { "uri", n => { Uri = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("index", Index); writer.WriteStringValue("uri", Uri); @@ -53,3 +66,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ReferenceUpdate.cs b/src/sample/generated/Models/ReferenceUpdate.cs index dcd3bcc7..ae036a41 100644 --- a/src/sample/generated/Models/ReferenceUpdate.cs +++ b/src/sample/generated/Models/ReferenceUpdate.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ReferenceUpdate : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReferenceUpdate : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataId property @@ -25,33 +31,40 @@ public class ReferenceUpdate : IAdditionalDataHolder, IParsable { public string OdataType { get; set; } #endif /// - /// Instantiates a new ReferenceUpdate and sets the default values. + /// Instantiates a new and sets the default values. /// - public ReferenceUpdate() { + public ReferenceUpdate() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ReferenceUpdate CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ReferenceUpdate CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ReferenceUpdate(); + return new global::ApiSdk.Models.ReferenceUpdate(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.id", n => { OdataId = n.GetStringValue(); } }, - {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.id", n => { OdataId = n.GetStringValue(); } }, + { "@odata.type", n => { OdataType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.id", OdataId); writer.WriteStringValue("@odata.type", OdataType); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ReferencedObject.cs b/src/sample/generated/Models/ReferencedObject.cs index 757d8f47..af1ad887 100644 --- a/src/sample/generated/Models/ReferencedObject.cs +++ b/src/sample/generated/Models/ReferencedObject.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ReferencedObject : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ReferencedObject : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Name of the referenced object. Must match one of the objects in the directory definition. @@ -25,33 +31,40 @@ public class ReferencedObject : IAdditionalDataHolder, IParsable { public string ReferencedProperty { get; set; } #endif /// - /// Instantiates a new referencedObject and sets the default values. + /// Instantiates a new and sets the default values. /// - public ReferencedObject() { + public ReferencedObject() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ReferencedObject CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ReferencedObject CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ReferencedObject(); + return new global::ApiSdk.Models.ReferencedObject(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"referencedObjectName", n => { ReferencedObjectName = n.GetStringValue(); } }, - {"referencedProperty", n => { ReferencedProperty = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "referencedObjectName", n => { ReferencedObjectName = n.GetStringValue(); } }, + { "referencedProperty", n => { ReferencedProperty = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("referencedObjectName", ReferencedObjectName); writer.WriteStringValue("referencedProperty", ReferencedProperty); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/RemoteDesktopSecurityConfiguration.cs b/src/sample/generated/Models/RemoteDesktopSecurityConfiguration.cs new file mode 100644 index 00000000..8d9fd203 --- /dev/null +++ b/src/sample/generated/Models/RemoteDesktopSecurityConfiguration.cs @@ -0,0 +1,60 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RemoteDesktopSecurityConfiguration : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Determines if Microsoft Entra ID RDS authentication protocol for RDP is enabled. + public bool? IsRemoteDesktopProtocolEnabled { get; set; } + /// The collection of target device groups that are associated with the RDS security configuration that will be enabled for SSO when a client connects to the target device over RDP using the new Microsoft Entra ID RDS authentication protocol. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? TargetDeviceGroups { get; set; } +#nullable restore +#else + public List TargetDeviceGroups { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.RemoteDesktopSecurityConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.RemoteDesktopSecurityConfiguration(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "isRemoteDesktopProtocolEnabled", n => { IsRemoteDesktopProtocolEnabled = n.GetBoolValue(); } }, + { "targetDeviceGroups", n => { TargetDeviceGroups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TargetDeviceGroup.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteBoolValue("isRemoteDesktopProtocolEnabled", IsRemoteDesktopProtocolEnabled); + writer.WriteCollectionOfObjectValues("targetDeviceGroups", TargetDeviceGroups); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/RemoteItem.cs b/src/sample/generated/Models/RemoteItem.cs index 21466d8f..dae0f6f9 100644 --- a/src/sample/generated/Models/RemoteItem.cs +++ b/src/sample/generated/Models/RemoteItem.cs @@ -1,46 +1,52 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class RemoteItem : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RemoteItem : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The createdBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? CreatedBy { get; set; } #nullable restore #else - public IdentitySet CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet CreatedBy { get; set; } #endif /// Date and time of item creation. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } /// The file property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public FileObject? File { get; set; } + public global::ApiSdk.Models.FileObject? File { get; set; } #nullable restore #else - public FileObject File { get; set; } + public global::ApiSdk.Models.FileObject File { get; set; } #endif /// The fileSystemInfo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.FileSystemInfo? FileSystemInfo { get; set; } + public global::ApiSdk.Models.FileSystemInfo? FileSystemInfo { get; set; } #nullable restore #else - public ApiSdk.Models.FileSystemInfo FileSystemInfo { get; set; } + public global::ApiSdk.Models.FileSystemInfo FileSystemInfo { get; set; } #endif /// The folder property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Folder? Folder { get; set; } + public global::ApiSdk.Models.Folder? Folder { get; set; } #nullable restore #else - public ApiSdk.Models.Folder Folder { get; set; } + public global::ApiSdk.Models.Folder Folder { get; set; } #endif /// Unique identifier for the remote item in its drive. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -53,18 +59,18 @@ public class RemoteItem : IAdditionalDataHolder, IParsable { /// The image property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Image? Image { get; set; } + public global::ApiSdk.Models.Image? Image { get; set; } #nullable restore #else - public ApiSdk.Models.Image Image { get; set; } + public global::ApiSdk.Models.Image Image { get; set; } #endif /// The lastModifiedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? LastModifiedBy { get; set; } #nullable restore #else - public IdentitySet LastModifiedBy { get; set; } + public global::ApiSdk.Models.IdentitySet LastModifiedBy { get; set; } #endif /// Date and time the item was last modified. Read-only. public DateTimeOffset? LastModifiedDateTime { get; set; } @@ -79,52 +85,52 @@ public class RemoteItem : IAdditionalDataHolder, IParsable { /// The package property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Package? Package { get; set; } + public global::ApiSdk.Models.Package? Package { get; set; } #nullable restore #else - public ApiSdk.Models.Package Package { get; set; } + public global::ApiSdk.Models.Package Package { get; set; } #endif /// The parentReference property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemReference? ParentReference { get; set; } + public global::ApiSdk.Models.ItemReference? ParentReference { get; set; } #nullable restore #else - public ItemReference ParentReference { get; set; } + public global::ApiSdk.Models.ItemReference ParentReference { get; set; } #endif /// The shared property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Shared? Shared { get; set; } + public global::ApiSdk.Models.Shared? Shared { get; set; } #nullable restore #else - public ApiSdk.Models.Shared Shared { get; set; } + public global::ApiSdk.Models.Shared Shared { get; set; } #endif /// The sharepointIds property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SharepointIds? SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds? SharepointIds { get; set; } #nullable restore #else - public ApiSdk.Models.SharepointIds SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds SharepointIds { get; set; } #endif /// Size of the remote item. Read-only. public long? Size { get; set; } /// The specialFolder property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SpecialFolder? SpecialFolder { get; set; } + public global::ApiSdk.Models.SpecialFolder? SpecialFolder { get; set; } #nullable restore #else - public ApiSdk.Models.SpecialFolder SpecialFolder { get; set; } + public global::ApiSdk.Models.SpecialFolder SpecialFolder { get; set; } #endif /// The video property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Video? Video { get; set; } + public global::ApiSdk.Models.Video? Video { get; set; } #nullable restore #else - public ApiSdk.Models.Video Video { get; set; } + public global::ApiSdk.Models.Video Video { get; set; } #endif /// DAV compatible URL for the item. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -143,71 +149,79 @@ public class RemoteItem : IAdditionalDataHolder, IParsable { public string WebUrl { get; set; } #endif /// - /// Instantiates a new remoteItem and sets the default values. + /// Instantiates a new and sets the default values. /// - public RemoteItem() { + public RemoteItem() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static RemoteItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.RemoteItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new RemoteItem(); + return new global::ApiSdk.Models.RemoteItem(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"createdBy", n => { CreatedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"file", n => { File = n.GetObjectValue(FileObject.CreateFromDiscriminatorValue); } }, - {"fileSystemInfo", n => { FileSystemInfo = n.GetObjectValue(ApiSdk.Models.FileSystemInfo.CreateFromDiscriminatorValue); } }, - {"folder", n => { Folder = n.GetObjectValue(ApiSdk.Models.Folder.CreateFromDiscriminatorValue); } }, - {"id", n => { Id = n.GetStringValue(); } }, - {"image", n => { Image = n.GetObjectValue(ApiSdk.Models.Image.CreateFromDiscriminatorValue); } }, - {"lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"package", n => { Package = n.GetObjectValue(ApiSdk.Models.Package.CreateFromDiscriminatorValue); } }, - {"parentReference", n => { ParentReference = n.GetObjectValue(ItemReference.CreateFromDiscriminatorValue); } }, - {"shared", n => { Shared = n.GetObjectValue(ApiSdk.Models.Shared.CreateFromDiscriminatorValue); } }, - {"sharepointIds", n => { SharepointIds = n.GetObjectValue(ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, - {"size", n => { Size = n.GetLongValue(); } }, - {"specialFolder", n => { SpecialFolder = n.GetObjectValue(ApiSdk.Models.SpecialFolder.CreateFromDiscriminatorValue); } }, - {"video", n => { Video = n.GetObjectValue(ApiSdk.Models.Video.CreateFromDiscriminatorValue); } }, - {"webDavUrl", n => { WebDavUrl = n.GetStringValue(); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "createdBy", n => { CreatedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "file", n => { File = n.GetObjectValue(global::ApiSdk.Models.FileObject.CreateFromDiscriminatorValue); } }, + { "fileSystemInfo", n => { FileSystemInfo = n.GetObjectValue(global::ApiSdk.Models.FileSystemInfo.CreateFromDiscriminatorValue); } }, + { "folder", n => { Folder = n.GetObjectValue(global::ApiSdk.Models.Folder.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "image", n => { Image = n.GetObjectValue(global::ApiSdk.Models.Image.CreateFromDiscriminatorValue); } }, + { "lastModifiedBy", n => { LastModifiedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "package", n => { Package = n.GetObjectValue(global::ApiSdk.Models.Package.CreateFromDiscriminatorValue); } }, + { "parentReference", n => { ParentReference = n.GetObjectValue(global::ApiSdk.Models.ItemReference.CreateFromDiscriminatorValue); } }, + { "shared", n => { Shared = n.GetObjectValue(global::ApiSdk.Models.Shared.CreateFromDiscriminatorValue); } }, + { "sharepointIds", n => { SharepointIds = n.GetObjectValue(global::ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, + { "size", n => { Size = n.GetLongValue(); } }, + { "specialFolder", n => { SpecialFolder = n.GetObjectValue(global::ApiSdk.Models.SpecialFolder.CreateFromDiscriminatorValue); } }, + { "video", n => { Video = n.GetObjectValue(global::ApiSdk.Models.Video.CreateFromDiscriminatorValue); } }, + { "webDavUrl", n => { WebDavUrl = n.GetStringValue(); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("createdBy", CreatedBy); + writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("file", File); - writer.WriteObjectValue("fileSystemInfo", FileSystemInfo); - writer.WriteObjectValue("folder", Folder); + writer.WriteObjectValue("file", File); + writer.WriteObjectValue("fileSystemInfo", FileSystemInfo); + writer.WriteObjectValue("folder", Folder); writer.WriteStringValue("id", Id); - writer.WriteObjectValue("image", Image); - writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); + writer.WriteObjectValue("image", Image); + writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("name", Name); - writer.WriteObjectValue("package", Package); - writer.WriteObjectValue("parentReference", ParentReference); - writer.WriteObjectValue("shared", Shared); - writer.WriteObjectValue("sharepointIds", SharepointIds); + writer.WriteObjectValue("package", Package); + writer.WriteObjectValue("parentReference", ParentReference); + writer.WriteObjectValue("shared", Shared); + writer.WriteObjectValue("sharepointIds", SharepointIds); writer.WriteLongValue("size", Size); - writer.WriteObjectValue("specialFolder", SpecialFolder); - writer.WriteObjectValue("video", Video); + writer.WriteObjectValue("specialFolder", SpecialFolder); + writer.WriteObjectValue("video", Video); writer.WriteStringValue("webDavUrl", WebDavUrl); writer.WriteStringValue("webUrl", WebUrl); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/RequestSignatureVerification.cs b/src/sample/generated/Models/RequestSignatureVerification.cs index 267da587..b5f564c2 100644 --- a/src/sample/generated/Models/RequestSignatureVerification.cs +++ b/src/sample/generated/Models/RequestSignatureVerification.cs @@ -1,49 +1,63 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class RequestSignatureVerification : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RequestSignatureVerification : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The allowedWeakAlgorithms property - public WeakAlgorithms? AllowedWeakAlgorithms { get; set; } + public global::ApiSdk.Models.WeakAlgorithms? AllowedWeakAlgorithms { get; set; } /// Specifies whether signed authentication requests for this application should be required. public bool? IsSignedRequestRequired { get; set; } /// - /// Instantiates a new requestSignatureVerification and sets the default values. + /// Instantiates a new and sets the default values. /// - public RequestSignatureVerification() { + public RequestSignatureVerification() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static RequestSignatureVerification CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.RequestSignatureVerification CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new RequestSignatureVerification(); + return new global::ApiSdk.Models.RequestSignatureVerification(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowedWeakAlgorithms", n => { AllowedWeakAlgorithms = n.GetEnumValue(); } }, - {"isSignedRequestRequired", n => { IsSignedRequestRequired = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowedWeakAlgorithms", n => { AllowedWeakAlgorithms = n.GetEnumValue(); } }, + { "isSignedRequestRequired", n => { IsSignedRequestRequired = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("allowedWeakAlgorithms", AllowedWeakAlgorithms); + writer.WriteEnumValue("allowedWeakAlgorithms", AllowedWeakAlgorithms); writer.WriteBoolValue("isSignedRequestRequired", IsSignedRequestRequired); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/RequiredResourceAccess.cs b/src/sample/generated/Models/RequiredResourceAccess.cs index 51a2d887..4997f438 100644 --- a/src/sample/generated/Models/RequiredResourceAccess.cs +++ b/src/sample/generated/Models/RequiredResourceAccess.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class RequiredResourceAccess : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RequiredResourceAccess : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ResourceAccess { get; set; } + public List? ResourceAccess { get; set; } #nullable restore #else - public List ResourceAccess { get; set; } + public List ResourceAccess { get; set; } #endif /// The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,37 +31,45 @@ public class RequiredResourceAccess : IAdditionalDataHolder, IParsable { public string ResourceAppId { get; set; } #endif /// - /// Instantiates a new requiredResourceAccess and sets the default values. + /// Instantiates a new and sets the default values. /// - public RequiredResourceAccess() { + public RequiredResourceAccess() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static RequiredResourceAccess CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.RequiredResourceAccess CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new RequiredResourceAccess(); + return new global::ApiSdk.Models.RequiredResourceAccess(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"resourceAccess", n => { ResourceAccess = n.GetCollectionOfObjectValues(ApiSdk.Models.ResourceAccess.CreateFromDiscriminatorValue)?.ToList(); } }, - {"resourceAppId", n => { ResourceAppId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "resourceAccess", n => { ResourceAccess = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ResourceAccess.CreateFromDiscriminatorValue)?.AsList(); } }, + { "resourceAppId", n => { ResourceAppId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("resourceAccess", ResourceAccess); + writer.WriteCollectionOfObjectValues("resourceAccess", ResourceAccess); writer.WriteStringValue("resourceAppId", ResourceAppId); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ResourceAccess.cs b/src/sample/generated/Models/ResourceAccess.cs index 03fda536..0ccf6900 100644 --- a/src/sample/generated/Models/ResourceAccess.cs +++ b/src/sample/generated/Models/ResourceAccess.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ResourceAccess : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResourceAccess : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The unique identifier of an app role or delegated permission exposed by the resource application. For delegated permissions, this should match the id property of one of the delegated permissions in the oauth2PermissionScopes collection of the resource application's service principal. For app roles (application permissions), this should match the id property of an app role in the appRoles collection of the resource application's service principal. @@ -19,33 +25,40 @@ public class ResourceAccess : IAdditionalDataHolder, IParsable { public string Type { get; set; } #endif /// - /// Instantiates a new resourceAccess and sets the default values. + /// Instantiates a new and sets the default values. /// - public ResourceAccess() { + public ResourceAccess() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ResourceAccess CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ResourceAccess CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ResourceAccess(); + return new global::ApiSdk.Models.ResourceAccess(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"id", n => { Id = n.GetGuidValue(); } }, - {"type", n => { Type = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetGuidValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteGuidValue("id", Id); writer.WriteStringValue("type", Type); @@ -53,3 +66,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ResourceReference.cs b/src/sample/generated/Models/ResourceReference.cs index 9dc74d95..4d3170e8 100644 --- a/src/sample/generated/Models/ResourceReference.cs +++ b/src/sample/generated/Models/ResourceReference.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ResourceReference : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResourceReference : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The item's unique identifier. @@ -33,34 +39,41 @@ public class ResourceReference : IAdditionalDataHolder, IParsable { public string WebUrl { get; set; } #endif /// - /// Instantiates a new resourceReference and sets the default values. + /// Instantiates a new and sets the default values. /// - public ResourceReference() { + public ResourceReference() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ResourceReference CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ResourceReference CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ResourceReference(); + return new global::ApiSdk.Models.ResourceReference(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"id", n => { Id = n.GetStringValue(); } }, - {"type", n => { Type = n.GetStringValue(); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("type", Type); @@ -69,3 +82,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ResourceSpecificPermission.cs b/src/sample/generated/Models/ResourceSpecificPermission.cs index 88287417..4295fea5 100644 --- a/src/sample/generated/Models/ResourceSpecificPermission.cs +++ b/src/sample/generated/Models/ResourceSpecificPermission.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ResourceSpecificPermission : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResourceSpecificPermission : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Describes the level of access that the resource-specific permission represents. @@ -37,36 +43,43 @@ public class ResourceSpecificPermission : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new resourceSpecificPermission and sets the default values. + /// Instantiates a new and sets the default values. /// - public ResourceSpecificPermission() { + public ResourceSpecificPermission() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ResourceSpecificPermission CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ResourceSpecificPermission CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ResourceSpecificPermission(); + return new global::ApiSdk.Models.ResourceSpecificPermission(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"id", n => { Id = n.GetGuidValue(); } }, - {"isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetGuidValue(); } }, + { "isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); @@ -77,3 +90,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ResourceSpecificPermissionGrant.cs b/src/sample/generated/Models/ResourceSpecificPermissionGrant.cs index b0afb632..06423beb 100644 --- a/src/sample/generated/Models/ResourceSpecificPermissionGrant.cs +++ b/src/sample/generated/Models/ResourceSpecificPermissionGrant.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ResourceSpecificPermissionGrant : DirectoryObject, IParsable { - /// ID of the service principal of the Azure AD app that has been granted access. Read-only. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResourceSpecificPermissionGrant : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { + /// ID of the service principal of the Microsoft Entra app that has been granted access. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ClientAppId { get; set; } @@ -14,7 +20,7 @@ public class ResourceSpecificPermissionGrant : DirectoryObject, IParsable { #else public string ClientAppId { get; set; } #endif - /// ID of the Azure AD app that has been granted access. Read-only. + /// ID of the Microsoft Entra app that has been granted access. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ClientId { get; set; } @@ -38,7 +44,7 @@ public class ResourceSpecificPermissionGrant : DirectoryObject, IParsable { #else public string PermissionType { get; set; } #endif - /// ID of the Azure AD app that is hosting the resource. Read-only. + /// ID of the Microsoft Entra app that is hosting the resource. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ResourceAppId { get; set; } @@ -49,28 +55,34 @@ public class ResourceSpecificPermissionGrant : DirectoryObject, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ResourceSpecificPermissionGrant CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ResourceSpecificPermissionGrant CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ResourceSpecificPermissionGrant(); + return new global::ApiSdk.Models.ResourceSpecificPermissionGrant(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"clientAppId", n => { ClientAppId = n.GetStringValue(); } }, - {"clientId", n => { ClientId = n.GetStringValue(); } }, - {"permission", n => { Permission = n.GetStringValue(); } }, - {"permissionType", n => { PermissionType = n.GetStringValue(); } }, - {"resourceAppId", n => { ResourceAppId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "clientAppId", n => { ClientAppId = n.GetStringValue(); } }, + { "clientId", n => { ClientId = n.GetStringValue(); } }, + { "permission", n => { Permission = n.GetStringValue(); } }, + { "permissionType", n => { PermissionType = n.GetStringValue(); } }, + { "resourceAppId", n => { ResourceAppId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clientAppId", ClientAppId); @@ -81,3 +93,4 @@ public class ResourceSpecificPermissionGrant : DirectoryObject, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ResourceVisualization.cs b/src/sample/generated/Models/ResourceVisualization.cs index f6e3864c..1c1cdb42 100644 --- a/src/sample/generated/Models/ResourceVisualization.cs +++ b/src/sample/generated/Models/ResourceVisualization.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ResourceVisualization : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResourceVisualization : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A string describing where the item is stored. For example, the name of a SharePoint site or the user name identifying the owner of the OneDrive storing the item. @@ -73,39 +79,46 @@ public class ResourceVisualization : IAdditionalDataHolder, IParsable { public string Type { get; set; } #endif /// - /// Instantiates a new resourceVisualization and sets the default values. + /// Instantiates a new and sets the default values. /// - public ResourceVisualization() { + public ResourceVisualization() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ResourceVisualization CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ResourceVisualization CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ResourceVisualization(); + return new global::ApiSdk.Models.ResourceVisualization(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"containerDisplayName", n => { ContainerDisplayName = n.GetStringValue(); } }, - {"containerType", n => { ContainerType = n.GetStringValue(); } }, - {"containerWebUrl", n => { ContainerWebUrl = n.GetStringValue(); } }, - {"mediaType", n => { MediaType = n.GetStringValue(); } }, - {"previewImageUrl", n => { PreviewImageUrl = n.GetStringValue(); } }, - {"previewText", n => { PreviewText = n.GetStringValue(); } }, - {"title", n => { Title = n.GetStringValue(); } }, - {"type", n => { Type = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "containerDisplayName", n => { ContainerDisplayName = n.GetStringValue(); } }, + { "containerType", n => { ContainerType = n.GetStringValue(); } }, + { "containerWebUrl", n => { ContainerWebUrl = n.GetStringValue(); } }, + { "mediaType", n => { MediaType = n.GetStringValue(); } }, + { "previewImageUrl", n => { PreviewImageUrl = n.GetStringValue(); } }, + { "previewText", n => { PreviewText = n.GetStringValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("containerDisplayName", ContainerDisplayName); writer.WriteStringValue("containerType", ContainerType); @@ -119,3 +132,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ResponseStatus.cs b/src/sample/generated/Models/ResponseStatus.cs index 639d31d5..57b092e9 100644 --- a/src/sample/generated/Models/ResponseStatus.cs +++ b/src/sample/generated/Models/ResponseStatus.cs @@ -1,49 +1,63 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ResponseStatus : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ResponseStatus : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The response property - public ResponseType? Response { get; set; } + public global::ApiSdk.Models.ResponseType? Response { get; set; } /// The date and time when the response was returned. It uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? Time { get; set; } /// - /// Instantiates a new responseStatus and sets the default values. + /// Instantiates a new and sets the default values. /// - public ResponseStatus() { + public ResponseStatus() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ResponseStatus CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ResponseStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ResponseStatus(); + return new global::ApiSdk.Models.ResponseStatus(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"response", n => { Response = n.GetEnumValue(); } }, - {"time", n => { Time = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "response", n => { Response = n.GetEnumValue(); } }, + { "time", n => { Time = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("response", Response); + writer.WriteEnumValue("response", Response); writer.WriteDateTimeOffsetValue("time", Time); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ResponseType.cs b/src/sample/generated/Models/ResponseType.cs index 2807d307..078bf53e 100644 --- a/src/sample/generated/Models/ResponseType.cs +++ b/src/sample/generated/Models/ResponseType.cs @@ -1,19 +1,36 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ResponseType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ResponseType + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "organizer")] + #pragma warning disable CS1591 Organizer, + #pragma warning restore CS1591 [EnumMember(Value = "tentativelyAccepted")] + #pragma warning disable CS1591 TentativelyAccepted, + #pragma warning restore CS1591 [EnumMember(Value = "accepted")] + #pragma warning disable CS1591 Accepted, + #pragma warning restore CS1591 [EnumMember(Value = "declined")] + #pragma warning disable CS1591 Declined, + #pragma warning restore CS1591 [EnumMember(Value = "notResponded")] + #pragma warning disable CS1591 NotResponded, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/RetentionLabelSettings.cs b/src/sample/generated/Models/RetentionLabelSettings.cs new file mode 100644 index 00000000..a951af84 --- /dev/null +++ b/src/sample/generated/Models/RetentionLabelSettings.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.Security; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RetentionLabelSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The behaviorDuringRetentionPeriod property + public global::ApiSdk.Models.Security.BehaviorDuringRetentionPeriod? BehaviorDuringRetentionPeriod { get; set; } + /// Specifies whether updates to document content are allowed. Read-only. + public bool? IsContentUpdateAllowed { get; set; } + /// Specifies whether the document deletion is allowed. Read-only. + public bool? IsDeleteAllowed { get; set; } + /// Specifies whether you're allowed to change the retention label on the document. Read-only. + public bool? IsLabelUpdateAllowed { get; set; } + /// Specifies whether updates to the item metadata (for example, the Title field) are blocked. Read-only. + public bool? IsMetadataUpdateAllowed { get; set; } + /// Specifies whether the item is locked. Read-write. + public bool? IsRecordLocked { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RetentionLabelSettings() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.RetentionLabelSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.RetentionLabelSettings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "behaviorDuringRetentionPeriod", n => { BehaviorDuringRetentionPeriod = n.GetEnumValue(); } }, + { "isContentUpdateAllowed", n => { IsContentUpdateAllowed = n.GetBoolValue(); } }, + { "isDeleteAllowed", n => { IsDeleteAllowed = n.GetBoolValue(); } }, + { "isLabelUpdateAllowed", n => { IsLabelUpdateAllowed = n.GetBoolValue(); } }, + { "isMetadataUpdateAllowed", n => { IsMetadataUpdateAllowed = n.GetBoolValue(); } }, + { "isRecordLocked", n => { IsRecordLocked = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("behaviorDuringRetentionPeriod", BehaviorDuringRetentionPeriod); + writer.WriteBoolValue("isContentUpdateAllowed", IsContentUpdateAllowed); + writer.WriteBoolValue("isDeleteAllowed", IsDeleteAllowed); + writer.WriteBoolValue("isLabelUpdateAllowed", IsLabelUpdateAllowed); + writer.WriteBoolValue("isMetadataUpdateAllowed", IsMetadataUpdateAllowed); + writer.WriteBoolValue("isRecordLocked", IsRecordLocked); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/RichLongRunningOperation.cs b/src/sample/generated/Models/RichLongRunningOperation.cs index 00e329bf..228b7d1a 100644 --- a/src/sample/generated/Models/RichLongRunningOperation.cs +++ b/src/sample/generated/Models/RichLongRunningOperation.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class RichLongRunningOperation : LongRunningOperation, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RichLongRunningOperation : global::ApiSdk.Models.LongRunningOperation, IParsable + #pragma warning restore CS1591 + { /// The error property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PublicError? Error { get; set; } + public global::ApiSdk.Models.PublicError? Error { get; set; } #nullable restore #else - public PublicError Error { get; set; } + public global::ApiSdk.Models.PublicError Error { get; set; } #endif /// A value between 0 and 100 that indicates the progress of the operation. public int? PercentageComplete { get; set; } @@ -35,33 +41,40 @@ public class RichLongRunningOperation : LongRunningOperation, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new RichLongRunningOperation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.RichLongRunningOperation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new RichLongRunningOperation(); + return new global::ApiSdk.Models.RichLongRunningOperation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"error", n => { Error = n.GetObjectValue(PublicError.CreateFromDiscriminatorValue); } }, - {"percentageComplete", n => { PercentageComplete = n.GetIntValue(); } }, - {"resourceId", n => { ResourceId = n.GetStringValue(); } }, - {"type", n => { Type = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "error", n => { Error = n.GetObjectValue(global::ApiSdk.Models.PublicError.CreateFromDiscriminatorValue); } }, + { "percentageComplete", n => { PercentageComplete = n.GetIntValue(); } }, + { "resourceId", n => { ResourceId = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("error", Error); + writer.WriteObjectValue("error", Error); writer.WriteIntValue("percentageComplete", PercentageComplete); writer.WriteStringValue("resourceId", ResourceId); writer.WriteStringValue("type", Type); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Root.cs b/src/sample/generated/Models/Root.cs index 9eebce26..5b002a8b 100644 --- a/src/sample/generated/Models/Root.cs +++ b/src/sample/generated/Models/Root.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Root : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Root : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new root and sets the default values. + /// Instantiates a new and sets the default values. /// - public Root() { + public Root() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Root CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Root CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Root(); + return new global::ApiSdk.Models.Root(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SamlSingleSignOnSettings.cs b/src/sample/generated/Models/SamlSingleSignOnSettings.cs index c313ffab..1ec5e710 100644 --- a/src/sample/generated/Models/SamlSingleSignOnSettings.cs +++ b/src/sample/generated/Models/SamlSingleSignOnSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SamlSingleSignOnSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SamlSingleSignOnSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The relative URI the service provider would redirect to after completion of the single sign-on flow. @@ -17,35 +23,43 @@ public class SamlSingleSignOnSettings : IAdditionalDataHolder, IParsable { public string RelayState { get; set; } #endif /// - /// Instantiates a new samlSingleSignOnSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public SamlSingleSignOnSettings() { + public SamlSingleSignOnSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SamlSingleSignOnSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SamlSingleSignOnSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SamlSingleSignOnSettings(); + return new global::ApiSdk.Models.SamlSingleSignOnSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"relayState", n => { RelayState = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "relayState", n => { RelayState = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("relayState", RelayState); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Schedule.cs b/src/sample/generated/Models/Schedule.cs index f9cd915e..5a027672 100644 --- a/src/sample/generated/Models/Schedule.cs +++ b/src/sample/generated/Models/Schedule.cs @@ -1,43 +1,49 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Schedule : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Schedule : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Indicates whether the schedule is enabled for the team. Required. public bool? Enabled { get; set; } /// The offer requests for shifts in the schedule. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OfferShiftRequests { get; set; } + public List? OfferShiftRequests { get; set; } #nullable restore #else - public List OfferShiftRequests { get; set; } + public List OfferShiftRequests { get; set; } #endif /// Indicates whether offer shift requests are enabled for the schedule. public bool? OfferShiftRequestsEnabled { get; set; } /// The open shift requests in the schedule. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OpenShiftChangeRequests { get; set; } + public List? OpenShiftChangeRequests { get; set; } #nullable restore #else - public List OpenShiftChangeRequests { get; set; } + public List OpenShiftChangeRequests { get; set; } #endif /// The set of open shifts in a scheduling group in the schedule. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OpenShifts { get; set; } + public List? OpenShifts { get; set; } #nullable restore #else - public List OpenShifts { get; set; } + public List OpenShifts { get; set; } #endif /// Indicates whether open shifts are enabled for the schedule. public bool? OpenShiftsEnabled { get; set; } /// The provisionStatus property - public OperationStatus? ProvisionStatus { get; set; } + public global::ApiSdk.Models.OperationStatus? ProvisionStatus { get; set; } /// Additional information about why schedule provisioning failed. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -49,26 +55,26 @@ public class Schedule : Entity, IParsable { /// The logical grouping of users in the schedule (usually by role). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SchedulingGroups { get; set; } + public List? SchedulingGroups { get; set; } #nullable restore #else - public List SchedulingGroups { get; set; } + public List SchedulingGroups { get; set; } #endif /// The shifts in the schedule. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Shifts { get; set; } + public List? Shifts { get; set; } #nullable restore #else - public List Shifts { get; set; } + public List Shifts { get; set; } #endif /// The swap requests for shifts in the schedule. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SwapShiftsChangeRequests { get; set; } + public List? SwapShiftsChangeRequests { get; set; } #nullable restore #else - public List SwapShiftsChangeRequests { get; set; } + public List SwapShiftsChangeRequests { get; set; } #endif /// Indicates whether swap shifts requests are enabled for the schedule. public bool? SwapShiftsRequestsEnabled { get; set; } @@ -77,28 +83,28 @@ public class Schedule : Entity, IParsable { /// The set of reasons for a time off in the schedule. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TimeOffReasons { get; set; } + public List? TimeOffReasons { get; set; } #nullable restore #else - public List TimeOffReasons { get; set; } + public List TimeOffReasons { get; set; } #endif /// The time off requests in the schedule. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TimeOffRequests { get; set; } + public List? TimeOffRequests { get; set; } #nullable restore #else - public List TimeOffRequests { get; set; } + public List TimeOffRequests { get; set; } #endif /// Indicates whether time off requests are enabled for the schedule. public bool? TimeOffRequestsEnabled { get; set; } /// The instances of times off in the schedule. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TimesOff { get; set; } + public List? TimesOff { get; set; } #nullable restore #else - public List TimesOff { get; set; } + public List TimesOff { get; set; } #endif /// Indicates the time zone of the schedule team using tz database format. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -119,62 +125,69 @@ public class Schedule : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Schedule CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Schedule CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Schedule(); + return new global::ApiSdk.Models.Schedule(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"enabled", n => { Enabled = n.GetBoolValue(); } }, - {"offerShiftRequests", n => { OfferShiftRequests = n.GetCollectionOfObjectValues(OfferShiftRequest.CreateFromDiscriminatorValue)?.ToList(); } }, - {"offerShiftRequestsEnabled", n => { OfferShiftRequestsEnabled = n.GetBoolValue(); } }, - {"openShiftChangeRequests", n => { OpenShiftChangeRequests = n.GetCollectionOfObjectValues(OpenShiftChangeRequest.CreateFromDiscriminatorValue)?.ToList(); } }, - {"openShifts", n => { OpenShifts = n.GetCollectionOfObjectValues(OpenShift.CreateFromDiscriminatorValue)?.ToList(); } }, - {"openShiftsEnabled", n => { OpenShiftsEnabled = n.GetBoolValue(); } }, - {"provisionStatus", n => { ProvisionStatus = n.GetEnumValue(); } }, - {"provisionStatusCode", n => { ProvisionStatusCode = n.GetStringValue(); } }, - {"schedulingGroups", n => { SchedulingGroups = n.GetCollectionOfObjectValues(SchedulingGroup.CreateFromDiscriminatorValue)?.ToList(); } }, - {"shifts", n => { Shifts = n.GetCollectionOfObjectValues(Shift.CreateFromDiscriminatorValue)?.ToList(); } }, - {"swapShiftsChangeRequests", n => { SwapShiftsChangeRequests = n.GetCollectionOfObjectValues(SwapShiftsChangeRequest.CreateFromDiscriminatorValue)?.ToList(); } }, - {"swapShiftsRequestsEnabled", n => { SwapShiftsRequestsEnabled = n.GetBoolValue(); } }, - {"timeClockEnabled", n => { TimeClockEnabled = n.GetBoolValue(); } }, - {"timeOffReasons", n => { TimeOffReasons = n.GetCollectionOfObjectValues(TimeOffReason.CreateFromDiscriminatorValue)?.ToList(); } }, - {"timeOffRequests", n => { TimeOffRequests = n.GetCollectionOfObjectValues(TimeOffRequest.CreateFromDiscriminatorValue)?.ToList(); } }, - {"timeOffRequestsEnabled", n => { TimeOffRequestsEnabled = n.GetBoolValue(); } }, - {"timeZone", n => { TimeZone = n.GetStringValue(); } }, - {"timesOff", n => { TimesOff = n.GetCollectionOfObjectValues(TimeOff.CreateFromDiscriminatorValue)?.ToList(); } }, - {"workforceIntegrationIds", n => { WorkforceIntegrationIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "offerShiftRequests", n => { OfferShiftRequests = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OfferShiftRequest.CreateFromDiscriminatorValue)?.AsList(); } }, + { "offerShiftRequestsEnabled", n => { OfferShiftRequestsEnabled = n.GetBoolValue(); } }, + { "openShiftChangeRequests", n => { OpenShiftChangeRequests = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OpenShiftChangeRequest.CreateFromDiscriminatorValue)?.AsList(); } }, + { "openShifts", n => { OpenShifts = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OpenShift.CreateFromDiscriminatorValue)?.AsList(); } }, + { "openShiftsEnabled", n => { OpenShiftsEnabled = n.GetBoolValue(); } }, + { "provisionStatus", n => { ProvisionStatus = n.GetEnumValue(); } }, + { "provisionStatusCode", n => { ProvisionStatusCode = n.GetStringValue(); } }, + { "schedulingGroups", n => { SchedulingGroups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SchedulingGroup.CreateFromDiscriminatorValue)?.AsList(); } }, + { "shifts", n => { Shifts = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Shift.CreateFromDiscriminatorValue)?.AsList(); } }, + { "swapShiftsChangeRequests", n => { SwapShiftsChangeRequests = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SwapShiftsChangeRequest.CreateFromDiscriminatorValue)?.AsList(); } }, + { "swapShiftsRequestsEnabled", n => { SwapShiftsRequestsEnabled = n.GetBoolValue(); } }, + { "timeClockEnabled", n => { TimeClockEnabled = n.GetBoolValue(); } }, + { "timeOffReasons", n => { TimeOffReasons = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TimeOffReason.CreateFromDiscriminatorValue)?.AsList(); } }, + { "timeOffRequests", n => { TimeOffRequests = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TimeOffRequest.CreateFromDiscriminatorValue)?.AsList(); } }, + { "timeOffRequestsEnabled", n => { TimeOffRequestsEnabled = n.GetBoolValue(); } }, + { "timeZone", n => { TimeZone = n.GetStringValue(); } }, + { "timesOff", n => { TimesOff = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TimeOff.CreateFromDiscriminatorValue)?.AsList(); } }, + { "workforceIntegrationIds", n => { WorkforceIntegrationIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("enabled", Enabled); - writer.WriteCollectionOfObjectValues("offerShiftRequests", OfferShiftRequests); + writer.WriteCollectionOfObjectValues("offerShiftRequests", OfferShiftRequests); writer.WriteBoolValue("offerShiftRequestsEnabled", OfferShiftRequestsEnabled); - writer.WriteCollectionOfObjectValues("openShiftChangeRequests", OpenShiftChangeRequests); - writer.WriteCollectionOfObjectValues("openShifts", OpenShifts); + writer.WriteCollectionOfObjectValues("openShiftChangeRequests", OpenShiftChangeRequests); + writer.WriteCollectionOfObjectValues("openShifts", OpenShifts); writer.WriteBoolValue("openShiftsEnabled", OpenShiftsEnabled); - writer.WriteEnumValue("provisionStatus", ProvisionStatus); - writer.WriteCollectionOfObjectValues("schedulingGroups", SchedulingGroups); - writer.WriteCollectionOfObjectValues("shifts", Shifts); - writer.WriteCollectionOfObjectValues("swapShiftsChangeRequests", SwapShiftsChangeRequests); + writer.WriteEnumValue("provisionStatus", ProvisionStatus); + writer.WriteCollectionOfObjectValues("schedulingGroups", SchedulingGroups); + writer.WriteCollectionOfObjectValues("shifts", Shifts); + writer.WriteCollectionOfObjectValues("swapShiftsChangeRequests", SwapShiftsChangeRequests); writer.WriteBoolValue("swapShiftsRequestsEnabled", SwapShiftsRequestsEnabled); writer.WriteBoolValue("timeClockEnabled", TimeClockEnabled); - writer.WriteCollectionOfObjectValues("timeOffReasons", TimeOffReasons); - writer.WriteCollectionOfObjectValues("timeOffRequests", TimeOffRequests); + writer.WriteCollectionOfObjectValues("timeOffReasons", TimeOffReasons); + writer.WriteCollectionOfObjectValues("timeOffRequests", TimeOffRequests); writer.WriteBoolValue("timeOffRequestsEnabled", TimeOffRequestsEnabled); - writer.WriteCollectionOfObjectValues("timesOff", TimesOff); + writer.WriteCollectionOfObjectValues("timesOff", TimesOff); writer.WriteStringValue("timeZone", TimeZone); writer.WriteCollectionOfPrimitiveValues("workforceIntegrationIds", WorkforceIntegrationIds); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ScheduleChangeRequest.cs b/src/sample/generated/Models/ScheduleChangeRequest.cs index 3c466512..6fb659b5 100644 --- a/src/sample/generated/Models/ScheduleChangeRequest.cs +++ b/src/sample/generated/Models/ScheduleChangeRequest.cs @@ -1,13 +1,19 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ScheduleChangeRequest : ChangeTrackedEntity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ScheduleChangeRequest : global::ApiSdk.Models.ChangeTrackedEntity, IParsable + #pragma warning restore CS1591 + { /// The assignedTo property - public ScheduleChangeRequestActor? AssignedTo { get; set; } + public global::ApiSdk.Models.ScheduleChangeRequestActor? AssignedTo { get; set; } /// The managerActionDateTime property public DateTimeOffset? ManagerActionDateTime { get; private set; } /// The managerActionMessage property @@ -45,41 +51,48 @@ public class ScheduleChangeRequest : ChangeTrackedEntity, IParsable { public string SenderUserId { get; private set; } #endif /// The state property - public ScheduleChangeState? State { get; set; } + public global::ApiSdk.Models.ScheduleChangeState? State { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ScheduleChangeRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ScheduleChangeRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ScheduleChangeRequest(); + return new global::ApiSdk.Models.ScheduleChangeRequest(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"assignedTo", n => { AssignedTo = n.GetEnumValue(); } }, - {"managerActionDateTime", n => { ManagerActionDateTime = n.GetDateTimeOffsetValue(); } }, - {"managerActionMessage", n => { ManagerActionMessage = n.GetStringValue(); } }, - {"managerUserId", n => { ManagerUserId = n.GetStringValue(); } }, - {"senderDateTime", n => { SenderDateTime = n.GetDateTimeOffsetValue(); } }, - {"senderMessage", n => { SenderMessage = n.GetStringValue(); } }, - {"senderUserId", n => { SenderUserId = n.GetStringValue(); } }, - {"state", n => { State = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "assignedTo", n => { AssignedTo = n.GetEnumValue(); } }, + { "managerActionDateTime", n => { ManagerActionDateTime = n.GetDateTimeOffsetValue(); } }, + { "managerActionMessage", n => { ManagerActionMessage = n.GetStringValue(); } }, + { "managerUserId", n => { ManagerUserId = n.GetStringValue(); } }, + { "senderDateTime", n => { SenderDateTime = n.GetDateTimeOffsetValue(); } }, + { "senderMessage", n => { SenderMessage = n.GetStringValue(); } }, + { "senderUserId", n => { SenderUserId = n.GetStringValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("assignedTo", AssignedTo); + writer.WriteEnumValue("assignedTo", AssignedTo); writer.WriteStringValue("managerActionMessage", ManagerActionMessage); writer.WriteStringValue("senderMessage", SenderMessage); - writer.WriteEnumValue("state", State); + writer.WriteEnumValue("state", State); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ScheduleChangeRequestActor.cs b/src/sample/generated/Models/ScheduleChangeRequestActor.cs index e507d767..d8436c34 100644 --- a/src/sample/generated/Models/ScheduleChangeRequestActor.cs +++ b/src/sample/generated/Models/ScheduleChangeRequestActor.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ScheduleChangeRequestActor { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ScheduleChangeRequestActor + #pragma warning restore CS1591 + { [EnumMember(Value = "sender")] + #pragma warning disable CS1591 Sender, + #pragma warning restore CS1591 [EnumMember(Value = "recipient")] + #pragma warning disable CS1591 Recipient, + #pragma warning restore CS1591 [EnumMember(Value = "manager")] + #pragma warning disable CS1591 Manager, + #pragma warning restore CS1591 [EnumMember(Value = "system")] + #pragma warning disable CS1591 System, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ScheduleChangeState.cs b/src/sample/generated/Models/ScheduleChangeState.cs index 2a10d392..489d8d79 100644 --- a/src/sample/generated/Models/ScheduleChangeState.cs +++ b/src/sample/generated/Models/ScheduleChangeState.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ScheduleChangeState { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ScheduleChangeState + #pragma warning restore CS1591 + { [EnumMember(Value = "pending")] + #pragma warning disable CS1591 Pending, + #pragma warning restore CS1591 [EnumMember(Value = "approved")] + #pragma warning disable CS1591 Approved, + #pragma warning restore CS1591 [EnumMember(Value = "declined")] + #pragma warning disable CS1591 Declined, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ScheduleEntity.cs b/src/sample/generated/Models/ScheduleEntity.cs index f6b2bc86..452ac88d 100644 --- a/src/sample/generated/Models/ScheduleEntity.cs +++ b/src/sample/generated/Models/ScheduleEntity.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ScheduleEntity : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ScheduleEntity : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The endDateTime property @@ -13,41 +19,49 @@ public class ScheduleEntity : IAdditionalDataHolder, IParsable { /// The startDateTime property public DateTimeOffset? StartDateTime { get; set; } /// The theme property - public ScheduleEntityTheme? Theme { get; set; } + public global::ApiSdk.Models.ScheduleEntityTheme? Theme { get; set; } /// - /// Instantiates a new scheduleEntity and sets the default values. + /// Instantiates a new and sets the default values. /// - public ScheduleEntity() { + public ScheduleEntity() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ScheduleEntity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ScheduleEntity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ScheduleEntity(); + return new global::ApiSdk.Models.ScheduleEntity(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, - {"theme", n => { Theme = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + { "theme", n => { Theme = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); - writer.WriteEnumValue("theme", Theme); + writer.WriteEnumValue("theme", Theme); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ScheduleEntityTheme.cs b/src/sample/generated/Models/ScheduleEntityTheme.cs index 4097f7e7..4848fef9 100644 --- a/src/sample/generated/Models/ScheduleEntityTheme.cs +++ b/src/sample/generated/Models/ScheduleEntityTheme.cs @@ -1,33 +1,64 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum ScheduleEntityTheme { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ScheduleEntityTheme + #pragma warning restore CS1591 + { [EnumMember(Value = "white")] + #pragma warning disable CS1591 White, + #pragma warning restore CS1591 [EnumMember(Value = "blue")] + #pragma warning disable CS1591 Blue, + #pragma warning restore CS1591 [EnumMember(Value = "green")] + #pragma warning disable CS1591 Green, + #pragma warning restore CS1591 [EnumMember(Value = "purple")] + #pragma warning disable CS1591 Purple, + #pragma warning restore CS1591 [EnumMember(Value = "pink")] + #pragma warning disable CS1591 Pink, + #pragma warning restore CS1591 [EnumMember(Value = "yellow")] + #pragma warning disable CS1591 Yellow, + #pragma warning restore CS1591 [EnumMember(Value = "gray")] + #pragma warning disable CS1591 Gray, + #pragma warning restore CS1591 [EnumMember(Value = "darkBlue")] + #pragma warning disable CS1591 DarkBlue, + #pragma warning restore CS1591 [EnumMember(Value = "darkGreen")] + #pragma warning disable CS1591 DarkGreen, + #pragma warning restore CS1591 [EnumMember(Value = "darkPurple")] + #pragma warning disable CS1591 DarkPurple, + #pragma warning restore CS1591 [EnumMember(Value = "darkPink")] + #pragma warning disable CS1591 DarkPink, + #pragma warning restore CS1591 [EnumMember(Value = "darkYellow")] + #pragma warning disable CS1591 DarkYellow, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/SchedulingGroup.cs b/src/sample/generated/Models/SchedulingGroup.cs index 013851c2..84fb8e0f 100644 --- a/src/sample/generated/Models/SchedulingGroup.cs +++ b/src/sample/generated/Models/SchedulingGroup.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SchedulingGroup : ChangeTrackedEntity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SchedulingGroup : global::ApiSdk.Models.ChangeTrackedEntity, IParsable + #pragma warning restore CS1591 + { /// The display name for the schedulingGroup. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -27,26 +33,32 @@ public class SchedulingGroup : ChangeTrackedEntity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SchedulingGroup CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SchedulingGroup CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SchedulingGroup(); + return new global::ApiSdk.Models.SchedulingGroup(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"isActive", n => { IsActive = n.GetBoolValue(); } }, - {"userIds", n => { UserIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "isActive", n => { IsActive = n.GetBoolValue(); } }, + { "userIds", n => { UserIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); @@ -54,3 +66,4 @@ public class SchedulingGroup : ChangeTrackedEntity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ScopedRoleMembership.cs b/src/sample/generated/Models/ScopedRoleMembership.cs index 11af4d13..46dd68fc 100644 --- a/src/sample/generated/Models/ScopedRoleMembership.cs +++ b/src/sample/generated/Models/ScopedRoleMembership.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ScopedRoleMembership : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ScopedRoleMembership : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Unique identifier for the administrative unit that the directory role is scoped to #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -25,39 +31,46 @@ public class ScopedRoleMembership : Entity, IParsable { /// The roleMemberInfo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Identity? RoleMemberInfo { get; set; } + public global::ApiSdk.Models.Identity? RoleMemberInfo { get; set; } #nullable restore #else - public Identity RoleMemberInfo { get; set; } + public global::ApiSdk.Models.Identity RoleMemberInfo { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ScopedRoleMembership CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ScopedRoleMembership CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ScopedRoleMembership(); + return new global::ApiSdk.Models.ScopedRoleMembership(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"administrativeUnitId", n => { AdministrativeUnitId = n.GetStringValue(); } }, - {"roleId", n => { RoleId = n.GetStringValue(); } }, - {"roleMemberInfo", n => { RoleMemberInfo = n.GetObjectValue(Identity.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "administrativeUnitId", n => { AdministrativeUnitId = n.GetStringValue(); } }, + { "roleId", n => { RoleId = n.GetStringValue(); } }, + { "roleMemberInfo", n => { RoleMemberInfo = n.GetObjectValue(global::ApiSdk.Models.Identity.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("administrativeUnitId", AdministrativeUnitId); writer.WriteStringValue("roleId", RoleId); - writer.WriteObjectValue("roleMemberInfo", RoleMemberInfo); + writer.WriteObjectValue("roleMemberInfo", RoleMemberInfo); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ScoredEmailAddress.cs b/src/sample/generated/Models/ScoredEmailAddress.cs index 17bd22fe..5b61348e 100644 --- a/src/sample/generated/Models/ScoredEmailAddress.cs +++ b/src/sample/generated/Models/ScoredEmailAddress.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ScoredEmailAddress : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ScoredEmailAddress : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The email address. @@ -27,43 +33,51 @@ public class ScoredEmailAddress : IAdditionalDataHolder, IParsable { /// The relevance score of the email address. A relevance score is used as a sort key, in relation to the other returned results. A higher relevance score value corresponds to a more relevant result. Relevance is determined by the user’s communication and collaboration patterns and business relationships. public double? RelevanceScore { get; set; } /// The selectionLikelihood property - public SelectionLikelihoodInfo? SelectionLikelihood { get; set; } + public global::ApiSdk.Models.SelectionLikelihoodInfo? SelectionLikelihood { get; set; } /// - /// Instantiates a new scoredEmailAddress and sets the default values. + /// Instantiates a new and sets the default values. /// - public ScoredEmailAddress() { + public ScoredEmailAddress() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ScoredEmailAddress CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ScoredEmailAddress CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ScoredEmailAddress(); + return new global::ApiSdk.Models.ScoredEmailAddress(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"address", n => { Address = n.GetStringValue(); } }, - {"itemId", n => { ItemId = n.GetStringValue(); } }, - {"relevanceScore", n => { RelevanceScore = n.GetDoubleValue(); } }, - {"selectionLikelihood", n => { SelectionLikelihood = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "address", n => { Address = n.GetStringValue(); } }, + { "itemId", n => { ItemId = n.GetStringValue(); } }, + { "relevanceScore", n => { RelevanceScore = n.GetDoubleValue(); } }, + { "selectionLikelihood", n => { SelectionLikelihood = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("itemId", ItemId); writer.WriteDoubleValue("relevanceScore", RelevanceScore); - writer.WriteEnumValue("selectionLikelihood", SelectionLikelihood); + writer.WriteEnumValue("selectionLikelihood", SelectionLikelihood); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SearchResult.cs b/src/sample/generated/Models/SearchResult.cs index 4a56adbf..3fe12fbc 100644 --- a/src/sample/generated/Models/SearchResult.cs +++ b/src/sample/generated/Models/SearchResult.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SearchResult : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SearchResult : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A callback URL that can be used to record telemetry information. The application should issue a GET on this URL if the user interacts with this item to improve the quality of results. @@ -17,35 +23,43 @@ public class SearchResult : IAdditionalDataHolder, IParsable { public string OnClickTelemetryUrl { get; set; } #endif /// - /// Instantiates a new searchResult and sets the default values. + /// Instantiates a new and sets the default values. /// - public SearchResult() { + public SearchResult() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SearchResult CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SearchResult CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SearchResult(); + return new global::ApiSdk.Models.SearchResult(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"onClickTelemetryUrl", n => { OnClickTelemetryUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "onClickTelemetryUrl", n => { OnClickTelemetryUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("onClickTelemetryUrl", OnClickTelemetryUrl); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SectionGroup.cs b/src/sample/generated/Models/SectionGroup.cs index 711ecaad..09692a79 100644 --- a/src/sample/generated/Models/SectionGroup.cs +++ b/src/sample/generated/Models/SectionGroup.cs @@ -1,34 +1,40 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SectionGroup : OnenoteEntityHierarchyModel, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SectionGroup : global::ApiSdk.Models.OnenoteEntityHierarchyModel, IParsable + #pragma warning restore CS1591 + { /// The parentNotebook property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Notebook? ParentNotebook { get; set; } + public global::ApiSdk.Models.Notebook? ParentNotebook { get; set; } #nullable restore #else - public Notebook ParentNotebook { get; set; } + public global::ApiSdk.Models.Notebook ParentNotebook { get; set; } #endif /// The parentSectionGroup property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SectionGroup? ParentSectionGroup { get; set; } + public global::ApiSdk.Models.SectionGroup? ParentSectionGroup { get; set; } #nullable restore #else - public SectionGroup ParentSectionGroup { get; set; } + public global::ApiSdk.Models.SectionGroup ParentSectionGroup { get; set; } #endif /// The section groups in the section. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SectionGroups { get; set; } + public List? SectionGroups { get; set; } #nullable restore #else - public List SectionGroups { get; set; } + public List SectionGroups { get; set; } #endif /// The URL for the sectionGroups navigation property, which returns all the section groups in the section group. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,10 +47,10 @@ public class SectionGroup : OnenoteEntityHierarchyModel, IParsable { /// The sections in the section group. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Sections { get; set; } + public List? Sections { get; set; } #nullable restore #else - public List Sections { get; set; } + public List Sections { get; set; } #endif /// The URL for the sections navigation property, which returns all the sections in the section group. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -57,37 +63,44 @@ public class SectionGroup : OnenoteEntityHierarchyModel, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SectionGroup CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SectionGroup CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SectionGroup(); + return new global::ApiSdk.Models.SectionGroup(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"parentNotebook", n => { ParentNotebook = n.GetObjectValue(Notebook.CreateFromDiscriminatorValue); } }, - {"parentSectionGroup", n => { ParentSectionGroup = n.GetObjectValue(SectionGroup.CreateFromDiscriminatorValue); } }, - {"sectionGroups", n => { SectionGroups = n.GetCollectionOfObjectValues(SectionGroup.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sectionGroupsUrl", n => { SectionGroupsUrl = n.GetStringValue(); } }, - {"sections", n => { Sections = n.GetCollectionOfObjectValues(OnenoteSection.CreateFromDiscriminatorValue)?.ToList(); } }, - {"sectionsUrl", n => { SectionsUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "parentNotebook", n => { ParentNotebook = n.GetObjectValue(global::ApiSdk.Models.Notebook.CreateFromDiscriminatorValue); } }, + { "parentSectionGroup", n => { ParentSectionGroup = n.GetObjectValue(global::ApiSdk.Models.SectionGroup.CreateFromDiscriminatorValue); } }, + { "sectionGroups", n => { SectionGroups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SectionGroup.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sectionGroupsUrl", n => { SectionGroupsUrl = n.GetStringValue(); } }, + { "sections", n => { Sections = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnenoteSection.CreateFromDiscriminatorValue)?.AsList(); } }, + { "sectionsUrl", n => { SectionsUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("parentNotebook", ParentNotebook); - writer.WriteObjectValue("parentSectionGroup", ParentSectionGroup); - writer.WriteCollectionOfObjectValues("sectionGroups", SectionGroups); + writer.WriteObjectValue("parentNotebook", ParentNotebook); + writer.WriteObjectValue("parentSectionGroup", ParentSectionGroup); + writer.WriteCollectionOfObjectValues("sectionGroups", SectionGroups); writer.WriteStringValue("sectionGroupsUrl", SectionGroupsUrl); - writer.WriteCollectionOfObjectValues("sections", Sections); + writer.WriteCollectionOfObjectValues("sections", Sections); writer.WriteStringValue("sectionsUrl", SectionsUrl); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SectionLinks.cs b/src/sample/generated/Models/SectionLinks.cs index 4de3f8a3..44cee418 100644 --- a/src/sample/generated/Models/SectionLinks.cs +++ b/src/sample/generated/Models/SectionLinks.cs @@ -1,61 +1,75 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SectionLinks : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SectionLinks : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The oneNoteClientUrl property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ExternalLink? OneNoteClientUrl { get; set; } + public global::ApiSdk.Models.ExternalLink? OneNoteClientUrl { get; set; } #nullable restore #else - public ExternalLink OneNoteClientUrl { get; set; } + public global::ApiSdk.Models.ExternalLink OneNoteClientUrl { get; set; } #endif /// The oneNoteWebUrl property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ExternalLink? OneNoteWebUrl { get; set; } + public global::ApiSdk.Models.ExternalLink? OneNoteWebUrl { get; set; } #nullable restore #else - public ExternalLink OneNoteWebUrl { get; set; } + public global::ApiSdk.Models.ExternalLink OneNoteWebUrl { get; set; } #endif /// - /// Instantiates a new sectionLinks and sets the default values. + /// Instantiates a new and sets the default values. /// - public SectionLinks() { + public SectionLinks() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SectionLinks CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SectionLinks CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SectionLinks(); + return new global::ApiSdk.Models.SectionLinks(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"oneNoteClientUrl", n => { OneNoteClientUrl = n.GetObjectValue(ExternalLink.CreateFromDiscriminatorValue); } }, - {"oneNoteWebUrl", n => { OneNoteWebUrl = n.GetObjectValue(ExternalLink.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "oneNoteClientUrl", n => { OneNoteClientUrl = n.GetObjectValue(global::ApiSdk.Models.ExternalLink.CreateFromDiscriminatorValue); } }, + { "oneNoteWebUrl", n => { OneNoteWebUrl = n.GetObjectValue(global::ApiSdk.Models.ExternalLink.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); - writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); + writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); + writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Security/BehaviorDuringRetentionPeriod.cs b/src/sample/generated/Models/Security/BehaviorDuringRetentionPeriod.cs new file mode 100644 index 00000000..78702b38 --- /dev/null +++ b/src/sample/generated/Models/Security/BehaviorDuringRetentionPeriod.cs @@ -0,0 +1,32 @@ +// +using System.Runtime.Serialization; +using System; +namespace ApiSdk.Models.Security +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum BehaviorDuringRetentionPeriod + #pragma warning restore CS1591 + { + [EnumMember(Value = "doNotRetain")] + #pragma warning disable CS1591 + DoNotRetain, + #pragma warning restore CS1591 + [EnumMember(Value = "retain")] + #pragma warning disable CS1591 + Retain, + #pragma warning restore CS1591 + [EnumMember(Value = "retainAsRecord")] + #pragma warning disable CS1591 + RetainAsRecord, + #pragma warning restore CS1591 + [EnumMember(Value = "retainAsRegulatoryRecord")] + #pragma warning disable CS1591 + RetainAsRegulatoryRecord, + #pragma warning restore CS1591 + [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 + UnknownFutureValue, + #pragma warning restore CS1591 + } +} diff --git a/src/sample/generated/Models/SelectionLikelihoodInfo.cs b/src/sample/generated/Models/SelectionLikelihoodInfo.cs index 34f9b97c..3846bd57 100644 --- a/src/sample/generated/Models/SelectionLikelihoodInfo.cs +++ b/src/sample/generated/Models/SelectionLikelihoodInfo.cs @@ -1,11 +1,20 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum SelectionLikelihoodInfo { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SelectionLikelihoodInfo + #pragma warning restore CS1591 + { [EnumMember(Value = "notSpecified")] + #pragma warning disable CS1591 NotSpecified, + #pragma warning restore CS1591 [EnumMember(Value = "high")] + #pragma warning disable CS1591 High, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/Sensitivity.cs b/src/sample/generated/Models/Sensitivity.cs index 3cdf8b2a..92c92f1e 100644 --- a/src/sample/generated/Models/Sensitivity.cs +++ b/src/sample/generated/Models/Sensitivity.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum Sensitivity { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum Sensitivity + #pragma warning restore CS1591 + { [EnumMember(Value = "normal")] + #pragma warning disable CS1591 Normal, + #pragma warning restore CS1591 [EnumMember(Value = "personal")] + #pragma warning disable CS1591 Personal, + #pragma warning restore CS1591 [EnumMember(Value = "private")] + #pragma warning disable CS1591 Private, + #pragma warning restore CS1591 [EnumMember(Value = "confidential")] + #pragma warning disable CS1591 Confidential, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/ServicePlanInfo.cs b/src/sample/generated/Models/ServicePlanInfo.cs index 05ec2371..b60af714 100644 --- a/src/sample/generated/Models/ServicePlanInfo.cs +++ b/src/sample/generated/Models/ServicePlanInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ServicePlanInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ServicePlanInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The object the service plan can be assigned to. The possible values are:User - service plan can be assigned to individual users.Company - service plan can be assigned to the entire tenant. @@ -16,7 +22,7 @@ public class ServicePlanInfo : IAdditionalDataHolder, IParsable { #else public string AppliesTo { get; set; } #endif - /// The provisioning status of the service plan. The possible values are:Success - Service is fully provisioned.Disabled - Service has been disabled.ErrorStatus - The service plan has not been provisioned and is in an error state.PendingInput - Service is not yet provisioned; awaiting service confirmation.PendingActivation - Service is provisioned but requires explicit activation by administrator (for example, Intune_O365 service plan)PendingProvisioning - Microsoft has added a new service to the product SKU and it has not been activated in the tenant, yet. + /// The provisioning status of the service plan. The possible values are:Success - Service is fully provisioned.Disabled - Service is disabled.Error - The service plan isn't provisioned and is in an error state.PendingInput - The service isn't provisioned and is awaiting service confirmation.PendingActivation - The service is provisioned but requires explicit activation by an administrator (for example, Intune_O365 service plan)PendingProvisioning - Microsoft has added a new service to the product SKU and it isn't activated in the tenant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ProvisioningStatus { get; set; } @@ -35,35 +41,42 @@ public class ServicePlanInfo : IAdditionalDataHolder, IParsable { public string ServicePlanName { get; set; } #endif /// - /// Instantiates a new servicePlanInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public ServicePlanInfo() { + public ServicePlanInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ServicePlanInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ServicePlanInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ServicePlanInfo(); + return new global::ApiSdk.Models.ServicePlanInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"appliesTo", n => { AppliesTo = n.GetStringValue(); } }, - {"provisioningStatus", n => { ProvisioningStatus = n.GetStringValue(); } }, - {"servicePlanId", n => { ServicePlanId = n.GetGuidValue(); } }, - {"servicePlanName", n => { ServicePlanName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "appliesTo", n => { AppliesTo = n.GetStringValue(); } }, + { "provisioningStatus", n => { ProvisioningStatus = n.GetStringValue(); } }, + { "servicePlanId", n => { ServicePlanId = n.GetGuidValue(); } }, + { "servicePlanName", n => { ServicePlanName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appliesTo", AppliesTo); writer.WriteStringValue("provisioningStatus", ProvisioningStatus); @@ -73,3 +86,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ServicePrincipal.cs b/src/sample/generated/Models/ServicePrincipal.cs index 419a086f..036546eb 100644 --- a/src/sample/generated/Models/ServicePrincipal.cs +++ b/src/sample/generated/Models/ServicePrincipal.cs @@ -1,22 +1,28 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ServicePrincipal : DirectoryObject, IParsable { - /// true if the service principal account is enabled; otherwise, false. If set to false, then no users will be able to sign in to this app, even if they are assigned to it. Supports $filter (eq, ne, not, in). +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ServicePrincipal : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { + /// true if the service principal account is enabled; otherwise, false. If set to false, then no users are able to sign in to this app, even if they're assigned to it. Supports $filter (eq, ne, not, in). public bool? AccountEnabled { get; set; } - /// Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its 'FileHandler' functionality. This will let services like Microsoft 365 call the application in the context of a document the user is working on. + /// Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its 'FileHandler' functionality. This lets services like Microsoft 365 call the application in the context of a document the user is working on. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AddIns { get; set; } + public List? AddIns { get; set; } #nullable restore #else - public List AddIns { get; set; } + public List AddIns { get; set; } #endif - /// Used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities. Supports $filter (eq, not, ge, le, startsWith). + /// Used to retrieve service principals by subscription, identify resource group and full resource IDs for managed identities. Supports $filter (eq, not, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? AlternativeNames { get; set; } @@ -40,7 +46,7 @@ public class ServicePrincipal : DirectoryObject, IParsable { #else public string AppDisplayName { get; set; } #endif - /// The unique identifier for the associated application (its appId property). Supports $filter (eq, ne, not, in, startsWith). + /// The unique identifier for the associated application (its appId property). Alternate key. Supports $filter (eq, ne, not, in, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AppId { get; set; } @@ -48,7 +54,7 @@ public class ServicePrincipal : DirectoryObject, IParsable { #else public string AppId { get; set; } #endif - /// Unique identifier of the applicationTemplate that the servicePrincipal was created from. Read-only. Supports $filter (eq, ne, NOT, startsWith). + /// Unique identifier of the applicationTemplate. Supports $filter (eq, not, ne). Read-only. null if the service principal wasn't created from an application template. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ApplicationTemplateId { get; set; } @@ -59,72 +65,72 @@ public class ServicePrincipal : DirectoryObject, IParsable { /// The appManagementPolicy applied to this application. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppManagementPolicies { get; set; } + public List? AppManagementPolicies { get; set; } #nullable restore #else - public List AppManagementPolicies { get; set; } + public List AppManagementPolicies { get; set; } #endif - /// Contains the tenant id where the application is registered. This is applicable only to service principals backed by applications. Supports $filter (eq, ne, NOT, ge, le). + /// Contains the tenant ID where the application is registered. This is applicable only to service principals backed by applications. Supports $filter (eq, ne, NOT, ge, le). public Guid? AppOwnerOrganizationId { get; set; } /// App role assignments for this app or service, granted to users, groups, and other service principals. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppRoleAssignedTo { get; set; } + public List? AppRoleAssignedTo { get; set; } #nullable restore #else - public List AppRoleAssignedTo { get; set; } + public List AppRoleAssignedTo { get; set; } #endif /// Specifies whether users or other service principals need to be granted an app role assignment for this service principal before users can sign in or apps can get tokens. The default value is false. Not nullable. Supports $filter (eq, ne, NOT). public bool? AppRoleAssignmentRequired { get; set; } /// App role assignment for another app or service, granted to this service principal. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppRoleAssignments { get; set; } + public List? AppRoleAssignments { get; set; } #nullable restore #else - public List AppRoleAssignments { get; set; } + public List AppRoleAssignments { get; set; } #endif - /// The roles exposed by the application which this service principal represents. For more information see the appRoles property definition on the application entity. Not nullable. + /// The roles exposed by the application that's linked to this service principal. For more information, see the appRoles property definition on the application entity. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppRoles { get; set; } + public List? AppRoles { get; set; } #nullable restore #else - public List AppRoles { get; set; } + public List AppRoles { get; set; } #endif /// The claimsMappingPolicies assigned to this service principal. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ClaimsMappingPolicies { get; set; } + public List? ClaimsMappingPolicies { get; set; } #nullable restore #else - public List ClaimsMappingPolicies { get; set; } + public List ClaimsMappingPolicies { get; set; } #endif /// Directory objects created by this service principal. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CreatedObjects { get; set; } + public List? CreatedObjects { get; set; } #nullable restore #else - public List CreatedObjects { get; set; } + public List CreatedObjects { get; set; } #endif /// The customSecurityAttributes property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public CustomSecurityAttributeValue? CustomSecurityAttributes { get; set; } + public global::ApiSdk.Models.CustomSecurityAttributeValue? CustomSecurityAttributes { get; set; } #nullable restore #else - public CustomSecurityAttributeValue CustomSecurityAttributes { get; set; } + public global::ApiSdk.Models.CustomSecurityAttributeValue CustomSecurityAttributes { get; set; } #endif /// The delegatedPermissionClassifications property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DelegatedPermissionClassifications { get; set; } + public List? DelegatedPermissionClassifications { get; set; } #nullable restore #else - public List DelegatedPermissionClassifications { get; set; } + public List DelegatedPermissionClassifications { get; set; } #endif - /// Free text field to provide an internal end-user facing description of the service principal. End-user portals such MyApps will display the application description in this field. The maximum allowed size is 1024 characters. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. + /// Free text field to provide an internal end-user facing description of the service principal. End-user portals such MyApps displays the application description in this field. The maximum allowed size is 1,024 characters. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Description { get; set; } @@ -132,7 +138,7 @@ public class ServicePrincipal : DirectoryObject, IParsable { #else public string Description { get; set; } #endif - /// Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). + /// Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisabledByMicrosoftStatus { get; set; } @@ -151,18 +157,18 @@ public class ServicePrincipal : DirectoryObject, IParsable { /// The endpoints property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Endpoints { get; set; } + public List? Endpoints { get; set; } #nullable restore #else - public List Endpoints { get; set; } + public List Endpoints { get; set; } #endif /// Federated identities for a specific type of service principal - managed identity. Supports $expand and $filter (/$count eq 0, /$count ne 0). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? FederatedIdentityCredentials { get; set; } + public List? FederatedIdentityCredentials { get; set; } #nullable restore #else - public List FederatedIdentityCredentials { get; set; } + public List FederatedIdentityCredentials { get; set; } #endif /// Home page or landing page of the application. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -175,28 +181,28 @@ public class ServicePrincipal : DirectoryObject, IParsable { /// The homeRealmDiscoveryPolicies assigned to this service principal. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? HomeRealmDiscoveryPolicies { get; set; } + public List? HomeRealmDiscoveryPolicies { get; set; } #nullable restore #else - public List HomeRealmDiscoveryPolicies { get; set; } + public List HomeRealmDiscoveryPolicies { get; set; } #endif /// The info property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public InformationalUrl? Info { get; set; } + public global::ApiSdk.Models.InformationalUrl? Info { get; set; } #nullable restore #else - public InformationalUrl Info { get; set; } + public global::ApiSdk.Models.InformationalUrl Info { get; set; } #endif /// The collection of key credentials associated with the service principal. Not nullable. Supports $filter (eq, not, ge, le). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? KeyCredentials { get; set; } + public List? KeyCredentials { get; set; } #nullable restore #else - public List KeyCredentials { get; set; } + public List KeyCredentials { get; set; } #endif - /// Specifies the URL where the service provider redirects the user to Azure AD to authenticate. Azure AD uses the URL to launch the application from Microsoft 365 or the Azure AD My Apps. When blank, Azure AD performs IdP-initiated sign-on for applications configured with SAML-based single sign-on. The user launches the application from Microsoft 365, the Azure AD My Apps, or the Azure AD SSO URL. + /// Specifies the URL where the service provider redirects the user to Microsoft Entra ID to authenticate. Microsoft Entra ID uses the URL to launch the application from Microsoft 365 or the Microsoft Entra My Apps. When blank, Microsoft Entra ID performs IdP-initiated sign-on for applications configured with SAML-based single sign-on. The user launches the application from Microsoft 365, the Microsoft Entra My Apps, or the Microsoft Entra SSO URL. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? LoginUrl { get; set; } @@ -204,7 +210,7 @@ public class ServicePrincipal : DirectoryObject, IParsable { #else public string LoginUrl { get; set; } #endif - /// Specifies the URL that will be used by Microsoft's authorization service to logout an user using OpenId Connect front-channel, back-channel or SAML logout protocols. + /// Specifies the URL that the Microsoft's authorization service uses to sign out a user using OpenID Connect front-channel, back-channel, or SAML sign out protocols. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? LogoutUrl { get; set; } @@ -215,12 +221,12 @@ public class ServicePrincipal : DirectoryObject, IParsable { /// Roles that this service principal is a member of. HTTP Methods: GET Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MemberOf { get; set; } + public List? MemberOf { get; set; } #nullable restore #else - public List MemberOf { get; set; } + public List MemberOf { get; set; } #endif - /// Free text field to capture information about the service principal, typically used for operational purposes. Maximum allowed size is 1024 characters. + /// Free text field to capture information about the service principal, typically used for operational purposes. Maximum allowed size is 1,024 characters. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Notes { get; set; } @@ -228,7 +234,7 @@ public class ServicePrincipal : DirectoryObject, IParsable { #else public string Notes { get; set; } #endif - /// Specifies the list of email addresses where Azure AD sends a notification when the active certificate is near the expiration date. This is only for the certificates used to sign the SAML token issued for Azure AD Gallery applications. + /// Specifies the list of email addresses where Microsoft Entra ID sends a notification when the active certificate is near the expiration date. This is only for the certificates used to sign the SAML token issued for Microsoft Entra Gallery applications. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? NotificationEmailAddresses { get; set; } @@ -239,44 +245,44 @@ public class ServicePrincipal : DirectoryObject, IParsable { /// Delegated permission grants authorizing this service principal to access an API on behalf of a signed-in user. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Oauth2PermissionGrants { get; set; } + public List? Oauth2PermissionGrants { get; set; } #nullable restore #else - public List Oauth2PermissionGrants { get; set; } + public List Oauth2PermissionGrants { get; set; } #endif - /// The delegated permissions exposed by the application. For more information see the oauth2PermissionScopes property on the application entity's api property. Not nullable. + /// The delegated permissions exposed by the application. For more information, see the oauth2PermissionScopes property on the application entity's api property. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Oauth2PermissionScopes { get; set; } + public List? Oauth2PermissionScopes { get; set; } #nullable restore #else - public List Oauth2PermissionScopes { get; set; } + public List Oauth2PermissionScopes { get; set; } #endif - /// Directory objects that are owned by this service principal. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Directory objects that this service principal owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OwnedObjects { get; set; } + public List? OwnedObjects { get; set; } #nullable restore #else - public List OwnedObjects { get; set; } + public List OwnedObjects { get; set; } #endif - /// Directory objects that are owners of this servicePrincipal. The owners are a set of non-admin users or servicePrincipals who are allowed to modify this object. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. + /// Directory objects that are owners of this servicePrincipal. The owners are a set of nonadmin users or servicePrincipals who are allowed to modify this object. Read-only. Nullable. Supports $expand, $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1), and $select nested in $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Owners { get; set; } + public List? Owners { get; set; } #nullable restore #else - public List Owners { get; set; } + public List Owners { get; set; } #endif /// The collection of password credentials associated with the application. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PasswordCredentials { get; set; } + public List? PasswordCredentials { get; set; } #nullable restore #else - public List PasswordCredentials { get; set; } + public List PasswordCredentials { get; set; } #endif - /// Specifies the single sign-on mode configured for this application. Azure AD uses the preferred single sign-on mode to launch the application from Microsoft 365 or the Azure AD My Apps. The supported values are password, saml, notSupported, and oidc. + /// Specifies the single sign-on mode configured for this application. Microsoft Entra ID uses the preferred single sign-on mode to launch the application from Microsoft 365 or the My Apps portal. The supported values are password, saml, notSupported, and oidc. Note: This field might be null for older SAML apps and for OIDC applications where it isn't set automatically. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? PreferredSingleSignOnMode { get; set; } @@ -284,13 +290,21 @@ public class ServicePrincipal : DirectoryObject, IParsable { #else public string PreferredSingleSignOnMode { get; set; } #endif - /// This property can be used on SAML applications (apps that have preferredSingleSignOnMode set to saml) to control which certificate is used to sign the SAML responses. For applications that are not SAML, do not write or otherwise rely on this property. + /// This property can be used on SAML applications (apps that have preferredSingleSignOnMode set to saml) to control which certificate is used to sign the SAML responses. For applications that aren't SAML, don't write or otherwise rely on this property. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? PreferredTokenSigningKeyThumbprint { get; set; } #nullable restore #else public string PreferredTokenSigningKeyThumbprint { get; set; } +#endif + /// The remoteDesktopSecurityConfiguration property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.RemoteDesktopSecurityConfiguration? RemoteDesktopSecurityConfiguration { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.RemoteDesktopSecurityConfiguration RemoteDesktopSecurityConfiguration { get; set; } #endif /// The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -303,20 +317,20 @@ public class ServicePrincipal : DirectoryObject, IParsable { /// The resource-specific application permissions exposed by this application. Currently, resource-specific permissions are only supported for Teams apps accessing to specific chats and teams using Microsoft Graph. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ResourceSpecificApplicationPermissions { get; set; } + public List? ResourceSpecificApplicationPermissions { get; set; } #nullable restore #else - public List ResourceSpecificApplicationPermissions { get; set; } + public List ResourceSpecificApplicationPermissions { get; set; } #endif /// The samlSingleSignOnSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SamlSingleSignOnSettings? SamlSingleSignOnSettings { get; set; } + public global::ApiSdk.Models.SamlSingleSignOnSettings? SamlSingleSignOnSettings { get; set; } #nullable restore #else - public ApiSdk.Models.SamlSingleSignOnSettings SamlSingleSignOnSettings { get; set; } + public global::ApiSdk.Models.SamlSingleSignOnSettings SamlSingleSignOnSettings { get; set; } #endif - /// Contains the list of identifiersUris, copied over from the associated application. Additional values can be added to hybrid applications. These values can be used to identify the permissions exposed by this app within Azure AD. For example,Client apps can specify a resource URI which is based on the values of this property to acquire an access token, which is the URI returned in the 'aud' claim.The any operator is required for filter expressions on multi-valued properties. Not nullable. Supports $filter (eq, not, ge, le, startsWith). + /// Contains the list of identifiersUris, copied over from the associated application. Additional values can be added to hybrid applications. These values can be used to identify the permissions exposed by this app within Microsoft Entra ID. For example,Client apps can specify a resource URI that is based on the values of this property to acquire an access token, which is the URI returned in the 'aud' claim.The any operator is required for filter expressions on multi-valued properties. Not nullable. Supports $filter (eq, not, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? ServicePrincipalNames { get; set; } @@ -324,7 +338,7 @@ public class ServicePrincipal : DirectoryObject, IParsable { #else public List ServicePrincipalNames { get; set; } #endif - /// Identifies whether the service principal represents an application, a managed identity, or a legacy application. This is set by Azure AD internally. The servicePrincipalType property can be set to three different values: Application - A service principal that represents an application or service. The appId property identifies the associated app registration, and matches the appId of an application, possibly from a different tenant. If the associated app registration is missing, tokens are not issued for the service principal.ManagedIdentity - A service principal that represents a managed identity. Service principals representing managed identities can be granted access and permissions, but cannot be updated or modified directly.Legacy - A service principal that represents an app created before app registrations, or through legacy experiences. Legacy service principal can have credentials, service principal names, reply URLs, and other properties which are editable by an authorized user, but does not have an associated app registration. The appId value does not associate the service principal with an app registration. The service principal can only be used in the tenant where it was created.SocialIdp - For internal use. + /// Identifies whether the service principal represents an application, a managed identity, or a legacy application. This is set by Microsoft Entra ID internally. The servicePrincipalType property can be set to three different values: Application - A service principal that represents an application or service. The appId property identifies the associated app registration, and matches the appId of an application, possibly from a different tenant. If the associated app registration is missing, tokens aren't issued for the service principal.ManagedIdentity - A service principal that represents a managed identity. Service principals representing managed identities can be granted access and permissions, but can't be updated or modified directly.Legacy - A service principal that represents an app created before app registrations, or through legacy experiences. A legacy service principal can have credentials, service principal names, reply URLs, and other properties that are editable by an authorized user, but doesn't have an associated app registration. The appId value doesn't associate the service principal with an app registration. The service principal can only be used in the tenant where it was created.SocialIdp - For internal use. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ServicePrincipalType { get; set; } @@ -332,7 +346,7 @@ public class ServicePrincipal : DirectoryObject, IParsable { #else public string ServicePrincipalType { get; set; } #endif - /// Specifies the Microsoft accounts that are supported for the current application. Read-only. Supported values are:AzureADMyOrg: Users with a Microsoft work or school account in my organization's Azure AD tenant (single-tenant).AzureADMultipleOrgs: Users with a Microsoft work or school account in any organization's Azure AD tenant (multi-tenant).AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account in any organization's Azure AD tenant.PersonalMicrosoftAccount: Users with a personal Microsoft account only. + /// Specifies the Microsoft accounts that are supported for the current application. Read-only. Supported values are:AzureADMyOrg: Users with a Microsoft work or school account in my organization's Microsoft Entra tenant (single-tenant).AzureADMultipleOrgs: Users with a Microsoft work or school account in any organization's Microsoft Entra tenant (multitenant).AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account in any organization's Microsoft Entra tenant.PersonalMicrosoftAccount: Users with a personal Microsoft account only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SignInAudience { get; set; } @@ -343,10 +357,10 @@ public class ServicePrincipal : DirectoryObject, IParsable { /// The synchronization property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Synchronization? Synchronization { get; set; } + public global::ApiSdk.Models.Synchronization? Synchronization { get; set; } #nullable restore #else - public ApiSdk.Models.Synchronization Synchronization { get; set; } + public global::ApiSdk.Models.Synchronization Synchronization { get; set; } #endif /// Custom strings that can be used to categorize and identify the service principal. Not nullable. The value is the union of strings set here and on the associated application entity's tags property.Supports $filter (eq, not, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -356,164 +370,173 @@ public class ServicePrincipal : DirectoryObject, IParsable { #else public List Tags { get; set; } #endif - /// Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD issues tokens for this application encrypted using the key specified by this property. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + /// Specifies the keyId of a public key from the keyCredentials collection. When configured, Microsoft Entra ID issues tokens for this application encrypted using the key specified by this property. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. public Guid? TokenEncryptionKeyId { get; set; } /// The tokenIssuancePolicies assigned to this service principal. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TokenIssuancePolicies { get; set; } + public List? TokenIssuancePolicies { get; set; } #nullable restore #else - public List TokenIssuancePolicies { get; set; } + public List TokenIssuancePolicies { get; set; } #endif /// The tokenLifetimePolicies assigned to this service principal. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TokenLifetimePolicies { get; set; } + public List? TokenLifetimePolicies { get; set; } #nullable restore #else - public List TokenLifetimePolicies { get; set; } + public List TokenLifetimePolicies { get; set; } #endif /// The transitiveMemberOf property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TransitiveMemberOf { get; set; } + public List? TransitiveMemberOf { get; set; } #nullable restore #else - public List TransitiveMemberOf { get; set; } + public List TransitiveMemberOf { get; set; } #endif /// The verifiedPublisher property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.VerifiedPublisher? VerifiedPublisher { get; set; } + public global::ApiSdk.Models.VerifiedPublisher? VerifiedPublisher { get; set; } #nullable restore #else - public ApiSdk.Models.VerifiedPublisher VerifiedPublisher { get; set; } + public global::ApiSdk.Models.VerifiedPublisher VerifiedPublisher { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ServicePrincipal CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ServicePrincipal CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ServicePrincipal(); + return new global::ApiSdk.Models.ServicePrincipal(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"accountEnabled", n => { AccountEnabled = n.GetBoolValue(); } }, - {"addIns", n => { AddIns = n.GetCollectionOfObjectValues(AddIn.CreateFromDiscriminatorValue)?.ToList(); } }, - {"alternativeNames", n => { AlternativeNames = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"appDescription", n => { AppDescription = n.GetStringValue(); } }, - {"appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, - {"appId", n => { AppId = n.GetStringValue(); } }, - {"appManagementPolicies", n => { AppManagementPolicies = n.GetCollectionOfObjectValues(AppManagementPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"appOwnerOrganizationId", n => { AppOwnerOrganizationId = n.GetGuidValue(); } }, - {"appRoleAssignedTo", n => { AppRoleAssignedTo = n.GetCollectionOfObjectValues(AppRoleAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"appRoleAssignmentRequired", n => { AppRoleAssignmentRequired = n.GetBoolValue(); } }, - {"appRoleAssignments", n => { AppRoleAssignments = n.GetCollectionOfObjectValues(AppRoleAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"appRoles", n => { AppRoles = n.GetCollectionOfObjectValues(AppRole.CreateFromDiscriminatorValue)?.ToList(); } }, - {"applicationTemplateId", n => { ApplicationTemplateId = n.GetStringValue(); } }, - {"claimsMappingPolicies", n => { ClaimsMappingPolicies = n.GetCollectionOfObjectValues(ClaimsMappingPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"createdObjects", n => { CreatedObjects = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"customSecurityAttributes", n => { CustomSecurityAttributes = n.GetObjectValue(CustomSecurityAttributeValue.CreateFromDiscriminatorValue); } }, - {"delegatedPermissionClassifications", n => { DelegatedPermissionClassifications = n.GetCollectionOfObjectValues(DelegatedPermissionClassification.CreateFromDiscriminatorValue)?.ToList(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"disabledByMicrosoftStatus", n => { DisabledByMicrosoftStatus = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"endpoints", n => { Endpoints = n.GetCollectionOfObjectValues(Endpoint.CreateFromDiscriminatorValue)?.ToList(); } }, - {"federatedIdentityCredentials", n => { FederatedIdentityCredentials = n.GetCollectionOfObjectValues(FederatedIdentityCredential.CreateFromDiscriminatorValue)?.ToList(); } }, - {"homeRealmDiscoveryPolicies", n => { HomeRealmDiscoveryPolicies = n.GetCollectionOfObjectValues(HomeRealmDiscoveryPolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"homepage", n => { Homepage = n.GetStringValue(); } }, - {"info", n => { Info = n.GetObjectValue(InformationalUrl.CreateFromDiscriminatorValue); } }, - {"keyCredentials", n => { KeyCredentials = n.GetCollectionOfObjectValues(KeyCredential.CreateFromDiscriminatorValue)?.ToList(); } }, - {"loginUrl", n => { LoginUrl = n.GetStringValue(); } }, - {"logoutUrl", n => { LogoutUrl = n.GetStringValue(); } }, - {"memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"notes", n => { Notes = n.GetStringValue(); } }, - {"notificationEmailAddresses", n => { NotificationEmailAddresses = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"oauth2PermissionGrants", n => { Oauth2PermissionGrants = n.GetCollectionOfObjectValues(OAuth2PermissionGrant.CreateFromDiscriminatorValue)?.ToList(); } }, - {"oauth2PermissionScopes", n => { Oauth2PermissionScopes = n.GetCollectionOfObjectValues(PermissionScope.CreateFromDiscriminatorValue)?.ToList(); } }, - {"ownedObjects", n => { OwnedObjects = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"owners", n => { Owners = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"passwordCredentials", n => { PasswordCredentials = n.GetCollectionOfObjectValues(PasswordCredential.CreateFromDiscriminatorValue)?.ToList(); } }, - {"preferredSingleSignOnMode", n => { PreferredSingleSignOnMode = n.GetStringValue(); } }, - {"preferredTokenSigningKeyThumbprint", n => { PreferredTokenSigningKeyThumbprint = n.GetStringValue(); } }, - {"replyUrls", n => { ReplyUrls = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"resourceSpecificApplicationPermissions", n => { ResourceSpecificApplicationPermissions = n.GetCollectionOfObjectValues(ResourceSpecificPermission.CreateFromDiscriminatorValue)?.ToList(); } }, - {"samlSingleSignOnSettings", n => { SamlSingleSignOnSettings = n.GetObjectValue(ApiSdk.Models.SamlSingleSignOnSettings.CreateFromDiscriminatorValue); } }, - {"servicePrincipalNames", n => { ServicePrincipalNames = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"servicePrincipalType", n => { ServicePrincipalType = n.GetStringValue(); } }, - {"signInAudience", n => { SignInAudience = n.GetStringValue(); } }, - {"synchronization", n => { Synchronization = n.GetObjectValue(ApiSdk.Models.Synchronization.CreateFromDiscriminatorValue); } }, - {"tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"tokenEncryptionKeyId", n => { TokenEncryptionKeyId = n.GetGuidValue(); } }, - {"tokenIssuancePolicies", n => { TokenIssuancePolicies = n.GetCollectionOfObjectValues(TokenIssuancePolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"tokenLifetimePolicies", n => { TokenLifetimePolicies = n.GetCollectionOfObjectValues(TokenLifetimePolicy.CreateFromDiscriminatorValue)?.ToList(); } }, - {"transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"verifiedPublisher", n => { VerifiedPublisher = n.GetObjectValue(ApiSdk.Models.VerifiedPublisher.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "accountEnabled", n => { AccountEnabled = n.GetBoolValue(); } }, + { "addIns", n => { AddIns = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AddIn.CreateFromDiscriminatorValue)?.AsList(); } }, + { "alternativeNames", n => { AlternativeNames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "appDescription", n => { AppDescription = n.GetStringValue(); } }, + { "appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, + { "appId", n => { AppId = n.GetStringValue(); } }, + { "appManagementPolicies", n => { AppManagementPolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AppManagementPolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "appOwnerOrganizationId", n => { AppOwnerOrganizationId = n.GetGuidValue(); } }, + { "appRoleAssignedTo", n => { AppRoleAssignedTo = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AppRoleAssignment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "appRoleAssignmentRequired", n => { AppRoleAssignmentRequired = n.GetBoolValue(); } }, + { "appRoleAssignments", n => { AppRoleAssignments = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AppRoleAssignment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "appRoles", n => { AppRoles = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AppRole.CreateFromDiscriminatorValue)?.AsList(); } }, + { "applicationTemplateId", n => { ApplicationTemplateId = n.GetStringValue(); } }, + { "claimsMappingPolicies", n => { ClaimsMappingPolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ClaimsMappingPolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "createdObjects", n => { CreatedObjects = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "customSecurityAttributes", n => { CustomSecurityAttributes = n.GetObjectValue(global::ApiSdk.Models.CustomSecurityAttributeValue.CreateFromDiscriminatorValue); } }, + { "delegatedPermissionClassifications", n => { DelegatedPermissionClassifications = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DelegatedPermissionClassification.CreateFromDiscriminatorValue)?.AsList(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "disabledByMicrosoftStatus", n => { DisabledByMicrosoftStatus = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "endpoints", n => { Endpoints = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Endpoint.CreateFromDiscriminatorValue)?.AsList(); } }, + { "federatedIdentityCredentials", n => { FederatedIdentityCredentials = n.GetCollectionOfObjectValues(global::ApiSdk.Models.FederatedIdentityCredential.CreateFromDiscriminatorValue)?.AsList(); } }, + { "homeRealmDiscoveryPolicies", n => { HomeRealmDiscoveryPolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.HomeRealmDiscoveryPolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "homepage", n => { Homepage = n.GetStringValue(); } }, + { "info", n => { Info = n.GetObjectValue(global::ApiSdk.Models.InformationalUrl.CreateFromDiscriminatorValue); } }, + { "keyCredentials", n => { KeyCredentials = n.GetCollectionOfObjectValues(global::ApiSdk.Models.KeyCredential.CreateFromDiscriminatorValue)?.AsList(); } }, + { "loginUrl", n => { LoginUrl = n.GetStringValue(); } }, + { "logoutUrl", n => { LogoutUrl = n.GetStringValue(); } }, + { "memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "notes", n => { Notes = n.GetStringValue(); } }, + { "notificationEmailAddresses", n => { NotificationEmailAddresses = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "oauth2PermissionGrants", n => { Oauth2PermissionGrants = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OAuth2PermissionGrant.CreateFromDiscriminatorValue)?.AsList(); } }, + { "oauth2PermissionScopes", n => { Oauth2PermissionScopes = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PermissionScope.CreateFromDiscriminatorValue)?.AsList(); } }, + { "ownedObjects", n => { OwnedObjects = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "owners", n => { Owners = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "passwordCredentials", n => { PasswordCredentials = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PasswordCredential.CreateFromDiscriminatorValue)?.AsList(); } }, + { "preferredSingleSignOnMode", n => { PreferredSingleSignOnMode = n.GetStringValue(); } }, + { "preferredTokenSigningKeyThumbprint", n => { PreferredTokenSigningKeyThumbprint = n.GetStringValue(); } }, + { "remoteDesktopSecurityConfiguration", n => { RemoteDesktopSecurityConfiguration = n.GetObjectValue(global::ApiSdk.Models.RemoteDesktopSecurityConfiguration.CreateFromDiscriminatorValue); } }, + { "replyUrls", n => { ReplyUrls = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "resourceSpecificApplicationPermissions", n => { ResourceSpecificApplicationPermissions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ResourceSpecificPermission.CreateFromDiscriminatorValue)?.AsList(); } }, + { "samlSingleSignOnSettings", n => { SamlSingleSignOnSettings = n.GetObjectValue(global::ApiSdk.Models.SamlSingleSignOnSettings.CreateFromDiscriminatorValue); } }, + { "servicePrincipalNames", n => { ServicePrincipalNames = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "servicePrincipalType", n => { ServicePrincipalType = n.GetStringValue(); } }, + { "signInAudience", n => { SignInAudience = n.GetStringValue(); } }, + { "synchronization", n => { Synchronization = n.GetObjectValue(global::ApiSdk.Models.Synchronization.CreateFromDiscriminatorValue); } }, + { "tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "tokenEncryptionKeyId", n => { TokenEncryptionKeyId = n.GetGuidValue(); } }, + { "tokenIssuancePolicies", n => { TokenIssuancePolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TokenIssuancePolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "tokenLifetimePolicies", n => { TokenLifetimePolicies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TokenLifetimePolicy.CreateFromDiscriminatorValue)?.AsList(); } }, + { "transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "verifiedPublisher", n => { VerifiedPublisher = n.GetObjectValue(global::ApiSdk.Models.VerifiedPublisher.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountEnabled", AccountEnabled); - writer.WriteCollectionOfObjectValues("addIns", AddIns); + writer.WriteCollectionOfObjectValues("addIns", AddIns); writer.WriteCollectionOfPrimitiveValues("alternativeNames", AlternativeNames); writer.WriteStringValue("appDescription", AppDescription); writer.WriteStringValue("appDisplayName", AppDisplayName); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("applicationTemplateId", ApplicationTemplateId); - writer.WriteCollectionOfObjectValues("appManagementPolicies", AppManagementPolicies); + writer.WriteCollectionOfObjectValues("appManagementPolicies", AppManagementPolicies); writer.WriteGuidValue("appOwnerOrganizationId", AppOwnerOrganizationId); - writer.WriteCollectionOfObjectValues("appRoleAssignedTo", AppRoleAssignedTo); + writer.WriteCollectionOfObjectValues("appRoleAssignedTo", AppRoleAssignedTo); writer.WriteBoolValue("appRoleAssignmentRequired", AppRoleAssignmentRequired); - writer.WriteCollectionOfObjectValues("appRoleAssignments", AppRoleAssignments); - writer.WriteCollectionOfObjectValues("appRoles", AppRoles); - writer.WriteCollectionOfObjectValues("claimsMappingPolicies", ClaimsMappingPolicies); - writer.WriteCollectionOfObjectValues("createdObjects", CreatedObjects); - writer.WriteObjectValue("customSecurityAttributes", CustomSecurityAttributes); - writer.WriteCollectionOfObjectValues("delegatedPermissionClassifications", DelegatedPermissionClassifications); + writer.WriteCollectionOfObjectValues("appRoleAssignments", AppRoleAssignments); + writer.WriteCollectionOfObjectValues("appRoles", AppRoles); + writer.WriteCollectionOfObjectValues("claimsMappingPolicies", ClaimsMappingPolicies); + writer.WriteCollectionOfObjectValues("createdObjects", CreatedObjects); + writer.WriteObjectValue("customSecurityAttributes", CustomSecurityAttributes); + writer.WriteCollectionOfObjectValues("delegatedPermissionClassifications", DelegatedPermissionClassifications); writer.WriteStringValue("description", Description); writer.WriteStringValue("disabledByMicrosoftStatus", DisabledByMicrosoftStatus); writer.WriteStringValue("displayName", DisplayName); - writer.WriteCollectionOfObjectValues("endpoints", Endpoints); - writer.WriteCollectionOfObjectValues("federatedIdentityCredentials", FederatedIdentityCredentials); + writer.WriteCollectionOfObjectValues("endpoints", Endpoints); + writer.WriteCollectionOfObjectValues("federatedIdentityCredentials", FederatedIdentityCredentials); writer.WriteStringValue("homepage", Homepage); - writer.WriteCollectionOfObjectValues("homeRealmDiscoveryPolicies", HomeRealmDiscoveryPolicies); - writer.WriteObjectValue("info", Info); - writer.WriteCollectionOfObjectValues("keyCredentials", KeyCredentials); + writer.WriteCollectionOfObjectValues("homeRealmDiscoveryPolicies", HomeRealmDiscoveryPolicies); + writer.WriteObjectValue("info", Info); + writer.WriteCollectionOfObjectValues("keyCredentials", KeyCredentials); writer.WriteStringValue("loginUrl", LoginUrl); writer.WriteStringValue("logoutUrl", LogoutUrl); - writer.WriteCollectionOfObjectValues("memberOf", MemberOf); + writer.WriteCollectionOfObjectValues("memberOf", MemberOf); writer.WriteStringValue("notes", Notes); writer.WriteCollectionOfPrimitiveValues("notificationEmailAddresses", NotificationEmailAddresses); - writer.WriteCollectionOfObjectValues("oauth2PermissionGrants", Oauth2PermissionGrants); - writer.WriteCollectionOfObjectValues("oauth2PermissionScopes", Oauth2PermissionScopes); - writer.WriteCollectionOfObjectValues("ownedObjects", OwnedObjects); - writer.WriteCollectionOfObjectValues("owners", Owners); - writer.WriteCollectionOfObjectValues("passwordCredentials", PasswordCredentials); + writer.WriteCollectionOfObjectValues("oauth2PermissionGrants", Oauth2PermissionGrants); + writer.WriteCollectionOfObjectValues("oauth2PermissionScopes", Oauth2PermissionScopes); + writer.WriteCollectionOfObjectValues("ownedObjects", OwnedObjects); + writer.WriteCollectionOfObjectValues("owners", Owners); + writer.WriteCollectionOfObjectValues("passwordCredentials", PasswordCredentials); writer.WriteStringValue("preferredSingleSignOnMode", PreferredSingleSignOnMode); writer.WriteStringValue("preferredTokenSigningKeyThumbprint", PreferredTokenSigningKeyThumbprint); + writer.WriteObjectValue("remoteDesktopSecurityConfiguration", RemoteDesktopSecurityConfiguration); writer.WriteCollectionOfPrimitiveValues("replyUrls", ReplyUrls); - writer.WriteCollectionOfObjectValues("resourceSpecificApplicationPermissions", ResourceSpecificApplicationPermissions); - writer.WriteObjectValue("samlSingleSignOnSettings", SamlSingleSignOnSettings); + writer.WriteCollectionOfObjectValues("resourceSpecificApplicationPermissions", ResourceSpecificApplicationPermissions); + writer.WriteObjectValue("samlSingleSignOnSettings", SamlSingleSignOnSettings); writer.WriteCollectionOfPrimitiveValues("servicePrincipalNames", ServicePrincipalNames); writer.WriteStringValue("servicePrincipalType", ServicePrincipalType); writer.WriteStringValue("signInAudience", SignInAudience); - writer.WriteObjectValue("synchronization", Synchronization); + writer.WriteObjectValue("synchronization", Synchronization); writer.WriteCollectionOfPrimitiveValues("tags", Tags); writer.WriteGuidValue("tokenEncryptionKeyId", TokenEncryptionKeyId); - writer.WriteCollectionOfObjectValues("tokenIssuancePolicies", TokenIssuancePolicies); - writer.WriteCollectionOfObjectValues("tokenLifetimePolicies", TokenLifetimePolicies); - writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); - writer.WriteObjectValue("verifiedPublisher", VerifiedPublisher); + writer.WriteCollectionOfObjectValues("tokenIssuancePolicies", TokenIssuancePolicies); + writer.WriteCollectionOfObjectValues("tokenLifetimePolicies", TokenLifetimePolicies); + writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); + writer.WriteObjectValue("verifiedPublisher", VerifiedPublisher); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ServicePrincipalCollectionResponse.cs b/src/sample/generated/Models/ServicePrincipalCollectionResponse.cs index 9c6f4f37..8b7a852b 100644 --- a/src/sample/generated/Models/ServicePrincipalCollectionResponse.cs +++ b/src/sample/generated/Models/ServicePrincipalCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ServicePrincipalCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ServicePrincipalCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class ServicePrincipalCollectionResponse : IAdditionalDataHolder, IParsab /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new servicePrincipalCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public ServicePrincipalCollectionResponse() { + public ServicePrincipalCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ServicePrincipalCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ServicePrincipalCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ServicePrincipalCollectionResponse(); + return new global::ApiSdk.Models.ServicePrincipalCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(ServicePrincipal.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ServicePrincipal.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ServicePrincipalLockConfiguration.cs b/src/sample/generated/Models/ServicePrincipalLockConfiguration.cs index eca19d58..1d8570a5 100644 --- a/src/sample/generated/Models/ServicePrincipalLockConfiguration.cs +++ b/src/sample/generated/Models/ServicePrincipalLockConfiguration.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ServicePrincipalLockConfiguration : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ServicePrincipalLockConfiguration : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Enables locking all sensitive properties. The sensitive properties are keyCredentials, passwordCredentials, and tokenEncryptionKeyId. @@ -19,36 +25,43 @@ public class ServicePrincipalLockConfiguration : IAdditionalDataHolder, IParsabl /// Locks the tokenEncryptionKeyId property for modification on the service principal. public bool? TokenEncryptionKeyId { get; set; } /// - /// Instantiates a new servicePrincipalLockConfiguration and sets the default values. + /// Instantiates a new and sets the default values. /// - public ServicePrincipalLockConfiguration() { + public ServicePrincipalLockConfiguration() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ServicePrincipalLockConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ServicePrincipalLockConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ServicePrincipalLockConfiguration(); + return new global::ApiSdk.Models.ServicePrincipalLockConfiguration(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allProperties", n => { AllProperties = n.GetBoolValue(); } }, - {"credentialsWithUsageSign", n => { CredentialsWithUsageSign = n.GetBoolValue(); } }, - {"credentialsWithUsageVerify", n => { CredentialsWithUsageVerify = n.GetBoolValue(); } }, - {"isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, - {"tokenEncryptionKeyId", n => { TokenEncryptionKeyId = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allProperties", n => { AllProperties = n.GetBoolValue(); } }, + { "credentialsWithUsageSign", n => { CredentialsWithUsageSign = n.GetBoolValue(); } }, + { "credentialsWithUsageVerify", n => { CredentialsWithUsageVerify = n.GetBoolValue(); } }, + { "isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, + { "tokenEncryptionKeyId", n => { TokenEncryptionKeyId = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allProperties", AllProperties); writer.WriteBoolValue("credentialsWithUsageSign", CredentialsWithUsageSign); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ServiceProvisioningError.cs b/src/sample/generated/Models/ServiceProvisioningError.cs index cda25d3c..f791f7f7 100644 --- a/src/sample/generated/Models/ServiceProvisioningError.cs +++ b/src/sample/generated/Models/ServiceProvisioningError.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ServiceProvisioningError : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ServiceProvisioningError : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The createdDateTime property + /// The date and time at which the error occurred. public DateTimeOffset? CreatedDateTime { get; set; } - /// The isResolved property + /// Indicates whether the error has been attended to. public bool? IsResolved { get; set; } - /// The serviceInstance property + /// Qualified service instance (for example, 'SharePoint/Dublin') that published the service error information. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ServiceInstance { get; set; } @@ -21,34 +27,41 @@ public class ServiceProvisioningError : IAdditionalDataHolder, IParsable { public string ServiceInstance { get; set; } #endif /// - /// Instantiates a new serviceProvisioningError and sets the default values. + /// Instantiates a new and sets the default values. /// - public ServiceProvisioningError() { + public ServiceProvisioningError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ServiceProvisioningError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ServiceProvisioningError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ServiceProvisioningError(); + return new global::ApiSdk.Models.ServiceProvisioningError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"isResolved", n => { IsResolved = n.GetBoolValue(); } }, - {"serviceInstance", n => { ServiceInstance = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "isResolved", n => { IsResolved = n.GetBoolValue(); } }, + { "serviceInstance", n => { ServiceInstance = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteBoolValue("isResolved", IsResolved); @@ -57,3 +70,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ServiceStorageQuotaBreakdown.cs b/src/sample/generated/Models/ServiceStorageQuotaBreakdown.cs new file mode 100644 index 00000000..e3998eec --- /dev/null +++ b/src/sample/generated/Models/ServiceStorageQuotaBreakdown.cs @@ -0,0 +1,46 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ServiceStorageQuotaBreakdown : global::ApiSdk.Models.StorageQuotaBreakdown, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.ServiceStorageQuotaBreakdown CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.ServiceStorageQuotaBreakdown(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ServiceStorageQuotaBreakdownCollectionResponse.cs b/src/sample/generated/Models/ServiceStorageQuotaBreakdownCollectionResponse.cs new file mode 100644 index 00000000..6aa4e440 --- /dev/null +++ b/src/sample/generated/Models/ServiceStorageQuotaBreakdownCollectionResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ServiceStorageQuotaBreakdownCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The OdataNextLink property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataNextLink { get; set; } +#nullable restore +#else + public string OdataNextLink { get; set; } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { get; set; } +#nullable restore +#else + public List Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ServiceStorageQuotaBreakdownCollectionResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.ServiceStorageQuotaBreakdownCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.ServiceStorageQuotaBreakdownCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ServiceStorageQuotaBreakdown.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.nextLink", OdataNextLink); + writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SettingSource.cs b/src/sample/generated/Models/SettingSource.cs index ffeecb28..a2f3dfdb 100644 --- a/src/sample/generated/Models/SettingSource.cs +++ b/src/sample/generated/Models/SettingSource.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SettingSource : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SettingSource : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Not yet documented @@ -25,41 +31,49 @@ public class SettingSource : IAdditionalDataHolder, IParsable { public string Id { get; set; } #endif /// The sourceType property - public SettingSourceType? SourceType { get; set; } + public global::ApiSdk.Models.SettingSourceType? SourceType { get; set; } /// - /// Instantiates a new settingSource and sets the default values. + /// Instantiates a new and sets the default values. /// - public SettingSource() { + public SettingSource() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SettingSource CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SettingSource CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SettingSource(); + return new global::ApiSdk.Models.SettingSource(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"id", n => { Id = n.GetStringValue(); } }, - {"sourceType", n => { SourceType = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "sourceType", n => { SourceType = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); - writer.WriteEnumValue("sourceType", SourceType); + writer.WriteEnumValue("sourceType", SourceType); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SettingSourceType.cs b/src/sample/generated/Models/SettingSourceType.cs index 80956fcc..b39cd274 100644 --- a/src/sample/generated/Models/SettingSourceType.cs +++ b/src/sample/generated/Models/SettingSourceType.cs @@ -1,11 +1,20 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum SettingSourceType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SettingSourceType + #pragma warning restore CS1591 + { [EnumMember(Value = "deviceConfiguration")] + #pragma warning disable CS1591 DeviceConfiguration, + #pragma warning restore CS1591 [EnumMember(Value = "deviceIntent")] + #pragma warning disable CS1591 DeviceIntent, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/SettingValue.cs b/src/sample/generated/Models/SettingValue.cs index 8c8c0ac7..85251f99 100644 --- a/src/sample/generated/Models/SettingValue.cs +++ b/src/sample/generated/Models/SettingValue.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SettingValue : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SettingValue : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Name of the setting (as defined by the groupSettingTemplate). @@ -25,33 +31,40 @@ public class SettingValue : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new settingValue and sets the default values. + /// Instantiates a new and sets the default values. /// - public SettingValue() { + public SettingValue() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SettingValue CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SettingValue(); + return new global::ApiSdk.Models.SettingValue(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"name", n => { Name = n.GetStringValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("value", Value); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SharePointIdentity.cs b/src/sample/generated/Models/SharePointIdentity.cs index 5ad40319..6dc6e6f0 100644 --- a/src/sample/generated/Models/SharePointIdentity.cs +++ b/src/sample/generated/Models/SharePointIdentity.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SharePointIdentity : Identity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SharePointIdentity : global::ApiSdk.Models.Identity, IParsable + #pragma warning restore CS1591 + { /// The sign in name of the SharePoint identity. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class SharePointIdentity : Identity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SharePointIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SharePointIdentity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SharePointIdentity(); + return new global::ApiSdk.Models.SharePointIdentity(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"loginName", n => { LoginName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "loginName", n => { LoginName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("loginName", LoginName); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SharePointIdentitySet.cs b/src/sample/generated/Models/SharePointIdentitySet.cs index 8f7e89a6..5144b3a2 100644 --- a/src/sample/generated/Models/SharePointIdentitySet.cs +++ b/src/sample/generated/Models/SharePointIdentitySet.cs @@ -1,63 +1,76 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SharePointIdentitySet : IdentitySet, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SharePointIdentitySet : global::ApiSdk.Models.IdentitySet, IParsable + #pragma warning restore CS1591 + { /// The group property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Identity? Group { get; set; } + public global::ApiSdk.Models.Identity? Group { get; set; } #nullable restore #else - public Identity Group { get; set; } + public global::ApiSdk.Models.Identity Group { get; set; } #endif /// The siteGroup property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SharePointIdentity? SiteGroup { get; set; } + public global::ApiSdk.Models.SharePointIdentity? SiteGroup { get; set; } #nullable restore #else - public SharePointIdentity SiteGroup { get; set; } + public global::ApiSdk.Models.SharePointIdentity SiteGroup { get; set; } #endif /// The siteUser property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SharePointIdentity? SiteUser { get; set; } + public global::ApiSdk.Models.SharePointIdentity? SiteUser { get; set; } #nullable restore #else - public SharePointIdentity SiteUser { get; set; } + public global::ApiSdk.Models.SharePointIdentity SiteUser { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SharePointIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SharePointIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SharePointIdentitySet(); + return new global::ApiSdk.Models.SharePointIdentitySet(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"group", n => { Group = n.GetObjectValue(Identity.CreateFromDiscriminatorValue); } }, - {"siteGroup", n => { SiteGroup = n.GetObjectValue(SharePointIdentity.CreateFromDiscriminatorValue); } }, - {"siteUser", n => { SiteUser = n.GetObjectValue(SharePointIdentity.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "group", n => { Group = n.GetObjectValue(global::ApiSdk.Models.Identity.CreateFromDiscriminatorValue); } }, + { "siteGroup", n => { SiteGroup = n.GetObjectValue(global::ApiSdk.Models.SharePointIdentity.CreateFromDiscriminatorValue); } }, + { "siteUser", n => { SiteUser = n.GetObjectValue(global::ApiSdk.Models.SharePointIdentity.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("group", Group); - writer.WriteObjectValue("siteGroup", SiteGroup); - writer.WriteObjectValue("siteUser", SiteUser); + writer.WriteObjectValue("group", Group); + writer.WriteObjectValue("siteGroup", SiteGroup); + writer.WriteObjectValue("siteUser", SiteUser); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Shared.cs b/src/sample/generated/Models/Shared.cs index 7f5a23a3..51061f8c 100644 --- a/src/sample/generated/Models/Shared.cs +++ b/src/sample/generated/Models/Shared.cs @@ -1,22 +1,28 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Shared : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Shared : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The owner property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? Owner { get; set; } + public global::ApiSdk.Models.IdentitySet? Owner { get; set; } #nullable restore #else - public IdentitySet Owner { get; set; } + public global::ApiSdk.Models.IdentitySet Owner { get; set; } #endif - /// Indicates the scope of how the item is shared: anonymous, organization, or users. Read-only. + /// Indicates the scope of how the item is shared. The possible values are: anonymous, organization, or users. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Scope { get; set; } @@ -27,49 +33,57 @@ public class Shared : IAdditionalDataHolder, IParsable { /// The sharedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? SharedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? SharedBy { get; set; } #nullable restore #else - public IdentitySet SharedBy { get; set; } + public global::ApiSdk.Models.IdentitySet SharedBy { get; set; } #endif /// The UTC date and time when the item was shared. Read-only. public DateTimeOffset? SharedDateTime { get; set; } /// - /// Instantiates a new shared and sets the default values. + /// Instantiates a new and sets the default values. /// - public Shared() { + public Shared() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Shared CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Shared CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Shared(); + return new global::ApiSdk.Models.Shared(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"owner", n => { Owner = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"scope", n => { Scope = n.GetStringValue(); } }, - {"sharedBy", n => { SharedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"sharedDateTime", n => { SharedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "owner", n => { Owner = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "scope", n => { Scope = n.GetStringValue(); } }, + { "sharedBy", n => { SharedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "sharedDateTime", n => { SharedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("owner", Owner); + writer.WriteObjectValue("owner", Owner); writer.WriteStringValue("scope", Scope); - writer.WriteObjectValue("sharedBy", SharedBy); + writer.WriteObjectValue("sharedBy", SharedBy); writer.WriteDateTimeOffsetValue("sharedDateTime", SharedDateTime); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SharedInsight.cs b/src/sample/generated/Models/SharedInsight.cs index 76d5769d..525b18b4 100644 --- a/src/sample/generated/Models/SharedInsight.cs +++ b/src/sample/generated/Models/SharedInsight.cs @@ -1,93 +1,106 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SharedInsight : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SharedInsight : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The lastShared property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SharingDetail? LastShared { get; set; } + public global::ApiSdk.Models.SharingDetail? LastShared { get; set; } #nullable restore #else - public SharingDetail LastShared { get; set; } + public global::ApiSdk.Models.SharingDetail LastShared { get; set; } #endif /// The lastSharedMethod property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Entity? LastSharedMethod { get; set; } + public global::ApiSdk.Models.Entity? LastSharedMethod { get; set; } #nullable restore #else - public Entity LastSharedMethod { get; set; } + public global::ApiSdk.Models.Entity LastSharedMethod { get; set; } #endif /// The resource property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Entity? Resource { get; set; } + public global::ApiSdk.Models.Entity? Resource { get; set; } #nullable restore #else - public Entity Resource { get; set; } + public global::ApiSdk.Models.Entity Resource { get; set; } #endif /// The resourceReference property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ResourceReference? ResourceReference { get; set; } + public global::ApiSdk.Models.ResourceReference? ResourceReference { get; set; } #nullable restore #else - public ApiSdk.Models.ResourceReference ResourceReference { get; set; } + public global::ApiSdk.Models.ResourceReference ResourceReference { get; set; } #endif /// The resourceVisualization property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ResourceVisualization? ResourceVisualization { get; set; } + public global::ApiSdk.Models.ResourceVisualization? ResourceVisualization { get; set; } #nullable restore #else - public ApiSdk.Models.ResourceVisualization ResourceVisualization { get; set; } + public global::ApiSdk.Models.ResourceVisualization ResourceVisualization { get; set; } #endif /// The sharingHistory property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SharingHistory { get; set; } + public List? SharingHistory { get; set; } #nullable restore #else - public List SharingHistory { get; set; } + public List SharingHistory { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SharedInsight CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SharedInsight CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SharedInsight(); + return new global::ApiSdk.Models.SharedInsight(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"lastShared", n => { LastShared = n.GetObjectValue(SharingDetail.CreateFromDiscriminatorValue); } }, - {"lastSharedMethod", n => { LastSharedMethod = n.GetObjectValue(Entity.CreateFromDiscriminatorValue); } }, - {"resource", n => { Resource = n.GetObjectValue(Entity.CreateFromDiscriminatorValue); } }, - {"resourceReference", n => { ResourceReference = n.GetObjectValue(ApiSdk.Models.ResourceReference.CreateFromDiscriminatorValue); } }, - {"resourceVisualization", n => { ResourceVisualization = n.GetObjectValue(ApiSdk.Models.ResourceVisualization.CreateFromDiscriminatorValue); } }, - {"sharingHistory", n => { SharingHistory = n.GetCollectionOfObjectValues(SharingDetail.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "lastShared", n => { LastShared = n.GetObjectValue(global::ApiSdk.Models.SharingDetail.CreateFromDiscriminatorValue); } }, + { "lastSharedMethod", n => { LastSharedMethod = n.GetObjectValue(global::ApiSdk.Models.Entity.CreateFromDiscriminatorValue); } }, + { "resource", n => { Resource = n.GetObjectValue(global::ApiSdk.Models.Entity.CreateFromDiscriminatorValue); } }, + { "resourceReference", n => { ResourceReference = n.GetObjectValue(global::ApiSdk.Models.ResourceReference.CreateFromDiscriminatorValue); } }, + { "resourceVisualization", n => { ResourceVisualization = n.GetObjectValue(global::ApiSdk.Models.ResourceVisualization.CreateFromDiscriminatorValue); } }, + { "sharingHistory", n => { SharingHistory = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SharingDetail.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("lastShared", LastShared); - writer.WriteObjectValue("lastSharedMethod", LastSharedMethod); - writer.WriteObjectValue("resource", Resource); - writer.WriteObjectValue("resourceReference", ResourceReference); - writer.WriteObjectValue("resourceVisualization", ResourceVisualization); - writer.WriteCollectionOfObjectValues("sharingHistory", SharingHistory); + writer.WriteObjectValue("lastShared", LastShared); + writer.WriteObjectValue("lastSharedMethod", LastSharedMethod); + writer.WriteObjectValue("resource", Resource); + writer.WriteObjectValue("resourceReference", ResourceReference); + writer.WriteObjectValue("resourceVisualization", ResourceVisualization); + writer.WriteCollectionOfObjectValues("sharingHistory", SharingHistory); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SharedInsightCollectionResponse.cs b/src/sample/generated/Models/SharedInsightCollectionResponse.cs new file mode 100644 index 00000000..c13d254c --- /dev/null +++ b/src/sample/generated/Models/SharedInsightCollectionResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SharedInsightCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The OdataNextLink property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataNextLink { get; set; } +#nullable restore +#else + public string OdataNextLink { get; set; } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { get; set; } +#nullable restore +#else + public List Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SharedInsightCollectionResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.SharedInsightCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.SharedInsightCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SharedInsight.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.nextLink", OdataNextLink); + writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SharedWithChannelTeamInfo.cs b/src/sample/generated/Models/SharedWithChannelTeamInfo.cs index 167fd6aa..bff6e2c9 100644 --- a/src/sample/generated/Models/SharedWithChannelTeamInfo.cs +++ b/src/sample/generated/Models/SharedWithChannelTeamInfo.cs @@ -1,47 +1,60 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SharedWithChannelTeamInfo : TeamInfo, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SharedWithChannelTeamInfo : global::ApiSdk.Models.TeamInfo, IParsable + #pragma warning restore CS1591 + { /// A collection of team members who have access to the shared channel. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AllowedMembers { get; set; } + public List? AllowedMembers { get; set; } #nullable restore #else - public List AllowedMembers { get; set; } + public List AllowedMembers { get; set; } #endif /// Indicates whether the team is the host of the channel. public bool? IsHostTeam { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SharedWithChannelTeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SharedWithChannelTeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SharedWithChannelTeamInfo(); + return new global::ApiSdk.Models.SharedWithChannelTeamInfo(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"allowedMembers", n => { AllowedMembers = n.GetCollectionOfObjectValues(ConversationMember.CreateFromDiscriminatorValue)?.ToList(); } }, - {"isHostTeam", n => { IsHostTeam = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "allowedMembers", n => { AllowedMembers = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ConversationMember.CreateFromDiscriminatorValue)?.AsList(); } }, + { "isHostTeam", n => { IsHostTeam = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("allowedMembers", AllowedMembers); + writer.WriteCollectionOfObjectValues("allowedMembers", AllowedMembers); writer.WriteBoolValue("isHostTeam", IsHostTeam); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SharepointIds.cs b/src/sample/generated/Models/SharepointIds.cs index e4884b42..cccd747b 100644 --- a/src/sample/generated/Models/SharepointIds.cs +++ b/src/sample/generated/Models/SharepointIds.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SharepointIds : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SharepointIds : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The unique identifier (guid) for the item's list in SharePoint. @@ -65,38 +71,45 @@ public class SharepointIds : IAdditionalDataHolder, IParsable { public string WebId { get; set; } #endif /// - /// Instantiates a new sharepointIds and sets the default values. + /// Instantiates a new and sets the default values. /// - public SharepointIds() { + public SharepointIds() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SharepointIds CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SharepointIds CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SharepointIds(); + return new global::ApiSdk.Models.SharepointIds(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"listId", n => { ListId = n.GetStringValue(); } }, - {"listItemId", n => { ListItemId = n.GetStringValue(); } }, - {"listItemUniqueId", n => { ListItemUniqueId = n.GetStringValue(); } }, - {"siteId", n => { SiteId = n.GetStringValue(); } }, - {"siteUrl", n => { SiteUrl = n.GetStringValue(); } }, - {"tenantId", n => { TenantId = n.GetStringValue(); } }, - {"webId", n => { WebId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "listId", n => { ListId = n.GetStringValue(); } }, + { "listItemId", n => { ListItemId = n.GetStringValue(); } }, + { "listItemUniqueId", n => { ListItemUniqueId = n.GetStringValue(); } }, + { "siteId", n => { SiteId = n.GetStringValue(); } }, + { "siteUrl", n => { SiteUrl = n.GetStringValue(); } }, + { "tenantId", n => { TenantId = n.GetStringValue(); } }, + { "webId", n => { WebId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("listId", ListId); writer.WriteStringValue("listItemId", ListItemId); @@ -109,3 +122,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SharingDetail.cs b/src/sample/generated/Models/SharingDetail.cs index 3ce812df..c072c944 100644 --- a/src/sample/generated/Models/SharingDetail.cs +++ b/src/sample/generated/Models/SharingDetail.cs @@ -1,30 +1,36 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SharingDetail : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SharingDetail : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The sharedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public InsightIdentity? SharedBy { get; set; } + public global::ApiSdk.Models.InsightIdentity? SharedBy { get; set; } #nullable restore #else - public InsightIdentity SharedBy { get; set; } + public global::ApiSdk.Models.InsightIdentity SharedBy { get; set; } #endif /// The date and time the file was last shared. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. public DateTimeOffset? SharedDateTime { get; set; } /// The sharingReference property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ResourceReference? SharingReference { get; set; } + public global::ApiSdk.Models.ResourceReference? SharingReference { get; set; } #nullable restore #else - public ResourceReference SharingReference { get; set; } + public global::ApiSdk.Models.ResourceReference SharingReference { get; set; } #endif /// The subject with which the document was shared. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -34,7 +40,7 @@ public class SharingDetail : IAdditionalDataHolder, IParsable { #else public string SharingSubject { get; set; } #endif - /// Determines the way the document was shared, can be by a 'Link', 'Attachment', 'Group', 'Site'. + /// Determines the way the document was shared. Can be by a 1Link1, 1Attachment1, 1Group1, 1Site1. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SharingType { get; set; } @@ -43,43 +49,51 @@ public class SharingDetail : IAdditionalDataHolder, IParsable { public string SharingType { get; set; } #endif /// - /// Instantiates a new sharingDetail and sets the default values. + /// Instantiates a new and sets the default values. /// - public SharingDetail() { + public SharingDetail() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SharingDetail CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SharingDetail CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SharingDetail(); + return new global::ApiSdk.Models.SharingDetail(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"sharedBy", n => { SharedBy = n.GetObjectValue(InsightIdentity.CreateFromDiscriminatorValue); } }, - {"sharedDateTime", n => { SharedDateTime = n.GetDateTimeOffsetValue(); } }, - {"sharingReference", n => { SharingReference = n.GetObjectValue(ResourceReference.CreateFromDiscriminatorValue); } }, - {"sharingSubject", n => { SharingSubject = n.GetStringValue(); } }, - {"sharingType", n => { SharingType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sharedBy", n => { SharedBy = n.GetObjectValue(global::ApiSdk.Models.InsightIdentity.CreateFromDiscriminatorValue); } }, + { "sharedDateTime", n => { SharedDateTime = n.GetDateTimeOffsetValue(); } }, + { "sharingReference", n => { SharingReference = n.GetObjectValue(global::ApiSdk.Models.ResourceReference.CreateFromDiscriminatorValue); } }, + { "sharingSubject", n => { SharingSubject = n.GetStringValue(); } }, + { "sharingType", n => { SharingType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("sharedBy", SharedBy); + writer.WriteObjectValue("sharedBy", SharedBy); writer.WriteDateTimeOffsetValue("sharedDateTime", SharedDateTime); - writer.WriteObjectValue("sharingReference", SharingReference); + writer.WriteObjectValue("sharingReference", SharingReference); writer.WriteStringValue("sharingSubject", SharingSubject); writer.WriteStringValue("sharingType", SharingType); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SharingInvitation.cs b/src/sample/generated/Models/SharingInvitation.cs index 6cf0148e..3f58df82 100644 --- a/src/sample/generated/Models/SharingInvitation.cs +++ b/src/sample/generated/Models/SharingInvitation.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SharingInvitation : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SharingInvitation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The email address provided for the recipient of the sharing invitation. Read-only. @@ -19,10 +25,10 @@ public class SharingInvitation : IAdditionalDataHolder, IParsable { /// The invitedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? InvitedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? InvitedBy { get; set; } #nullable restore #else - public IdentitySet InvitedBy { get; set; } + public global::ApiSdk.Models.IdentitySet InvitedBy { get; set; } #endif /// The redeemedBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -35,41 +41,49 @@ public class SharingInvitation : IAdditionalDataHolder, IParsable { /// If true the recipient of the invitation needs to sign in in order to access the shared item. Read-only. public bool? SignInRequired { get; set; } /// - /// Instantiates a new sharingInvitation and sets the default values. + /// Instantiates a new and sets the default values. /// - public SharingInvitation() { + public SharingInvitation() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SharingInvitation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SharingInvitation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SharingInvitation(); + return new global::ApiSdk.Models.SharingInvitation(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"email", n => { Email = n.GetStringValue(); } }, - {"invitedBy", n => { InvitedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"redeemedBy", n => { RedeemedBy = n.GetStringValue(); } }, - {"signInRequired", n => { SignInRequired = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "email", n => { Email = n.GetStringValue(); } }, + { "invitedBy", n => { InvitedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "redeemedBy", n => { RedeemedBy = n.GetStringValue(); } }, + { "signInRequired", n => { SignInRequired = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("email", Email); - writer.WriteObjectValue("invitedBy", InvitedBy); + writer.WriteObjectValue("invitedBy", InvitedBy); writer.WriteStringValue("redeemedBy", RedeemedBy); writer.WriteBoolValue("signInRequired", SignInRequired); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SharingLink.cs b/src/sample/generated/Models/SharingLink.cs index 36bc13b0..057e8fe6 100644 --- a/src/sample/generated/Models/SharingLink.cs +++ b/src/sample/generated/Models/SharingLink.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SharingLink : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SharingLink : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The application property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Identity? Application { get; set; } + public global::ApiSdk.Models.Identity? Application { get; set; } #nullable restore #else - public Identity Application { get; set; } + public global::ApiSdk.Models.Identity Application { get; set; } #endif /// If true then the user can only use this link to view the item on the web, and cannot use it to download the contents of the item. Only for OneDrive for Business and SharePoint. public bool? PreventsDownload { get; set; } @@ -51,39 +57,46 @@ public class SharingLink : IAdditionalDataHolder, IParsable { public string WebUrl { get; set; } #endif /// - /// Instantiates a new sharingLink and sets the default values. + /// Instantiates a new and sets the default values. /// - public SharingLink() { + public SharingLink() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SharingLink CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SharingLink CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SharingLink(); + return new global::ApiSdk.Models.SharingLink(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"application", n => { Application = n.GetObjectValue(Identity.CreateFromDiscriminatorValue); } }, - {"preventsDownload", n => { PreventsDownload = n.GetBoolValue(); } }, - {"scope", n => { Scope = n.GetStringValue(); } }, - {"type", n => { Type = n.GetStringValue(); } }, - {"webHtml", n => { WebHtml = n.GetStringValue(); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "application", n => { Application = n.GetObjectValue(global::ApiSdk.Models.Identity.CreateFromDiscriminatorValue); } }, + { "preventsDownload", n => { PreventsDownload = n.GetBoolValue(); } }, + { "scope", n => { Scope = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "webHtml", n => { WebHtml = n.GetStringValue(); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("application", Application); + writer.WriteObjectValue("application", Application); writer.WriteBoolValue("preventsDownload", PreventsDownload); writer.WriteStringValue("scope", Scope); writer.WriteStringValue("type", Type); @@ -93,3 +106,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Shift.cs b/src/sample/generated/Models/Shift.cs index 93b0f357..c12c2a4d 100644 --- a/src/sample/generated/Models/Shift.cs +++ b/src/sample/generated/Models/Shift.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Shift : ChangeTrackedEntity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Shift : global::ApiSdk.Models.ChangeTrackedEntity, IParsable + #pragma warning restore CS1591 + { /// The draftShift property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ShiftItem? DraftShift { get; set; } + public global::ApiSdk.Models.ShiftItem? DraftShift { get; set; } #nullable restore #else - public ShiftItem DraftShift { get; set; } + public global::ApiSdk.Models.ShiftItem DraftShift { get; set; } #endif /// ID of the scheduling group the shift is part of. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,10 +31,10 @@ public class Shift : ChangeTrackedEntity, IParsable { /// The sharedShift property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ShiftItem? SharedShift { get; set; } + public global::ApiSdk.Models.ShiftItem? SharedShift { get; set; } #nullable restore #else - public ShiftItem SharedShift { get; set; } + public global::ApiSdk.Models.ShiftItem SharedShift { get; set; } #endif /// ID of the user assigned to the shift. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,33 +47,40 @@ public class Shift : ChangeTrackedEntity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Shift CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Shift CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Shift(); + return new global::ApiSdk.Models.Shift(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"draftShift", n => { DraftShift = n.GetObjectValue(ShiftItem.CreateFromDiscriminatorValue); } }, - {"schedulingGroupId", n => { SchedulingGroupId = n.GetStringValue(); } }, - {"sharedShift", n => { SharedShift = n.GetObjectValue(ShiftItem.CreateFromDiscriminatorValue); } }, - {"userId", n => { UserId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "draftShift", n => { DraftShift = n.GetObjectValue(global::ApiSdk.Models.ShiftItem.CreateFromDiscriminatorValue); } }, + { "schedulingGroupId", n => { SchedulingGroupId = n.GetStringValue(); } }, + { "sharedShift", n => { SharedShift = n.GetObjectValue(global::ApiSdk.Models.ShiftItem.CreateFromDiscriminatorValue); } }, + { "userId", n => { UserId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("draftShift", DraftShift); + writer.WriteObjectValue("draftShift", DraftShift); writer.WriteStringValue("schedulingGroupId", SchedulingGroupId); - writer.WriteObjectValue("sharedShift", SharedShift); + writer.WriteObjectValue("sharedShift", SharedShift); writer.WriteStringValue("userId", UserId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ShiftActivity.cs b/src/sample/generated/Models/ShiftActivity.cs index 55819c70..57014ed9 100644 --- a/src/sample/generated/Models/ShiftActivity.cs +++ b/src/sample/generated/Models/ShiftActivity.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ShiftActivity : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ShiftActivity : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Customer defined code for the shiftActivity. Required. @@ -31,47 +37,55 @@ public class ShiftActivity : IAdditionalDataHolder, IParsable { /// The start date and time for the shiftActivity. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required. public DateTimeOffset? StartDateTime { get; set; } /// The theme property - public ScheduleEntityTheme? Theme { get; set; } + public global::ApiSdk.Models.ScheduleEntityTheme? Theme { get; set; } /// - /// Instantiates a new shiftActivity and sets the default values. + /// Instantiates a new and sets the default values. /// - public ShiftActivity() { + public ShiftActivity() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ShiftActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ShiftActivity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ShiftActivity(); + return new global::ApiSdk.Models.ShiftActivity(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, - {"isPaid", n => { IsPaid = n.GetBoolValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, - {"theme", n => { Theme = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + { "isPaid", n => { IsPaid = n.GetBoolValue(); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + { "theme", n => { Theme = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteBoolValue("isPaid", IsPaid); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); - writer.WriteEnumValue("theme", Theme); + writer.WriteEnumValue("theme", Theme); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ShiftAvailability.cs b/src/sample/generated/Models/ShiftAvailability.cs index 4a62cbfc..eba8486c 100644 --- a/src/sample/generated/Models/ShiftAvailability.cs +++ b/src/sample/generated/Models/ShiftAvailability.cs @@ -1,28 +1,34 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ShiftAvailability : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ShiftAvailability : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The recurrence property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PatternedRecurrence? Recurrence { get; set; } + public global::ApiSdk.Models.PatternedRecurrence? Recurrence { get; set; } #nullable restore #else - public PatternedRecurrence Recurrence { get; set; } + public global::ApiSdk.Models.PatternedRecurrence Recurrence { get; set; } #endif /// The time slot(s) preferred by the user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TimeSlots { get; set; } + public List? TimeSlots { get; set; } #nullable restore #else - public List TimeSlots { get; set; } + public List TimeSlots { get; set; } #endif /// Specifies the time zone for the indicated time. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,39 +39,47 @@ public class ShiftAvailability : IAdditionalDataHolder, IParsable { public string TimeZone { get; set; } #endif /// - /// Instantiates a new shiftAvailability and sets the default values. + /// Instantiates a new and sets the default values. /// - public ShiftAvailability() { + public ShiftAvailability() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ShiftAvailability CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ShiftAvailability CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ShiftAvailability(); + return new global::ApiSdk.Models.ShiftAvailability(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"recurrence", n => { Recurrence = n.GetObjectValue(PatternedRecurrence.CreateFromDiscriminatorValue); } }, - {"timeSlots", n => { TimeSlots = n.GetCollectionOfObjectValues(TimeRange.CreateFromDiscriminatorValue)?.ToList(); } }, - {"timeZone", n => { TimeZone = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "recurrence", n => { Recurrence = n.GetObjectValue(global::ApiSdk.Models.PatternedRecurrence.CreateFromDiscriminatorValue); } }, + { "timeSlots", n => { TimeSlots = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TimeRange.CreateFromDiscriminatorValue)?.AsList(); } }, + { "timeZone", n => { TimeZone = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("recurrence", Recurrence); - writer.WriteCollectionOfObjectValues("timeSlots", TimeSlots); + writer.WriteObjectValue("recurrence", Recurrence); + writer.WriteCollectionOfObjectValues("timeSlots", TimeSlots); writer.WriteStringValue("timeZone", TimeZone); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ShiftItem.cs b/src/sample/generated/Models/ShiftItem.cs index 9ce1c4e0..c6db0dc3 100644 --- a/src/sample/generated/Models/ShiftItem.cs +++ b/src/sample/generated/Models/ShiftItem.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ShiftItem : ScheduleEntity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ShiftItem : global::ApiSdk.Models.ScheduleEntity, IParsable + #pragma warning restore CS1591 + { /// An incremental part of a shift which can cover details of when and where an employee is during their shift. For example, an assignment or a scheduled break or lunch. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Activities { get; set; } + public List? Activities { get; set; } #nullable restore #else - public List Activities { get; set; } + public List Activities { get; set; } #endif /// The shift label of the shiftItem. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,31 +39,38 @@ public class ShiftItem : ScheduleEntity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ShiftItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ShiftItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ShiftItem(); + return new global::ApiSdk.Models.ShiftItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"activities", n => { Activities = n.GetCollectionOfObjectValues(ShiftActivity.CreateFromDiscriminatorValue)?.ToList(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"notes", n => { Notes = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "activities", n => { Activities = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ShiftActivity.CreateFromDiscriminatorValue)?.AsList(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "notes", n => { Notes = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("activities", Activities); + writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("notes", Notes); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ShiftPreferences.cs b/src/sample/generated/Models/ShiftPreferences.cs index d55e8dcc..ca9253bf 100644 --- a/src/sample/generated/Models/ShiftPreferences.cs +++ b/src/sample/generated/Models/ShiftPreferences.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ShiftPreferences : ChangeTrackedEntity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ShiftPreferences : global::ApiSdk.Models.ChangeTrackedEntity, IParsable + #pragma warning restore CS1591 + { /// Availability of the user to be scheduled for work and its recurrence pattern. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Availability { get; set; } + public List? Availability { get; set; } #nullable restore #else - public List Availability { get; set; } + public List Availability { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ShiftPreferences CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ShiftPreferences CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ShiftPreferences(); + return new global::ApiSdk.Models.ShiftPreferences(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"availability", n => { Availability = n.GetCollectionOfObjectValues(ShiftAvailability.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "availability", n => { Availability = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ShiftAvailability.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("availability", Availability); + writer.WriteCollectionOfObjectValues("availability", Availability); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SignInActivity.cs b/src/sample/generated/Models/SignInActivity.cs index c2c98f24..249182c1 100644 --- a/src/sample/generated/Models/SignInActivity.cs +++ b/src/sample/generated/Models/SignInActivity.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SignInActivity : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SignInActivity : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client attempted to sign into the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Azure AD maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD. + /// The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client attempted (either successfully or unsuccessfully) to sign in to the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Microsoft Entra ID maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Microsoft Entra ID. public DateTimeOffset? LastNonInteractiveSignInDateTime { get; set; } /// Request identifier of the last non-interactive sign-in performed by this user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -18,7 +24,7 @@ public class SignInActivity : IAdditionalDataHolder, IParsable { #else public string LastNonInteractiveSignInRequestId { get; set; } #endif - /// The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user attempted to sign into the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Azure AD maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Azure AD. + /// The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user attempted (either successfully or unsuccessfully) to sign in to the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Microsoft Entra ID maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Microsoft Entra ID. public DateTimeOffset? LastSignInDateTime { get; set; } /// Request identifier of the last interactive sign-in performed by this user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -27,43 +33,65 @@ public class SignInActivity : IAdditionalDataHolder, IParsable { #nullable restore #else public string LastSignInRequestId { get; set; } +#endif + /// The date and time of the user's most recent successful sign-in activity. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + public DateTimeOffset? LastSuccessfulSignInDateTime { get; set; } + /// The request ID of the last successful sign-in. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? LastSuccessfulSignInRequestId { get; set; } +#nullable restore +#else + public string LastSuccessfulSignInRequestId { get; set; } #endif /// - /// Instantiates a new signInActivity and sets the default values. + /// Instantiates a new and sets the default values. /// - public SignInActivity() { + public SignInActivity() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SignInActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SignInActivity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SignInActivity(); + return new global::ApiSdk.Models.SignInActivity(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"lastNonInteractiveSignInDateTime", n => { LastNonInteractiveSignInDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastNonInteractiveSignInRequestId", n => { LastNonInteractiveSignInRequestId = n.GetStringValue(); } }, - {"lastSignInDateTime", n => { LastSignInDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastSignInRequestId", n => { LastSignInRequestId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "lastNonInteractiveSignInDateTime", n => { LastNonInteractiveSignInDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastNonInteractiveSignInRequestId", n => { LastNonInteractiveSignInRequestId = n.GetStringValue(); } }, + { "lastSignInDateTime", n => { LastSignInDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastSignInRequestId", n => { LastSignInRequestId = n.GetStringValue(); } }, + { "lastSuccessfulSignInDateTime", n => { LastSuccessfulSignInDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastSuccessfulSignInRequestId", n => { LastSuccessfulSignInRequestId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastNonInteractiveSignInDateTime", LastNonInteractiveSignInDateTime); writer.WriteStringValue("lastNonInteractiveSignInRequestId", LastNonInteractiveSignInRequestId); writer.WriteDateTimeOffsetValue("lastSignInDateTime", LastSignInDateTime); writer.WriteStringValue("lastSignInRequestId", LastSignInRequestId); + writer.WriteDateTimeOffsetValue("lastSuccessfulSignInDateTime", LastSuccessfulSignInDateTime); + writer.WriteStringValue("lastSuccessfulSignInRequestId", LastSuccessfulSignInRequestId); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SingleValueLegacyExtendedProperty.cs b/src/sample/generated/Models/SingleValueLegacyExtendedProperty.cs index 37b27e01..39933e89 100644 --- a/src/sample/generated/Models/SingleValueLegacyExtendedProperty.cs +++ b/src/sample/generated/Models/SingleValueLegacyExtendedProperty.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SingleValueLegacyExtendedProperty : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SingleValueLegacyExtendedProperty : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// A property value. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class SingleValueLegacyExtendedProperty : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SingleValueLegacyExtendedProperty CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SingleValueLegacyExtendedProperty CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SingleValueLegacyExtendedProperty(); + return new global::ApiSdk.Models.SingleValueLegacyExtendedProperty(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Site.cs b/src/sample/generated/Models/Site.cs index 7d50ca98..8ac7dadf 100644 --- a/src/sample/generated/Models/Site.cs +++ b/src/sample/generated/Models/Site.cs @@ -1,35 +1,41 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.TermStore; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Site : BaseItem, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Site : global::ApiSdk.Models.BaseItem, IParsable + #pragma warning restore CS1591 + { /// The analytics property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemAnalytics? Analytics { get; set; } + public global::ApiSdk.Models.ItemAnalytics? Analytics { get; set; } #nullable restore #else - public ItemAnalytics Analytics { get; set; } + public global::ApiSdk.Models.ItemAnalytics Analytics { get; set; } #endif /// The collection of column definitions reusable across lists under this site. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Columns { get; set; } + public List? Columns { get; set; } #nullable restore #else - public List Columns { get; set; } + public List Columns { get; set; } #endif /// The collection of content types defined for this site. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ContentTypes { get; set; } + public List? ContentTypes { get; set; } #nullable restore #else - public List ContentTypes { get; set; } + public List ContentTypes { get; set; } #endif /// The full title for the site. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -42,187 +48,204 @@ public class Site : BaseItem, IParsable { /// The drive property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Drive? Drive { get; set; } + public global::ApiSdk.Models.Drive? Drive { get; set; } #nullable restore #else - public ApiSdk.Models.Drive Drive { get; set; } + public global::ApiSdk.Models.Drive Drive { get; set; } #endif /// The collection of drives (document libraries) under this site. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Drives { get; set; } + public List? Drives { get; set; } #nullable restore #else - public List Drives { get; set; } + public List Drives { get; set; } #endif /// The error property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PublicError? Error { get; set; } + public global::ApiSdk.Models.PublicError? Error { get; set; } #nullable restore #else - public PublicError Error { get; set; } + public global::ApiSdk.Models.PublicError Error { get; set; } #endif /// The externalColumns property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ExternalColumns { get; set; } + public List? ExternalColumns { get; set; } #nullable restore #else - public List ExternalColumns { get; set; } + public List ExternalColumns { get; set; } #endif - /// The isPersonalSite property + /// Identifies whether the site is personal or not. Read-only. public bool? IsPersonalSite { get; set; } /// Used to address any item contained in this site. This collection can't be enumerated. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Items { get; set; } + public List? Items { get; set; } #nullable restore #else - public List Items { get; set; } + public List Items { get; set; } #endif /// The collection of lists under this site. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Lists { get; set; } + public List? Lists { get; set; } #nullable restore #else - public List Lists { get; set; } + public List Lists { get; set; } #endif /// The onenote property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Onenote? Onenote { get; set; } + public global::ApiSdk.Models.Onenote? Onenote { get; set; } #nullable restore #else - public ApiSdk.Models.Onenote Onenote { get; set; } + public global::ApiSdk.Models.Onenote Onenote { get; set; } #endif /// The collection of long-running operations on the site. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Operations { get; set; } + public List? Operations { get; set; } #nullable restore #else - public List Operations { get; set; } + public List Operations { get; set; } +#endif + /// The collection of pages in the baseSitePages list in this site. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Pages { get; set; } +#nullable restore +#else + public List Pages { get; set; } #endif /// The permissions associated with the site. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Permissions { get; set; } + public List? Permissions { get; set; } #nullable restore #else - public List Permissions { get; set; } + public List Permissions { get; set; } #endif /// The root property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Root? Root { get; set; } + public global::ApiSdk.Models.Root? Root { get; set; } #nullable restore #else - public ApiSdk.Models.Root Root { get; set; } + public global::ApiSdk.Models.Root Root { get; set; } #endif /// The sharepointIds property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SharepointIds? SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds? SharepointIds { get; set; } #nullable restore #else - public ApiSdk.Models.SharepointIds SharepointIds { get; set; } + public global::ApiSdk.Models.SharepointIds SharepointIds { get; set; } #endif /// The siteCollection property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SiteCollection? SiteCollection { get; set; } + public global::ApiSdk.Models.SiteCollection? SiteCollection { get; set; } #nullable restore #else - public ApiSdk.Models.SiteCollection SiteCollection { get; set; } + public global::ApiSdk.Models.SiteCollection SiteCollection { get; set; } #endif /// The collection of the sub-sites under this site. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Sites { get; set; } + public List? Sites { get; set; } #nullable restore #else - public List Sites { get; set; } + public List Sites { get; set; } #endif /// The termStore property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Store? TermStore { get; set; } + public global::ApiSdk.Models.TermStore.Store? TermStore { get; set; } #nullable restore #else - public Store TermStore { get; set; } + public global::ApiSdk.Models.TermStore.Store TermStore { get; set; } #endif /// The collection of termStores under this site. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TermStores { get; set; } + public List? TermStores { get; set; } #nullable restore #else - public List TermStores { get; set; } + public List TermStores { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Site CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Site CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Site(); + return new global::ApiSdk.Models.Site(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"analytics", n => { Analytics = n.GetObjectValue(ItemAnalytics.CreateFromDiscriminatorValue); } }, - {"columns", n => { Columns = n.GetCollectionOfObjectValues(ColumnDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"contentTypes", n => { ContentTypes = n.GetCollectionOfObjectValues(ContentType.CreateFromDiscriminatorValue)?.ToList(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"drive", n => { Drive = n.GetObjectValue(ApiSdk.Models.Drive.CreateFromDiscriminatorValue); } }, - {"drives", n => { Drives = n.GetCollectionOfObjectValues(ApiSdk.Models.Drive.CreateFromDiscriminatorValue)?.ToList(); } }, - {"error", n => { Error = n.GetObjectValue(PublicError.CreateFromDiscriminatorValue); } }, - {"externalColumns", n => { ExternalColumns = n.GetCollectionOfObjectValues(ColumnDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"isPersonalSite", n => { IsPersonalSite = n.GetBoolValue(); } }, - {"items", n => { Items = n.GetCollectionOfObjectValues(BaseItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"lists", n => { Lists = n.GetCollectionOfObjectValues(List.CreateFromDiscriminatorValue)?.ToList(); } }, - {"onenote", n => { Onenote = n.GetObjectValue(ApiSdk.Models.Onenote.CreateFromDiscriminatorValue); } }, - {"operations", n => { Operations = n.GetCollectionOfObjectValues(RichLongRunningOperation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"permissions", n => { Permissions = n.GetCollectionOfObjectValues(Permission.CreateFromDiscriminatorValue)?.ToList(); } }, - {"root", n => { Root = n.GetObjectValue(ApiSdk.Models.Root.CreateFromDiscriminatorValue); } }, - {"sharepointIds", n => { SharepointIds = n.GetObjectValue(ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, - {"siteCollection", n => { SiteCollection = n.GetObjectValue(ApiSdk.Models.SiteCollection.CreateFromDiscriminatorValue); } }, - {"sites", n => { Sites = n.GetCollectionOfObjectValues(Site.CreateFromDiscriminatorValue)?.ToList(); } }, - {"termStore", n => { TermStore = n.GetObjectValue(Store.CreateFromDiscriminatorValue); } }, - {"termStores", n => { TermStores = n.GetCollectionOfObjectValues(Store.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "analytics", n => { Analytics = n.GetObjectValue(global::ApiSdk.Models.ItemAnalytics.CreateFromDiscriminatorValue); } }, + { "columns", n => { Columns = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ColumnDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "contentTypes", n => { ContentTypes = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ContentType.CreateFromDiscriminatorValue)?.AsList(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "drive", n => { Drive = n.GetObjectValue(global::ApiSdk.Models.Drive.CreateFromDiscriminatorValue); } }, + { "drives", n => { Drives = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Drive.CreateFromDiscriminatorValue)?.AsList(); } }, + { "error", n => { Error = n.GetObjectValue(global::ApiSdk.Models.PublicError.CreateFromDiscriminatorValue); } }, + { "externalColumns", n => { ExternalColumns = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ColumnDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "isPersonalSite", n => { IsPersonalSite = n.GetBoolValue(); } }, + { "items", n => { Items = n.GetCollectionOfObjectValues(global::ApiSdk.Models.BaseItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "lists", n => { Lists = n.GetCollectionOfObjectValues(global::ApiSdk.Models.List.CreateFromDiscriminatorValue)?.AsList(); } }, + { "onenote", n => { Onenote = n.GetObjectValue(global::ApiSdk.Models.Onenote.CreateFromDiscriminatorValue); } }, + { "operations", n => { Operations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.RichLongRunningOperation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pages", n => { Pages = n.GetCollectionOfObjectValues(global::ApiSdk.Models.BaseSitePage.CreateFromDiscriminatorValue)?.AsList(); } }, + { "permissions", n => { Permissions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Permission.CreateFromDiscriminatorValue)?.AsList(); } }, + { "root", n => { Root = n.GetObjectValue(global::ApiSdk.Models.Root.CreateFromDiscriminatorValue); } }, + { "sharepointIds", n => { SharepointIds = n.GetObjectValue(global::ApiSdk.Models.SharepointIds.CreateFromDiscriminatorValue); } }, + { "siteCollection", n => { SiteCollection = n.GetObjectValue(global::ApiSdk.Models.SiteCollection.CreateFromDiscriminatorValue); } }, + { "sites", n => { Sites = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Site.CreateFromDiscriminatorValue)?.AsList(); } }, + { "termStore", n => { TermStore = n.GetObjectValue(global::ApiSdk.Models.TermStore.Store.CreateFromDiscriminatorValue); } }, + { "termStores", n => { TermStores = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.Store.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("analytics", Analytics); - writer.WriteCollectionOfObjectValues("columns", Columns); - writer.WriteCollectionOfObjectValues("contentTypes", ContentTypes); + writer.WriteObjectValue("analytics", Analytics); + writer.WriteCollectionOfObjectValues("columns", Columns); + writer.WriteCollectionOfObjectValues("contentTypes", ContentTypes); writer.WriteStringValue("displayName", DisplayName); - writer.WriteObjectValue("drive", Drive); - writer.WriteCollectionOfObjectValues("drives", Drives); - writer.WriteObjectValue("error", Error); - writer.WriteCollectionOfObjectValues("externalColumns", ExternalColumns); + writer.WriteObjectValue("drive", Drive); + writer.WriteCollectionOfObjectValues("drives", Drives); + writer.WriteObjectValue("error", Error); + writer.WriteCollectionOfObjectValues("externalColumns", ExternalColumns); writer.WriteBoolValue("isPersonalSite", IsPersonalSite); - writer.WriteCollectionOfObjectValues("items", Items); - writer.WriteCollectionOfObjectValues("lists", Lists); - writer.WriteObjectValue("onenote", Onenote); - writer.WriteCollectionOfObjectValues("operations", Operations); - writer.WriteCollectionOfObjectValues("permissions", Permissions); - writer.WriteObjectValue("root", Root); - writer.WriteObjectValue("sharepointIds", SharepointIds); - writer.WriteObjectValue("siteCollection", SiteCollection); - writer.WriteCollectionOfObjectValues("sites", Sites); - writer.WriteObjectValue("termStore", TermStore); - writer.WriteCollectionOfObjectValues("termStores", TermStores); + writer.WriteCollectionOfObjectValues("items", Items); + writer.WriteCollectionOfObjectValues("lists", Lists); + writer.WriteObjectValue("onenote", Onenote); + writer.WriteCollectionOfObjectValues("operations", Operations); + writer.WriteCollectionOfObjectValues("pages", Pages); + writer.WriteCollectionOfObjectValues("permissions", Permissions); + writer.WriteObjectValue("root", Root); + writer.WriteObjectValue("sharepointIds", SharepointIds); + writer.WriteObjectValue("siteCollection", SiteCollection); + writer.WriteCollectionOfObjectValues("sites", Sites); + writer.WriteObjectValue("termStore", TermStore); + writer.WriteCollectionOfObjectValues("termStores", TermStores); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SiteArchivalDetails.cs b/src/sample/generated/Models/SiteArchivalDetails.cs new file mode 100644 index 00000000..0bcd24c0 --- /dev/null +++ b/src/sample/generated/Models/SiteArchivalDetails.cs @@ -0,0 +1,59 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SiteArchivalDetails : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The archiveStatus property + public global::ApiSdk.Models.SiteArchiveStatus? ArchiveStatus { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SiteArchivalDetails() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.SiteArchivalDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.SiteArchivalDetails(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archiveStatus", n => { ArchiveStatus = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("archiveStatus", ArchiveStatus); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SiteArchiveStatus.cs b/src/sample/generated/Models/SiteArchiveStatus.cs new file mode 100644 index 00000000..2cef3392 --- /dev/null +++ b/src/sample/generated/Models/SiteArchiveStatus.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SiteArchiveStatus + #pragma warning restore CS1591 + { + [EnumMember(Value = "recentlyArchived")] + #pragma warning disable CS1591 + RecentlyArchived, + #pragma warning restore CS1591 + [EnumMember(Value = "fullyArchived")] + #pragma warning disable CS1591 + FullyArchived, + #pragma warning restore CS1591 + [EnumMember(Value = "reactivating")] + #pragma warning disable CS1591 + Reactivating, + #pragma warning restore CS1591 + [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 + UnknownFutureValue, + #pragma warning restore CS1591 + } +} diff --git a/src/sample/generated/Models/SiteCollection.cs b/src/sample/generated/Models/SiteCollection.cs index 322aade7..4b16460a 100644 --- a/src/sample/generated/Models/SiteCollection.cs +++ b/src/sample/generated/Models/SiteCollection.cs @@ -1,14 +1,28 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SiteCollection : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SiteCollection : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The geographic region code for where this site collection resides. Read-only. + /// The archivalDetails property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.SiteArchivalDetails? ArchivalDetails { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.SiteArchivalDetails ArchivalDetails { get; set; } +#endif + /// The geographic region code for where this site collection resides. Only present for multi-geo tenants. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DataLocationCode { get; set; } @@ -27,45 +41,55 @@ public class SiteCollection : IAdditionalDataHolder, IParsable { /// The root property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Root? Root { get; set; } + public global::ApiSdk.Models.Root? Root { get; set; } #nullable restore #else - public ApiSdk.Models.Root Root { get; set; } + public global::ApiSdk.Models.Root Root { get; set; } #endif /// - /// Instantiates a new siteCollection and sets the default values. + /// Instantiates a new and sets the default values. /// - public SiteCollection() { + public SiteCollection() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SiteCollection CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SiteCollection CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SiteCollection(); + return new global::ApiSdk.Models.SiteCollection(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"dataLocationCode", n => { DataLocationCode = n.GetStringValue(); } }, - {"hostname", n => { Hostname = n.GetStringValue(); } }, - {"root", n => { Root = n.GetObjectValue(ApiSdk.Models.Root.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "archivalDetails", n => { ArchivalDetails = n.GetObjectValue(global::ApiSdk.Models.SiteArchivalDetails.CreateFromDiscriminatorValue); } }, + { "dataLocationCode", n => { DataLocationCode = n.GetStringValue(); } }, + { "hostname", n => { Hostname = n.GetStringValue(); } }, + { "root", n => { Root = n.GetObjectValue(global::ApiSdk.Models.Root.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("archivalDetails", ArchivalDetails); writer.WriteStringValue("dataLocationCode", DataLocationCode); writer.WriteStringValue("hostname", Hostname); - writer.WriteObjectValue("root", Root); + writer.WriteObjectValue("root", Root); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SizeRange.cs b/src/sample/generated/Models/SizeRange.cs index e02fb0fd..65b1ae37 100644 --- a/src/sample/generated/Models/SizeRange.cs +++ b/src/sample/generated/Models/SizeRange.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SizeRange : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SizeRange : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The maximum size (in kilobytes) that an incoming message must have in order for a condition or exception to apply. @@ -13,33 +19,40 @@ public class SizeRange : IAdditionalDataHolder, IParsable { /// The minimum size (in kilobytes) that an incoming message must have in order for a condition or exception to apply. public int? MinimumSize { get; set; } /// - /// Instantiates a new sizeRange and sets the default values. + /// Instantiates a new and sets the default values. /// - public SizeRange() { + public SizeRange() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SizeRange CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SizeRange CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SizeRange(); + return new global::ApiSdk.Models.SizeRange(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"maximumSize", n => { MaximumSize = n.GetIntValue(); } }, - {"minimumSize", n => { MinimumSize = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "maximumSize", n => { MaximumSize = n.GetIntValue(); } }, + { "minimumSize", n => { MinimumSize = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("maximumSize", MaximumSize); writer.WriteIntValue("minimumSize", MinimumSize); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SoftwareOathAuthenticationMethod.cs b/src/sample/generated/Models/SoftwareOathAuthenticationMethod.cs index b3560eb2..ea9e2f4e 100644 --- a/src/sample/generated/Models/SoftwareOathAuthenticationMethod.cs +++ b/src/sample/generated/Models/SoftwareOathAuthenticationMethod.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SoftwareOathAuthenticationMethod : AuthenticationMethod, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SoftwareOathAuthenticationMethod : global::ApiSdk.Models.AuthenticationMethod, IParsable + #pragma warning restore CS1591 + { /// The secret key of the method. Always returns null. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class SoftwareOathAuthenticationMethod : AuthenticationMethod, IParsable /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SoftwareOathAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SoftwareOathAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SoftwareOathAuthenticationMethod(); + return new global::ApiSdk.Models.SoftwareOathAuthenticationMethod(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"secretKey", n => { SecretKey = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "secretKey", n => { SecretKey = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("secretKey", SecretKey); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SpaApplication.cs b/src/sample/generated/Models/SpaApplication.cs index 16985f9f..b607f2bc 100644 --- a/src/sample/generated/Models/SpaApplication.cs +++ b/src/sample/generated/Models/SpaApplication.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SpaApplication : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SpaApplication : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Specifies the URLs where user tokens are sent for sign-in, or the redirect URIs where OAuth 2.0 authorization codes and access tokens are sent. @@ -17,35 +23,43 @@ public class SpaApplication : IAdditionalDataHolder, IParsable { public List RedirectUris { get; set; } #endif /// - /// Instantiates a new spaApplication and sets the default values. + /// Instantiates a new and sets the default values. /// - public SpaApplication() { + public SpaApplication() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SpaApplication CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SpaApplication CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SpaApplication(); + return new global::ApiSdk.Models.SpaApplication(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("redirectUris", RedirectUris); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SpecialFolder.cs b/src/sample/generated/Models/SpecialFolder.cs index 81302d2d..17b91a20 100644 --- a/src/sample/generated/Models/SpecialFolder.cs +++ b/src/sample/generated/Models/SpecialFolder.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SpecialFolder : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SpecialFolder : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The unique identifier for this item in the /drive/special collection @@ -17,35 +23,43 @@ public class SpecialFolder : IAdditionalDataHolder, IParsable { public string Name { get; set; } #endif /// - /// Instantiates a new specialFolder and sets the default values. + /// Instantiates a new and sets the default values. /// - public SpecialFolder() { + public SpecialFolder() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SpecialFolder CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SpecialFolder CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SpecialFolder(); + return new global::ApiSdk.Models.SpecialFolder(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"name", n => { Name = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Status.cs b/src/sample/generated/Models/Status.cs index 3378c670..28331d00 100644 --- a/src/sample/generated/Models/Status.cs +++ b/src/sample/generated/Models/Status.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum Status { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum Status + #pragma warning restore CS1591 + { [EnumMember(Value = "active")] + #pragma warning disable CS1591 Active, + #pragma warning restore CS1591 [EnumMember(Value = "updated")] + #pragma warning disable CS1591 Updated, + #pragma warning restore CS1591 [EnumMember(Value = "deleted")] + #pragma warning disable CS1591 Deleted, + #pragma warning restore CS1591 [EnumMember(Value = "ignored")] + #pragma warning disable CS1591 Ignored, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/StoragePlanInformation.cs b/src/sample/generated/Models/StoragePlanInformation.cs index 0ba36fb9..3a93da61 100644 --- a/src/sample/generated/Models/StoragePlanInformation.cs +++ b/src/sample/generated/Models/StoragePlanInformation.cs @@ -1,45 +1,59 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class StoragePlanInformation : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StoragePlanInformation : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Indicates whether there are higher storage quota plans available. Read-only. public bool? UpgradeAvailable { get; set; } /// - /// Instantiates a new storagePlanInformation and sets the default values. + /// Instantiates a new and sets the default values. /// - public StoragePlanInformation() { + public StoragePlanInformation() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static StoragePlanInformation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.StoragePlanInformation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new StoragePlanInformation(); + return new global::ApiSdk.Models.StoragePlanInformation(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"upgradeAvailable", n => { UpgradeAvailable = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "upgradeAvailable", n => { UpgradeAvailable = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("upgradeAvailable", UpgradeAvailable); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/StorageQuotaBreakdown.cs b/src/sample/generated/Models/StorageQuotaBreakdown.cs new file mode 100644 index 00000000..fa3e0a95 --- /dev/null +++ b/src/sample/generated/Models/StorageQuotaBreakdown.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StorageQuotaBreakdown : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// The manageWebUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ManageWebUrl { get; set; } +#nullable restore +#else + public string ManageWebUrl { get; set; } +#endif + /// The used property + public long? Used { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.StorageQuotaBreakdown CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.StorageQuotaBreakdown(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "manageWebUrl", n => { ManageWebUrl = n.GetStringValue(); } }, + { "used", n => { Used = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteStringValue("manageWebUrl", ManageWebUrl); + writer.WriteLongValue("used", Used); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/StringKeyAttributeMappingSourceValuePair.cs b/src/sample/generated/Models/StringKeyAttributeMappingSourceValuePair.cs index 88b03b08..c09fe678 100644 --- a/src/sample/generated/Models/StringKeyAttributeMappingSourceValuePair.cs +++ b/src/sample/generated/Models/StringKeyAttributeMappingSourceValuePair.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class StringKeyAttributeMappingSourceValuePair : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StringKeyAttributeMappingSourceValuePair : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The name of the parameter. @@ -19,43 +25,51 @@ public class StringKeyAttributeMappingSourceValuePair : IAdditionalDataHolder, I /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public AttributeMappingSource? Value { get; set; } + public global::ApiSdk.Models.AttributeMappingSource? Value { get; set; } #nullable restore #else - public AttributeMappingSource Value { get; set; } + public global::ApiSdk.Models.AttributeMappingSource Value { get; set; } #endif /// - /// Instantiates a new stringKeyAttributeMappingSourceValuePair and sets the default values. + /// Instantiates a new and sets the default values. /// - public StringKeyAttributeMappingSourceValuePair() { + public StringKeyAttributeMappingSourceValuePair() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static StringKeyAttributeMappingSourceValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.StringKeyAttributeMappingSourceValuePair CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new StringKeyAttributeMappingSourceValuePair(); + return new global::ApiSdk.Models.StringKeyAttributeMappingSourceValuePair(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"key", n => { Key = n.GetStringValue(); } }, - {"value", n => { Value = n.GetObjectValue(AttributeMappingSource.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "value", n => { Value = n.GetObjectValue(global::ApiSdk.Models.AttributeMappingSource.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); - writer.WriteObjectValue("value", Value); + writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/StringKeyLongValuePair.cs b/src/sample/generated/Models/StringKeyLongValuePair.cs index 607eaf01..ae33010a 100644 --- a/src/sample/generated/Models/StringKeyLongValuePair.cs +++ b/src/sample/generated/Models/StringKeyLongValuePair.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class StringKeyLongValuePair : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StringKeyLongValuePair : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The mapping of the user type from the source system to the target system. For example:User to User - For Azure AD to Azure AD synchronization worker to user - For Workday to Azure AD synchronization. + /// The mapping of the user type from the source system to the target system. For example:User to User - For Microsoft Entra ID to Microsoft Entra ID synchronization worker to user - For Workday to Microsoft Entra synchronization. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Key { get; set; } @@ -19,33 +25,40 @@ public class StringKeyLongValuePair : IAdditionalDataHolder, IParsable { /// Total number of synchronized objects. public long? Value { get; set; } /// - /// Instantiates a new stringKeyLongValuePair and sets the default values. + /// Instantiates a new and sets the default values. /// - public StringKeyLongValuePair() { + public StringKeyLongValuePair() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static StringKeyLongValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.StringKeyLongValuePair CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new StringKeyLongValuePair(); + return new global::ApiSdk.Models.StringKeyLongValuePair(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"key", n => { Key = n.GetStringValue(); } }, - {"value", n => { Value = n.GetLongValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "value", n => { Value = n.GetLongValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteLongValue("value", Value); @@ -53,3 +66,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/StringKeyStringValuePair.cs b/src/sample/generated/Models/StringKeyStringValuePair.cs index 9325037b..cc292d99 100644 --- a/src/sample/generated/Models/StringKeyStringValuePair.cs +++ b/src/sample/generated/Models/StringKeyStringValuePair.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class StringKeyStringValuePair : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StringKeyStringValuePair : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Key. @@ -25,33 +31,40 @@ public class StringKeyStringValuePair : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new stringKeyStringValuePair and sets the default values. + /// Instantiates a new and sets the default values. /// - public StringKeyStringValuePair() { + public StringKeyStringValuePair() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static StringKeyStringValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.StringKeyStringValuePair CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new StringKeyStringValuePair(); + return new global::ApiSdk.Models.StringKeyStringValuePair(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"key", n => { Key = n.GetStringValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("value", Value); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/StsPolicy.cs b/src/sample/generated/Models/StsPolicy.cs index 29336c59..9eed77e3 100644 --- a/src/sample/generated/Models/StsPolicy.cs +++ b/src/sample/generated/Models/StsPolicy.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class StsPolicy : PolicyBase, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class StsPolicy : global::ApiSdk.Models.PolicyBase, IParsable + #pragma warning restore CS1591 + { /// The appliesTo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppliesTo { get; set; } + public List? AppliesTo { get; set; } #nullable restore #else - public List AppliesTo { get; set; } + public List AppliesTo { get; set; } #endif /// A string collection containing a JSON string that defines the rules and settings for a policy. The syntax for the definition differs for each derived policy type. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -27,31 +33,38 @@ public class StsPolicy : PolicyBase, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new StsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.StsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new StsPolicy(); + return new global::ApiSdk.Models.StsPolicy(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"appliesTo", n => { AppliesTo = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"definition", n => { Definition = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"isOrganizationDefault", n => { IsOrganizationDefault = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "appliesTo", n => { AppliesTo = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "definition", n => { Definition = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "isOrganizationDefault", n => { IsOrganizationDefault = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("appliesTo", AppliesTo); + writer.WriteCollectionOfObjectValues("appliesTo", AppliesTo); writer.WriteCollectionOfPrimitiveValues("definition", Definition); writer.WriteBoolValue("isOrganizationDefault", IsOrganizationDefault); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Subscription.cs b/src/sample/generated/Models/Subscription.cs index 4767076f..4f02e158 100644 --- a/src/sample/generated/Models/Subscription.cs +++ b/src/sample/generated/Models/Subscription.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Subscription : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Subscription : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Optional. Identifier of the application used to create the subscription. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -14,7 +20,7 @@ public class Subscription : Entity, IParsable { #else public string ApplicationId { get; set; } #endif - /// Required. Indicates the type of change in the subscribed resource that will raise a change notification. The supported values are: created, updated, deleted. Multiple values can be combined using a comma-separated list. Note: Drive root item and list change notifications support only the updated changeType. User and group change notifications support updated and deleted changeType. Use updated to receive notifications when user or group is created, updated or soft deleted. Use deleted to receive notifications when user or group is permanently deleted. + /// Required. Indicates the type of change in the subscribed resource that raises a change notification. The supported values are: created, updated, deleted. Multiple values can be combined using a comma-separated list. Note: Drive root item and list change notifications support only the updated changeType. User and group change notifications support updated and deleted changeType. Use updated to receive notifications when user or group is created, updated, or soft deleted. Use deleted to receive notifications when user or group is permanently deleted. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ChangeType { get; set; } @@ -30,7 +36,7 @@ public class Subscription : Entity, IParsable { #else public string ClientState { get; set; } #endif - /// Optional. Identifier of the user or service principal that created the subscription. If the app used delegated permissions to create the subscription, this field contains the id of the signed-in user the app called on behalf of. If the app used application permissions, this field contains the id of the service principal corresponding to the app. Read-only. + /// Optional. Identifier of the user or service principal that created the subscription. If the app used delegated permissions to create the subscription, this field contains the ID of the signed-in user the app called on behalf of. If the app used application permissions, this field contains the ID of the service principal corresponding to the app. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CreatorId { get; set; } @@ -54,7 +60,7 @@ public class Subscription : Entity, IParsable { #else public string EncryptionCertificateId { get; set; } #endif - /// Required. Specifies the date and time when the webhook subscription expires. The time is in UTC, and can be an amount of time from subscription creation that varies for the resource subscribed to. For the maximum supported subscription length of time, see the table below. + /// Required. Specifies the date and time when the webhook subscription expires. The time is in UTC, and can be an amount of time from subscription creation that varies for the resource subscribed to. For the maximum supported subscription length of time, see Subscription lifetime. public DateTimeOffset? ExpirationDateTime { get; set; } /// Optional. When set to true, change notifications include resource data (such as content of a chat message). public bool? IncludeResourceData { get; set; } @@ -74,7 +80,7 @@ public class Subscription : Entity, IParsable { #else public string LifecycleNotificationUrl { get; set; } #endif - /// Optional. OData query options for specifying value for the targeting resource. Clients receive notifications when resource reaches the state matching the query options provided here. With this new property in the subscription creation payload along with all existing properties, Webhooks will deliver notifications whenever a resource reaches the desired state mentioned in the notificationQueryOptions property. For example, when the print job is completed or when a print job resource isFetchable property value becomes true etc. Supported only for Universal Print Service. For more information, see Subscribe to change notifications from cloud printing APIs using Microsoft Graph. + /// Optional. OData query options for specifying value for the targeting resource. Clients receive notifications when resource reaches the state matching the query options provided here. With this new property in the subscription creation payload along with all existing properties, Webhooks deliver notifications whenever a resource reaches the desired state mentioned in the notificationQueryOptions property. For example, when the print job is completed or when a print job resource isFetchable property value becomes true etc. Supported only for Universal Print Service. For more information, see Subscribe to change notifications from cloud printing APIs using Microsoft Graph. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? NotificationQueryOptions { get; set; } @@ -82,7 +88,7 @@ public class Subscription : Entity, IParsable { #else public string NotificationQueryOptions { get; set; } #endif - /// Required. The URL of the endpoint that will receive the change notifications. This URL must make use of the HTTPS protocol. Any query string parameter included in the notificationUrl property will be included in the HTTP POST request when Microsoft Graph sends the change notifications. + /// Required. The URL of the endpoint that receives the change notifications. This URL must make use of the HTTPS protocol. Any query string parameter included in the notificationUrl property is included in the HTTP POST request when Microsoft Graph sends the change notifications. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? NotificationUrl { get; set; } @@ -90,7 +96,7 @@ public class Subscription : Entity, IParsable { #else public string NotificationUrl { get; set; } #endif - /// Optional. The app ID that the subscription service can use to generate the validation token. This allows the client to validate the authenticity of the notification received. + /// Optional. The app ID that the subscription service can use to generate the validation token. The value allows the client to validate the authenticity of the notification received. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? NotificationUrlAppId { get; set; } @@ -98,7 +104,7 @@ public class Subscription : Entity, IParsable { #else public string NotificationUrlAppId { get; set; } #endif - /// Required. Specifies the resource that will be monitored for changes. Do not include the base URL (https://graph.microsoft.com/v1.0/). See the possible resource path values for each supported resource. + /// Required. Specifies the resource that is monitored for changes. Don't include the base URL (https://graph.microsoft.com/v1.0/). See the possible resource path values for each supported resource. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Resource { get; set; } @@ -109,37 +115,43 @@ public class Subscription : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Subscription CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Subscription CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Subscription(); + return new global::ApiSdk.Models.Subscription(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"applicationId", n => { ApplicationId = n.GetStringValue(); } }, - {"changeType", n => { ChangeType = n.GetStringValue(); } }, - {"clientState", n => { ClientState = n.GetStringValue(); } }, - {"creatorId", n => { CreatorId = n.GetStringValue(); } }, - {"encryptionCertificate", n => { EncryptionCertificate = n.GetStringValue(); } }, - {"encryptionCertificateId", n => { EncryptionCertificateId = n.GetStringValue(); } }, - {"expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"includeResourceData", n => { IncludeResourceData = n.GetBoolValue(); } }, - {"latestSupportedTlsVersion", n => { LatestSupportedTlsVersion = n.GetStringValue(); } }, - {"lifecycleNotificationUrl", n => { LifecycleNotificationUrl = n.GetStringValue(); } }, - {"notificationQueryOptions", n => { NotificationQueryOptions = n.GetStringValue(); } }, - {"notificationUrl", n => { NotificationUrl = n.GetStringValue(); } }, - {"notificationUrlAppId", n => { NotificationUrlAppId = n.GetStringValue(); } }, - {"resource", n => { Resource = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "applicationId", n => { ApplicationId = n.GetStringValue(); } }, + { "changeType", n => { ChangeType = n.GetStringValue(); } }, + { "clientState", n => { ClientState = n.GetStringValue(); } }, + { "creatorId", n => { CreatorId = n.GetStringValue(); } }, + { "encryptionCertificate", n => { EncryptionCertificate = n.GetStringValue(); } }, + { "encryptionCertificateId", n => { EncryptionCertificateId = n.GetStringValue(); } }, + { "expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "includeResourceData", n => { IncludeResourceData = n.GetBoolValue(); } }, + { "latestSupportedTlsVersion", n => { LatestSupportedTlsVersion = n.GetStringValue(); } }, + { "lifecycleNotificationUrl", n => { LifecycleNotificationUrl = n.GetStringValue(); } }, + { "notificationQueryOptions", n => { NotificationQueryOptions = n.GetStringValue(); } }, + { "notificationUrl", n => { NotificationUrl = n.GetStringValue(); } }, + { "notificationUrlAppId", n => { NotificationUrlAppId = n.GetStringValue(); } }, + { "resource", n => { Resource = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("applicationId", ApplicationId); @@ -159,3 +171,4 @@ public class Subscription : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SwapShiftsChangeRequest.cs b/src/sample/generated/Models/SwapShiftsChangeRequest.cs index f8647eb9..8d48364a 100644 --- a/src/sample/generated/Models/SwapShiftsChangeRequest.cs +++ b/src/sample/generated/Models/SwapShiftsChangeRequest.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SwapShiftsChangeRequest : OfferShiftRequest, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SwapShiftsChangeRequest : global::ApiSdk.Models.OfferShiftRequest, IParsable + #pragma warning restore CS1591 + { /// ShiftId for the recipient user with whom the request is to swap. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class SwapShiftsChangeRequest : OfferShiftRequest, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SwapShiftsChangeRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SwapShiftsChangeRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SwapShiftsChangeRequest(); + return new global::ApiSdk.Models.SwapShiftsChangeRequest(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"recipientShiftId", n => { RecipientShiftId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "recipientShiftId", n => { RecipientShiftId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("recipientShiftId", RecipientShiftId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Synchronization.cs b/src/sample/generated/Models/Synchronization.cs index 0d92add3..7e7d455e 100644 --- a/src/sample/generated/Models/Synchronization.cs +++ b/src/sample/generated/Models/Synchronization.cs @@ -1,63 +1,76 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Synchronization : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Synchronization : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Performs synchronization by periodically running in the background, polling for changes in one directory, and pushing them to another directory. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Jobs { get; set; } + public List? Jobs { get; set; } #nullable restore #else - public List Jobs { get; set; } + public List Jobs { get; set; } #endif /// Represents a collection of credentials to access provisioned cloud applications. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Secrets { get; set; } + public List? Secrets { get; set; } #nullable restore #else - public List Secrets { get; set; } + public List Secrets { get; set; } #endif /// Preconfigured synchronization settings for a particular application. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Templates { get; set; } + public List? Templates { get; set; } #nullable restore #else - public List Templates { get; set; } + public List Templates { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Synchronization CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Synchronization CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Synchronization(); + return new global::ApiSdk.Models.Synchronization(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"jobs", n => { Jobs = n.GetCollectionOfObjectValues(SynchronizationJob.CreateFromDiscriminatorValue)?.ToList(); } }, - {"secrets", n => { Secrets = n.GetCollectionOfObjectValues(SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, - {"templates", n => { Templates = n.GetCollectionOfObjectValues(SynchronizationTemplate.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "jobs", n => { Jobs = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SynchronizationJob.CreateFromDiscriminatorValue)?.AsList(); } }, + { "secrets", n => { Secrets = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue)?.AsList(); } }, + { "templates", n => { Templates = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SynchronizationTemplate.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("jobs", Jobs); - writer.WriteCollectionOfObjectValues("secrets", Secrets); - writer.WriteCollectionOfObjectValues("templates", Templates); + writer.WriteCollectionOfObjectValues("jobs", Jobs); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteCollectionOfObjectValues("templates", Templates); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationError.cs b/src/sample/generated/Models/SynchronizationError.cs index 9540aff4..f165c805 100644 --- a/src/sample/generated/Models/SynchronizationError.cs +++ b/src/sample/generated/Models/SynchronizationError.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationError : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationError : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The error code. For example, AzureDirectoryB2BManagementPolicyCheckFailure. @@ -27,34 +33,41 @@ public class SynchronizationError : IAdditionalDataHolder, IParsable { /// The action to take to resolve the error. For example, false. public bool? TenantActionable { get; set; } /// - /// Instantiates a new synchronizationError and sets the default values. + /// Instantiates a new and sets the default values. /// - public SynchronizationError() { + public SynchronizationError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SynchronizationError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SynchronizationError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationError(); + return new global::ApiSdk.Models.SynchronizationError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"message", n => { Message = n.GetStringValue(); } }, - {"tenantActionable", n => { TenantActionable = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "message", n => { Message = n.GetStringValue(); } }, + { "tenantActionable", n => { TenantActionable = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationJob.cs b/src/sample/generated/Models/SynchronizationJob.cs index 28f1ac5c..18840caf 100644 --- a/src/sample/generated/Models/SynchronizationJob.cs +++ b/src/sample/generated/Models/SynchronizationJob.cs @@ -1,42 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationJob : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationJob : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The bulkUpload property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.BulkUpload? BulkUpload { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.BulkUpload BulkUpload { get; set; } +#endif /// The schedule property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationSchedule? Schedule { get; set; } + public global::ApiSdk.Models.SynchronizationSchedule? Schedule { get; set; } #nullable restore #else - public SynchronizationSchedule Schedule { get; set; } + public global::ApiSdk.Models.SynchronizationSchedule Schedule { get; set; } #endif /// The schema property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationSchema? Schema { get; set; } + public global::ApiSdk.Models.SynchronizationSchema? Schema { get; set; } #nullable restore #else - public SynchronizationSchema Schema { get; set; } + public global::ApiSdk.Models.SynchronizationSchema Schema { get; set; } #endif /// The status property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationStatus? Status { get; set; } + public global::ApiSdk.Models.SynchronizationStatus? Status { get; set; } #nullable restore #else - public SynchronizationStatus Status { get; set; } + public global::ApiSdk.Models.SynchronizationStatus Status { get; set; } #endif /// Settings associated with the job. Some settings are inherited from the template. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SynchronizationJobSettings { get; set; } + public List? SynchronizationJobSettings { get; set; } #nullable restore #else - public List SynchronizationJobSettings { get; set; } + public List SynchronizationJobSettings { get; set; } #endif /// Identifier of the synchronization template this job is based on. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -49,35 +63,44 @@ public class SynchronizationJob : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SynchronizationJob CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SynchronizationJob CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationJob(); + return new global::ApiSdk.Models.SynchronizationJob(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"schedule", n => { Schedule = n.GetObjectValue(SynchronizationSchedule.CreateFromDiscriminatorValue); } }, - {"schema", n => { Schema = n.GetObjectValue(SynchronizationSchema.CreateFromDiscriminatorValue); } }, - {"status", n => { Status = n.GetObjectValue(SynchronizationStatus.CreateFromDiscriminatorValue); } }, - {"synchronizationJobSettings", n => { SynchronizationJobSettings = n.GetCollectionOfObjectValues(KeyValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, - {"templateId", n => { TemplateId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "bulkUpload", n => { BulkUpload = n.GetObjectValue(global::ApiSdk.Models.BulkUpload.CreateFromDiscriminatorValue); } }, + { "schedule", n => { Schedule = n.GetObjectValue(global::ApiSdk.Models.SynchronizationSchedule.CreateFromDiscriminatorValue); } }, + { "schema", n => { Schema = n.GetObjectValue(global::ApiSdk.Models.SynchronizationSchema.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetObjectValue(global::ApiSdk.Models.SynchronizationStatus.CreateFromDiscriminatorValue); } }, + { "synchronizationJobSettings", n => { SynchronizationJobSettings = n.GetCollectionOfObjectValues(global::ApiSdk.Models.KeyValuePair.CreateFromDiscriminatorValue)?.AsList(); } }, + { "templateId", n => { TemplateId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("schedule", Schedule); - writer.WriteObjectValue("schema", Schema); - writer.WriteObjectValue("status", Status); - writer.WriteCollectionOfObjectValues("synchronizationJobSettings", SynchronizationJobSettings); + writer.WriteObjectValue("bulkUpload", BulkUpload); + writer.WriteObjectValue("schedule", Schedule); + writer.WriteObjectValue("schema", Schema); + writer.WriteObjectValue("status", Status); + writer.WriteCollectionOfObjectValues("synchronizationJobSettings", SynchronizationJobSettings); writer.WriteStringValue("templateId", TemplateId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationMetadata.cs b/src/sample/generated/Models/SynchronizationMetadata.cs index 218c2b4e..0b06308e 100644 --- a/src/sample/generated/Models/SynchronizationMetadata.cs +++ b/src/sample/generated/Models/SynchronizationMetadata.cs @@ -1,25 +1,48 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum SynchronizationMetadata { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SynchronizationMetadata + #pragma warning restore CS1591 + { [EnumMember(Value = "GalleryApplicationIdentifier")] + #pragma warning disable CS1591 GalleryApplicationIdentifier, + #pragma warning restore CS1591 [EnumMember(Value = "GalleryApplicationKey")] + #pragma warning disable CS1591 GalleryApplicationKey, + #pragma warning restore CS1591 [EnumMember(Value = "IsOAuthEnabled")] + #pragma warning disable CS1591 IsOAuthEnabled, + #pragma warning restore CS1591 [EnumMember(Value = "IsSynchronizationAgentAssignmentRequired")] + #pragma warning disable CS1591 IsSynchronizationAgentAssignmentRequired, + #pragma warning restore CS1591 [EnumMember(Value = "IsSynchronizationAgentRequired")] + #pragma warning disable CS1591 IsSynchronizationAgentRequired, + #pragma warning restore CS1591 [EnumMember(Value = "IsSynchronizationInPreview")] + #pragma warning disable CS1591 IsSynchronizationInPreview, + #pragma warning restore CS1591 [EnumMember(Value = "OAuthSettings")] + #pragma warning disable CS1591 OAuthSettings, + #pragma warning restore CS1591 [EnumMember(Value = "SynchronizationLearnMoreIbizaFwLink")] + #pragma warning disable CS1591 SynchronizationLearnMoreIbizaFwLink, + #pragma warning restore CS1591 [EnumMember(Value = "ConfigurationFields")] + #pragma warning disable CS1591 ConfigurationFields, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/SynchronizationMetadataEntry.cs b/src/sample/generated/Models/SynchronizationMetadataEntry.cs index c5baa05b..82428453 100644 --- a/src/sample/generated/Models/SynchronizationMetadataEntry.cs +++ b/src/sample/generated/Models/SynchronizationMetadataEntry.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationMetadataEntry : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationMetadataEntry : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The key property - public SynchronizationMetadata? Key { get; set; } + public global::ApiSdk.Models.SynchronizationMetadata? Key { get; set; } /// Value of the metadata property. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,37 +25,45 @@ public class SynchronizationMetadataEntry : IAdditionalDataHolder, IParsable { public string Value { get; set; } #endif /// - /// Instantiates a new synchronizationMetadataEntry and sets the default values. + /// Instantiates a new and sets the default values. /// - public SynchronizationMetadataEntry() { + public SynchronizationMetadataEntry() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SynchronizationMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SynchronizationMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationMetadataEntry(); + return new global::ApiSdk.Models.SynchronizationMetadataEntry(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"key", n => { Key = n.GetEnumValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetEnumValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("key", Key); + writer.WriteEnumValue("key", Key); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationProgress.cs b/src/sample/generated/Models/SynchronizationProgress.cs index 91af80c2..d13c26e5 100644 --- a/src/sample/generated/Models/SynchronizationProgress.cs +++ b/src/sample/generated/Models/SynchronizationProgress.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationProgress : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationProgress : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The numerator of a progress ratio; the number of units of changes already processed. @@ -23,35 +29,42 @@ public class SynchronizationProgress : IAdditionalDataHolder, IParsable { public string Units { get; set; } #endif /// - /// Instantiates a new synchronizationProgress and sets the default values. + /// Instantiates a new and sets the default values. /// - public SynchronizationProgress() { + public SynchronizationProgress() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SynchronizationProgress CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SynchronizationProgress CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationProgress(); + return new global::ApiSdk.Models.SynchronizationProgress(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"completedUnits", n => { CompletedUnits = n.GetLongValue(); } }, - {"progressObservationDateTime", n => { ProgressObservationDateTime = n.GetDateTimeOffsetValue(); } }, - {"totalUnits", n => { TotalUnits = n.GetLongValue(); } }, - {"units", n => { Units = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "completedUnits", n => { CompletedUnits = n.GetLongValue(); } }, + { "progressObservationDateTime", n => { ProgressObservationDateTime = n.GetDateTimeOffsetValue(); } }, + { "totalUnits", n => { TotalUnits = n.GetLongValue(); } }, + { "units", n => { Units = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("completedUnits", CompletedUnits); writer.WriteDateTimeOffsetValue("progressObservationDateTime", ProgressObservationDateTime); @@ -61,3 +74,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationQuarantine.cs b/src/sample/generated/Models/SynchronizationQuarantine.cs index db3664f7..43989588 100644 --- a/src/sample/generated/Models/SynchronizationQuarantine.cs +++ b/src/sample/generated/Models/SynchronizationQuarantine.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationQuarantine : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationQuarantine : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Date and time when the quarantine was last evaluated and imposed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. @@ -13,59 +19,67 @@ public class SynchronizationQuarantine : IAdditionalDataHolder, IParsable { /// The error property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationError? Error { get; set; } + public global::ApiSdk.Models.SynchronizationError? Error { get; set; } #nullable restore #else - public SynchronizationError Error { get; set; } + public global::ApiSdk.Models.SynchronizationError Error { get; set; } #endif /// Date and time when the next attempt to re-evaluate the quarantine will be made. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? NextAttempt { get; set; } /// The reason property - public QuarantineReason? Reason { get; set; } + public global::ApiSdk.Models.QuarantineReason? Reason { get; set; } /// Date and time when the quarantine was first imposed in this series (a series starts when a quarantine is first imposed, and is reset as soon as the quarantine is lifted). The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? SeriesBegan { get; set; } /// Number of times in this series the quarantine was re-evaluated and left in effect (a series starts when quarantine is first imposed, and is reset as soon as quarantine is lifted). public long? SeriesCount { get; set; } /// - /// Instantiates a new synchronizationQuarantine and sets the default values. + /// Instantiates a new and sets the default values. /// - public SynchronizationQuarantine() { + public SynchronizationQuarantine() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SynchronizationQuarantine CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SynchronizationQuarantine CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationQuarantine(); + return new global::ApiSdk.Models.SynchronizationQuarantine(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"currentBegan", n => { CurrentBegan = n.GetDateTimeOffsetValue(); } }, - {"error", n => { Error = n.GetObjectValue(SynchronizationError.CreateFromDiscriminatorValue); } }, - {"nextAttempt", n => { NextAttempt = n.GetDateTimeOffsetValue(); } }, - {"reason", n => { Reason = n.GetEnumValue(); } }, - {"seriesBegan", n => { SeriesBegan = n.GetDateTimeOffsetValue(); } }, - {"seriesCount", n => { SeriesCount = n.GetLongValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "currentBegan", n => { CurrentBegan = n.GetDateTimeOffsetValue(); } }, + { "error", n => { Error = n.GetObjectValue(global::ApiSdk.Models.SynchronizationError.CreateFromDiscriminatorValue); } }, + { "nextAttempt", n => { NextAttempt = n.GetDateTimeOffsetValue(); } }, + { "reason", n => { Reason = n.GetEnumValue(); } }, + { "seriesBegan", n => { SeriesBegan = n.GetDateTimeOffsetValue(); } }, + { "seriesCount", n => { SeriesCount = n.GetLongValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("currentBegan", CurrentBegan); - writer.WriteObjectValue("error", Error); + writer.WriteObjectValue("error", Error); writer.WriteDateTimeOffsetValue("nextAttempt", NextAttempt); - writer.WriteEnumValue("reason", Reason); + writer.WriteEnumValue("reason", Reason); writer.WriteDateTimeOffsetValue("seriesBegan", SeriesBegan); writer.WriteLongValue("seriesCount", SeriesCount); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationRule.cs b/src/sample/generated/Models/SynchronizationRule.cs index 68a8f63c..ef1dc0da 100644 --- a/src/sample/generated/Models/SynchronizationRule.cs +++ b/src/sample/generated/Models/SynchronizationRule.cs @@ -1,30 +1,36 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationRule : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationRule : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The containerFilter property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ContainerFilter? ContainerFilter { get; set; } + public global::ApiSdk.Models.ContainerFilter? ContainerFilter { get; set; } #nullable restore #else - public ApiSdk.Models.ContainerFilter ContainerFilter { get; set; } + public global::ApiSdk.Models.ContainerFilter ContainerFilter { get; set; } #endif /// true if the synchronization rule can be customized; false if this rule is read-only and shouldn't be changed. public bool? Editable { get; set; } /// The groupFilter property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.GroupFilter? GroupFilter { get; set; } + public global::ApiSdk.Models.GroupFilter? GroupFilter { get; set; } #nullable restore #else - public ApiSdk.Models.GroupFilter GroupFilter { get; set; } + public global::ApiSdk.Models.GroupFilter GroupFilter { get; set; } #endif /// Synchronization rule identifier. Must be one of the identifiers recognized by the synchronization engine. Supported rule identifiers can be found in the synchronization template returned by the API. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -37,10 +43,10 @@ public class SynchronizationRule : IAdditionalDataHolder, IParsable { /// Additional extension properties. Unless instructed explicitly by the support team, metadata values shouldn't be changed. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Metadata { get; set; } + public List? Metadata { get; set; } #nullable restore #else - public List Metadata { get; set; } + public List Metadata { get; set; } #endif /// Human-readable name of the synchronization rule. Not nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -53,10 +59,10 @@ public class SynchronizationRule : IAdditionalDataHolder, IParsable { /// Collection of object mappings supported by the rule. Tells the synchronization engine which objects should be synchronized. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ObjectMappings { get; set; } + public List? ObjectMappings { get; set; } #nullable restore #else - public List ObjectMappings { get; set; } + public List ObjectMappings { get; set; } #endif /// Priority relative to other rules in the synchronizationSchema. Rules with the lowest priority number will be processed first. public int? Priority { get; set; } @@ -77,49 +83,56 @@ public class SynchronizationRule : IAdditionalDataHolder, IParsable { public string TargetDirectoryName { get; set; } #endif /// - /// Instantiates a new synchronizationRule and sets the default values. + /// Instantiates a new and sets the default values. /// - public SynchronizationRule() { + public SynchronizationRule() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SynchronizationRule CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SynchronizationRule CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationRule(); + return new global::ApiSdk.Models.SynchronizationRule(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"containerFilter", n => { ContainerFilter = n.GetObjectValue(ApiSdk.Models.ContainerFilter.CreateFromDiscriminatorValue); } }, - {"editable", n => { Editable = n.GetBoolValue(); } }, - {"groupFilter", n => { GroupFilter = n.GetObjectValue(ApiSdk.Models.GroupFilter.CreateFromDiscriminatorValue); } }, - {"id", n => { Id = n.GetStringValue(); } }, - {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(StringKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"objectMappings", n => { ObjectMappings = n.GetCollectionOfObjectValues(ObjectMapping.CreateFromDiscriminatorValue)?.ToList(); } }, - {"priority", n => { Priority = n.GetIntValue(); } }, - {"sourceDirectoryName", n => { SourceDirectoryName = n.GetStringValue(); } }, - {"targetDirectoryName", n => { TargetDirectoryName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "containerFilter", n => { ContainerFilter = n.GetObjectValue(global::ApiSdk.Models.ContainerFilter.CreateFromDiscriminatorValue); } }, + { "editable", n => { Editable = n.GetBoolValue(); } }, + { "groupFilter", n => { GroupFilter = n.GetObjectValue(global::ApiSdk.Models.GroupFilter.CreateFromDiscriminatorValue); } }, + { "id", n => { Id = n.GetStringValue(); } }, + { "metadata", n => { Metadata = n.GetCollectionOfObjectValues(global::ApiSdk.Models.StringKeyStringValuePair.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "objectMappings", n => { ObjectMappings = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ObjectMapping.CreateFromDiscriminatorValue)?.AsList(); } }, + { "priority", n => { Priority = n.GetIntValue(); } }, + { "sourceDirectoryName", n => { SourceDirectoryName = n.GetStringValue(); } }, + { "targetDirectoryName", n => { TargetDirectoryName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("containerFilter", ContainerFilter); + writer.WriteObjectValue("containerFilter", ContainerFilter); writer.WriteBoolValue("editable", Editable); - writer.WriteObjectValue("groupFilter", GroupFilter); + writer.WriteObjectValue("groupFilter", GroupFilter); writer.WriteStringValue("id", Id); - writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteCollectionOfObjectValues("metadata", Metadata); writer.WriteStringValue("name", Name); - writer.WriteCollectionOfObjectValues("objectMappings", ObjectMappings); + writer.WriteCollectionOfObjectValues("objectMappings", ObjectMappings); writer.WriteIntValue("priority", Priority); writer.WriteStringValue("sourceDirectoryName", SourceDirectoryName); writer.WriteStringValue("targetDirectoryName", TargetDirectoryName); @@ -127,3 +140,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationSchedule.cs b/src/sample/generated/Models/SynchronizationSchedule.cs index 0e050981..338e1579 100644 --- a/src/sample/generated/Models/SynchronizationSchedule.cs +++ b/src/sample/generated/Models/SynchronizationSchedule.cs @@ -1,53 +1,67 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationSchedule : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationSchedule : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Date and time when this job expires. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? Expiration { get; set; } - /// The interval between synchronization iterations. The value is represented in ISO 8601 format for durations. For example, PT1M represents a period of one month. + /// The interval between synchronization iterations. The value is represented in ISO 8601 format for durations. For example, P1M represents a period of one month and PT1M represents a period of one minute. public TimeSpan? Interval { get; set; } /// The state property - public SynchronizationScheduleState? State { get; set; } + public global::ApiSdk.Models.SynchronizationScheduleState? State { get; set; } /// - /// Instantiates a new synchronizationSchedule and sets the default values. + /// Instantiates a new and sets the default values. /// - public SynchronizationSchedule() { + public SynchronizationSchedule() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SynchronizationSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SynchronizationSchedule CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationSchedule(); + return new global::ApiSdk.Models.SynchronizationSchedule(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"expiration", n => { Expiration = n.GetDateTimeOffsetValue(); } }, - {"interval", n => { Interval = n.GetTimeSpanValue(); } }, - {"state", n => { State = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "expiration", n => { Expiration = n.GetDateTimeOffsetValue(); } }, + { "interval", n => { Interval = n.GetTimeSpanValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expiration", Expiration); writer.WriteTimeSpanValue("interval", Interval); - writer.WriteEnumValue("state", State); + writer.WriteEnumValue("state", State); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationScheduleState.cs b/src/sample/generated/Models/SynchronizationScheduleState.cs index 472e07a8..54f012a7 100644 --- a/src/sample/generated/Models/SynchronizationScheduleState.cs +++ b/src/sample/generated/Models/SynchronizationScheduleState.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum SynchronizationScheduleState { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SynchronizationScheduleState + #pragma warning restore CS1591 + { [EnumMember(Value = "Active")] + #pragma warning disable CS1591 Active, + #pragma warning restore CS1591 [EnumMember(Value = "Disabled")] + #pragma warning disable CS1591 Disabled, + #pragma warning restore CS1591 [EnumMember(Value = "Paused")] + #pragma warning disable CS1591 Paused, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/SynchronizationSchema.cs b/src/sample/generated/Models/SynchronizationSchema.cs index d854c731..27fb1dd4 100644 --- a/src/sample/generated/Models/SynchronizationSchema.cs +++ b/src/sample/generated/Models/SynchronizationSchema.cs @@ -1,26 +1,32 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationSchema : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationSchema : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Contains the collection of directories and all of their objects. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Directories { get; set; } + public List? Directories { get; set; } #nullable restore #else - public List Directories { get; set; } + public List Directories { get; set; } #endif /// A collection of synchronization rules configured for the synchronizationJob or synchronizationTemplate. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SynchronizationRules { get; set; } + public List? SynchronizationRules { get; set; } #nullable restore #else - public List SynchronizationRules { get; set; } + public List SynchronizationRules { get; set; } #endif /// The version of the schema, updated automatically with every schema change. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,31 +39,38 @@ public class SynchronizationSchema : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SynchronizationSchema CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SynchronizationSchema CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationSchema(); + return new global::ApiSdk.Models.SynchronizationSchema(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"directories", n => { Directories = n.GetCollectionOfObjectValues(DirectoryDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"synchronizationRules", n => { SynchronizationRules = n.GetCollectionOfObjectValues(SynchronizationRule.CreateFromDiscriminatorValue)?.ToList(); } }, - {"version", n => { Version = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "directories", n => { Directories = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "synchronizationRules", n => { SynchronizationRules = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SynchronizationRule.CreateFromDiscriminatorValue)?.AsList(); } }, + { "version", n => { Version = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("directories", Directories); - writer.WriteCollectionOfObjectValues("synchronizationRules", SynchronizationRules); + writer.WriteCollectionOfObjectValues("directories", Directories); + writer.WriteCollectionOfObjectValues("synchronizationRules", SynchronizationRules); writer.WriteStringValue("version", Version); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationSecret.cs b/src/sample/generated/Models/SynchronizationSecret.cs index d3e9279d..ce19999a 100644 --- a/src/sample/generated/Models/SynchronizationSecret.cs +++ b/src/sample/generated/Models/SynchronizationSecret.cs @@ -1,97 +1,192 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum SynchronizationSecret { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SynchronizationSecret + #pragma warning restore CS1591 + { [EnumMember(Value = "None")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "UserName")] + #pragma warning disable CS1591 UserName, + #pragma warning restore CS1591 [EnumMember(Value = "Password")] + #pragma warning disable CS1591 Password, + #pragma warning restore CS1591 [EnumMember(Value = "SecretToken")] + #pragma warning disable CS1591 SecretToken, + #pragma warning restore CS1591 [EnumMember(Value = "AppKey")] + #pragma warning disable CS1591 AppKey, + #pragma warning restore CS1591 [EnumMember(Value = "BaseAddress")] + #pragma warning disable CS1591 BaseAddress, + #pragma warning restore CS1591 [EnumMember(Value = "ClientIdentifier")] + #pragma warning disable CS1591 ClientIdentifier, + #pragma warning restore CS1591 [EnumMember(Value = "ClientSecret")] + #pragma warning disable CS1591 ClientSecret, + #pragma warning restore CS1591 [EnumMember(Value = "SingleSignOnType")] + #pragma warning disable CS1591 SingleSignOnType, + #pragma warning restore CS1591 [EnumMember(Value = "Sandbox")] + #pragma warning disable CS1591 Sandbox, + #pragma warning restore CS1591 [EnumMember(Value = "Url")] + #pragma warning disable CS1591 Url, + #pragma warning restore CS1591 [EnumMember(Value = "Domain")] + #pragma warning disable CS1591 Domain, + #pragma warning restore CS1591 [EnumMember(Value = "ConsumerKey")] + #pragma warning disable CS1591 ConsumerKey, + #pragma warning restore CS1591 [EnumMember(Value = "ConsumerSecret")] + #pragma warning disable CS1591 ConsumerSecret, + #pragma warning restore CS1591 [EnumMember(Value = "TokenKey")] + #pragma warning disable CS1591 TokenKey, + #pragma warning restore CS1591 [EnumMember(Value = "TokenExpiration")] + #pragma warning disable CS1591 TokenExpiration, + #pragma warning restore CS1591 [EnumMember(Value = "Oauth2AccessToken")] + #pragma warning disable CS1591 Oauth2AccessToken, + #pragma warning restore CS1591 [EnumMember(Value = "Oauth2AccessTokenCreationTime")] + #pragma warning disable CS1591 Oauth2AccessTokenCreationTime, + #pragma warning restore CS1591 [EnumMember(Value = "Oauth2RefreshToken")] + #pragma warning disable CS1591 Oauth2RefreshToken, + #pragma warning restore CS1591 [EnumMember(Value = "SyncAll")] + #pragma warning disable CS1591 SyncAll, + #pragma warning restore CS1591 [EnumMember(Value = "InstanceName")] + #pragma warning disable CS1591 InstanceName, + #pragma warning restore CS1591 [EnumMember(Value = "Oauth2ClientId")] + #pragma warning disable CS1591 Oauth2ClientId, + #pragma warning restore CS1591 [EnumMember(Value = "Oauth2ClientSecret")] + #pragma warning disable CS1591 Oauth2ClientSecret, + #pragma warning restore CS1591 [EnumMember(Value = "CompanyId")] + #pragma warning disable CS1591 CompanyId, + #pragma warning restore CS1591 [EnumMember(Value = "UpdateKeyOnSoftDelete")] + #pragma warning disable CS1591 UpdateKeyOnSoftDelete, + #pragma warning restore CS1591 [EnumMember(Value = "SynchronizationSchedule")] + #pragma warning disable CS1591 SynchronizationSchedule, + #pragma warning restore CS1591 [EnumMember(Value = "SystemOfRecord")] + #pragma warning disable CS1591 SystemOfRecord, + #pragma warning restore CS1591 [EnumMember(Value = "SandboxName")] + #pragma warning disable CS1591 SandboxName, + #pragma warning restore CS1591 [EnumMember(Value = "EnforceDomain")] + #pragma warning disable CS1591 EnforceDomain, + #pragma warning restore CS1591 [EnumMember(Value = "SyncNotificationSettings")] + #pragma warning disable CS1591 SyncNotificationSettings, + #pragma warning restore CS1591 [EnumMember(Value = "SkipOutOfScopeDeletions")] + #pragma warning disable CS1591 SkipOutOfScopeDeletions, + #pragma warning restore CS1591 [EnumMember(Value = "Oauth2AuthorizationCode")] + #pragma warning disable CS1591 Oauth2AuthorizationCode, + #pragma warning restore CS1591 [EnumMember(Value = "Oauth2RedirectUri")] + #pragma warning disable CS1591 Oauth2RedirectUri, + #pragma warning restore CS1591 [EnumMember(Value = "ApplicationTemplateIdentifier")] + #pragma warning disable CS1591 ApplicationTemplateIdentifier, + #pragma warning restore CS1591 [EnumMember(Value = "Oauth2TokenExchangeUri")] + #pragma warning disable CS1591 Oauth2TokenExchangeUri, + #pragma warning restore CS1591 [EnumMember(Value = "Oauth2AuthorizationUri")] + #pragma warning disable CS1591 Oauth2AuthorizationUri, + #pragma warning restore CS1591 [EnumMember(Value = "AuthenticationType")] + #pragma warning disable CS1591 AuthenticationType, + #pragma warning restore CS1591 [EnumMember(Value = "Server")] + #pragma warning disable CS1591 Server, + #pragma warning restore CS1591 [EnumMember(Value = "PerformInboundEntitlementGrants")] + #pragma warning disable CS1591 PerformInboundEntitlementGrants, + #pragma warning restore CS1591 [EnumMember(Value = "HardDeletesEnabled")] + #pragma warning disable CS1591 HardDeletesEnabled, + #pragma warning restore CS1591 [EnumMember(Value = "SyncAgentCompatibilityKey")] + #pragma warning disable CS1591 SyncAgentCompatibilityKey, + #pragma warning restore CS1591 [EnumMember(Value = "SyncAgentADContainer")] + #pragma warning disable CS1591 SyncAgentADContainer, + #pragma warning restore CS1591 [EnumMember(Value = "ValidateDomain")] + #pragma warning disable CS1591 ValidateDomain, + #pragma warning restore CS1591 [EnumMember(Value = "TestReferences")] + #pragma warning disable CS1591 TestReferences, + #pragma warning restore CS1591 [EnumMember(Value = "ConnectionString")] + #pragma warning disable CS1591 ConnectionString, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/SynchronizationSecretKeyStringValuePair.cs b/src/sample/generated/Models/SynchronizationSecretKeyStringValuePair.cs index 08e63047..b838f411 100644 --- a/src/sample/generated/Models/SynchronizationSecretKeyStringValuePair.cs +++ b/src/sample/generated/Models/SynchronizationSecretKeyStringValuePair.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationSecretKeyStringValuePair : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationSecretKeyStringValuePair : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The key property - public SynchronizationSecret? Key { get; set; } + public global::ApiSdk.Models.SynchronizationSecret? Key { get; set; } /// The value of the secret. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,37 +25,45 @@ public class SynchronizationSecretKeyStringValuePair : IAdditionalDataHolder, IP public string Value { get; set; } #endif /// - /// Instantiates a new synchronizationSecretKeyStringValuePair and sets the default values. + /// Instantiates a new and sets the default values. /// - public SynchronizationSecretKeyStringValuePair() { + public SynchronizationSecretKeyStringValuePair() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SynchronizationSecretKeyStringValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SynchronizationSecretKeyStringValuePair CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationSecretKeyStringValuePair(); + return new global::ApiSdk.Models.SynchronizationSecretKeyStringValuePair(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"key", n => { Key = n.GetEnumValue(); } }, - {"value", n => { Value = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetEnumValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("key", Key); + writer.WriteEnumValue("key", Key); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationStatus.cs b/src/sample/generated/Models/SynchronizationStatus.cs index 7b93fc46..481cd244 100644 --- a/src/sample/generated/Models/SynchronizationStatus.cs +++ b/src/sample/generated/Models/SynchronizationStatus.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationStatus : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationStatus : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The code property - public SynchronizationStatusCode? Code { get; set; } + public global::ApiSdk.Models.SynchronizationStatusCode? Code { get; set; } /// Number of consecutive times this job failed. public long? CountSuccessiveCompleteFailures { get; set; } /// true if the job's escrows (object-level errors) were pruned during initial synchronization. Escrows can be pruned if during the initial synchronization, you reach the threshold of errors that would normally put the job in quarantine. Instead of going into quarantine, the synchronization process clears the job's errors and continues until the initial synchronization is completed. When the initial synchronization is completed, the job will pause and wait for the customer to clean up the errors. @@ -17,42 +23,42 @@ public class SynchronizationStatus : IAdditionalDataHolder, IParsable { /// The lastExecution property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationTaskExecution? LastExecution { get; set; } + public global::ApiSdk.Models.SynchronizationTaskExecution? LastExecution { get; set; } #nullable restore #else - public SynchronizationTaskExecution LastExecution { get; set; } + public global::ApiSdk.Models.SynchronizationTaskExecution LastExecution { get; set; } #endif /// The lastSuccessfulExecution property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationTaskExecution? LastSuccessfulExecution { get; set; } + public global::ApiSdk.Models.SynchronizationTaskExecution? LastSuccessfulExecution { get; set; } #nullable restore #else - public SynchronizationTaskExecution LastSuccessfulExecution { get; set; } + public global::ApiSdk.Models.SynchronizationTaskExecution LastSuccessfulExecution { get; set; } #endif /// The lastSuccessfulExecutionWithExports property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationTaskExecution? LastSuccessfulExecutionWithExports { get; set; } + public global::ApiSdk.Models.SynchronizationTaskExecution? LastSuccessfulExecutionWithExports { get; set; } #nullable restore #else - public SynchronizationTaskExecution LastSuccessfulExecutionWithExports { get; set; } + public global::ApiSdk.Models.SynchronizationTaskExecution LastSuccessfulExecutionWithExports { get; set; } #endif /// Details of the progress of a job toward completion. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Progress { get; set; } + public List? Progress { get; set; } #nullable restore #else - public List Progress { get; set; } + public List Progress { get; set; } #endif /// The quarantine property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationQuarantine? Quarantine { get; set; } + public global::ApiSdk.Models.SynchronizationQuarantine? Quarantine { get; set; } #nullable restore #else - public SynchronizationQuarantine Quarantine { get; set; } + public global::ApiSdk.Models.SynchronizationQuarantine Quarantine { get; set; } #endif /// The time when steady state (no more changes to the process) was first achieved. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? SteadyStateFirstAchievedTime { get; set; } @@ -61,10 +67,10 @@ public class SynchronizationStatus : IAdditionalDataHolder, IParsable { /// Count of synchronized objects, listed by object type. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? SynchronizedEntryCountByType { get; set; } + public List? SynchronizedEntryCountByType { get; set; } #nullable restore #else - public List SynchronizedEntryCountByType { get; set; } + public List SynchronizedEntryCountByType { get; set; } #endif /// In the event of an error, the URL with the troubleshooting steps for the issue. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -75,57 +81,65 @@ public class SynchronizationStatus : IAdditionalDataHolder, IParsable { public string TroubleshootingUrl { get; set; } #endif /// - /// Instantiates a new synchronizationStatus and sets the default values. + /// Instantiates a new and sets the default values. /// - public SynchronizationStatus() { + public SynchronizationStatus() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SynchronizationStatus CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SynchronizationStatus CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationStatus(); + return new global::ApiSdk.Models.SynchronizationStatus(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetEnumValue(); } }, - {"countSuccessiveCompleteFailures", n => { CountSuccessiveCompleteFailures = n.GetLongValue(); } }, - {"escrowsPruned", n => { EscrowsPruned = n.GetBoolValue(); } }, - {"lastExecution", n => { LastExecution = n.GetObjectValue(SynchronizationTaskExecution.CreateFromDiscriminatorValue); } }, - {"lastSuccessfulExecution", n => { LastSuccessfulExecution = n.GetObjectValue(SynchronizationTaskExecution.CreateFromDiscriminatorValue); } }, - {"lastSuccessfulExecutionWithExports", n => { LastSuccessfulExecutionWithExports = n.GetObjectValue(SynchronizationTaskExecution.CreateFromDiscriminatorValue); } }, - {"progress", n => { Progress = n.GetCollectionOfObjectValues(SynchronizationProgress.CreateFromDiscriminatorValue)?.ToList(); } }, - {"quarantine", n => { Quarantine = n.GetObjectValue(SynchronizationQuarantine.CreateFromDiscriminatorValue); } }, - {"steadyStateFirstAchievedTime", n => { SteadyStateFirstAchievedTime = n.GetDateTimeOffsetValue(); } }, - {"steadyStateLastAchievedTime", n => { SteadyStateLastAchievedTime = n.GetDateTimeOffsetValue(); } }, - {"synchronizedEntryCountByType", n => { SynchronizedEntryCountByType = n.GetCollectionOfObjectValues(StringKeyLongValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, - {"troubleshootingUrl", n => { TroubleshootingUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetEnumValue(); } }, + { "countSuccessiveCompleteFailures", n => { CountSuccessiveCompleteFailures = n.GetLongValue(); } }, + { "escrowsPruned", n => { EscrowsPruned = n.GetBoolValue(); } }, + { "lastExecution", n => { LastExecution = n.GetObjectValue(global::ApiSdk.Models.SynchronizationTaskExecution.CreateFromDiscriminatorValue); } }, + { "lastSuccessfulExecution", n => { LastSuccessfulExecution = n.GetObjectValue(global::ApiSdk.Models.SynchronizationTaskExecution.CreateFromDiscriminatorValue); } }, + { "lastSuccessfulExecutionWithExports", n => { LastSuccessfulExecutionWithExports = n.GetObjectValue(global::ApiSdk.Models.SynchronizationTaskExecution.CreateFromDiscriminatorValue); } }, + { "progress", n => { Progress = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SynchronizationProgress.CreateFromDiscriminatorValue)?.AsList(); } }, + { "quarantine", n => { Quarantine = n.GetObjectValue(global::ApiSdk.Models.SynchronizationQuarantine.CreateFromDiscriminatorValue); } }, + { "steadyStateFirstAchievedTime", n => { SteadyStateFirstAchievedTime = n.GetDateTimeOffsetValue(); } }, + { "steadyStateLastAchievedTime", n => { SteadyStateLastAchievedTime = n.GetDateTimeOffsetValue(); } }, + { "synchronizedEntryCountByType", n => { SynchronizedEntryCountByType = n.GetCollectionOfObjectValues(global::ApiSdk.Models.StringKeyLongValuePair.CreateFromDiscriminatorValue)?.AsList(); } }, + { "troubleshootingUrl", n => { TroubleshootingUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("code", Code); + writer.WriteEnumValue("code", Code); writer.WriteLongValue("countSuccessiveCompleteFailures", CountSuccessiveCompleteFailures); writer.WriteBoolValue("escrowsPruned", EscrowsPruned); - writer.WriteObjectValue("lastExecution", LastExecution); - writer.WriteObjectValue("lastSuccessfulExecution", LastSuccessfulExecution); - writer.WriteObjectValue("lastSuccessfulExecutionWithExports", LastSuccessfulExecutionWithExports); - writer.WriteCollectionOfObjectValues("progress", Progress); - writer.WriteObjectValue("quarantine", Quarantine); + writer.WriteObjectValue("lastExecution", LastExecution); + writer.WriteObjectValue("lastSuccessfulExecution", LastSuccessfulExecution); + writer.WriteObjectValue("lastSuccessfulExecutionWithExports", LastSuccessfulExecutionWithExports); + writer.WriteCollectionOfObjectValues("progress", Progress); + writer.WriteObjectValue("quarantine", Quarantine); writer.WriteDateTimeOffsetValue("steadyStateFirstAchievedTime", SteadyStateFirstAchievedTime); writer.WriteDateTimeOffsetValue("steadyStateLastAchievedTime", SteadyStateLastAchievedTime); - writer.WriteCollectionOfObjectValues("synchronizedEntryCountByType", SynchronizedEntryCountByType); + writer.WriteCollectionOfObjectValues("synchronizedEntryCountByType", SynchronizedEntryCountByType); writer.WriteStringValue("troubleshootingUrl", TroubleshootingUrl); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationStatusCode.cs b/src/sample/generated/Models/SynchronizationStatusCode.cs index 0338357a..a83b14bc 100644 --- a/src/sample/generated/Models/SynchronizationStatusCode.cs +++ b/src/sample/generated/Models/SynchronizationStatusCode.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum SynchronizationStatusCode { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SynchronizationStatusCode + #pragma warning restore CS1591 + { [EnumMember(Value = "NotConfigured")] + #pragma warning disable CS1591 NotConfigured, + #pragma warning restore CS1591 [EnumMember(Value = "NotRun")] + #pragma warning disable CS1591 NotRun, + #pragma warning restore CS1591 [EnumMember(Value = "Active")] + #pragma warning disable CS1591 Active, + #pragma warning restore CS1591 [EnumMember(Value = "Paused")] + #pragma warning disable CS1591 Paused, + #pragma warning restore CS1591 [EnumMember(Value = "Quarantine")] + #pragma warning disable CS1591 Quarantine, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/SynchronizationTaskExecution.cs b/src/sample/generated/Models/SynchronizationTaskExecution.cs index 9f34c943..8c109043 100644 --- a/src/sample/generated/Models/SynchronizationTaskExecution.cs +++ b/src/sample/generated/Models/SynchronizationTaskExecution.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationTaskExecution : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationTaskExecution : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Identifier of the job run. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -37,57 +43,64 @@ public class SynchronizationTaskExecution : IAdditionalDataHolder, IParsable { /// The error property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationError? Error { get; set; } + public global::ApiSdk.Models.SynchronizationError? Error { get; set; } #nullable restore #else - public SynchronizationError Error { get; set; } + public global::ApiSdk.Models.SynchronizationError Error { get; set; } #endif /// The state property - public SynchronizationTaskExecutionResult? State { get; set; } + public global::ApiSdk.Models.SynchronizationTaskExecutionResult? State { get; set; } /// Time when this job run began. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? TimeBegan { get; set; } /// Time when this job run ended. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. public DateTimeOffset? TimeEnded { get; set; } /// - /// Instantiates a new synchronizationTaskExecution and sets the default values. + /// Instantiates a new and sets the default values. /// - public SynchronizationTaskExecution() { + public SynchronizationTaskExecution() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SynchronizationTaskExecution CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SynchronizationTaskExecution CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationTaskExecution(); + return new global::ApiSdk.Models.SynchronizationTaskExecution(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"activityIdentifier", n => { ActivityIdentifier = n.GetStringValue(); } }, - {"countEntitled", n => { CountEntitled = n.GetLongValue(); } }, - {"countEntitledForProvisioning", n => { CountEntitledForProvisioning = n.GetLongValue(); } }, - {"countEscrowed", n => { CountEscrowed = n.GetLongValue(); } }, - {"countEscrowedRaw", n => { CountEscrowedRaw = n.GetLongValue(); } }, - {"countExported", n => { CountExported = n.GetLongValue(); } }, - {"countExports", n => { CountExports = n.GetLongValue(); } }, - {"countImported", n => { CountImported = n.GetLongValue(); } }, - {"countImportedDeltas", n => { CountImportedDeltas = n.GetLongValue(); } }, - {"countImportedReferenceDeltas", n => { CountImportedReferenceDeltas = n.GetLongValue(); } }, - {"error", n => { Error = n.GetObjectValue(SynchronizationError.CreateFromDiscriminatorValue); } }, - {"state", n => { State = n.GetEnumValue(); } }, - {"timeBegan", n => { TimeBegan = n.GetDateTimeOffsetValue(); } }, - {"timeEnded", n => { TimeEnded = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "activityIdentifier", n => { ActivityIdentifier = n.GetStringValue(); } }, + { "countEntitled", n => { CountEntitled = n.GetLongValue(); } }, + { "countEntitledForProvisioning", n => { CountEntitledForProvisioning = n.GetLongValue(); } }, + { "countEscrowed", n => { CountEscrowed = n.GetLongValue(); } }, + { "countEscrowedRaw", n => { CountEscrowedRaw = n.GetLongValue(); } }, + { "countExported", n => { CountExported = n.GetLongValue(); } }, + { "countExports", n => { CountExports = n.GetLongValue(); } }, + { "countImported", n => { CountImported = n.GetLongValue(); } }, + { "countImportedDeltas", n => { CountImportedDeltas = n.GetLongValue(); } }, + { "countImportedReferenceDeltas", n => { CountImportedReferenceDeltas = n.GetLongValue(); } }, + { "error", n => { Error = n.GetObjectValue(global::ApiSdk.Models.SynchronizationError.CreateFromDiscriminatorValue); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "timeBegan", n => { TimeBegan = n.GetDateTimeOffsetValue(); } }, + { "timeEnded", n => { TimeEnded = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activityIdentifier", ActivityIdentifier); writer.WriteLongValue("countEntitled", CountEntitled); @@ -99,11 +112,12 @@ public void Serialize(ISerializationWriter writer) { writer.WriteLongValue("countImported", CountImported); writer.WriteLongValue("countImportedDeltas", CountImportedDeltas); writer.WriteLongValue("countImportedReferenceDeltas", CountImportedReferenceDeltas); - writer.WriteObjectValue("error", Error); - writer.WriteEnumValue("state", State); + writer.WriteObjectValue("error", Error); + writer.WriteEnumValue("state", State); writer.WriteDateTimeOffsetValue("timeBegan", TimeBegan); writer.WriteDateTimeOffsetValue("timeEnded", TimeEnded); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SynchronizationTaskExecutionResult.cs b/src/sample/generated/Models/SynchronizationTaskExecutionResult.cs index 7f905305..1b62dd80 100644 --- a/src/sample/generated/Models/SynchronizationTaskExecutionResult.cs +++ b/src/sample/generated/Models/SynchronizationTaskExecutionResult.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum SynchronizationTaskExecutionResult { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum SynchronizationTaskExecutionResult + #pragma warning restore CS1591 + { [EnumMember(Value = "Succeeded")] + #pragma warning disable CS1591 Succeeded, + #pragma warning restore CS1591 [EnumMember(Value = "Failed")] + #pragma warning disable CS1591 Failed, + #pragma warning restore CS1591 [EnumMember(Value = "EntryLevelErrors")] + #pragma warning disable CS1591 EntryLevelErrors, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/SynchronizationTemplate.cs b/src/sample/generated/Models/SynchronizationTemplate.cs index b35c6e48..19cf30c1 100644 --- a/src/sample/generated/Models/SynchronizationTemplate.cs +++ b/src/sample/generated/Models/SynchronizationTemplate.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SynchronizationTemplate : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SynchronizationTemplate : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Identifier of the application this template belongs to. public Guid? ApplicationId { get; set; } /// true if this template is recommended to be the default for the application. @@ -31,46 +37,52 @@ public class SynchronizationTemplate : Entity, IParsable { /// Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Metadata { get; set; } + public List? Metadata { get; set; } #nullable restore #else - public List Metadata { get; set; } + public List Metadata { get; set; } #endif /// The schema property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public SynchronizationSchema? Schema { get; set; } + public global::ApiSdk.Models.SynchronizationSchema? Schema { get; set; } #nullable restore #else - public SynchronizationSchema Schema { get; set; } + public global::ApiSdk.Models.SynchronizationSchema Schema { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new SynchronizationTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.SynchronizationTemplate CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SynchronizationTemplate(); + return new global::ApiSdk.Models.SynchronizationTemplate(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"applicationId", n => { ApplicationId = n.GetGuidValue(); } }, - {"default", n => { Default = n.GetBoolValue(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"discoverable", n => { Discoverable = n.GetBoolValue(); } }, - {"factoryTag", n => { FactoryTag = n.GetStringValue(); } }, - {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(SynchronizationMetadataEntry.CreateFromDiscriminatorValue)?.ToList(); } }, - {"schema", n => { Schema = n.GetObjectValue(SynchronizationSchema.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "applicationId", n => { ApplicationId = n.GetGuidValue(); } }, + { "default", n => { Default = n.GetBoolValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "discoverable", n => { Discoverable = n.GetBoolValue(); } }, + { "factoryTag", n => { FactoryTag = n.GetStringValue(); } }, + { "metadata", n => { Metadata = n.GetCollectionOfObjectValues(global::ApiSdk.Models.SynchronizationMetadataEntry.CreateFromDiscriminatorValue)?.AsList(); } }, + { "schema", n => { Schema = n.GetObjectValue(global::ApiSdk.Models.SynchronizationSchema.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteGuidValue("applicationId", ApplicationId); @@ -78,8 +90,9 @@ public class SynchronizationTemplate : Entity, IParsable { writer.WriteStringValue("description", Description); writer.WriteBoolValue("discoverable", Discoverable); writer.WriteStringValue("factoryTag", FactoryTag); - writer.WriteCollectionOfObjectValues("metadata", Metadata); - writer.WriteObjectValue("schema", Schema); + writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteObjectValue("schema", Schema); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/SystemFacet.cs b/src/sample/generated/Models/SystemFacet.cs index 10225acc..58f6a424 100644 --- a/src/sample/generated/Models/SystemFacet.cs +++ b/src/sample/generated/Models/SystemFacet.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class SystemFacet : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SystemFacet : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new systemFacet and sets the default values. + /// Instantiates a new and sets the default values. /// - public SystemFacet() { + public SystemFacet() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static SystemFacet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.SystemFacet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new SystemFacet(); + return new global::ApiSdk.Models.SystemFacet(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TargetDeviceGroup.cs b/src/sample/generated/Models/TargetDeviceGroup.cs new file mode 100644 index 00000000..bed8af48 --- /dev/null +++ b/src/sample/generated/Models/TargetDeviceGroup.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TargetDeviceGroup : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Display name for the target device group. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName { get; set; } +#nullable restore +#else + public string DisplayName { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.TargetDeviceGroup CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.TargetDeviceGroup(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteStringValue("displayName", DisplayName); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TaskStatus.cs b/src/sample/generated/Models/TaskStatus.cs index 64ed9e5e..fec891af 100644 --- a/src/sample/generated/Models/TaskStatus.cs +++ b/src/sample/generated/Models/TaskStatus.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TaskStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TaskStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "notStarted")] + #pragma warning disable CS1591 NotStarted, + #pragma warning restore CS1591 [EnumMember(Value = "inProgress")] + #pragma warning disable CS1591 InProgress, + #pragma warning restore CS1591 [EnumMember(Value = "completed")] + #pragma warning disable CS1591 Completed, + #pragma warning restore CS1591 [EnumMember(Value = "waitingOnOthers")] + #pragma warning disable CS1591 WaitingOnOthers, + #pragma warning restore CS1591 [EnumMember(Value = "deferred")] + #pragma warning disable CS1591 Deferred, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/Team.cs b/src/sample/generated/Models/Team.cs index 7ccca9a7..d38dec84 100644 --- a/src/sample/generated/Models/Team.cs +++ b/src/sample/generated/Models/Team.cs @@ -1,26 +1,32 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Team : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Team : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// List of channels either hosted in or shared with the team (incoming channels). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AllChannels { get; set; } + public List? AllChannels { get; set; } #nullable restore #else - public List AllChannels { get; set; } + public List AllChannels { get; set; } #endif /// The collection of channels and messages associated with the team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Channels { get; set; } + public List? Channels { get; set; } #nullable restore #else - public List Channels { get; set; } + public List Channels { get; set; } #endif /// An optional label. Typically describes the data or business sensitivity of the team. Must match one of a pre-configured set in the tenant's directory. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -51,42 +57,42 @@ public class Team : Entity, IParsable { /// The funSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamFunSettings? FunSettings { get; set; } + public global::ApiSdk.Models.TeamFunSettings? FunSettings { get; set; } #nullable restore #else - public TeamFunSettings FunSettings { get; set; } + public global::ApiSdk.Models.TeamFunSettings FunSettings { get; set; } #endif /// The group property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Group? Group { get; set; } + public global::ApiSdk.Models.Group? Group { get; set; } #nullable restore #else - public ApiSdk.Models.Group Group { get; set; } + public global::ApiSdk.Models.Group Group { get; set; } #endif /// The guestSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamGuestSettings? GuestSettings { get; set; } + public global::ApiSdk.Models.TeamGuestSettings? GuestSettings { get; set; } #nullable restore #else - public TeamGuestSettings GuestSettings { get; set; } + public global::ApiSdk.Models.TeamGuestSettings GuestSettings { get; set; } #endif /// List of channels shared with the team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? IncomingChannels { get; set; } + public List? IncomingChannels { get; set; } #nullable restore #else - public List IncomingChannels { get; set; } + public List IncomingChannels { get; set; } #endif /// The apps installed in this team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? InstalledApps { get; set; } + public List? InstalledApps { get; set; } #nullable restore #else - public List InstalledApps { get; set; } + public List InstalledApps { get; set; } #endif /// A unique ID for the team that has been used in a few places such as the audit log/Office 365 Management Activity API. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -101,94 +107,94 @@ public class Team : Entity, IParsable { /// Members and owners of the team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Members { get; set; } + public List? Members { get; set; } #nullable restore #else - public List Members { get; set; } + public List Members { get; set; } #endif /// The memberSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamMemberSettings? MemberSettings { get; set; } + public global::ApiSdk.Models.TeamMemberSettings? MemberSettings { get; set; } #nullable restore #else - public TeamMemberSettings MemberSettings { get; set; } + public global::ApiSdk.Models.TeamMemberSettings MemberSettings { get; set; } #endif /// The messagingSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamMessagingSettings? MessagingSettings { get; set; } + public global::ApiSdk.Models.TeamMessagingSettings? MessagingSettings { get; set; } #nullable restore #else - public TeamMessagingSettings MessagingSettings { get; set; } + public global::ApiSdk.Models.TeamMessagingSettings MessagingSettings { get; set; } #endif /// The async operations that ran or are running on this team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Operations { get; set; } + public List? Operations { get; set; } #nullable restore #else - public List Operations { get; set; } + public List Operations { get; set; } #endif /// A collection of permissions granted to apps to access the team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PermissionGrants { get; set; } + public List? PermissionGrants { get; set; } #nullable restore #else - public List PermissionGrants { get; set; } + public List PermissionGrants { get; set; } #endif /// The photo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ProfilePhoto? Photo { get; set; } + public global::ApiSdk.Models.ProfilePhoto? Photo { get; set; } #nullable restore #else - public ProfilePhoto Photo { get; set; } + public global::ApiSdk.Models.ProfilePhoto Photo { get; set; } #endif /// The primaryChannel property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Channel? PrimaryChannel { get; set; } + public global::ApiSdk.Models.Channel? PrimaryChannel { get; set; } #nullable restore #else - public Channel PrimaryChannel { get; set; } + public global::ApiSdk.Models.Channel PrimaryChannel { get; set; } #endif /// The schedule property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Schedule? Schedule { get; set; } + public global::ApiSdk.Models.Schedule? Schedule { get; set; } #nullable restore #else - public ApiSdk.Models.Schedule Schedule { get; set; } + public global::ApiSdk.Models.Schedule Schedule { get; set; } #endif /// The specialization property - public TeamSpecialization? Specialization { get; set; } + public global::ApiSdk.Models.TeamSpecialization? Specialization { get; set; } /// The summary property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamSummary? Summary { get; set; } + public global::ApiSdk.Models.TeamSummary? Summary { get; set; } #nullable restore #else - public TeamSummary Summary { get; set; } + public global::ApiSdk.Models.TeamSummary Summary { get; set; } #endif /// The tags associated with the team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tags { get; set; } + public List? Tags { get; set; } #nullable restore #else - public List Tags { get; set; } + public List Tags { get; set; } #endif /// The template property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamsTemplate? Template { get; set; } + public global::ApiSdk.Models.TeamsTemplate? Template { get; set; } #nullable restore #else - public TeamsTemplate Template { get; set; } + public global::ApiSdk.Models.TeamsTemplate Template { get; set; } #endif - /// The ID of the Azure Active Directory tenant. + /// The ID of the Microsoft Entra tenant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TenantId { get; set; } @@ -197,7 +203,7 @@ public class Team : Entity, IParsable { public string TenantId { get; set; } #endif /// The visibility property - public TeamVisibilityType? Visibility { get; set; } + public global::ApiSdk.Models.TeamVisibilityType? Visibility { get; set; } /// A hyperlink that will go to the team in the Microsoft Teams client. This is the URL that you get when you right-click a team in the Microsoft Teams client and select Get link to team. This URL should be treated as an opaque blob, and not parsed. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -209,81 +215,88 @@ public class Team : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Team CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Team CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Team(); + return new global::ApiSdk.Models.Team(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"allChannels", n => { AllChannels = n.GetCollectionOfObjectValues(Channel.CreateFromDiscriminatorValue)?.ToList(); } }, - {"channels", n => { Channels = n.GetCollectionOfObjectValues(Channel.CreateFromDiscriminatorValue)?.ToList(); } }, - {"classification", n => { Classification = n.GetStringValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"funSettings", n => { FunSettings = n.GetObjectValue(TeamFunSettings.CreateFromDiscriminatorValue); } }, - {"group", n => { Group = n.GetObjectValue(ApiSdk.Models.Group.CreateFromDiscriminatorValue); } }, - {"guestSettings", n => { GuestSettings = n.GetObjectValue(TeamGuestSettings.CreateFromDiscriminatorValue); } }, - {"incomingChannels", n => { IncomingChannels = n.GetCollectionOfObjectValues(Channel.CreateFromDiscriminatorValue)?.ToList(); } }, - {"installedApps", n => { InstalledApps = n.GetCollectionOfObjectValues(TeamsAppInstallation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"internalId", n => { InternalId = n.GetStringValue(); } }, - {"isArchived", n => { IsArchived = n.GetBoolValue(); } }, - {"memberSettings", n => { MemberSettings = n.GetObjectValue(TeamMemberSettings.CreateFromDiscriminatorValue); } }, - {"members", n => { Members = n.GetCollectionOfObjectValues(ConversationMember.CreateFromDiscriminatorValue)?.ToList(); } }, - {"messagingSettings", n => { MessagingSettings = n.GetObjectValue(TeamMessagingSettings.CreateFromDiscriminatorValue); } }, - {"operations", n => { Operations = n.GetCollectionOfObjectValues(TeamsAsyncOperation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"permissionGrants", n => { PermissionGrants = n.GetCollectionOfObjectValues(ResourceSpecificPermissionGrant.CreateFromDiscriminatorValue)?.ToList(); } }, - {"photo", n => { Photo = n.GetObjectValue(ProfilePhoto.CreateFromDiscriminatorValue); } }, - {"primaryChannel", n => { PrimaryChannel = n.GetObjectValue(Channel.CreateFromDiscriminatorValue); } }, - {"schedule", n => { Schedule = n.GetObjectValue(ApiSdk.Models.Schedule.CreateFromDiscriminatorValue); } }, - {"specialization", n => { Specialization = n.GetEnumValue(); } }, - {"summary", n => { Summary = n.GetObjectValue(TeamSummary.CreateFromDiscriminatorValue); } }, - {"tags", n => { Tags = n.GetCollectionOfObjectValues(TeamworkTag.CreateFromDiscriminatorValue)?.ToList(); } }, - {"template", n => { Template = n.GetObjectValue(TeamsTemplate.CreateFromDiscriminatorValue); } }, - {"tenantId", n => { TenantId = n.GetStringValue(); } }, - {"visibility", n => { Visibility = n.GetEnumValue(); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "allChannels", n => { AllChannels = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Channel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "channels", n => { Channels = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Channel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "classification", n => { Classification = n.GetStringValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "funSettings", n => { FunSettings = n.GetObjectValue(global::ApiSdk.Models.TeamFunSettings.CreateFromDiscriminatorValue); } }, + { "group", n => { Group = n.GetObjectValue(global::ApiSdk.Models.Group.CreateFromDiscriminatorValue); } }, + { "guestSettings", n => { GuestSettings = n.GetObjectValue(global::ApiSdk.Models.TeamGuestSettings.CreateFromDiscriminatorValue); } }, + { "incomingChannels", n => { IncomingChannels = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Channel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "installedApps", n => { InstalledApps = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TeamsAppInstallation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "internalId", n => { InternalId = n.GetStringValue(); } }, + { "isArchived", n => { IsArchived = n.GetBoolValue(); } }, + { "memberSettings", n => { MemberSettings = n.GetObjectValue(global::ApiSdk.Models.TeamMemberSettings.CreateFromDiscriminatorValue); } }, + { "members", n => { Members = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ConversationMember.CreateFromDiscriminatorValue)?.AsList(); } }, + { "messagingSettings", n => { MessagingSettings = n.GetObjectValue(global::ApiSdk.Models.TeamMessagingSettings.CreateFromDiscriminatorValue); } }, + { "operations", n => { Operations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TeamsAsyncOperation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "permissionGrants", n => { PermissionGrants = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ResourceSpecificPermissionGrant.CreateFromDiscriminatorValue)?.AsList(); } }, + { "photo", n => { Photo = n.GetObjectValue(global::ApiSdk.Models.ProfilePhoto.CreateFromDiscriminatorValue); } }, + { "primaryChannel", n => { PrimaryChannel = n.GetObjectValue(global::ApiSdk.Models.Channel.CreateFromDiscriminatorValue); } }, + { "schedule", n => { Schedule = n.GetObjectValue(global::ApiSdk.Models.Schedule.CreateFromDiscriminatorValue); } }, + { "specialization", n => { Specialization = n.GetEnumValue(); } }, + { "summary", n => { Summary = n.GetObjectValue(global::ApiSdk.Models.TeamSummary.CreateFromDiscriminatorValue); } }, + { "tags", n => { Tags = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TeamworkTag.CreateFromDiscriminatorValue)?.AsList(); } }, + { "template", n => { Template = n.GetObjectValue(global::ApiSdk.Models.TeamsTemplate.CreateFromDiscriminatorValue); } }, + { "tenantId", n => { TenantId = n.GetStringValue(); } }, + { "visibility", n => { Visibility = n.GetEnumValue(); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("allChannels", AllChannels); - writer.WriteCollectionOfObjectValues("channels", Channels); + writer.WriteCollectionOfObjectValues("allChannels", AllChannels); + writer.WriteCollectionOfObjectValues("channels", Channels); writer.WriteStringValue("classification", Classification); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); - writer.WriteObjectValue("funSettings", FunSettings); - writer.WriteObjectValue("group", Group); - writer.WriteObjectValue("guestSettings", GuestSettings); - writer.WriteCollectionOfObjectValues("incomingChannels", IncomingChannels); - writer.WriteCollectionOfObjectValues("installedApps", InstalledApps); + writer.WriteObjectValue("funSettings", FunSettings); + writer.WriteObjectValue("group", Group); + writer.WriteObjectValue("guestSettings", GuestSettings); + writer.WriteCollectionOfObjectValues("incomingChannels", IncomingChannels); + writer.WriteCollectionOfObjectValues("installedApps", InstalledApps); writer.WriteStringValue("internalId", InternalId); writer.WriteBoolValue("isArchived", IsArchived); - writer.WriteCollectionOfObjectValues("members", Members); - writer.WriteObjectValue("memberSettings", MemberSettings); - writer.WriteObjectValue("messagingSettings", MessagingSettings); - writer.WriteCollectionOfObjectValues("operations", Operations); - writer.WriteCollectionOfObjectValues("permissionGrants", PermissionGrants); - writer.WriteObjectValue("photo", Photo); - writer.WriteObjectValue("primaryChannel", PrimaryChannel); - writer.WriteObjectValue("schedule", Schedule); - writer.WriteEnumValue("specialization", Specialization); - writer.WriteObjectValue("summary", Summary); - writer.WriteCollectionOfObjectValues("tags", Tags); - writer.WriteObjectValue("template", Template); + writer.WriteCollectionOfObjectValues("members", Members); + writer.WriteObjectValue("memberSettings", MemberSettings); + writer.WriteObjectValue("messagingSettings", MessagingSettings); + writer.WriteCollectionOfObjectValues("operations", Operations); + writer.WriteCollectionOfObjectValues("permissionGrants", PermissionGrants); + writer.WriteObjectValue("photo", Photo); + writer.WriteObjectValue("primaryChannel", PrimaryChannel); + writer.WriteObjectValue("schedule", Schedule); + writer.WriteEnumValue("specialization", Specialization); + writer.WriteObjectValue("summary", Summary); + writer.WriteCollectionOfObjectValues("tags", Tags); + writer.WriteObjectValue("template", Template); writer.WriteStringValue("tenantId", TenantId); - writer.WriteEnumValue("visibility", Visibility); + writer.WriteEnumValue("visibility", Visibility); writer.WriteStringValue("webUrl", WebUrl); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamFunSettings.cs b/src/sample/generated/Models/TeamFunSettings.cs index 91f7c20e..fd1f0288 100644 --- a/src/sample/generated/Models/TeamFunSettings.cs +++ b/src/sample/generated/Models/TeamFunSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamFunSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamFunSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// If set to true, enables users to include custom memes. @@ -15,43 +21,51 @@ public class TeamFunSettings : IAdditionalDataHolder, IParsable { /// If set to true, enables users to include stickers and memes. public bool? AllowStickersAndMemes { get; set; } /// The giphyContentRating property - public GiphyRatingType? GiphyContentRating { get; set; } + public global::ApiSdk.Models.GiphyRatingType? GiphyContentRating { get; set; } /// - /// Instantiates a new teamFunSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamFunSettings() { + public TeamFunSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamFunSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamFunSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamFunSettings(); + return new global::ApiSdk.Models.TeamFunSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowCustomMemes", n => { AllowCustomMemes = n.GetBoolValue(); } }, - {"allowGiphy", n => { AllowGiphy = n.GetBoolValue(); } }, - {"allowStickersAndMemes", n => { AllowStickersAndMemes = n.GetBoolValue(); } }, - {"giphyContentRating", n => { GiphyContentRating = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowCustomMemes", n => { AllowCustomMemes = n.GetBoolValue(); } }, + { "allowGiphy", n => { AllowGiphy = n.GetBoolValue(); } }, + { "allowStickersAndMemes", n => { AllowStickersAndMemes = n.GetBoolValue(); } }, + { "giphyContentRating", n => { GiphyContentRating = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowCustomMemes", AllowCustomMemes); writer.WriteBoolValue("allowGiphy", AllowGiphy); writer.WriteBoolValue("allowStickersAndMemes", AllowStickersAndMemes); - writer.WriteEnumValue("giphyContentRating", GiphyContentRating); + writer.WriteEnumValue("giphyContentRating", GiphyContentRating); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamGuestSettings.cs b/src/sample/generated/Models/TeamGuestSettings.cs index 32c3b1a2..ee562892 100644 --- a/src/sample/generated/Models/TeamGuestSettings.cs +++ b/src/sample/generated/Models/TeamGuestSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamGuestSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamGuestSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// If set to true, guests can add and update channels. @@ -13,33 +19,40 @@ public class TeamGuestSettings : IAdditionalDataHolder, IParsable { /// If set to true, guests can delete channels. public bool? AllowDeleteChannels { get; set; } /// - /// Instantiates a new teamGuestSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamGuestSettings() { + public TeamGuestSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamGuestSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamGuestSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamGuestSettings(); + return new global::ApiSdk.Models.TeamGuestSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowCreateUpdateChannels", n => { AllowCreateUpdateChannels = n.GetBoolValue(); } }, - {"allowDeleteChannels", n => { AllowDeleteChannels = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowCreateUpdateChannels", n => { AllowCreateUpdateChannels = n.GetBoolValue(); } }, + { "allowDeleteChannels", n => { AllowDeleteChannels = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowCreateUpdateChannels", AllowCreateUpdateChannels); writer.WriteBoolValue("allowDeleteChannels", AllowDeleteChannels); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamInfo.cs b/src/sample/generated/Models/TeamInfo.cs index 5a147819..12b94ec1 100644 --- a/src/sample/generated/Models/TeamInfo.cs +++ b/src/sample/generated/Models/TeamInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamInfo : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamInfo : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The name of the team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,12 +23,12 @@ public class TeamInfo : Entity, IParsable { /// The team property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Team? Team { get; set; } + public global::ApiSdk.Models.Team? Team { get; set; } #nullable restore #else - public ApiSdk.Models.Team Team { get; set; } + public global::ApiSdk.Models.Team Team { get; set; } #endif - /// The ID of the Azure Active Directory tenant. + /// The ID of the Microsoft Entra tenant. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? TenantId { get; set; } @@ -33,31 +39,38 @@ public class TeamInfo : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamInfo(); + return new global::ApiSdk.Models.TeamInfo(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"team", n => { Team = n.GetObjectValue(ApiSdk.Models.Team.CreateFromDiscriminatorValue); } }, - {"tenantId", n => { TenantId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "team", n => { Team = n.GetObjectValue(global::ApiSdk.Models.Team.CreateFromDiscriminatorValue); } }, + { "tenantId", n => { TenantId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); - writer.WriteObjectValue("team", Team); + writer.WriteObjectValue("team", Team); writer.WriteStringValue("tenantId", TenantId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamMemberSettings.cs b/src/sample/generated/Models/TeamMemberSettings.cs index fcbc7969..87a11b91 100644 --- a/src/sample/generated/Models/TeamMemberSettings.cs +++ b/src/sample/generated/Models/TeamMemberSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamMemberSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamMemberSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// If set to true, members can add and remove apps. @@ -21,37 +27,44 @@ public class TeamMemberSettings : IAdditionalDataHolder, IParsable { /// If set to true, members can delete channels. public bool? AllowDeleteChannels { get; set; } /// - /// Instantiates a new teamMemberSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamMemberSettings() { + public TeamMemberSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamMemberSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamMemberSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamMemberSettings(); + return new global::ApiSdk.Models.TeamMemberSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowAddRemoveApps", n => { AllowAddRemoveApps = n.GetBoolValue(); } }, - {"allowCreatePrivateChannels", n => { AllowCreatePrivateChannels = n.GetBoolValue(); } }, - {"allowCreateUpdateChannels", n => { AllowCreateUpdateChannels = n.GetBoolValue(); } }, - {"allowCreateUpdateRemoveConnectors", n => { AllowCreateUpdateRemoveConnectors = n.GetBoolValue(); } }, - {"allowCreateUpdateRemoveTabs", n => { AllowCreateUpdateRemoveTabs = n.GetBoolValue(); } }, - {"allowDeleteChannels", n => { AllowDeleteChannels = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowAddRemoveApps", n => { AllowAddRemoveApps = n.GetBoolValue(); } }, + { "allowCreatePrivateChannels", n => { AllowCreatePrivateChannels = n.GetBoolValue(); } }, + { "allowCreateUpdateChannels", n => { AllowCreateUpdateChannels = n.GetBoolValue(); } }, + { "allowCreateUpdateRemoveConnectors", n => { AllowCreateUpdateRemoveConnectors = n.GetBoolValue(); } }, + { "allowCreateUpdateRemoveTabs", n => { AllowCreateUpdateRemoveTabs = n.GetBoolValue(); } }, + { "allowDeleteChannels", n => { AllowDeleteChannels = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowAddRemoveApps", AllowAddRemoveApps); writer.WriteBoolValue("allowCreatePrivateChannels", AllowCreatePrivateChannels); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamMessagingSettings.cs b/src/sample/generated/Models/TeamMessagingSettings.cs index 89cf377f..4e742d26 100644 --- a/src/sample/generated/Models/TeamMessagingSettings.cs +++ b/src/sample/generated/Models/TeamMessagingSettings.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamMessagingSettings : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamMessagingSettings : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// If set to true, @channel mentions are allowed. @@ -19,36 +25,43 @@ public class TeamMessagingSettings : IAdditionalDataHolder, IParsable { /// If set to true, users can edit their messages. public bool? AllowUserEditMessages { get; set; } /// - /// Instantiates a new teamMessagingSettings and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamMessagingSettings() { + public TeamMessagingSettings() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamMessagingSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamMessagingSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamMessagingSettings(); + return new global::ApiSdk.Models.TeamMessagingSettings(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowChannelMentions", n => { AllowChannelMentions = n.GetBoolValue(); } }, - {"allowOwnerDeleteMessages", n => { AllowOwnerDeleteMessages = n.GetBoolValue(); } }, - {"allowTeamMentions", n => { AllowTeamMentions = n.GetBoolValue(); } }, - {"allowUserDeleteMessages", n => { AllowUserDeleteMessages = n.GetBoolValue(); } }, - {"allowUserEditMessages", n => { AllowUserEditMessages = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowChannelMentions", n => { AllowChannelMentions = n.GetBoolValue(); } }, + { "allowOwnerDeleteMessages", n => { AllowOwnerDeleteMessages = n.GetBoolValue(); } }, + { "allowTeamMentions", n => { AllowTeamMentions = n.GetBoolValue(); } }, + { "allowUserDeleteMessages", n => { AllowUserDeleteMessages = n.GetBoolValue(); } }, + { "allowUserEditMessages", n => { AllowUserEditMessages = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowChannelMentions", AllowChannelMentions); writer.WriteBoolValue("allowOwnerDeleteMessages", AllowOwnerDeleteMessages); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamSpecialization.cs b/src/sample/generated/Models/TeamSpecialization.cs index 718d59c7..3c0dee65 100644 --- a/src/sample/generated/Models/TeamSpecialization.cs +++ b/src/sample/generated/Models/TeamSpecialization.cs @@ -1,23 +1,44 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamSpecialization { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamSpecialization + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "educationStandard")] + #pragma warning disable CS1591 EducationStandard, + #pragma warning restore CS1591 [EnumMember(Value = "educationClass")] + #pragma warning disable CS1591 EducationClass, + #pragma warning restore CS1591 [EnumMember(Value = "educationProfessionalLearningCommunity")] + #pragma warning disable CS1591 EducationProfessionalLearningCommunity, + #pragma warning restore CS1591 [EnumMember(Value = "educationStaff")] + #pragma warning disable CS1591 EducationStaff, + #pragma warning restore CS1591 [EnumMember(Value = "healthcareStandard")] + #pragma warning disable CS1591 HealthcareStandard, + #pragma warning restore CS1591 [EnumMember(Value = "healthcareCareCoordination")] + #pragma warning disable CS1591 HealthcareCareCoordination, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TeamSummary.cs b/src/sample/generated/Models/TeamSummary.cs index b96b1fae..26b8a529 100644 --- a/src/sample/generated/Models/TeamSummary.cs +++ b/src/sample/generated/Models/TeamSummary.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamSummary : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamSummary : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Count of guests in a team. @@ -15,34 +21,41 @@ public class TeamSummary : IAdditionalDataHolder, IParsable { /// Count of owners in a team. public int? OwnersCount { get; set; } /// - /// Instantiates a new teamSummary and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamSummary() { + public TeamSummary() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamSummary CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamSummary CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamSummary(); + return new global::ApiSdk.Models.TeamSummary(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"guestsCount", n => { GuestsCount = n.GetIntValue(); } }, - {"membersCount", n => { MembersCount = n.GetIntValue(); } }, - {"ownersCount", n => { OwnersCount = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "guestsCount", n => { GuestsCount = n.GetIntValue(); } }, + { "membersCount", n => { MembersCount = n.GetIntValue(); } }, + { "ownersCount", n => { OwnersCount = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("guestsCount", GuestsCount); writer.WriteIntValue("membersCount", MembersCount); @@ -51,3 +64,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamVisibilityType.cs b/src/sample/generated/Models/TeamVisibilityType.cs index 4fc38adf..abf2d86d 100644 --- a/src/sample/generated/Models/TeamVisibilityType.cs +++ b/src/sample/generated/Models/TeamVisibilityType.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamVisibilityType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamVisibilityType + #pragma warning restore CS1591 + { [EnumMember(Value = "private")] + #pragma warning disable CS1591 Private, + #pragma warning restore CS1591 [EnumMember(Value = "public")] + #pragma warning disable CS1591 Public, + #pragma warning restore CS1591 [EnumMember(Value = "hiddenMembership")] + #pragma warning disable CS1591 HiddenMembership, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TeamsApp.cs b/src/sample/generated/Models/TeamsApp.cs index 6863157c..7b4be111 100644 --- a/src/sample/generated/Models/TeamsApp.cs +++ b/src/sample/generated/Models/TeamsApp.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsApp : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsApp : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The details for each version of the app. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppDefinitions { get; set; } + public List? AppDefinitions { get; set; } #nullable restore #else - public List AppDefinitions { get; set; } + public List AppDefinitions { get; set; } #endif /// The name of the catalog app provided by the app developer in the Microsoft Teams zip app package. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -23,7 +29,7 @@ public class TeamsApp : Entity, IParsable { public string DisplayName { get; set; } #endif /// The distributionMethod property - public TeamsAppDistributionMethod? DistributionMethod { get; set; } + public global::ApiSdk.Models.TeamsAppDistributionMethod? DistributionMethod { get; set; } /// The ID of the catalog provided by the app developer in the Microsoft Teams zip app package. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -35,33 +41,40 @@ public class TeamsApp : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamsApp CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamsApp CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsApp(); + return new global::ApiSdk.Models.TeamsApp(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"appDefinitions", n => { AppDefinitions = n.GetCollectionOfObjectValues(TeamsAppDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"distributionMethod", n => { DistributionMethod = n.GetEnumValue(); } }, - {"externalId", n => { ExternalId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "appDefinitions", n => { AppDefinitions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TeamsAppDefinition.CreateFromDiscriminatorValue)?.AsList(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "distributionMethod", n => { DistributionMethod = n.GetEnumValue(); } }, + { "externalId", n => { ExternalId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("appDefinitions", AppDefinitions); + writer.WriteCollectionOfObjectValues("appDefinitions", AppDefinitions); writer.WriteStringValue("displayName", DisplayName); - writer.WriteEnumValue("distributionMethod", DistributionMethod); + writer.WriteEnumValue("distributionMethod", DistributionMethod); writer.WriteStringValue("externalId", ExternalId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamsAppAuthorization.cs b/src/sample/generated/Models/TeamsAppAuthorization.cs index 6b2666a6..35331632 100644 --- a/src/sample/generated/Models/TeamsAppAuthorization.cs +++ b/src/sample/generated/Models/TeamsAppAuthorization.cs @@ -1,51 +1,65 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsAppAuthorization : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsAppAuthorization : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The requiredPermissionSet property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamsAppPermissionSet? RequiredPermissionSet { get; set; } + public global::ApiSdk.Models.TeamsAppPermissionSet? RequiredPermissionSet { get; set; } #nullable restore #else - public TeamsAppPermissionSet RequiredPermissionSet { get; set; } + public global::ApiSdk.Models.TeamsAppPermissionSet RequiredPermissionSet { get; set; } #endif /// - /// Instantiates a new teamsAppAuthorization and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamsAppAuthorization() { + public TeamsAppAuthorization() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamsAppAuthorization CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamsAppAuthorization CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsAppAuthorization(); + return new global::ApiSdk.Models.TeamsAppAuthorization(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"requiredPermissionSet", n => { RequiredPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "requiredPermissionSet", n => { RequiredPermissionSet = n.GetObjectValue(global::ApiSdk.Models.TeamsAppPermissionSet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("requiredPermissionSet", RequiredPermissionSet); + writer.WriteObjectValue("requiredPermissionSet", RequiredPermissionSet); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamsAppDefinition.cs b/src/sample/generated/Models/TeamsAppDefinition.cs index 515ab77f..133e70ac 100644 --- a/src/sample/generated/Models/TeamsAppDefinition.cs +++ b/src/sample/generated/Models/TeamsAppDefinition.cs @@ -1,34 +1,40 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsAppDefinition : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsAppDefinition : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The authorization property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamsAppAuthorization? Authorization { get; set; } + public global::ApiSdk.Models.TeamsAppAuthorization? Authorization { get; set; } #nullable restore #else - public TeamsAppAuthorization Authorization { get; set; } + public global::ApiSdk.Models.TeamsAppAuthorization Authorization { get; set; } #endif /// The bot property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamworkBot? Bot { get; set; } + public global::ApiSdk.Models.TeamworkBot? Bot { get; set; } #nullable restore #else - public TeamworkBot Bot { get; set; } + public global::ApiSdk.Models.TeamworkBot Bot { get; set; } #endif /// The createdBy property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public IdentitySet? CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet? CreatedBy { get; set; } #nullable restore #else - public IdentitySet CreatedBy { get; set; } + public global::ApiSdk.Models.IdentitySet CreatedBy { get; set; } #endif /// Verbose description of the application. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -49,7 +55,7 @@ public class TeamsAppDefinition : Entity, IParsable { /// The lastModifiedDateTime property public DateTimeOffset? LastModifiedDateTime { get; set; } /// The publishingState property - public TeamsAppPublishingState? PublishingState { get; set; } + public global::ApiSdk.Models.TeamsAppPublishingState? PublishingState { get; set; } /// Short description of the application. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -77,45 +83,52 @@ public class TeamsAppDefinition : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamsAppDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamsAppDefinition CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsAppDefinition(); + return new global::ApiSdk.Models.TeamsAppDefinition(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"authorization", n => { Authorization = n.GetObjectValue(TeamsAppAuthorization.CreateFromDiscriminatorValue); } }, - {"bot", n => { Bot = n.GetObjectValue(TeamworkBot.CreateFromDiscriminatorValue); } }, - {"createdBy", n => { CreatedBy = n.GetObjectValue(IdentitySet.CreateFromDiscriminatorValue); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"publishingState", n => { PublishingState = n.GetEnumValue(); } }, - {"shortDescription", n => { ShortDescription = n.GetStringValue(); } }, - {"teamsAppId", n => { TeamsAppId = n.GetStringValue(); } }, - {"version", n => { Version = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "authorization", n => { Authorization = n.GetObjectValue(global::ApiSdk.Models.TeamsAppAuthorization.CreateFromDiscriminatorValue); } }, + { "bot", n => { Bot = n.GetObjectValue(global::ApiSdk.Models.TeamworkBot.CreateFromDiscriminatorValue); } }, + { "createdBy", n => { CreatedBy = n.GetObjectValue(global::ApiSdk.Models.IdentitySet.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "publishingState", n => { PublishingState = n.GetEnumValue(); } }, + { "shortDescription", n => { ShortDescription = n.GetStringValue(); } }, + { "teamsAppId", n => { TeamsAppId = n.GetStringValue(); } }, + { "version", n => { Version = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("authorization", Authorization); - writer.WriteObjectValue("bot", Bot); - writer.WriteObjectValue("createdBy", CreatedBy); + writer.WriteObjectValue("authorization", Authorization); + writer.WriteObjectValue("bot", Bot); + writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); - writer.WriteEnumValue("publishingState", PublishingState); + writer.WriteEnumValue("publishingState", PublishingState); writer.WriteStringValue("shortDescription", ShortDescription); writer.WriteStringValue("teamsAppId", TeamsAppId); writer.WriteStringValue("version", Version); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamsAppDistributionMethod.cs b/src/sample/generated/Models/TeamsAppDistributionMethod.cs index 68f501ae..740d1b52 100644 --- a/src/sample/generated/Models/TeamsAppDistributionMethod.cs +++ b/src/sample/generated/Models/TeamsAppDistributionMethod.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamsAppDistributionMethod { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamsAppDistributionMethod + #pragma warning restore CS1591 + { [EnumMember(Value = "store")] + #pragma warning disable CS1591 Store, + #pragma warning restore CS1591 [EnumMember(Value = "organization")] + #pragma warning disable CS1591 Organization, + #pragma warning restore CS1591 [EnumMember(Value = "sideloaded")] + #pragma warning disable CS1591 Sideloaded, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TeamsAppInstallation.cs b/src/sample/generated/Models/TeamsAppInstallation.cs index d871181c..e1545671 100644 --- a/src/sample/generated/Models/TeamsAppInstallation.cs +++ b/src/sample/generated/Models/TeamsAppInstallation.cs @@ -1,63 +1,76 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsAppInstallation : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsAppInstallation : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The consentedPermissionSet property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamsAppPermissionSet? ConsentedPermissionSet { get; set; } + public global::ApiSdk.Models.TeamsAppPermissionSet? ConsentedPermissionSet { get; set; } #nullable restore #else - public TeamsAppPermissionSet ConsentedPermissionSet { get; set; } + public global::ApiSdk.Models.TeamsAppPermissionSet ConsentedPermissionSet { get; set; } #endif /// The teamsApp property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.TeamsApp? TeamsApp { get; set; } + public global::ApiSdk.Models.TeamsApp? TeamsApp { get; set; } #nullable restore #else - public ApiSdk.Models.TeamsApp TeamsApp { get; set; } + public global::ApiSdk.Models.TeamsApp TeamsApp { get; set; } #endif /// The teamsAppDefinition property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.TeamsAppDefinition? TeamsAppDefinition { get; set; } + public global::ApiSdk.Models.TeamsAppDefinition? TeamsAppDefinition { get; set; } #nullable restore #else - public ApiSdk.Models.TeamsAppDefinition TeamsAppDefinition { get; set; } + public global::ApiSdk.Models.TeamsAppDefinition TeamsAppDefinition { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamsAppInstallation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamsAppInstallation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsAppInstallation(); + return new global::ApiSdk.Models.TeamsAppInstallation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(TeamsAppPermissionSet.CreateFromDiscriminatorValue); } }, - {"teamsApp", n => { TeamsApp = n.GetObjectValue(ApiSdk.Models.TeamsApp.CreateFromDiscriminatorValue); } }, - {"teamsAppDefinition", n => { TeamsAppDefinition = n.GetObjectValue(ApiSdk.Models.TeamsAppDefinition.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "consentedPermissionSet", n => { ConsentedPermissionSet = n.GetObjectValue(global::ApiSdk.Models.TeamsAppPermissionSet.CreateFromDiscriminatorValue); } }, + { "teamsApp", n => { TeamsApp = n.GetObjectValue(global::ApiSdk.Models.TeamsApp.CreateFromDiscriminatorValue); } }, + { "teamsAppDefinition", n => { TeamsAppDefinition = n.GetObjectValue(global::ApiSdk.Models.TeamsAppDefinition.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("consentedPermissionSet", ConsentedPermissionSet); - writer.WriteObjectValue("teamsApp", TeamsApp); - writer.WriteObjectValue("teamsAppDefinition", TeamsAppDefinition); + writer.WriteObjectValue("consentedPermissionSet", ConsentedPermissionSet); + writer.WriteObjectValue("teamsApp", TeamsApp); + writer.WriteObjectValue("teamsAppDefinition", TeamsAppDefinition); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamsAppPermissionSet.cs b/src/sample/generated/Models/TeamsAppPermissionSet.cs index ccc6b0ff..c788de99 100644 --- a/src/sample/generated/Models/TeamsAppPermissionSet.cs +++ b/src/sample/generated/Models/TeamsAppPermissionSet.cs @@ -1,51 +1,65 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsAppPermissionSet : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsAppPermissionSet : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// A collection of resource-specific permissions. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ResourceSpecificPermissions { get; set; } + public List? ResourceSpecificPermissions { get; set; } #nullable restore #else - public List ResourceSpecificPermissions { get; set; } + public List ResourceSpecificPermissions { get; set; } #endif /// - /// Instantiates a new teamsAppPermissionSet and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamsAppPermissionSet() { + public TeamsAppPermissionSet() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamsAppPermissionSet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamsAppPermissionSet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsAppPermissionSet(); + return new global::ApiSdk.Models.TeamsAppPermissionSet(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"resourceSpecificPermissions", n => { ResourceSpecificPermissions = n.GetCollectionOfObjectValues(TeamsAppResourceSpecificPermission.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "resourceSpecificPermissions", n => { ResourceSpecificPermissions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TeamsAppResourceSpecificPermission.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("resourceSpecificPermissions", ResourceSpecificPermissions); + writer.WriteCollectionOfObjectValues("resourceSpecificPermissions", ResourceSpecificPermissions); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamsAppPublishingState.cs b/src/sample/generated/Models/TeamsAppPublishingState.cs index 55fd8b87..ed89d9d5 100644 --- a/src/sample/generated/Models/TeamsAppPublishingState.cs +++ b/src/sample/generated/Models/TeamsAppPublishingState.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamsAppPublishingState { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamsAppPublishingState + #pragma warning restore CS1591 + { [EnumMember(Value = "submitted")] + #pragma warning disable CS1591 Submitted, + #pragma warning restore CS1591 [EnumMember(Value = "rejected")] + #pragma warning disable CS1591 Rejected, + #pragma warning restore CS1591 [EnumMember(Value = "published")] + #pragma warning disable CS1591 Published, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TeamsAppResourceSpecificPermission.cs b/src/sample/generated/Models/TeamsAppResourceSpecificPermission.cs index 4a5d05ec..fef7e888 100644 --- a/src/sample/generated/Models/TeamsAppResourceSpecificPermission.cs +++ b/src/sample/generated/Models/TeamsAppResourceSpecificPermission.cs @@ -1,15 +1,21 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsAppResourceSpecificPermission : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsAppResourceSpecificPermission : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The permissionType property - public TeamsAppResourceSpecificPermissionType? PermissionType { get; set; } + public global::ApiSdk.Models.TeamsAppResourceSpecificPermissionType? PermissionType { get; set; } /// The name of the resource-specific permission. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,37 +25,45 @@ public class TeamsAppResourceSpecificPermission : IAdditionalDataHolder, IParsab public string PermissionValue { get; set; } #endif /// - /// Instantiates a new teamsAppResourceSpecificPermission and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamsAppResourceSpecificPermission() { + public TeamsAppResourceSpecificPermission() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamsAppResourceSpecificPermission CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamsAppResourceSpecificPermission CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsAppResourceSpecificPermission(); + return new global::ApiSdk.Models.TeamsAppResourceSpecificPermission(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"permissionType", n => { PermissionType = n.GetEnumValue(); } }, - {"permissionValue", n => { PermissionValue = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "permissionType", n => { PermissionType = n.GetEnumValue(); } }, + { "permissionValue", n => { PermissionValue = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteEnumValue("permissionType", PermissionType); + writer.WriteEnumValue("permissionType", PermissionType); writer.WriteStringValue("permissionValue", PermissionValue); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamsAppResourceSpecificPermissionType.cs b/src/sample/generated/Models/TeamsAppResourceSpecificPermissionType.cs index 4e141fdc..6b872d8e 100644 --- a/src/sample/generated/Models/TeamsAppResourceSpecificPermissionType.cs +++ b/src/sample/generated/Models/TeamsAppResourceSpecificPermissionType.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamsAppResourceSpecificPermissionType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamsAppResourceSpecificPermissionType + #pragma warning restore CS1591 + { [EnumMember(Value = "delegated")] + #pragma warning disable CS1591 Delegated, + #pragma warning restore CS1591 [EnumMember(Value = "application")] + #pragma warning disable CS1591 Application, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TeamsAsyncOperation.cs b/src/sample/generated/Models/TeamsAsyncOperation.cs index 8511c8eb..53c3d858 100644 --- a/src/sample/generated/Models/TeamsAsyncOperation.cs +++ b/src/sample/generated/Models/TeamsAsyncOperation.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsAsyncOperation : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsAsyncOperation : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Number of times the operation was attempted before being marked successful or failed. public int? AttemptsCount { get; set; } /// Time when the operation was created. @@ -13,17 +19,17 @@ public class TeamsAsyncOperation : Entity, IParsable { /// The error property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public OperationError? Error { get; set; } + public global::ApiSdk.Models.OperationError? Error { get; set; } #nullable restore #else - public OperationError Error { get; set; } + public global::ApiSdk.Models.OperationError Error { get; set; } #endif /// Time when the async operation was last updated. public DateTimeOffset? LastActionDateTime { get; set; } /// The operationType property - public TeamsAsyncOperationType? OperationType { get; set; } + public global::ApiSdk.Models.TeamsAsyncOperationType? OperationType { get; set; } /// The status property - public TeamsAsyncOperationStatus? Status { get; set; } + public global::ApiSdk.Models.TeamsAsyncOperationStatus? Status { get; set; } /// The ID of the object that's created or modified as result of this async operation, typically a team. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -43,41 +49,48 @@ public class TeamsAsyncOperation : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamsAsyncOperation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamsAsyncOperation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsAsyncOperation(); + return new global::ApiSdk.Models.TeamsAsyncOperation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"attemptsCount", n => { AttemptsCount = n.GetIntValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"error", n => { Error = n.GetObjectValue(OperationError.CreateFromDiscriminatorValue); } }, - {"lastActionDateTime", n => { LastActionDateTime = n.GetDateTimeOffsetValue(); } }, - {"operationType", n => { OperationType = n.GetEnumValue(); } }, - {"status", n => { Status = n.GetEnumValue(); } }, - {"targetResourceId", n => { TargetResourceId = n.GetStringValue(); } }, - {"targetResourceLocation", n => { TargetResourceLocation = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "attemptsCount", n => { AttemptsCount = n.GetIntValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "error", n => { Error = n.GetObjectValue(global::ApiSdk.Models.OperationError.CreateFromDiscriminatorValue); } }, + { "lastActionDateTime", n => { LastActionDateTime = n.GetDateTimeOffsetValue(); } }, + { "operationType", n => { OperationType = n.GetEnumValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "targetResourceId", n => { TargetResourceId = n.GetStringValue(); } }, + { "targetResourceLocation", n => { TargetResourceLocation = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("attemptsCount", AttemptsCount); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("error", Error); + writer.WriteObjectValue("error", Error); writer.WriteDateTimeOffsetValue("lastActionDateTime", LastActionDateTime); - writer.WriteEnumValue("operationType", OperationType); - writer.WriteEnumValue("status", Status); + writer.WriteEnumValue("operationType", OperationType); + writer.WriteEnumValue("status", Status); writer.WriteStringValue("targetResourceId", TargetResourceId); writer.WriteStringValue("targetResourceLocation", TargetResourceLocation); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamsAsyncOperationStatus.cs b/src/sample/generated/Models/TeamsAsyncOperationStatus.cs index acd9100c..af0f55e6 100644 --- a/src/sample/generated/Models/TeamsAsyncOperationStatus.cs +++ b/src/sample/generated/Models/TeamsAsyncOperationStatus.cs @@ -1,19 +1,36 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamsAsyncOperationStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamsAsyncOperationStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "invalid")] + #pragma warning disable CS1591 Invalid, + #pragma warning restore CS1591 [EnumMember(Value = "notStarted")] + #pragma warning disable CS1591 NotStarted, + #pragma warning restore CS1591 [EnumMember(Value = "inProgress")] + #pragma warning disable CS1591 InProgress, + #pragma warning restore CS1591 [EnumMember(Value = "succeeded")] + #pragma warning disable CS1591 Succeeded, + #pragma warning restore CS1591 [EnumMember(Value = "failed")] + #pragma warning disable CS1591 Failed, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TeamsAsyncOperationType.cs b/src/sample/generated/Models/TeamsAsyncOperationType.cs index 13736740..45c166e0 100644 --- a/src/sample/generated/Models/TeamsAsyncOperationType.cs +++ b/src/sample/generated/Models/TeamsAsyncOperationType.cs @@ -1,23 +1,52 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamsAsyncOperationType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamsAsyncOperationType + #pragma warning restore CS1591 + { [EnumMember(Value = "invalid")] + #pragma warning disable CS1591 Invalid, + #pragma warning restore CS1591 [EnumMember(Value = "cloneTeam")] + #pragma warning disable CS1591 CloneTeam, + #pragma warning restore CS1591 [EnumMember(Value = "archiveTeam")] + #pragma warning disable CS1591 ArchiveTeam, + #pragma warning restore CS1591 [EnumMember(Value = "unarchiveTeam")] + #pragma warning disable CS1591 UnarchiveTeam, + #pragma warning restore CS1591 [EnumMember(Value = "createTeam")] + #pragma warning disable CS1591 CreateTeam, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 [EnumMember(Value = "teamifyGroup")] + #pragma warning disable CS1591 TeamifyGroup, + #pragma warning restore CS1591 [EnumMember(Value = "createChannel")] + #pragma warning disable CS1591 CreateChannel, + #pragma warning restore CS1591 + [EnumMember(Value = "archiveChannel")] + #pragma warning disable CS1591 + ArchiveChannel, + #pragma warning restore CS1591 + [EnumMember(Value = "unarchiveChannel")] + #pragma warning disable CS1591 + UnarchiveChannel, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TeamsTab.cs b/src/sample/generated/Models/TeamsTab.cs index dcaaeb49..239f9482 100644 --- a/src/sample/generated/Models/TeamsTab.cs +++ b/src/sample/generated/Models/TeamsTab.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsTab : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsTab : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The configuration property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamsTabConfiguration? Configuration { get; set; } + public global::ApiSdk.Models.TeamsTabConfiguration? Configuration { get; set; } #nullable restore #else - public TeamsTabConfiguration Configuration { get; set; } + public global::ApiSdk.Models.TeamsTabConfiguration Configuration { get; set; } #endif /// Name of the tab. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,10 +31,10 @@ public class TeamsTab : Entity, IParsable { /// The teamsApp property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.TeamsApp? TeamsApp { get; set; } + public global::ApiSdk.Models.TeamsApp? TeamsApp { get; set; } #nullable restore #else - public ApiSdk.Models.TeamsApp TeamsApp { get; set; } + public global::ApiSdk.Models.TeamsApp TeamsApp { get; set; } #endif /// Deep link URL of the tab instance. Read only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,33 +47,40 @@ public class TeamsTab : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamsTab CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamsTab CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsTab(); + return new global::ApiSdk.Models.TeamsTab(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"configuration", n => { Configuration = n.GetObjectValue(TeamsTabConfiguration.CreateFromDiscriminatorValue); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"teamsApp", n => { TeamsApp = n.GetObjectValue(ApiSdk.Models.TeamsApp.CreateFromDiscriminatorValue); } }, - {"webUrl", n => { WebUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "configuration", n => { Configuration = n.GetObjectValue(global::ApiSdk.Models.TeamsTabConfiguration.CreateFromDiscriminatorValue); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "teamsApp", n => { TeamsApp = n.GetObjectValue(global::ApiSdk.Models.TeamsApp.CreateFromDiscriminatorValue); } }, + { "webUrl", n => { WebUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("configuration", Configuration); + writer.WriteObjectValue("configuration", Configuration); writer.WriteStringValue("displayName", DisplayName); - writer.WriteObjectValue("teamsApp", TeamsApp); + writer.WriteObjectValue("teamsApp", TeamsApp); writer.WriteStringValue("webUrl", WebUrl); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamsTabConfiguration.cs b/src/sample/generated/Models/TeamsTabConfiguration.cs index 231b52b1..7ab671a0 100644 --- a/src/sample/generated/Models/TeamsTabConfiguration.cs +++ b/src/sample/generated/Models/TeamsTabConfiguration.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsTabConfiguration : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsTabConfiguration : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Url used for rendering tab contents in Teams. Required. @@ -41,35 +47,42 @@ public class TeamsTabConfiguration : IAdditionalDataHolder, IParsable { public string WebsiteUrl { get; set; } #endif /// - /// Instantiates a new teamsTabConfiguration and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamsTabConfiguration() { + public TeamsTabConfiguration() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamsTabConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamsTabConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsTabConfiguration(); + return new global::ApiSdk.Models.TeamsTabConfiguration(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"contentUrl", n => { ContentUrl = n.GetStringValue(); } }, - {"entityId", n => { EntityId = n.GetStringValue(); } }, - {"removeUrl", n => { RemoveUrl = n.GetStringValue(); } }, - {"websiteUrl", n => { WebsiteUrl = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "contentUrl", n => { ContentUrl = n.GetStringValue(); } }, + { "entityId", n => { EntityId = n.GetStringValue(); } }, + { "removeUrl", n => { RemoveUrl = n.GetStringValue(); } }, + { "websiteUrl", n => { WebsiteUrl = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentUrl", ContentUrl); writer.WriteStringValue("entityId", EntityId); @@ -79,3 +92,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamsTemplate.cs b/src/sample/generated/Models/TeamsTemplate.cs index 6db961d5..2f1029ac 100644 --- a/src/sample/generated/Models/TeamsTemplate.cs +++ b/src/sample/generated/Models/TeamsTemplate.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamsTemplate : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamsTemplate : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamsTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamsTemplate CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamsTemplate(); + return new global::ApiSdk.Models.TeamsTemplate(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamworkBot.cs b/src/sample/generated/Models/TeamworkBot.cs index 75199ab3..14224409 100644 --- a/src/sample/generated/Models/TeamworkBot.cs +++ b/src/sample/generated/Models/TeamworkBot.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamworkBot : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamworkBot : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamworkBot CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamworkBot CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamworkBot(); + return new global::ApiSdk.Models.TeamworkBot(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamworkConversationIdentity.cs b/src/sample/generated/Models/TeamworkConversationIdentity.cs index f95086ae..c8059dd7 100644 --- a/src/sample/generated/Models/TeamworkConversationIdentity.cs +++ b/src/sample/generated/Models/TeamworkConversationIdentity.cs @@ -1,37 +1,50 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamworkConversationIdentity : Identity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamworkConversationIdentity : global::ApiSdk.Models.Identity, IParsable + #pragma warning restore CS1591 + { /// The conversationIdentityType property - public TeamworkConversationIdentityType? ConversationIdentityType { get; set; } + public global::ApiSdk.Models.TeamworkConversationIdentityType? ConversationIdentityType { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamworkConversationIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamworkConversationIdentity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamworkConversationIdentity(); + return new global::ApiSdk.Models.TeamworkConversationIdentity(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"conversationIdentityType", n => { ConversationIdentityType = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "conversationIdentityType", n => { ConversationIdentityType = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("conversationIdentityType", ConversationIdentityType); + writer.WriteEnumValue("conversationIdentityType", ConversationIdentityType); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamworkConversationIdentityType.cs b/src/sample/generated/Models/TeamworkConversationIdentityType.cs index fcdb6b10..fcf66ea9 100644 --- a/src/sample/generated/Models/TeamworkConversationIdentityType.cs +++ b/src/sample/generated/Models/TeamworkConversationIdentityType.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamworkConversationIdentityType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamworkConversationIdentityType + #pragma warning restore CS1591 + { [EnumMember(Value = "team")] + #pragma warning disable CS1591 Team, + #pragma warning restore CS1591 [EnumMember(Value = "channel")] + #pragma warning disable CS1591 Channel, + #pragma warning restore CS1591 [EnumMember(Value = "chat")] + #pragma warning disable CS1591 Chat, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TeamworkHostedContent.cs b/src/sample/generated/Models/TeamworkHostedContent.cs index 3ad3e0c3..fc2de56e 100644 --- a/src/sample/generated/Models/TeamworkHostedContent.cs +++ b/src/sample/generated/Models/TeamworkHostedContent.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamworkHostedContent : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamworkHostedContent : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Write only. Bytes for the hosted content (such as images). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -25,25 +31,31 @@ public class TeamworkHostedContent : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamworkHostedContent CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamworkHostedContent CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamworkHostedContent(); + return new global::ApiSdk.Models.TeamworkHostedContent(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"contentBytes", n => { ContentBytes = n.GetByteArrayValue(); } }, - {"contentType", n => { ContentType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "contentBytes", n => { ContentBytes = n.GetByteArrayValue(); } }, + { "contentType", n => { ContentType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("contentBytes", ContentBytes); @@ -51,3 +63,4 @@ public class TeamworkHostedContent : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamworkOnlineMeetingInfo.cs b/src/sample/generated/Models/TeamworkOnlineMeetingInfo.cs index 11cc7300..b0f080b5 100644 --- a/src/sample/generated/Models/TeamworkOnlineMeetingInfo.cs +++ b/src/sample/generated/Models/TeamworkOnlineMeetingInfo.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamworkOnlineMeetingInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamworkOnlineMeetingInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The identifier of the calendar event associated with the meeting. @@ -27,45 +33,53 @@ public class TeamworkOnlineMeetingInfo : IAdditionalDataHolder, IParsable { /// The organizer property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TeamworkUserIdentity? Organizer { get; set; } + public global::ApiSdk.Models.TeamworkUserIdentity? Organizer { get; set; } #nullable restore #else - public TeamworkUserIdentity Organizer { get; set; } + public global::ApiSdk.Models.TeamworkUserIdentity Organizer { get; set; } #endif /// - /// Instantiates a new teamworkOnlineMeetingInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public TeamworkOnlineMeetingInfo() { + public TeamworkOnlineMeetingInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TeamworkOnlineMeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TeamworkOnlineMeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamworkOnlineMeetingInfo(); + return new global::ApiSdk.Models.TeamworkOnlineMeetingInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"calendarEventId", n => { CalendarEventId = n.GetStringValue(); } }, - {"joinWebUrl", n => { JoinWebUrl = n.GetStringValue(); } }, - {"organizer", n => { Organizer = n.GetObjectValue(TeamworkUserIdentity.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "calendarEventId", n => { CalendarEventId = n.GetStringValue(); } }, + { "joinWebUrl", n => { JoinWebUrl = n.GetStringValue(); } }, + { "organizer", n => { Organizer = n.GetObjectValue(global::ApiSdk.Models.TeamworkUserIdentity.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("calendarEventId", CalendarEventId); writer.WriteStringValue("joinWebUrl", JoinWebUrl); - writer.WriteObjectValue("organizer", Organizer); + writer.WriteObjectValue("organizer", Organizer); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamworkTag.cs b/src/sample/generated/Models/TeamworkTag.cs index b679ecb6..3d2a18a5 100644 --- a/src/sample/generated/Models/TeamworkTag.cs +++ b/src/sample/generated/Models/TeamworkTag.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamworkTag : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamworkTag : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The description of the tag as it appears to the user in Microsoft Teams. A teamworkTag can't have more than 200 teamworkTagMembers. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -27,13 +33,13 @@ public class TeamworkTag : Entity, IParsable { /// Users assigned to the tag. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Members { get; set; } + public List? Members { get; set; } #nullable restore #else - public List Members { get; set; } + public List Members { get; set; } #endif /// The tagType property - public TeamworkTagType? TagType { get; set; } + public global::ApiSdk.Models.TeamworkTagType? TagType { get; set; } /// ID of the team in which the tag is defined. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -45,37 +51,44 @@ public class TeamworkTag : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamworkTag CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamworkTag CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamworkTag(); + return new global::ApiSdk.Models.TeamworkTag(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"memberCount", n => { MemberCount = n.GetIntValue(); } }, - {"members", n => { Members = n.GetCollectionOfObjectValues(TeamworkTagMember.CreateFromDiscriminatorValue)?.ToList(); } }, - {"tagType", n => { TagType = n.GetEnumValue(); } }, - {"teamId", n => { TeamId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "memberCount", n => { MemberCount = n.GetIntValue(); } }, + { "members", n => { Members = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TeamworkTagMember.CreateFromDiscriminatorValue)?.AsList(); } }, + { "tagType", n => { TagType = n.GetEnumValue(); } }, + { "teamId", n => { TeamId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteIntValue("memberCount", MemberCount); - writer.WriteCollectionOfObjectValues("members", Members); - writer.WriteEnumValue("tagType", TagType); + writer.WriteCollectionOfObjectValues("members", Members); + writer.WriteEnumValue("tagType", TagType); writer.WriteStringValue("teamId", TeamId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamworkTagMember.cs b/src/sample/generated/Models/TeamworkTagMember.cs index e87175fd..e83c833f 100644 --- a/src/sample/generated/Models/TeamworkTagMember.cs +++ b/src/sample/generated/Models/TeamworkTagMember.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamworkTagMember : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamworkTagMember : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The member's display name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -33,26 +39,32 @@ public class TeamworkTagMember : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamworkTagMember CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamworkTagMember CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamworkTagMember(); + return new global::ApiSdk.Models.TeamworkTagMember(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"tenantId", n => { TenantId = n.GetStringValue(); } }, - {"userId", n => { UserId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "tenantId", n => { TenantId = n.GetStringValue(); } }, + { "userId", n => { UserId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); @@ -61,3 +73,4 @@ public class TeamworkTagMember : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamworkTagType.cs b/src/sample/generated/Models/TeamworkTagType.cs index 30b3d0d4..83ee0923 100644 --- a/src/sample/generated/Models/TeamworkTagType.cs +++ b/src/sample/generated/Models/TeamworkTagType.cs @@ -1,11 +1,20 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamworkTagType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamworkTagType + #pragma warning restore CS1591 + { [EnumMember(Value = "standard")] + #pragma warning disable CS1591 Standard, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TeamworkUserIdentity.cs b/src/sample/generated/Models/TeamworkUserIdentity.cs index 50a7572b..344fcd7d 100644 --- a/src/sample/generated/Models/TeamworkUserIdentity.cs +++ b/src/sample/generated/Models/TeamworkUserIdentity.cs @@ -1,37 +1,50 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TeamworkUserIdentity : Identity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TeamworkUserIdentity : global::ApiSdk.Models.Identity, IParsable + #pragma warning restore CS1591 + { /// The userIdentityType property - public TeamworkUserIdentityType? UserIdentityType { get; set; } + public global::ApiSdk.Models.TeamworkUserIdentityType? UserIdentityType { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TeamworkUserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TeamworkUserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TeamworkUserIdentity(); + return new global::ApiSdk.Models.TeamworkUserIdentity(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"userIdentityType", n => { UserIdentityType = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "userIdentityType", n => { UserIdentityType = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteEnumValue("userIdentityType", UserIdentityType); + writer.WriteEnumValue("userIdentityType", UserIdentityType); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TeamworkUserIdentityType.cs b/src/sample/generated/Models/TeamworkUserIdentityType.cs index 01d09b3c..0d3d4cfb 100644 --- a/src/sample/generated/Models/TeamworkUserIdentityType.cs +++ b/src/sample/generated/Models/TeamworkUserIdentityType.cs @@ -1,25 +1,48 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TeamworkUserIdentityType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TeamworkUserIdentityType + #pragma warning restore CS1591 + { [EnumMember(Value = "aadUser")] + #pragma warning disable CS1591 AadUser, + #pragma warning restore CS1591 [EnumMember(Value = "onPremiseAadUser")] + #pragma warning disable CS1591 OnPremiseAadUser, + #pragma warning restore CS1591 [EnumMember(Value = "anonymousGuest")] + #pragma warning disable CS1591 AnonymousGuest, + #pragma warning restore CS1591 [EnumMember(Value = "federatedUser")] + #pragma warning disable CS1591 FederatedUser, + #pragma warning restore CS1591 [EnumMember(Value = "personalMicrosoftAccountUser")] + #pragma warning disable CS1591 PersonalMicrosoftAccountUser, + #pragma warning restore CS1591 [EnumMember(Value = "skypeUser")] + #pragma warning disable CS1591 SkypeUser, + #pragma warning restore CS1591 [EnumMember(Value = "phoneUser")] + #pragma warning disable CS1591 PhoneUser, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 [EnumMember(Value = "emailUser")] + #pragma warning disable CS1591 EmailUser, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TemporaryAccessPassAuthenticationMethod.cs b/src/sample/generated/Models/TemporaryAccessPassAuthenticationMethod.cs index dd02d426..8d9769e2 100644 --- a/src/sample/generated/Models/TemporaryAccessPassAuthenticationMethod.cs +++ b/src/sample/generated/Models/TemporaryAccessPassAuthenticationMethod.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TemporaryAccessPassAuthenticationMethod : AuthenticationMethod, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TemporaryAccessPassAuthenticationMethod : global::ApiSdk.Models.AuthenticationMethod, IParsable + #pragma warning restore CS1591 + { /// The date and time when the Temporary Access Pass was created. public DateTimeOffset? CreatedDateTime { get; set; } /// The state of the authentication method that indicates whether it's currently usable by the user. @@ -35,30 +41,36 @@ public class TemporaryAccessPassAuthenticationMethod : AuthenticationMethod, IPa /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TemporaryAccessPassAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TemporaryAccessPassAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TemporaryAccessPassAuthenticationMethod(); + return new global::ApiSdk.Models.TemporaryAccessPassAuthenticationMethod(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"isUsable", n => { IsUsable = n.GetBoolValue(); } }, - {"isUsableOnce", n => { IsUsableOnce = n.GetBoolValue(); } }, - {"lifetimeInMinutes", n => { LifetimeInMinutes = n.GetIntValue(); } }, - {"methodUsabilityReason", n => { MethodUsabilityReason = n.GetStringValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, - {"temporaryAccessPass", n => { TemporaryAccessPass = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "isUsable", n => { IsUsable = n.GetBoolValue(); } }, + { "isUsableOnce", n => { IsUsableOnce = n.GetBoolValue(); } }, + { "lifetimeInMinutes", n => { LifetimeInMinutes = n.GetIntValue(); } }, + { "methodUsabilityReason", n => { MethodUsabilityReason = n.GetStringValue(); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + { "temporaryAccessPass", n => { TemporaryAccessPass = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); @@ -71,3 +83,4 @@ public class TemporaryAccessPassAuthenticationMethod : AuthenticationMethod, IPa } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermColumn.cs b/src/sample/generated/Models/TermColumn.cs index e68b7aa6..d47df6ab 100644 --- a/src/sample/generated/Models/TermColumn.cs +++ b/src/sample/generated/Models/TermColumn.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.TermStore; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TermColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TermColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Specifies whether the column allows more than one value. @@ -14,57 +20,65 @@ public class TermColumn : IAdditionalDataHolder, IParsable { /// The parentTerm property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Term? ParentTerm { get; set; } + public global::ApiSdk.Models.TermStore.Term? ParentTerm { get; set; } #nullable restore #else - public Term ParentTerm { get; set; } + public global::ApiSdk.Models.TermStore.Term ParentTerm { get; set; } #endif /// Specifies whether to display the entire term path or only the term label. public bool? ShowFullyQualifiedName { get; set; } /// The termSet property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Set? TermSet { get; set; } + public global::ApiSdk.Models.TermStore.Set? TermSet { get; set; } #nullable restore #else - public Set TermSet { get; set; } + public global::ApiSdk.Models.TermStore.Set TermSet { get; set; } #endif /// - /// Instantiates a new termColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public TermColumn() { + public TermColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TermColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TermColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TermColumn(); + return new global::ApiSdk.Models.TermColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowMultipleValues", n => { AllowMultipleValues = n.GetBoolValue(); } }, - {"parentTerm", n => { ParentTerm = n.GetObjectValue(Term.CreateFromDiscriminatorValue); } }, - {"showFullyQualifiedName", n => { ShowFullyQualifiedName = n.GetBoolValue(); } }, - {"termSet", n => { TermSet = n.GetObjectValue(Set.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowMultipleValues", n => { AllowMultipleValues = n.GetBoolValue(); } }, + { "parentTerm", n => { ParentTerm = n.GetObjectValue(global::ApiSdk.Models.TermStore.Term.CreateFromDiscriminatorValue); } }, + { "showFullyQualifiedName", n => { ShowFullyQualifiedName = n.GetBoolValue(); } }, + { "termSet", n => { TermSet = n.GetObjectValue(global::ApiSdk.Models.TermStore.Set.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowMultipleValues", AllowMultipleValues); - writer.WriteObjectValue("parentTerm", ParentTerm); + writer.WriteObjectValue("parentTerm", ParentTerm); writer.WriteBoolValue("showFullyQualifiedName", ShowFullyQualifiedName); - writer.WriteObjectValue("termSet", TermSet); + writer.WriteObjectValue("termSet", TermSet); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermStore/Group.cs b/src/sample/generated/Models/TermStore/Group.cs index f8c10cb2..1ef8b347 100644 --- a/src/sample/generated/Models/TermStore/Group.cs +++ b/src/sample/generated/Models/TermStore/Group.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.TermStore { - public class Group : Entity, IParsable { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Group : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Date and time of the group creation. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } /// Description that gives details on the term usage. @@ -33,49 +39,56 @@ public class Group : Entity, IParsable { public string ParentSiteId { get; set; } #endif /// The scope property - public TermGroupScope? Scope { get; set; } + public global::ApiSdk.Models.TermStore.TermGroupScope? Scope { get; set; } /// All sets under the group in a term [store]. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Sets { get; set; } + public List? Sets { get; set; } #nullable restore #else - public List Sets { get; set; } + public List Sets { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Group CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TermStore.Group CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Group(); + return new global::ApiSdk.Models.TermStore.Group(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"parentSiteId", n => { ParentSiteId = n.GetStringValue(); } }, - {"scope", n => { Scope = n.GetEnumValue(); } }, - {"sets", n => { Sets = n.GetCollectionOfObjectValues(Set.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "parentSiteId", n => { ParentSiteId = n.GetStringValue(); } }, + { "scope", n => { Scope = n.GetEnumValue(); } }, + { "sets", n => { Sets = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.Set.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("parentSiteId", ParentSiteId); - writer.WriteEnumValue("scope", Scope); - writer.WriteCollectionOfObjectValues("sets", Sets); + writer.WriteEnumValue("scope", Scope); + writer.WriteCollectionOfObjectValues("sets", Sets); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermStore/LocalizedDescription.cs b/src/sample/generated/Models/TermStore/LocalizedDescription.cs index ace0c8a7..17124b99 100644 --- a/src/sample/generated/Models/TermStore/LocalizedDescription.cs +++ b/src/sample/generated/Models/TermStore/LocalizedDescription.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.TermStore { - public class LocalizedDescription : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LocalizedDescription : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The description in the localized language. @@ -25,33 +31,40 @@ public class LocalizedDescription : IAdditionalDataHolder, IParsable { public string LanguageTag { get; set; } #endif /// - /// Instantiates a new localizedDescription and sets the default values. + /// Instantiates a new and sets the default values. /// - public LocalizedDescription() { + public LocalizedDescription() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LocalizedDescription CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TermStore.LocalizedDescription CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LocalizedDescription(); + return new global::ApiSdk.Models.TermStore.LocalizedDescription(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"description", n => { Description = n.GetStringValue(); } }, - {"languageTag", n => { LanguageTag = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "languageTag", n => { LanguageTag = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("languageTag", LanguageTag); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermStore/LocalizedLabel.cs b/src/sample/generated/Models/TermStore/LocalizedLabel.cs index a3d7495e..80deffab 100644 --- a/src/sample/generated/Models/TermStore/LocalizedLabel.cs +++ b/src/sample/generated/Models/TermStore/LocalizedLabel.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.TermStore { - public class LocalizedLabel : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LocalizedLabel : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Indicates whether the label is the default label. @@ -27,34 +33,41 @@ public class LocalizedLabel : IAdditionalDataHolder, IParsable { public string Name { get; set; } #endif /// - /// Instantiates a new localizedLabel and sets the default values. + /// Instantiates a new and sets the default values. /// - public LocalizedLabel() { + public LocalizedLabel() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LocalizedLabel CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TermStore.LocalizedLabel CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LocalizedLabel(); + return new global::ApiSdk.Models.TermStore.LocalizedLabel(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"isDefault", n => { IsDefault = n.GetBoolValue(); } }, - {"languageTag", n => { LanguageTag = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "isDefault", n => { IsDefault = n.GetBoolValue(); } }, + { "languageTag", n => { LanguageTag = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDefault", IsDefault); writer.WriteStringValue("languageTag", LanguageTag); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermStore/LocalizedName.cs b/src/sample/generated/Models/TermStore/LocalizedName.cs index 53070c0e..d900d6dc 100644 --- a/src/sample/generated/Models/TermStore/LocalizedName.cs +++ b/src/sample/generated/Models/TermStore/LocalizedName.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.TermStore { - public class LocalizedName : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class LocalizedName : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The language tag for the label. @@ -25,33 +31,40 @@ public class LocalizedName : IAdditionalDataHolder, IParsable { public string Name { get; set; } #endif /// - /// Instantiates a new localizedName and sets the default values. + /// Instantiates a new and sets the default values. /// - public LocalizedName() { + public LocalizedName() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static LocalizedName CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TermStore.LocalizedName CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new LocalizedName(); + return new global::ApiSdk.Models.TermStore.LocalizedName(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"languageTag", n => { LanguageTag = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "languageTag", n => { LanguageTag = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("languageTag", LanguageTag); writer.WriteStringValue("name", Name); @@ -59,3 +72,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermStore/Relation.cs b/src/sample/generated/Models/TermStore/Relation.cs index f4621c24..e7cc33bf 100644 --- a/src/sample/generated/Models/TermStore/Relation.cs +++ b/src/sample/generated/Models/TermStore/Relation.cs @@ -1,67 +1,80 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.TermStore { - public class Relation : Entity, IParsable { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Relation : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The fromTerm property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Term? FromTerm { get; set; } + public global::ApiSdk.Models.TermStore.Term? FromTerm { get; set; } #nullable restore #else - public Term FromTerm { get; set; } + public global::ApiSdk.Models.TermStore.Term FromTerm { get; set; } #endif /// The relationship property - public RelationType? Relationship { get; set; } + public global::ApiSdk.Models.TermStore.RelationType? Relationship { get; set; } /// The set property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.TermStore.Set? Set { get; set; } + public global::ApiSdk.Models.TermStore.Set? Set { get; set; } #nullable restore #else - public ApiSdk.Models.TermStore.Set Set { get; set; } + public global::ApiSdk.Models.TermStore.Set Set { get; set; } #endif /// The toTerm property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Term? ToTerm { get; set; } + public global::ApiSdk.Models.TermStore.Term? ToTerm { get; set; } #nullable restore #else - public Term ToTerm { get; set; } + public global::ApiSdk.Models.TermStore.Term ToTerm { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Relation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TermStore.Relation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Relation(); + return new global::ApiSdk.Models.TermStore.Relation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"fromTerm", n => { FromTerm = n.GetObjectValue(Term.CreateFromDiscriminatorValue); } }, - {"relationship", n => { Relationship = n.GetEnumValue(); } }, - {"set", n => { Set = n.GetObjectValue(ApiSdk.Models.TermStore.Set.CreateFromDiscriminatorValue); } }, - {"toTerm", n => { ToTerm = n.GetObjectValue(Term.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "fromTerm", n => { FromTerm = n.GetObjectValue(global::ApiSdk.Models.TermStore.Term.CreateFromDiscriminatorValue); } }, + { "relationship", n => { Relationship = n.GetEnumValue(); } }, + { "set", n => { Set = n.GetObjectValue(global::ApiSdk.Models.TermStore.Set.CreateFromDiscriminatorValue); } }, + { "toTerm", n => { ToTerm = n.GetObjectValue(global::ApiSdk.Models.TermStore.Term.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("fromTerm", FromTerm); - writer.WriteEnumValue("relationship", Relationship); - writer.WriteObjectValue("set", Set); - writer.WriteObjectValue("toTerm", ToTerm); + writer.WriteObjectValue("fromTerm", FromTerm); + writer.WriteEnumValue("relationship", Relationship); + writer.WriteObjectValue("set", Set); + writer.WriteObjectValue("toTerm", ToTerm); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermStore/RelationType.cs b/src/sample/generated/Models/TermStore/RelationType.cs index 0f0880c7..077a9691 100644 --- a/src/sample/generated/Models/TermStore/RelationType.cs +++ b/src/sample/generated/Models/TermStore/RelationType.cs @@ -1,13 +1,24 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models.TermStore { - public enum RelationType { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum RelationType + #pragma warning restore CS1591 + { [EnumMember(Value = "pin")] + #pragma warning disable CS1591 Pin, + #pragma warning restore CS1591 [EnumMember(Value = "reuse")] + #pragma warning disable CS1591 Reuse, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TermStore/Set.cs b/src/sample/generated/Models/TermStore/Set.cs index da65389b..2f2606eb 100644 --- a/src/sample/generated/Models/TermStore/Set.cs +++ b/src/sample/generated/Models/TermStore/Set.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.TermStore { - public class Set : Entity, IParsable { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Set : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Children terms of set in term [store]. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Children { get; set; } + public List? Children { get; set; } #nullable restore #else - public List Children { get; set; } + public List Children { get; set; } #endif /// Date and time of set creation. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } @@ -27,81 +33,88 @@ public class Set : Entity, IParsable { /// Name of the set for each languageTag. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? LocalizedNames { get; set; } + public List? LocalizedNames { get; set; } #nullable restore #else - public List LocalizedNames { get; set; } + public List LocalizedNames { get; set; } #endif /// The parentGroup property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Group? ParentGroup { get; set; } + public global::ApiSdk.Models.TermStore.Group? ParentGroup { get; set; } #nullable restore #else - public Group ParentGroup { get; set; } + public global::ApiSdk.Models.TermStore.Group ParentGroup { get; set; } #endif /// Custom properties for the set. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Properties { get; set; } + public List? Properties { get; set; } #nullable restore #else - public List Properties { get; set; } + public List Properties { get; set; } #endif /// Indicates which terms have been pinned or reused directly under the set. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Relations { get; set; } + public List? Relations { get; set; } #nullable restore #else - public List Relations { get; set; } + public List Relations { get; set; } #endif /// All the terms under the set. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Terms { get; set; } + public List? Terms { get; set; } #nullable restore #else - public List Terms { get; set; } + public List Terms { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Set CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TermStore.Set CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Set(); + return new global::ApiSdk.Models.TermStore.Set(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"children", n => { Children = n.GetCollectionOfObjectValues(Term.CreateFromDiscriminatorValue)?.ToList(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"localizedNames", n => { LocalizedNames = n.GetCollectionOfObjectValues(LocalizedName.CreateFromDiscriminatorValue)?.ToList(); } }, - {"parentGroup", n => { ParentGroup = n.GetObjectValue(Group.CreateFromDiscriminatorValue); } }, - {"properties", n => { Properties = n.GetCollectionOfObjectValues(ApiSdk.Models.KeyValue.CreateFromDiscriminatorValue)?.ToList(); } }, - {"relations", n => { Relations = n.GetCollectionOfObjectValues(Relation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"terms", n => { Terms = n.GetCollectionOfObjectValues(Term.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "children", n => { Children = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.Term.CreateFromDiscriminatorValue)?.AsList(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "localizedNames", n => { LocalizedNames = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.LocalizedName.CreateFromDiscriminatorValue)?.AsList(); } }, + { "parentGroup", n => { ParentGroup = n.GetObjectValue(global::ApiSdk.Models.TermStore.Group.CreateFromDiscriminatorValue); } }, + { "properties", n => { Properties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.KeyValue.CreateFromDiscriminatorValue)?.AsList(); } }, + { "relations", n => { Relations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.Relation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "terms", n => { Terms = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.Term.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("children", Children); + writer.WriteCollectionOfObjectValues("children", Children); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); - writer.WriteCollectionOfObjectValues("localizedNames", LocalizedNames); - writer.WriteObjectValue("parentGroup", ParentGroup); - writer.WriteCollectionOfObjectValues("properties", Properties); - writer.WriteCollectionOfObjectValues("relations", Relations); - writer.WriteCollectionOfObjectValues("terms", Terms); + writer.WriteCollectionOfObjectValues("localizedNames", LocalizedNames); + writer.WriteObjectValue("parentGroup", ParentGroup); + writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteCollectionOfObjectValues("relations", Relations); + writer.WriteCollectionOfObjectValues("terms", Terms); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermStore/Store.cs b/src/sample/generated/Models/TermStore/Store.cs index 6b7c57c7..37ef5b1d 100644 --- a/src/sample/generated/Models/TermStore/Store.cs +++ b/src/sample/generated/Models/TermStore/Store.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.TermStore { - public class Store : Entity, IParsable { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Store : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Default language of the term store. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,10 +23,10 @@ public class Store : Entity, IParsable { /// Collection of all groups available in the term store. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Groups { get; set; } + public List? Groups { get; set; } #nullable restore #else - public List Groups { get; set; } + public List Groups { get; set; } #endif /// List of languages for the term store. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,41 +39,48 @@ public class Store : Entity, IParsable { /// Collection of all sets available in the term store. This relationship can only be used to load a specific term set. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Sets { get; set; } + public List? Sets { get; set; } #nullable restore #else - public List Sets { get; set; } + public List Sets { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Store CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TermStore.Store CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Store(); + return new global::ApiSdk.Models.TermStore.Store(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"defaultLanguageTag", n => { DefaultLanguageTag = n.GetStringValue(); } }, - {"groups", n => { Groups = n.GetCollectionOfObjectValues(Group.CreateFromDiscriminatorValue)?.ToList(); } }, - {"languageTags", n => { LanguageTags = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"sets", n => { Sets = n.GetCollectionOfObjectValues(Set.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "defaultLanguageTag", n => { DefaultLanguageTag = n.GetStringValue(); } }, + { "groups", n => { Groups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.Group.CreateFromDiscriminatorValue)?.AsList(); } }, + { "languageTags", n => { LanguageTags = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "sets", n => { Sets = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.Set.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("defaultLanguageTag", DefaultLanguageTag); - writer.WriteCollectionOfObjectValues("groups", Groups); + writer.WriteCollectionOfObjectValues("groups", Groups); writer.WriteCollectionOfPrimitiveValues("languageTags", LanguageTags); - writer.WriteCollectionOfObjectValues("sets", Sets); + writer.WriteCollectionOfObjectValues("sets", Sets); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermStore/Term.cs b/src/sample/generated/Models/TermStore/Term.cs index 88f86bd5..d5ca72e6 100644 --- a/src/sample/generated/Models/TermStore/Term.cs +++ b/src/sample/generated/Models/TermStore/Term.cs @@ -1,101 +1,114 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models.TermStore { - public class Term : Entity, IParsable { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Term : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Children of current term. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Children { get; set; } + public List? Children { get; set; } #nullable restore #else - public List Children { get; set; } + public List Children { get; set; } #endif /// Date and time of term creation. Read-only. public DateTimeOffset? CreatedDateTime { get; set; } /// Description about term that is dependent on the languageTag. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Descriptions { get; set; } + public List? Descriptions { get; set; } #nullable restore #else - public List Descriptions { get; set; } + public List Descriptions { get; set; } #endif /// Label metadata for a term. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Labels { get; set; } + public List? Labels { get; set; } #nullable restore #else - public List Labels { get; set; } + public List Labels { get; set; } #endif /// Last date and time of term modification. Read-only. public DateTimeOffset? LastModifiedDateTime { get; set; } /// Collection of properties on the term. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Properties { get; set; } + public List? Properties { get; set; } #nullable restore #else - public List Properties { get; set; } + public List Properties { get; set; } #endif /// To indicate which terms are related to the current term as either pinned or reused. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Relations { get; set; } + public List? Relations { get; set; } #nullable restore #else - public List Relations { get; set; } + public List Relations { get; set; } #endif /// The set property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.TermStore.Set? Set { get; set; } + public global::ApiSdk.Models.TermStore.Set? Set { get; set; } #nullable restore #else - public ApiSdk.Models.TermStore.Set Set { get; set; } + public global::ApiSdk.Models.TermStore.Set Set { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Term CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TermStore.Term CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Term(); + return new global::ApiSdk.Models.TermStore.Term(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"children", n => { Children = n.GetCollectionOfObjectValues(Term.CreateFromDiscriminatorValue)?.ToList(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"descriptions", n => { Descriptions = n.GetCollectionOfObjectValues(LocalizedDescription.CreateFromDiscriminatorValue)?.ToList(); } }, - {"labels", n => { Labels = n.GetCollectionOfObjectValues(LocalizedLabel.CreateFromDiscriminatorValue)?.ToList(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"properties", n => { Properties = n.GetCollectionOfObjectValues(ApiSdk.Models.KeyValue.CreateFromDiscriminatorValue)?.ToList(); } }, - {"relations", n => { Relations = n.GetCollectionOfObjectValues(Relation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"set", n => { Set = n.GetObjectValue(ApiSdk.Models.TermStore.Set.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "children", n => { Children = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.Term.CreateFromDiscriminatorValue)?.AsList(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "descriptions", n => { Descriptions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.LocalizedDescription.CreateFromDiscriminatorValue)?.AsList(); } }, + { "labels", n => { Labels = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.LocalizedLabel.CreateFromDiscriminatorValue)?.AsList(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "properties", n => { Properties = n.GetCollectionOfObjectValues(global::ApiSdk.Models.KeyValue.CreateFromDiscriminatorValue)?.AsList(); } }, + { "relations", n => { Relations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TermStore.Relation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "set", n => { Set = n.GetObjectValue(global::ApiSdk.Models.TermStore.Set.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("children", Children); + writer.WriteCollectionOfObjectValues("children", Children); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteCollectionOfObjectValues("descriptions", Descriptions); - writer.WriteCollectionOfObjectValues("labels", Labels); + writer.WriteCollectionOfObjectValues("descriptions", Descriptions); + writer.WriteCollectionOfObjectValues("labels", Labels); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); - writer.WriteCollectionOfObjectValues("properties", Properties); - writer.WriteCollectionOfObjectValues("relations", Relations); - writer.WriteObjectValue("set", Set); + writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteCollectionOfObjectValues("relations", Relations); + writer.WriteObjectValue("set", Set); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TermStore/TermGroupScope.cs b/src/sample/generated/Models/TermStore/TermGroupScope.cs index 25dc6574..ed6634b0 100644 --- a/src/sample/generated/Models/TermStore/TermGroupScope.cs +++ b/src/sample/generated/Models/TermStore/TermGroupScope.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models.TermStore { - public enum TermGroupScope { +namespace ApiSdk.Models.TermStore +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TermGroupScope + #pragma warning restore CS1591 + { [EnumMember(Value = "global")] + #pragma warning disable CS1591 Global, + #pragma warning restore CS1591 [EnumMember(Value = "system")] + #pragma warning disable CS1591 System, + #pragma warning restore CS1591 [EnumMember(Value = "siteCollection")] + #pragma warning disable CS1591 SiteCollection, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TextColumn.cs b/src/sample/generated/Models/TextColumn.cs index ca33d736..162b4457 100644 --- a/src/sample/generated/Models/TextColumn.cs +++ b/src/sample/generated/Models/TextColumn.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TextColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TextColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Whether to allow multiple lines of text. @@ -25,36 +31,43 @@ public class TextColumn : IAdditionalDataHolder, IParsable { public string TextType { get; set; } #endif /// - /// Instantiates a new textColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public TextColumn() { + public TextColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TextColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TextColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TextColumn(); + return new global::ApiSdk.Models.TextColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowMultipleLines", n => { AllowMultipleLines = n.GetBoolValue(); } }, - {"appendChangesToExistingText", n => { AppendChangesToExistingText = n.GetBoolValue(); } }, - {"linesForEditing", n => { LinesForEditing = n.GetIntValue(); } }, - {"maxLength", n => { MaxLength = n.GetIntValue(); } }, - {"textType", n => { TextType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowMultipleLines", n => { AllowMultipleLines = n.GetBoolValue(); } }, + { "appendChangesToExistingText", n => { AppendChangesToExistingText = n.GetBoolValue(); } }, + { "linesForEditing", n => { LinesForEditing = n.GetIntValue(); } }, + { "maxLength", n => { MaxLength = n.GetIntValue(); } }, + { "textType", n => { TextType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowMultipleLines", AllowMultipleLines); writer.WriteBoolValue("appendChangesToExistingText", AppendChangesToExistingText); @@ -65,3 +78,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Thumbnail.cs b/src/sample/generated/Models/Thumbnail.cs index ae324151..62763e2e 100644 --- a/src/sample/generated/Models/Thumbnail.cs +++ b/src/sample/generated/Models/Thumbnail.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Thumbnail : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Thumbnail : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The content stream for the thumbnail. @@ -37,36 +43,43 @@ public class Thumbnail : IAdditionalDataHolder, IParsable { /// The width of the thumbnail, in pixels. public int? Width { get; set; } /// - /// Instantiates a new thumbnail and sets the default values. + /// Instantiates a new and sets the default values. /// - public Thumbnail() { + public Thumbnail() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Thumbnail CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Thumbnail CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Thumbnail(); + return new global::ApiSdk.Models.Thumbnail(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"content", n => { Content = n.GetByteArrayValue(); } }, - {"height", n => { Height = n.GetIntValue(); } }, - {"sourceItemId", n => { SourceItemId = n.GetStringValue(); } }, - {"url", n => { Url = n.GetStringValue(); } }, - {"width", n => { Width = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "content", n => { Content = n.GetByteArrayValue(); } }, + { "height", n => { Height = n.GetIntValue(); } }, + { "sourceItemId", n => { SourceItemId = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + { "width", n => { Width = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("content", Content); writer.WriteIntValue("height", Height); @@ -77,3 +90,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ThumbnailColumn.cs b/src/sample/generated/Models/ThumbnailColumn.cs index b990f8a4..0d6e33ea 100644 --- a/src/sample/generated/Models/ThumbnailColumn.cs +++ b/src/sample/generated/Models/ThumbnailColumn.cs @@ -1,41 +1,55 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ThumbnailColumn : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ThumbnailColumn : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// - /// Instantiates a new thumbnailColumn and sets the default values. + /// Instantiates a new and sets the default values. /// - public ThumbnailColumn() { + public ThumbnailColumn() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static ThumbnailColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.ThumbnailColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ThumbnailColumn(); + return new global::ApiSdk.Models.ThumbnailColumn(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/ThumbnailSet.cs b/src/sample/generated/Models/ThumbnailSet.cs index d2fb2f53..9e42f040 100644 --- a/src/sample/generated/Models/ThumbnailSet.cs +++ b/src/sample/generated/Models/ThumbnailSet.cs @@ -1,73 +1,86 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class ThumbnailSet : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ThumbnailSet : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The large property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Thumbnail? Large { get; set; } + public global::ApiSdk.Models.Thumbnail? Large { get; set; } #nullable restore #else - public Thumbnail Large { get; set; } + public global::ApiSdk.Models.Thumbnail Large { get; set; } #endif /// The medium property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Thumbnail? Medium { get; set; } + public global::ApiSdk.Models.Thumbnail? Medium { get; set; } #nullable restore #else - public Thumbnail Medium { get; set; } + public global::ApiSdk.Models.Thumbnail Medium { get; set; } #endif /// The small property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Thumbnail? Small { get; set; } + public global::ApiSdk.Models.Thumbnail? Small { get; set; } #nullable restore #else - public Thumbnail Small { get; set; } + public global::ApiSdk.Models.Thumbnail Small { get; set; } #endif /// The source property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Thumbnail? Source { get; set; } + public global::ApiSdk.Models.Thumbnail? Source { get; set; } #nullable restore #else - public Thumbnail Source { get; set; } + public global::ApiSdk.Models.Thumbnail Source { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new ThumbnailSet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.ThumbnailSet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new ThumbnailSet(); + return new global::ApiSdk.Models.ThumbnailSet(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"large", n => { Large = n.GetObjectValue(Thumbnail.CreateFromDiscriminatorValue); } }, - {"medium", n => { Medium = n.GetObjectValue(Thumbnail.CreateFromDiscriminatorValue); } }, - {"small", n => { Small = n.GetObjectValue(Thumbnail.CreateFromDiscriminatorValue); } }, - {"source", n => { Source = n.GetObjectValue(Thumbnail.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "large", n => { Large = n.GetObjectValue(global::ApiSdk.Models.Thumbnail.CreateFromDiscriminatorValue); } }, + { "medium", n => { Medium = n.GetObjectValue(global::ApiSdk.Models.Thumbnail.CreateFromDiscriminatorValue); } }, + { "small", n => { Small = n.GetObjectValue(global::ApiSdk.Models.Thumbnail.CreateFromDiscriminatorValue); } }, + { "source", n => { Source = n.GetObjectValue(global::ApiSdk.Models.Thumbnail.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("large", Large); - writer.WriteObjectValue("medium", Medium); - writer.WriteObjectValue("small", Small); - writer.WriteObjectValue("source", Source); + writer.WriteObjectValue("large", Large); + writer.WriteObjectValue("medium", Medium); + writer.WriteObjectValue("small", Small); + writer.WriteObjectValue("source", Source); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TimeOff.cs b/src/sample/generated/Models/TimeOff.cs index e8ce9387..ba02237d 100644 --- a/src/sample/generated/Models/TimeOff.cs +++ b/src/sample/generated/Models/TimeOff.cs @@ -1,26 +1,32 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TimeOff : ChangeTrackedEntity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimeOff : global::ApiSdk.Models.ChangeTrackedEntity, IParsable + #pragma warning restore CS1591 + { /// The draftTimeOff property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TimeOffItem? DraftTimeOff { get; set; } + public global::ApiSdk.Models.TimeOffItem? DraftTimeOff { get; set; } #nullable restore #else - public TimeOffItem DraftTimeOff { get; set; } + public global::ApiSdk.Models.TimeOffItem DraftTimeOff { get; set; } #endif /// The sharedTimeOff property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TimeOffItem? SharedTimeOff { get; set; } + public global::ApiSdk.Models.TimeOffItem? SharedTimeOff { get; set; } #nullable restore #else - public TimeOffItem SharedTimeOff { get; set; } + public global::ApiSdk.Models.TimeOffItem SharedTimeOff { get; set; } #endif /// ID of the user assigned to the timeOff. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,31 +39,38 @@ public class TimeOff : ChangeTrackedEntity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TimeOff CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TimeOff CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TimeOff(); + return new global::ApiSdk.Models.TimeOff(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"draftTimeOff", n => { DraftTimeOff = n.GetObjectValue(TimeOffItem.CreateFromDiscriminatorValue); } }, - {"sharedTimeOff", n => { SharedTimeOff = n.GetObjectValue(TimeOffItem.CreateFromDiscriminatorValue); } }, - {"userId", n => { UserId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "draftTimeOff", n => { DraftTimeOff = n.GetObjectValue(global::ApiSdk.Models.TimeOffItem.CreateFromDiscriminatorValue); } }, + { "sharedTimeOff", n => { SharedTimeOff = n.GetObjectValue(global::ApiSdk.Models.TimeOffItem.CreateFromDiscriminatorValue); } }, + { "userId", n => { UserId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("draftTimeOff", DraftTimeOff); - writer.WriteObjectValue("sharedTimeOff", SharedTimeOff); + writer.WriteObjectValue("draftTimeOff", DraftTimeOff); + writer.WriteObjectValue("sharedTimeOff", SharedTimeOff); writer.WriteStringValue("userId", UserId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TimeOffItem.cs b/src/sample/generated/Models/TimeOffItem.cs index 66c2d7ef..90d68be9 100644 --- a/src/sample/generated/Models/TimeOffItem.cs +++ b/src/sample/generated/Models/TimeOffItem.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TimeOffItem : ScheduleEntity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimeOffItem : global::ApiSdk.Models.ScheduleEntity, IParsable + #pragma warning restore CS1591 + { /// ID of the timeOffReason for this timeOffItem. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class TimeOffItem : ScheduleEntity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TimeOffItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TimeOffItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TimeOffItem(); + return new global::ApiSdk.Models.TimeOffItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"timeOffReasonId", n => { TimeOffReasonId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "timeOffReasonId", n => { TimeOffReasonId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("timeOffReasonId", TimeOffReasonId); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TimeOffReason.cs b/src/sample/generated/Models/TimeOffReason.cs index 8376dcc0..af5d6120 100644 --- a/src/sample/generated/Models/TimeOffReason.cs +++ b/src/sample/generated/Models/TimeOffReason.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TimeOffReason : ChangeTrackedEntity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimeOffReason : global::ApiSdk.Models.ChangeTrackedEntity, IParsable + #pragma warning restore CS1591 + { /// The name of the timeOffReason. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -15,37 +21,44 @@ public class TimeOffReason : ChangeTrackedEntity, IParsable { public string DisplayName { get; set; } #endif /// The iconType property - public TimeOffReasonIconType? IconType { get; set; } + public global::ApiSdk.Models.TimeOffReasonIconType? IconType { get; set; } /// Indicates whether the timeOffReason can be used when creating new entities or updating existing ones. Required. public bool? IsActive { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TimeOffReason CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TimeOffReason CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TimeOffReason(); + return new global::ApiSdk.Models.TimeOffReason(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"iconType", n => { IconType = n.GetEnumValue(); } }, - {"isActive", n => { IsActive = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "iconType", n => { IconType = n.GetEnumValue(); } }, + { "isActive", n => { IsActive = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); - writer.WriteEnumValue("iconType", IconType); + writer.WriteEnumValue("iconType", IconType); writer.WriteBoolValue("isActive", IsActive); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TimeOffReasonIconType.cs b/src/sample/generated/Models/TimeOffReasonIconType.cs index 7855c1e6..6851fc34 100644 --- a/src/sample/generated/Models/TimeOffReasonIconType.cs +++ b/src/sample/generated/Models/TimeOffReasonIconType.cs @@ -1,51 +1,100 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum TimeOffReasonIconType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum TimeOffReasonIconType + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "car")] + #pragma warning disable CS1591 Car, + #pragma warning restore CS1591 [EnumMember(Value = "calendar")] + #pragma warning disable CS1591 Calendar, + #pragma warning restore CS1591 [EnumMember(Value = "running")] + #pragma warning disable CS1591 Running, + #pragma warning restore CS1591 [EnumMember(Value = "plane")] + #pragma warning disable CS1591 Plane, + #pragma warning restore CS1591 [EnumMember(Value = "firstAid")] + #pragma warning disable CS1591 FirstAid, + #pragma warning restore CS1591 [EnumMember(Value = "doctor")] + #pragma warning disable CS1591 Doctor, + #pragma warning restore CS1591 [EnumMember(Value = "notWorking")] + #pragma warning disable CS1591 NotWorking, + #pragma warning restore CS1591 [EnumMember(Value = "clock")] + #pragma warning disable CS1591 Clock, + #pragma warning restore CS1591 [EnumMember(Value = "juryDuty")] + #pragma warning disable CS1591 JuryDuty, + #pragma warning restore CS1591 [EnumMember(Value = "globe")] + #pragma warning disable CS1591 Globe, + #pragma warning restore CS1591 [EnumMember(Value = "cup")] + #pragma warning disable CS1591 Cup, + #pragma warning restore CS1591 [EnumMember(Value = "phone")] + #pragma warning disable CS1591 Phone, + #pragma warning restore CS1591 [EnumMember(Value = "weather")] + #pragma warning disable CS1591 Weather, + #pragma warning restore CS1591 [EnumMember(Value = "umbrella")] + #pragma warning disable CS1591 Umbrella, + #pragma warning restore CS1591 [EnumMember(Value = "piggyBank")] + #pragma warning disable CS1591 PiggyBank, + #pragma warning restore CS1591 [EnumMember(Value = "dog")] + #pragma warning disable CS1591 Dog, + #pragma warning restore CS1591 [EnumMember(Value = "cake")] + #pragma warning disable CS1591 Cake, + #pragma warning restore CS1591 [EnumMember(Value = "trafficCone")] + #pragma warning disable CS1591 TrafficCone, + #pragma warning restore CS1591 [EnumMember(Value = "pin")] + #pragma warning disable CS1591 Pin, + #pragma warning restore CS1591 [EnumMember(Value = "sunny")] + #pragma warning disable CS1591 Sunny, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/TimeOffRequest.cs b/src/sample/generated/Models/TimeOffRequest.cs index dba03a8e..95e89142 100644 --- a/src/sample/generated/Models/TimeOffRequest.cs +++ b/src/sample/generated/Models/TimeOffRequest.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TimeOffRequest : ScheduleChangeRequest, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimeOffRequest : global::ApiSdk.Models.ScheduleChangeRequest, IParsable + #pragma warning restore CS1591 + { /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? EndDateTime { get; set; } /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z @@ -21,26 +27,32 @@ public class TimeOffRequest : ScheduleChangeRequest, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TimeOffRequest CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TimeOffRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TimeOffRequest(); + return new global::ApiSdk.Models.TimeOffRequest(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, - {"startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, - {"timeOffReasonId", n => { TimeOffReasonId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "endDateTime", n => { EndDateTime = n.GetDateTimeOffsetValue(); } }, + { "startDateTime", n => { StartDateTime = n.GetDateTimeOffsetValue(); } }, + { "timeOffReasonId", n => { TimeOffReasonId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); @@ -49,3 +61,4 @@ public class TimeOffRequest : ScheduleChangeRequest, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TimeRange.cs b/src/sample/generated/Models/TimeRange.cs index a9f63f35..3ad45ed9 100644 --- a/src/sample/generated/Models/TimeRange.cs +++ b/src/sample/generated/Models/TimeRange.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TimeRange : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimeRange : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// End time for the time range. @@ -14,33 +20,40 @@ public class TimeRange : IAdditionalDataHolder, IParsable { /// Start time for the time range. public Time? StartTime { get; set; } /// - /// Instantiates a new timeRange and sets the default values. + /// Instantiates a new and sets the default values. /// - public TimeRange() { + public TimeRange() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TimeRange CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TimeRange CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TimeRange(); + return new global::ApiSdk.Models.TimeRange(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"endTime", n => { EndTime = n.GetTimeValue(); } }, - {"startTime", n => { StartTime = n.GetTimeValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "endTime", n => { EndTime = n.GetTimeValue(); } }, + { "startTime", n => { StartTime = n.GetTimeValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteTimeValue("endTime", EndTime); writer.WriteTimeValue("startTime", StartTime); @@ -48,3 +61,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TimeSlot.cs b/src/sample/generated/Models/TimeSlot.cs index 45a2ac0d..b68f97ee 100644 --- a/src/sample/generated/Models/TimeSlot.cs +++ b/src/sample/generated/Models/TimeSlot.cs @@ -1,61 +1,75 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TimeSlot : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimeSlot : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The end property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? End { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? End { get; set; } #nullable restore #else - public DateTimeTimeZone End { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone End { get; set; } #endif /// The start property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? Start { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? Start { get; set; } #nullable restore #else - public DateTimeTimeZone Start { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone Start { get; set; } #endif /// - /// Instantiates a new timeSlot and sets the default values. + /// Instantiates a new and sets the default values. /// - public TimeSlot() { + public TimeSlot() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TimeSlot CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TimeSlot CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TimeSlot(); + return new global::ApiSdk.Models.TimeSlot(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"end", n => { End = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"start", n => { Start = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "end", n => { End = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "start", n => { Start = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("end", End); - writer.WriteObjectValue("start", Start); + writer.WriteObjectValue("end", End); + writer.WriteObjectValue("start", Start); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TimeZoneBase.cs b/src/sample/generated/Models/TimeZoneBase.cs index d9b74470..67c88e1f 100644 --- a/src/sample/generated/Models/TimeZoneBase.cs +++ b/src/sample/generated/Models/TimeZoneBase.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TimeZoneBase : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TimeZoneBase : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The name of a time zone. It can be a standard time zone name such as 'Hawaii-Aleutian Standard Time', or 'Customized Time Zone' for a custom time zone. @@ -17,35 +23,43 @@ public class TimeZoneBase : IAdditionalDataHolder, IParsable { public string Name { get; set; } #endif /// - /// Instantiates a new timeZoneBase and sets the default values. + /// Instantiates a new and sets the default values. /// - public TimeZoneBase() { + public TimeZoneBase() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TimeZoneBase CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TimeZoneBase CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TimeZoneBase(); + return new global::ApiSdk.Models.TimeZoneBase(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"name", n => { Name = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "name", n => { Name = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Todo.cs b/src/sample/generated/Models/Todo.cs index 5a99289d..d804c397 100644 --- a/src/sample/generated/Models/Todo.cs +++ b/src/sample/generated/Models/Todo.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Todo : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Todo : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The task lists in the users mailbox. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Lists { get; set; } + public List? Lists { get; set; } #nullable restore #else - public List Lists { get; set; } + public List Lists { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Todo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Todo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Todo(); + return new global::ApiSdk.Models.Todo(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"lists", n => { Lists = n.GetCollectionOfObjectValues(TodoTaskList.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "lists", n => { Lists = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TodoTaskList.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("lists", Lists); + writer.WriteCollectionOfObjectValues("lists", Lists); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TodoTask.cs b/src/sample/generated/Models/TodoTask.cs index be64dddf..02feb599 100644 --- a/src/sample/generated/Models/TodoTask.cs +++ b/src/sample/generated/Models/TodoTask.cs @@ -1,34 +1,40 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TodoTask : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TodoTask : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// A collection of file attachments for the task. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Attachments { get; set; } + public List? Attachments { get; set; } #nullable restore #else - public List Attachments { get; set; } + public List Attachments { get; set; } #endif /// The attachmentSessions property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AttachmentSessions { get; set; } + public List? AttachmentSessions { get; set; } #nullable restore #else - public List AttachmentSessions { get; set; } + public List AttachmentSessions { get; set; } #endif /// The body property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ItemBody? Body { get; set; } + public global::ApiSdk.Models.ItemBody? Body { get; set; } #nullable restore #else - public ItemBody Body { get; set; } + public global::ApiSdk.Models.ItemBody Body { get; set; } #endif /// The date and time when the task body was last modified. By default, it is in UTC. You can provide a custom time zone in the request header. The property value uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2020 would look like this: '2020-01-01T00:00:00Z'. public DateTimeOffset? BodyLastModifiedDateTime { get; set; } @@ -43,41 +49,41 @@ public class TodoTask : Entity, IParsable { /// A collection of checklistItems linked to a task. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ChecklistItems { get; set; } + public List? ChecklistItems { get; set; } #nullable restore #else - public List ChecklistItems { get; set; } + public List ChecklistItems { get; set; } #endif /// The completedDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? CompletedDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? CompletedDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone CompletedDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone CompletedDateTime { get; set; } #endif /// The date and time when the task was created. By default, it is in UTC. You can provide a custom time zone in the request header. The property value uses ISO 8601 format. For example, midnight UTC on Jan 1, 2020 would look like this: '2020-01-01T00:00:00Z'. public DateTimeOffset? CreatedDateTime { get; set; } /// The dueDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? DueDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? DueDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone DueDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone DueDateTime { get; set; } #endif /// The collection of open extensions defined for the task. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif /// Indicates whether the task has attachments. public bool? HasAttachments { get; set; } /// The importance property - public ApiSdk.Models.Importance? Importance { get; set; } + public global::ApiSdk.Models.Importance? Importance { get; set; } /// Set to true if an alert is set to remind the user of the task. public bool? IsReminderOn { get; set; } /// The date and time when the task was last modified. By default, it is in UTC. You can provide a custom time zone in the request header. The property value uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2020 would look like this: '2020-01-01T00:00:00Z'. @@ -85,37 +91,37 @@ public class TodoTask : Entity, IParsable { /// A collection of resources linked to the task. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? LinkedResources { get; set; } + public List? LinkedResources { get; set; } #nullable restore #else - public List LinkedResources { get; set; } + public List LinkedResources { get; set; } #endif /// The recurrence property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PatternedRecurrence? Recurrence { get; set; } + public global::ApiSdk.Models.PatternedRecurrence? Recurrence { get; set; } #nullable restore #else - public PatternedRecurrence Recurrence { get; set; } + public global::ApiSdk.Models.PatternedRecurrence Recurrence { get; set; } #endif /// The reminderDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? ReminderDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? ReminderDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone ReminderDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone ReminderDateTime { get; set; } #endif /// The startDateTime property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DateTimeTimeZone? StartDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone? StartDateTime { get; set; } #nullable restore #else - public DateTimeTimeZone StartDateTime { get; set; } + public global::ApiSdk.Models.DateTimeTimeZone StartDateTime { get; set; } #endif /// The status property - public TaskStatus? Status { get; set; } + public global::ApiSdk.Models.TaskStatus? Status { get; set; } /// A brief description of the task. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -127,65 +133,72 @@ public class TodoTask : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TodoTask CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TodoTask CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TodoTask(); + return new global::ApiSdk.Models.TodoTask(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"attachmentSessions", n => { AttachmentSessions = n.GetCollectionOfObjectValues(AttachmentSession.CreateFromDiscriminatorValue)?.ToList(); } }, - {"attachments", n => { Attachments = n.GetCollectionOfObjectValues(AttachmentBase.CreateFromDiscriminatorValue)?.ToList(); } }, - {"body", n => { Body = n.GetObjectValue(ItemBody.CreateFromDiscriminatorValue); } }, - {"bodyLastModifiedDateTime", n => { BodyLastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"categories", n => { Categories = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"checklistItems", n => { ChecklistItems = n.GetCollectionOfObjectValues(ChecklistItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"completedDateTime", n => { CompletedDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"dueDateTime", n => { DueDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, - {"importance", n => { Importance = n.GetEnumValue(); } }, - {"isReminderOn", n => { IsReminderOn = n.GetBoolValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"linkedResources", n => { LinkedResources = n.GetCollectionOfObjectValues(LinkedResource.CreateFromDiscriminatorValue)?.ToList(); } }, - {"recurrence", n => { Recurrence = n.GetObjectValue(PatternedRecurrence.CreateFromDiscriminatorValue); } }, - {"reminderDateTime", n => { ReminderDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"startDateTime", n => { StartDateTime = n.GetObjectValue(DateTimeTimeZone.CreateFromDiscriminatorValue); } }, - {"status", n => { Status = n.GetEnumValue(); } }, - {"title", n => { Title = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "attachmentSessions", n => { AttachmentSessions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AttachmentSession.CreateFromDiscriminatorValue)?.AsList(); } }, + { "attachments", n => { Attachments = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AttachmentBase.CreateFromDiscriminatorValue)?.AsList(); } }, + { "body", n => { Body = n.GetObjectValue(global::ApiSdk.Models.ItemBody.CreateFromDiscriminatorValue); } }, + { "bodyLastModifiedDateTime", n => { BodyLastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "categories", n => { Categories = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "checklistItems", n => { ChecklistItems = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ChecklistItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "completedDateTime", n => { CompletedDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "dueDateTime", n => { DueDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "hasAttachments", n => { HasAttachments = n.GetBoolValue(); } }, + { "importance", n => { Importance = n.GetEnumValue(); } }, + { "isReminderOn", n => { IsReminderOn = n.GetBoolValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "linkedResources", n => { LinkedResources = n.GetCollectionOfObjectValues(global::ApiSdk.Models.LinkedResource.CreateFromDiscriminatorValue)?.AsList(); } }, + { "recurrence", n => { Recurrence = n.GetObjectValue(global::ApiSdk.Models.PatternedRecurrence.CreateFromDiscriminatorValue); } }, + { "reminderDateTime", n => { ReminderDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "startDateTime", n => { StartDateTime = n.GetObjectValue(global::ApiSdk.Models.DateTimeTimeZone.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "title", n => { Title = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("attachments", Attachments); - writer.WriteCollectionOfObjectValues("attachmentSessions", AttachmentSessions); - writer.WriteObjectValue("body", Body); + writer.WriteCollectionOfObjectValues("attachments", Attachments); + writer.WriteCollectionOfObjectValues("attachmentSessions", AttachmentSessions); + writer.WriteObjectValue("body", Body); writer.WriteDateTimeOffsetValue("bodyLastModifiedDateTime", BodyLastModifiedDateTime); writer.WriteCollectionOfPrimitiveValues("categories", Categories); - writer.WriteCollectionOfObjectValues("checklistItems", ChecklistItems); - writer.WriteObjectValue("completedDateTime", CompletedDateTime); + writer.WriteCollectionOfObjectValues("checklistItems", ChecklistItems); + writer.WriteObjectValue("completedDateTime", CompletedDateTime); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("dueDateTime", DueDateTime); - writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteObjectValue("dueDateTime", DueDateTime); + writer.WriteCollectionOfObjectValues("extensions", Extensions); writer.WriteBoolValue("hasAttachments", HasAttachments); - writer.WriteEnumValue("importance", Importance); + writer.WriteEnumValue("importance", Importance); writer.WriteBoolValue("isReminderOn", IsReminderOn); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); - writer.WriteCollectionOfObjectValues("linkedResources", LinkedResources); - writer.WriteObjectValue("recurrence", Recurrence); - writer.WriteObjectValue("reminderDateTime", ReminderDateTime); - writer.WriteObjectValue("startDateTime", StartDateTime); - writer.WriteEnumValue("status", Status); + writer.WriteCollectionOfObjectValues("linkedResources", LinkedResources); + writer.WriteObjectValue("recurrence", Recurrence); + writer.WriteObjectValue("reminderDateTime", ReminderDateTime); + writer.WriteObjectValue("startDateTime", StartDateTime); + writer.WriteEnumValue("status", Status); writer.WriteStringValue("title", Title); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TodoTaskCollectionResponse.cs b/src/sample/generated/Models/TodoTaskCollectionResponse.cs index f83212f0..b8acd531 100644 --- a/src/sample/generated/Models/TodoTaskCollectionResponse.cs +++ b/src/sample/generated/Models/TodoTaskCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TodoTaskCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TodoTaskCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class TodoTaskCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new todoTaskCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public TodoTaskCollectionResponse() { + public TodoTaskCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TodoTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TodoTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TodoTaskCollectionResponse(); + return new global::ApiSdk.Models.TodoTaskCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(TodoTask.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TodoTask.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TodoTaskList.cs b/src/sample/generated/Models/TodoTaskList.cs index 9355594c..1ae7dc5c 100644 --- a/src/sample/generated/Models/TodoTaskList.cs +++ b/src/sample/generated/Models/TodoTaskList.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TodoTaskList : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TodoTaskList : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The name of the task list. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,10 +23,10 @@ public class TodoTaskList : Entity, IParsable { /// The collection of open extensions defined for the task list. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif /// True if the user is owner of the given task list. public bool? IsOwner { get; set; } @@ -29,47 +35,54 @@ public class TodoTaskList : Entity, IParsable { /// The tasks in this task list. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tasks { get; set; } + public List? Tasks { get; set; } #nullable restore #else - public List Tasks { get; set; } + public List Tasks { get; set; } #endif /// The wellknownListName property - public ApiSdk.Models.WellknownListName? WellknownListName { get; set; } + public global::ApiSdk.Models.WellknownListName? WellknownListName { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TodoTaskList CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TodoTaskList CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TodoTaskList(); + return new global::ApiSdk.Models.TodoTaskList(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"isOwner", n => { IsOwner = n.GetBoolValue(); } }, - {"isShared", n => { IsShared = n.GetBoolValue(); } }, - {"tasks", n => { Tasks = n.GetCollectionOfObjectValues(TodoTask.CreateFromDiscriminatorValue)?.ToList(); } }, - {"wellknownListName", n => { WellknownListName = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "isOwner", n => { IsOwner = n.GetBoolValue(); } }, + { "isShared", n => { IsShared = n.GetBoolValue(); } }, + { "tasks", n => { Tasks = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TodoTask.CreateFromDiscriminatorValue)?.AsList(); } }, + { "wellknownListName", n => { WellknownListName = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); - writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteCollectionOfObjectValues("extensions", Extensions); writer.WriteBoolValue("isOwner", IsOwner); writer.WriteBoolValue("isShared", IsShared); - writer.WriteCollectionOfObjectValues("tasks", Tasks); - writer.WriteEnumValue("wellknownListName", WellknownListName); + writer.WriteCollectionOfObjectValues("tasks", Tasks); + writer.WriteEnumValue("wellknownListName", WellknownListName); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TodoTaskListCollectionResponse.cs b/src/sample/generated/Models/TodoTaskListCollectionResponse.cs index 8b85132e..75bf0561 100644 --- a/src/sample/generated/Models/TodoTaskListCollectionResponse.cs +++ b/src/sample/generated/Models/TodoTaskListCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TodoTaskListCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TodoTaskListCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class TodoTaskListCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new todoTaskListCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public TodoTaskListCollectionResponse() { + public TodoTaskListCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static TodoTaskListCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.TodoTaskListCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TodoTaskListCollectionResponse(); + return new global::ApiSdk.Models.TodoTaskListCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(TodoTaskList.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.TodoTaskList.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TokenIssuancePolicy.cs b/src/sample/generated/Models/TokenIssuancePolicy.cs index eae3ae56..33149796 100644 --- a/src/sample/generated/Models/TokenIssuancePolicy.cs +++ b/src/sample/generated/Models/TokenIssuancePolicy.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TokenIssuancePolicy : StsPolicy, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TokenIssuancePolicy : global::ApiSdk.Models.StsPolicy, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TokenIssuancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TokenIssuancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TokenIssuancePolicy(); + return new global::ApiSdk.Models.TokenIssuancePolicy(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TokenLifetimePolicy.cs b/src/sample/generated/Models/TokenLifetimePolicy.cs index 42b05d51..b5ec022c 100644 --- a/src/sample/generated/Models/TokenLifetimePolicy.cs +++ b/src/sample/generated/Models/TokenLifetimePolicy.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class TokenLifetimePolicy : StsPolicy, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TokenLifetimePolicy : global::ApiSdk.Models.StsPolicy, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new TokenLifetimePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.TokenLifetimePolicy CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new TokenLifetimePolicy(); + return new global::ApiSdk.Models.TokenLifetimePolicy(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Trending.cs b/src/sample/generated/Models/Trending.cs index a0c0dd58..672d693a 100644 --- a/src/sample/generated/Models/Trending.cs +++ b/src/sample/generated/Models/Trending.cs @@ -1,71 +1,84 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Trending : Entity, IParsable { - /// The lastModifiedDateTime property +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Trending : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z public DateTimeOffset? LastModifiedDateTime { get; set; } /// The resource property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Entity? Resource { get; set; } + public global::ApiSdk.Models.Entity? Resource { get; set; } #nullable restore #else - public Entity Resource { get; set; } + public global::ApiSdk.Models.Entity Resource { get; set; } #endif /// The resourceReference property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ResourceReference? ResourceReference { get; set; } + public global::ApiSdk.Models.ResourceReference? ResourceReference { get; set; } #nullable restore #else - public ApiSdk.Models.ResourceReference ResourceReference { get; set; } + public global::ApiSdk.Models.ResourceReference ResourceReference { get; set; } #endif /// The resourceVisualization property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ResourceVisualization? ResourceVisualization { get; set; } + public global::ApiSdk.Models.ResourceVisualization? ResourceVisualization { get; set; } #nullable restore #else - public ApiSdk.Models.ResourceVisualization ResourceVisualization { get; set; } + public global::ApiSdk.Models.ResourceVisualization ResourceVisualization { get; set; } #endif /// Value indicating how much the document is currently trending. The larger the number, the more the document is currently trending around the user (the more relevant it is). Returned documents are sorted by this value. public double? Weight { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Trending CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Trending CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Trending(); + return new global::ApiSdk.Models.Trending(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"resource", n => { Resource = n.GetObjectValue(Entity.CreateFromDiscriminatorValue); } }, - {"resourceReference", n => { ResourceReference = n.GetObjectValue(ApiSdk.Models.ResourceReference.CreateFromDiscriminatorValue); } }, - {"resourceVisualization", n => { ResourceVisualization = n.GetObjectValue(ApiSdk.Models.ResourceVisualization.CreateFromDiscriminatorValue); } }, - {"weight", n => { Weight = n.GetDoubleValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "resource", n => { Resource = n.GetObjectValue(global::ApiSdk.Models.Entity.CreateFromDiscriminatorValue); } }, + { "resourceReference", n => { ResourceReference = n.GetObjectValue(global::ApiSdk.Models.ResourceReference.CreateFromDiscriminatorValue); } }, + { "resourceVisualization", n => { ResourceVisualization = n.GetObjectValue(global::ApiSdk.Models.ResourceVisualization.CreateFromDiscriminatorValue); } }, + { "weight", n => { Weight = n.GetDoubleValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); - writer.WriteObjectValue("resource", Resource); - writer.WriteObjectValue("resourceReference", ResourceReference); - writer.WriteObjectValue("resourceVisualization", ResourceVisualization); + writer.WriteObjectValue("resource", Resource); + writer.WriteObjectValue("resourceReference", ResourceReference); + writer.WriteObjectValue("resourceVisualization", ResourceVisualization); writer.WriteDoubleValue("weight", Weight); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/TrendingCollectionResponse.cs b/src/sample/generated/Models/TrendingCollectionResponse.cs new file mode 100644 index 00000000..8b613c04 --- /dev/null +++ b/src/sample/generated/Models/TrendingCollectionResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TrendingCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The OdataNextLink property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataNextLink { get; set; } +#nullable restore +#else + public string OdataNextLink { get; set; } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { get; set; } +#nullable restore +#else + public List Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TrendingCollectionResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.TrendingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.TrendingCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Trending.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.nextLink", OdataNextLink); + writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UnifiedStorageQuota.cs b/src/sample/generated/Models/UnifiedStorageQuota.cs new file mode 100644 index 00000000..bbd4cb98 --- /dev/null +++ b/src/sample/generated/Models/UnifiedStorageQuota.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UnifiedStorageQuota : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The deleted property + public long? Deleted { get; set; } + /// The manageWebUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ManageWebUrl { get; set; } +#nullable restore +#else + public string ManageWebUrl { get; set; } +#endif + /// The remaining property + public long? Remaining { get; set; } + /// The services property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Services { get; set; } +#nullable restore +#else + public List Services { get; set; } +#endif + /// The state property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? State { get; set; } +#nullable restore +#else + public string State { get; set; } +#endif + /// The total property + public long? Total { get; set; } + /// The used property + public long? Used { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.UnifiedStorageQuota CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.UnifiedStorageQuota(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "deleted", n => { Deleted = n.GetLongValue(); } }, + { "manageWebUrl", n => { ManageWebUrl = n.GetStringValue(); } }, + { "remaining", n => { Remaining = n.GetLongValue(); } }, + { "services", n => { Services = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ServiceStorageQuotaBreakdown.CreateFromDiscriminatorValue)?.AsList(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "total", n => { Total = n.GetLongValue(); } }, + { "used", n => { Used = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteLongValue("deleted", Deleted); + writer.WriteStringValue("manageWebUrl", ManageWebUrl); + writer.WriteLongValue("remaining", Remaining); + writer.WriteCollectionOfObjectValues("services", Services); + writer.WriteStringValue("state", State); + writer.WriteLongValue("total", Total); + writer.WriteLongValue("used", Used); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UsageDetails.cs b/src/sample/generated/Models/UsageDetails.cs index 4913005b..60b5dd3d 100644 --- a/src/sample/generated/Models/UsageDetails.cs +++ b/src/sample/generated/Models/UsageDetails.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class UsageDetails : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsageDetails : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The date and time the resource was last accessed by the user. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. @@ -13,33 +19,40 @@ public class UsageDetails : IAdditionalDataHolder, IParsable { /// The date and time the resource was last modified by the user. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. public DateTimeOffset? LastModifiedDateTime { get; set; } /// - /// Instantiates a new usageDetails and sets the default values. + /// Instantiates a new and sets the default values. /// - public UsageDetails() { + public UsageDetails() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static UsageDetails CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.UsageDetails CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new UsageDetails(); + return new global::ApiSdk.Models.UsageDetails(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"lastAccessedDateTime", n => { LastAccessedDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "lastAccessedDateTime", n => { LastAccessedDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastAccessedDateTime", LastAccessedDateTime); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UsedInsight.cs b/src/sample/generated/Models/UsedInsight.cs index f807b708..044bd599 100644 --- a/src/sample/generated/Models/UsedInsight.cs +++ b/src/sample/generated/Models/UsedInsight.cs @@ -1,73 +1,86 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class UsedInsight : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsedInsight : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The lastUsed property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public UsageDetails? LastUsed { get; set; } + public global::ApiSdk.Models.UsageDetails? LastUsed { get; set; } #nullable restore #else - public UsageDetails LastUsed { get; set; } + public global::ApiSdk.Models.UsageDetails LastUsed { get; set; } #endif /// The resource property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Entity? Resource { get; set; } + public global::ApiSdk.Models.Entity? Resource { get; set; } #nullable restore #else - public Entity Resource { get; set; } + public global::ApiSdk.Models.Entity Resource { get; set; } #endif /// The resourceReference property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ResourceReference? ResourceReference { get; set; } + public global::ApiSdk.Models.ResourceReference? ResourceReference { get; set; } #nullable restore #else - public ApiSdk.Models.ResourceReference ResourceReference { get; set; } + public global::ApiSdk.Models.ResourceReference ResourceReference { get; set; } #endif /// The resourceVisualization property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ResourceVisualization? ResourceVisualization { get; set; } + public global::ApiSdk.Models.ResourceVisualization? ResourceVisualization { get; set; } #nullable restore #else - public ApiSdk.Models.ResourceVisualization ResourceVisualization { get; set; } + public global::ApiSdk.Models.ResourceVisualization ResourceVisualization { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new UsedInsight CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.UsedInsight CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new UsedInsight(); + return new global::ApiSdk.Models.UsedInsight(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"lastUsed", n => { LastUsed = n.GetObjectValue(UsageDetails.CreateFromDiscriminatorValue); } }, - {"resource", n => { Resource = n.GetObjectValue(Entity.CreateFromDiscriminatorValue); } }, - {"resourceReference", n => { ResourceReference = n.GetObjectValue(ApiSdk.Models.ResourceReference.CreateFromDiscriminatorValue); } }, - {"resourceVisualization", n => { ResourceVisualization = n.GetObjectValue(ApiSdk.Models.ResourceVisualization.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "lastUsed", n => { LastUsed = n.GetObjectValue(global::ApiSdk.Models.UsageDetails.CreateFromDiscriminatorValue); } }, + { "resource", n => { Resource = n.GetObjectValue(global::ApiSdk.Models.Entity.CreateFromDiscriminatorValue); } }, + { "resourceReference", n => { ResourceReference = n.GetObjectValue(global::ApiSdk.Models.ResourceReference.CreateFromDiscriminatorValue); } }, + { "resourceVisualization", n => { ResourceVisualization = n.GetObjectValue(global::ApiSdk.Models.ResourceVisualization.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("lastUsed", LastUsed); - writer.WriteObjectValue("resource", Resource); - writer.WriteObjectValue("resourceReference", ResourceReference); - writer.WriteObjectValue("resourceVisualization", ResourceVisualization); + writer.WriteObjectValue("lastUsed", LastUsed); + writer.WriteObjectValue("resource", Resource); + writer.WriteObjectValue("resourceReference", ResourceReference); + writer.WriteObjectValue("resourceVisualization", ResourceVisualization); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UsedInsightCollectionResponse.cs b/src/sample/generated/Models/UsedInsightCollectionResponse.cs new file mode 100644 index 00000000..6dd421d4 --- /dev/null +++ b/src/sample/generated/Models/UsedInsightCollectionResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UsedInsightCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The OdataNextLink property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataNextLink { get; set; } +#nullable restore +#else + public string OdataNextLink { get; set; } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { get; set; } +#nullable restore +#else + public List Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public UsedInsightCollectionResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.UsedInsightCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.UsedInsightCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.UsedInsight.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.nextLink", OdataNextLink); + writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/User.cs b/src/sample/generated/Models/User.cs index bd1a9118..c3a29c9d 100644 --- a/src/sample/generated/Models/User.cs +++ b/src/sample/generated/Models/User.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class User : DirectoryObject, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class User : global::ApiSdk.Models.DirectoryObject, IParsable + #pragma warning restore CS1591 + { /// A freeform text entry field for the user to describe themselves. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -19,12 +25,12 @@ public class User : DirectoryObject, IParsable { /// The user's activities across devices. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Activities { get; set; } + public List? Activities { get; set; } #nullable restore #else - public List Activities { get; set; } + public List Activities { get; set; } #endif - /// Sets the age group of the user. Allowed values: null, Minor, NotAdult and Adult. For more information, see legal age group property definitions. Returned only on $select. Supports $filter (eq, ne, not, and in). + /// Sets the age group of the user. Allowed values: null, Minor, NotAdult, and Adult. For more information, see legal age group property definitions. Returned only on $select. Supports $filter (eq, ne, not, and in). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AgeGroup { get; set; } @@ -35,54 +41,54 @@ public class User : DirectoryObject, IParsable { /// The user's terms of use acceptance statuses. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AgreementAcceptances { get; set; } + public List? AgreementAcceptances { get; set; } #nullable restore #else - public List AgreementAcceptances { get; set; } + public List AgreementAcceptances { get; set; } #endif - /// Represents the app roles a user has been granted for an application. Supports $expand. + /// Represents the app roles a user is granted for an application. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AppRoleAssignments { get; set; } + public List? AppRoleAssignments { get; set; } #nullable restore #else - public List AppRoleAssignments { get; set; } + public List AppRoleAssignments { get; set; } #endif - /// The licenses that are assigned to the user, including inherited (group-based) licenses. This property doesn't differentiate directly assigned and inherited licenses. Use the licenseAssignmentStates property to identify the directly assigned and inherited licenses. Not nullable. Returned only on $select. Supports $filter (eq, not, /$count eq 0, /$count ne 0). + /// The licenses that are assigned to the user, including inherited (group-based) licenses. This property doesn't differentiate between directly assigned and inherited licenses. Use the licenseAssignmentStates property to identify the directly assigned and inherited licenses. Not nullable. Returned only on $select. Supports $filter (eq, not, /$count eq 0, /$count ne 0). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AssignedLicenses { get; set; } + public List? AssignedLicenses { get; set; } #nullable restore #else - public List AssignedLicenses { get; set; } + public List AssignedLicenses { get; set; } #endif /// The plans that are assigned to the user. Read-only. Not nullable. Returned only on $select. Supports $filter (eq and not). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AssignedPlans { get; set; } + public List? AssignedPlans { get; set; } #nullable restore #else - public List AssignedPlans { get; set; } + public List AssignedPlans { get; set; } #endif /// The authentication property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Authentication? Authentication { get; set; } + public global::ApiSdk.Models.Authentication? Authentication { get; set; } #nullable restore #else - public ApiSdk.Models.Authentication Authentication { get; set; } + public global::ApiSdk.Models.Authentication Authentication { get; set; } #endif /// The authorizationInfo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.AuthorizationInfo? AuthorizationInfo { get; set; } + public global::ApiSdk.Models.AuthorizationInfo? AuthorizationInfo { get; set; } #nullable restore #else - public ApiSdk.Models.AuthorizationInfo AuthorizationInfo { get; set; } + public global::ApiSdk.Models.AuthorizationInfo AuthorizationInfo { get; set; } #endif - /// The birthday of the user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned only on $select. + /// The birthday of the user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. Returned only on $select. public DateTimeOffset? Birthday { get; set; } - /// The telephone numbers for the user. NOTE: Although this is a string collection, only one number can be set for this property. Read-only for users synced from on-premises directory. Returned by default. Supports $filter (eq, not, ge, le, startsWith). + /// The telephone numbers for the user. NOTE: Although it's a string collection, only one number can be set for this property. Read-only for users synced from the on-premises directory. Returned by default. Supports $filter (eq, not, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? BusinessPhones { get; set; } @@ -93,42 +99,42 @@ public class User : DirectoryObject, IParsable { /// The calendar property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Calendar? Calendar { get; set; } + public global::ApiSdk.Models.Calendar? Calendar { get; set; } #nullable restore #else - public ApiSdk.Models.Calendar Calendar { get; set; } + public global::ApiSdk.Models.Calendar Calendar { get; set; } #endif /// The user's calendar groups. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CalendarGroups { get; set; } + public List? CalendarGroups { get; set; } #nullable restore #else - public List CalendarGroups { get; set; } + public List CalendarGroups { get; set; } #endif /// The user's calendars. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Calendars { get; set; } + public List? Calendars { get; set; } #nullable restore #else - public List Calendars { get; set; } + public List Calendars { get; set; } #endif /// The calendar view for the calendar. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CalendarView { get; set; } + public List? CalendarView { get; set; } #nullable restore #else - public List CalendarView { get; set; } + public List CalendarView { get; set; } #endif /// The chats property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Chats { get; set; } + public List? Chats { get; set; } #nullable restore #else - public List Chats { get; set; } + public List Chats { get; set; } #endif /// The city where the user is located. Maximum length is 128 characters. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -138,7 +144,15 @@ public class User : DirectoryObject, IParsable { #else public string City { get; set; } #endif - /// The name of the company that the user is associated with. This property can be useful for describing the company that an external user comes from. The maximum length is 64 characters.Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). + /// The cloudClipboard property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.CloudClipboardRoot? CloudClipboard { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.CloudClipboardRoot CloudClipboard { get; set; } +#endif + /// The name of the company that the user is associated with. This property can be useful for describing the company that a guest comes from. The maximum length is 64 characters.Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CompanyName { get; set; } @@ -146,7 +160,7 @@ public class User : DirectoryObject, IParsable { #else public string CompanyName { get; set; } #endif - /// Sets whether consent has been obtained for minors. Allowed values: null, Granted, Denied and NotRequired. Refer to the legal age group property definitions for further information. Returned only on $select. Supports $filter (eq, ne, not, and in). + /// Sets whether consent was obtained for minors. Allowed values: null, Granted, Denied, and NotRequired. For more information, see legal age group property definitions. Returned only on $select. Supports $filter (eq, ne, not, and in). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ConsentProvidedForMinor { get; set; } @@ -157,20 +171,20 @@ public class User : DirectoryObject, IParsable { /// The user's contacts folders. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ContactFolders { get; set; } + public List? ContactFolders { get; set; } #nullable restore #else - public List ContactFolders { get; set; } + public List ContactFolders { get; set; } #endif /// The user's contacts. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Contacts { get; set; } + public List? Contacts { get; set; } #nullable restore #else - public List Contacts { get; set; } + public List Contacts { get; set; } #endif - /// The country or region where the user is located; for example, US or UK. Maximum length is 128 characters. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). + /// The country/region where the user is located; for example, US or UK. Maximum length is 128 characters. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Country { get; set; } @@ -178,17 +192,17 @@ public class User : DirectoryObject, IParsable { #else public string Country { get; set; } #endif - /// The date and time the user was created, in ISO 8601 format and in UTC time. The value cannot be modified and is automatically populated when the entity is created. Nullable. For on-premises users, the value represents when they were first created in Azure AD. Property is null for some users created before June 2018 and on-premises users that were synced to Azure AD before June 2018. Read-only. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in). + /// The date and time the user was created, in ISO 8601 format and UTC. The value can't be modified and is automatically populated when the entity is created. Nullable. For on-premises users, the value represents when they were first created in Microsoft Entra ID. Property is null for some users created before June 2018 and on-premises users that were synced to Microsoft Entra ID before June 2018. Read-only. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in). public DateTimeOffset? CreatedDateTime { get; set; } /// Directory objects that the user created. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? CreatedObjects { get; set; } + public List? CreatedObjects { get; set; } #nullable restore #else - public List CreatedObjects { get; set; } + public List CreatedObjects { get; set; } #endif - /// Indicates whether the user account was created through one of the following methods: As a regular school or work account (null). As an external account (Invitation). As a local account for an Azure Active Directory B2C tenant (LocalAccount). Through self-service sign-up by an internal user using email verification (EmailVerified). Through self-service sign-up by an external user signing up through a link that is part of a user flow (SelfServiceSignUp). Read-only.Returned only on $select. Supports $filter (eq, ne, not, in). + /// Indicates whether the user account was created through one of the following methods: As a regular school or work account (null). As an external account (Invitation). As a local account for an Azure Active Directory B2C tenant (LocalAccount). Through self-service sign-up by an internal user using email verification (EmailVerified). Through self-service sign-up by a guest signing up through a link that is part of a user flow (SelfServiceSignUp). Read-only.Returned only on $select. Supports $filter (eq, ne, not, in). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CreationType { get; set; } @@ -199,12 +213,12 @@ public class User : DirectoryObject, IParsable { /// The customSecurityAttributes property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public CustomSecurityAttributeValue? CustomSecurityAttributes { get; set; } + public global::ApiSdk.Models.CustomSecurityAttributeValue? CustomSecurityAttributes { get; set; } #nullable restore #else - public CustomSecurityAttributeValue CustomSecurityAttributes { get; set; } + public global::ApiSdk.Models.CustomSecurityAttributeValue CustomSecurityAttributes { get; set; } #endif - /// The name for the department in which the user works. Maximum length is 64 characters. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in, and eq on null values). + /// The name of the department in which the user works. Maximum length is 64 characters. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Department { get; set; } @@ -217,20 +231,20 @@ public class User : DirectoryObject, IParsable { /// The list of troubleshooting events for this user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DeviceManagementTroubleshootingEvents { get; set; } + public List? DeviceManagementTroubleshootingEvents { get; set; } #nullable restore #else - public List DeviceManagementTroubleshootingEvents { get; set; } + public List DeviceManagementTroubleshootingEvents { get; set; } #endif /// The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DirectReports { get; set; } + public List? DirectReports { get; set; } #nullable restore #else - public List DirectReports { get; set; } + public List DirectReports { get; set; } #endif - /// The name displayed in the address book for the user. This is usually the combination of the user's first name, middle initial and last name. This property is required when a user is created and it cannot be cleared during updates. Maximum length is 256 characters. Returned by default. Supports $filter (eq, ne, not , ge, le, in, startsWith, and eq on null values), $orderby, and $search. + /// The name displayed in the address book for the user. This value is usually the combination of the user's first name, middle initial, and family name. This property is required when a user is created and it can't be cleared during updates. Maximum length is 256 characters. Returned by default. Supports $filter (eq, ne, not , ge, le, in, startsWith, and eq on null values), $orderby, and $search. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName { get; set; } @@ -241,28 +255,28 @@ public class User : DirectoryObject, IParsable { /// The drive property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Drive? Drive { get; set; } + public global::ApiSdk.Models.Drive? Drive { get; set; } #nullable restore #else - public ApiSdk.Models.Drive Drive { get; set; } + public global::ApiSdk.Models.Drive Drive { get; set; } #endif /// A collection of drives available for this user. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Drives { get; set; } + public List? Drives { get; set; } #nullable restore #else - public List Drives { get; set; } + public List Drives { get; set; } #endif /// The employeeExperience property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public EmployeeExperienceUser? EmployeeExperience { get; set; } + public global::ApiSdk.Models.EmployeeExperienceUser? EmployeeExperience { get; set; } #nullable restore #else - public EmployeeExperienceUser EmployeeExperience { get; set; } + public global::ApiSdk.Models.EmployeeExperienceUser EmployeeExperience { get; set; } #endif - /// The date and time when the user was hired or will start work in case of a future hire. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in). + /// The date and time when the user was hired or will start work in a future hire. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in). public DateTimeOffset? EmployeeHireDate { get; set; } /// The employee identifier assigned to the user by the organization. The maximum length is 16 characters. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -272,15 +286,15 @@ public class User : DirectoryObject, IParsable { #else public string EmployeeId { get; set; } #endif - /// The date and time when the user left or will leave the organization. To read this property, the calling app must be assigned the User-LifeCycleInfo.Read.All permission. To write this property, the calling app must be assigned the User.Read.All and User-LifeCycleInfo.ReadWrite.All permissions. To read this property in delegated scenarios, the admin needs one of the following Azure AD roles: Lifecycle Workflows Administrator, Global Reader, or Global Administrator. To write this property in delegated scenarios, the admin needs the Global Administrator role. Supports $filter (eq, ne, not , ge, le, in). For more information, see Configure the employeeLeaveDateTime property for a user. + /// The date and time when the user left or will leave the organization. To read this property, the calling app must be assigned the User-LifeCycleInfo.Read.All permission. To write this property, the calling app must be assigned the User.Read.All and User-LifeCycleInfo.ReadWrite.All permissions. To read this property in delegated scenarios, the admin needs at least one of the following Microsoft Entra roles: Lifecycle Workflows Administrator, Global Reader. To write this property in delegated scenarios, the admin needs the Global Administrator role. Supports $filter (eq, ne, not , ge, le, in). For more information, see Configure the employeeLeaveDateTime property for a user. public DateTimeOffset? EmployeeLeaveDateTime { get; set; } /// The employeeOrgData property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.EmployeeOrgData? EmployeeOrgData { get; set; } + public global::ApiSdk.Models.EmployeeOrgData? EmployeeOrgData { get; set; } #nullable restore #else - public ApiSdk.Models.EmployeeOrgData EmployeeOrgData { get; set; } + public global::ApiSdk.Models.EmployeeOrgData EmployeeOrgData { get; set; } #endif /// Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Returned only on $select. Supports $filter (eq, ne, not , ge, le, in, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -293,20 +307,20 @@ public class User : DirectoryObject, IParsable { /// The user's events. Default is to show Events under the Default Calendar. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Events { get; set; } + public List? Events { get; set; } #nullable restore #else - public List Events { get; set; } + public List Events { get; set; } #endif /// The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Extensions { get; set; } + public List? Extensions { get; set; } #nullable restore #else - public List Extensions { get; set; } + public List Extensions { get; set; } #endif - /// For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Returned only on $select. Supports $filter (eq, ne, not , in). + /// For a guest invited to the tenant using the invitation API, this property represents the invited user's invitation status. For invited users, the state can be PendingAcceptance or Accepted, or null for all other users. Returned only on $select. Supports $filter (eq, ne, not , in). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ExternalUserState { get; set; } @@ -327,10 +341,10 @@ public class User : DirectoryObject, IParsable { /// The followedSites property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? FollowedSites { get; set; } + public List? FollowedSites { get; set; } #nullable restore #else - public List FollowedSites { get; set; } + public List FollowedSites { get; set; } #endif /// The given name (first name) of the user. Maximum length is 64 characters. Returned by default. Supports $filter (eq, ne, not , ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -340,17 +354,17 @@ public class User : DirectoryObject, IParsable { #else public string GivenName { get; set; } #endif - /// The hire date of the user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned only on $select. Note: This property is specific to SharePoint Online. We recommend using the native employeeHireDate property to set and update hire date values using Microsoft Graph APIs. + /// The hire date of the user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014, is 2014-01-01T00:00:00Z. Returned only on $select. Note: This property is specific to SharePoint in Microsoft 365. We recommend using the native employeeHireDate property to set and update hire date values using Microsoft Graph APIs. public DateTimeOffset? HireDate { get; set; } - /// Represents the identities that can be used to sign in to this user account. An identity can be provided by Microsoft (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and tied to a user account. May contain multiple items with the same signInType value. Returned only on $select. Supports $filter (eq) including on null values, only where the signInType is not userPrincipalName. + /// Represents the identities that can be used to sign in to this user account. Microsoft (also known as a local account), organizations, or social identity providers such as Facebook, Google, and Microsoft can provide identity and tie it to a user account. It might contain multiple items with the same signInType value. Returned only on $select. Supports $filter (eq) with limitations. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Identities { get; set; } + public List? Identities { get; set; } #nullable restore #else - public List Identities { get; set; } + public List Identities { get; set; } #endif - /// The instant message voice over IP (VOIP) session initiation protocol (SIP) addresses for the user. Read-only. Returned only on $select. Supports $filter (eq, not, ge, le, startsWith). + /// The instant message voice-over IP (VOIP) session initiation protocol (SIP) addresses for the user. Read-only. Returned only on $select. Supports $filter (eq, not, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? ImAddresses { get; set; } @@ -361,18 +375,18 @@ public class User : DirectoryObject, IParsable { /// The inferenceClassification property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.InferenceClassification? InferenceClassification { get; set; } + public global::ApiSdk.Models.InferenceClassification? InferenceClassification { get; set; } #nullable restore #else - public ApiSdk.Models.InferenceClassification InferenceClassification { get; set; } + public global::ApiSdk.Models.InferenceClassification InferenceClassification { get; set; } #endif /// The insights property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public OfficeGraphInsights? Insights { get; set; } + public global::ApiSdk.Models.ItemInsights? Insights { get; set; } #nullable restore #else - public OfficeGraphInsights Insights { get; set; } + public global::ApiSdk.Models.ItemInsights Insights { get; set; } #endif /// A list for the user to describe their interests. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -382,7 +396,9 @@ public class User : DirectoryObject, IParsable { #else public List Interests { get; set; } #endif - /// Do not use – reserved for future use. + /// The isManagementRestricted property + public bool? IsManagementRestricted { get; set; } + /// Don't use – reserved for future use. public bool? IsResourceAccount { get; set; } /// The user's job title. Maximum length is 128 characters. Returned by default. Supports $filter (eq, ne, not , ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -395,14 +411,14 @@ public class User : DirectoryObject, IParsable { /// The joinedTeams property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? JoinedTeams { get; set; } + public List? JoinedTeams { get; set; } #nullable restore #else - public List JoinedTeams { get; set; } + public List JoinedTeams { get; set; } #endif - /// The time when this Azure AD user last changed their password or when their password was created, whichever date the latest action was performed. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned only on $select. + /// The time when this Microsoft Entra user last changed their password or when their password was created, whichever date the latest action was performed. The date and time information uses ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned only on $select. public DateTimeOffset? LastPasswordChangeDateTime { get; set; } - /// Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, MinorWithOutParentalConsent, MinorWithParentalConsent, MinorNoParentalConsentRequired, NotAdult and Adult. Refer to the legal age group property definitions for further information. Returned only on $select. + /// Used by enterprise applications to determine the legal age group of the user. This property is read-only and calculated based on ageGroup and consentProvidedForMinor properties. Allowed values: null, MinorWithOutParentalConsent, MinorWithParentalConsent, MinorNoParentalConsentRequired, NotAdult, and Adult. For more information, see legal age group property definitions. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? LegalAgeGroupClassification { get; set; } @@ -410,23 +426,23 @@ public class User : DirectoryObject, IParsable { #else public string LegalAgeGroupClassification { get; set; } #endif - /// State of license assignments for this user. Also indicates licenses that are directly assigned or the user has inherited through group memberships. Read-only. Returned only on $select. + /// State of license assignments for this user. Also indicates licenses that are directly assigned or the user inherited through group memberships. Read-only. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? LicenseAssignmentStates { get; set; } + public List? LicenseAssignmentStates { get; set; } #nullable restore #else - public List LicenseAssignmentStates { get; set; } + public List LicenseAssignmentStates { get; set; } #endif /// A collection of this user's license details. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? LicenseDetails { get; set; } + public List? LicenseDetails { get; set; } #nullable restore #else - public List LicenseDetails { get; set; } + public List LicenseDetails { get; set; } #endif - /// The SMTP address for the user, for example, jeff@contoso.onmicrosoft.com. Changes to this property will also update the user's proxyAddresses collection to include the value as an SMTP address. This property can't contain accent characters. NOTE: We don't recommend updating this property for Azure AD B2C user profiles. Use the otherMails property instead. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, endsWith, and eq on null values). + /// The SMTP address for the user, for example, jeff@contoso.com. Changes to this property update the user's proxyAddresses collection to include the value as an SMTP address. This property can't contain accent characters. NOTE: We don't recommend updating this property for Azure AD B2C user profiles. Use the otherMails property instead. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, endsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Mail { get; set; } @@ -437,18 +453,18 @@ public class User : DirectoryObject, IParsable { /// The mailboxSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.MailboxSettings? MailboxSettings { get; set; } + public global::ApiSdk.Models.MailboxSettings? MailboxSettings { get; set; } #nullable restore #else - public ApiSdk.Models.MailboxSettings MailboxSettings { get; set; } + public global::ApiSdk.Models.MailboxSettings MailboxSettings { get; set; } #endif /// The user's mail folders. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MailFolders { get; set; } + public List? MailFolders { get; set; } #nullable restore #else - public List MailFolders { get; set; } + public List MailFolders { get; set; } #endif /// The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -461,44 +477,44 @@ public class User : DirectoryObject, IParsable { /// Zero or more managed app registrations that belong to the user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ManagedAppRegistrations { get; set; } + public List? ManagedAppRegistrations { get; set; } #nullable restore #else - public List ManagedAppRegistrations { get; set; } + public List ManagedAppRegistrations { get; set; } #endif /// The managed devices associated with the user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ManagedDevices { get; set; } + public List? ManagedDevices { get; set; } #nullable restore #else - public List ManagedDevices { get; set; } + public List ManagedDevices { get; set; } #endif /// The manager property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public DirectoryObject? Manager { get; set; } + public global::ApiSdk.Models.DirectoryObject? Manager { get; set; } #nullable restore #else - public DirectoryObject Manager { get; set; } + public global::ApiSdk.Models.DirectoryObject Manager { get; set; } #endif /// The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? MemberOf { get; set; } + public List? MemberOf { get; set; } #nullable restore #else - public List MemberOf { get; set; } + public List MemberOf { get; set; } #endif /// The messages in a mailbox or folder. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Messages { get; set; } + public List? Messages { get; set; } #nullable restore #else - public List Messages { get; set; } + public List Messages { get; set; } #endif - /// The primary cellular telephone number for the user. Read-only for users synced from on-premises directory. Maximum length is 64 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values) and $search. + /// The primary cellular telephone number for the user. Read-only for users synced from the on-premises directory. Maximum length is 64 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values) and $search. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? MobilePhone { get; set; } @@ -506,7 +522,7 @@ public class User : DirectoryObject, IParsable { #else public string MobilePhone { get; set; } #endif - /// The URL for the user's personal site. Returned only on $select. + /// The URL for the user's site. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? MySite { get; set; } @@ -517,10 +533,10 @@ public class User : DirectoryObject, IParsable { /// The oauth2PermissionGrants property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Oauth2PermissionGrants { get; set; } + public List? Oauth2PermissionGrants { get; set; } #nullable restore #else - public List Oauth2PermissionGrants { get; set; } + public List Oauth2PermissionGrants { get; set; } #endif /// The office location in the user's place of business. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -533,20 +549,20 @@ public class User : DirectoryObject, IParsable { /// The onenote property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Onenote? Onenote { get; set; } + public global::ApiSdk.Models.Onenote? Onenote { get; set; } #nullable restore #else - public ApiSdk.Models.Onenote Onenote { get; set; } + public global::ApiSdk.Models.Onenote Onenote { get; set; } #endif - /// Information about a meeting, including the URL used to join a meeting, the attendees' list, and the description. + /// Information about a meeting, including the URL used to join a meeting, the attendees list, and the description. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OnlineMeetings { get; set; } + public List? OnlineMeetings { get; set; } #nullable restore #else - public List OnlineMeetings { get; set; } + public List OnlineMeetings { get; set; } #endif - /// Contains the on-premises Active Directory distinguished name or DN. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. + /// Contains the on-premises Active Directory distinguished name or DN. The property is only populated for customers who are synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect. Read-only. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesDistinguishedName { get; set; } @@ -554,7 +570,7 @@ public class User : DirectoryObject, IParsable { #else public string OnPremisesDistinguishedName { get; set; } #endif - /// Contains the on-premises domainFQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. + /// Contains the on-premises domainFQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect. Read-only. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesDomainName { get; set; } @@ -565,12 +581,12 @@ public class User : DirectoryObject, IParsable { /// The onPremisesExtensionAttributes property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.OnPremisesExtensionAttributes? OnPremisesExtensionAttributes { get; set; } + public global::ApiSdk.Models.OnPremisesExtensionAttributes? OnPremisesExtensionAttributes { get; set; } #nullable restore #else - public ApiSdk.Models.OnPremisesExtensionAttributes OnPremisesExtensionAttributes { get; set; } + public global::ApiSdk.Models.OnPremisesExtensionAttributes OnPremisesExtensionAttributes { get; set; } #endif - /// This property is used to associate an on-premises Active Directory user account to their Azure AD user object. This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters can't be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in).. + /// This property is used to associate an on-premises Active Directory user account to their Microsoft Entra user object. This property must be specified when creating a new user account in the Graph if you're using a federated domain for the user's userPrincipalName (UPN) property. NOTE: The $ and _ characters can't be used when specifying this property. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesImmutableId { get; set; } @@ -578,17 +594,17 @@ public class User : DirectoryObject, IParsable { #else public string OnPremisesImmutableId { get; set; } #endif - /// Indicates the last time at which the object was synced with the on-premises directory; for example: 2013-02-16T03:04:54Z. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in). + /// Indicates the last time at which the object was synced with the on-premises directory; for example: 2013-02-16T03:04:54Z. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in). public DateTimeOffset? OnPremisesLastSyncDateTime { get; set; } /// Errors when using Microsoft synchronization product during provisioning. Returned only on $select. Supports $filter (eq, not, ge, le). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OnPremisesProvisioningErrors { get; set; } + public List? OnPremisesProvisioningErrors { get; set; } #nullable restore #else - public List OnPremisesProvisioningErrors { get; set; } + public List OnPremisesProvisioningErrors { get; set; } #endif - /// Contains the on-premises samAccountName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith). + /// Contains the on-premises samAccountName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesSamAccountName { get; set; } @@ -596,7 +612,7 @@ public class User : DirectoryObject, IParsable { #else public string OnPremisesSamAccountName { get; set; } #endif - /// Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. Returned only on $select. Supports $filter (eq including on null values). + /// Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. Returned only on $select. Supports $filter (eq including on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesSecurityIdentifier { get; set; } @@ -604,9 +620,9 @@ public class User : DirectoryObject, IParsable { #else public string OnPremisesSecurityIdentifier { get; set; } #endif - /// true if this user object is currently being synced from an on-premises Active Directory (AD); otherwise the user isn't being synced and can be managed in Azure Active Directory (Azure AD). Read-only. Returned only on $select. Supports $filter (eq, ne, not, in, and eq on null values). + /// true if this user object is currently being synced from an on-premises Active Directory (AD); otherwise the user isn't being synced and can be managed in Microsoft Entra ID. Read-only. Returned only on $select. Supports $filter (eq, ne, not, in, and eq on null values). public bool? OnPremisesSyncEnabled { get; set; } - /// Contains the on-premises userPrincipalName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith). + /// Contains the on-premises userPrincipalName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Microsoft Entra ID via Microsoft Entra Connect. Read-only. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesUserPrincipalName { get; set; } @@ -614,7 +630,7 @@ public class User : DirectoryObject, IParsable { #else public string OnPremisesUserPrincipalName { get; set; } #endif - /// A list of additional email addresses for the user; for example: ['bob@contoso.com', 'Robert@fabrikam.com']. NOTE: This property can't contain accent characters. Returned only on $select. Supports $filter (eq, not, ge, le, in, startsWith, endsWith, /$count eq 0, /$count ne 0). + /// A list of other email addresses for the user; for example: ['bob@contoso.com', 'Robert@fabrikam.com']. NOTE: This property can't contain accent characters. Returned only on $select. Supports $filter (eq, not, ge, le, in, startsWith, endsWith, /$count eq 0, /$count ne 0). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? OtherMails { get; set; } @@ -625,28 +641,28 @@ public class User : DirectoryObject, IParsable { /// The outlook property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public OutlookUser? Outlook { get; set; } + public global::ApiSdk.Models.OutlookUser? Outlook { get; set; } #nullable restore #else - public OutlookUser Outlook { get; set; } + public global::ApiSdk.Models.OutlookUser Outlook { get; set; } #endif - /// Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Devices the user owns. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OwnedDevices { get; set; } + public List? OwnedDevices { get; set; } #nullable restore #else - public List OwnedDevices { get; set; } + public List OwnedDevices { get; set; } #endif - /// Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Directory objects the user owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? OwnedObjects { get; set; } + public List? OwnedObjects { get; set; } #nullable restore #else - public List OwnedObjects { get; set; } + public List OwnedObjects { get; set; } #endif - /// Specifies password policies for the user. This value is an enumeration with one possible value being DisableStrongPassword, which allows weaker passwords than the default policy to be specified. DisablePasswordExpiration can also be specified. The two may be specified together; for example: DisablePasswordExpiration, DisableStrongPassword. Returned only on $select. For more information on the default password policies, see Azure AD password policies. Supports $filter (ne, not, and eq on null values). + /// Specifies password policies for the user. This value is an enumeration with one possible value being DisableStrongPassword, which allows weaker passwords than the default policy to be specified. DisablePasswordExpiration can also be specified. The two might be specified together; for example: DisablePasswordExpiration, DisableStrongPassword. Returned only on $select. For more information on the default password policies, see Microsoft Entra password policies. Supports $filter (ne, not, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? PasswordPolicies { get; set; } @@ -657,10 +673,10 @@ public class User : DirectoryObject, IParsable { /// The passwordProfile property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.PasswordProfile? PasswordProfile { get; set; } + public global::ApiSdk.Models.PasswordProfile? PasswordProfile { get; set; } #nullable restore #else - public ApiSdk.Models.PasswordProfile PasswordProfile { get; set; } + public global::ApiSdk.Models.PasswordProfile PasswordProfile { get; set; } #endif /// A list for the user to enumerate their past projects. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -673,34 +689,42 @@ public class User : DirectoryObject, IParsable { /// People that are relevant to the user. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? People { get; set; } + public List? People { get; set; } +#nullable restore +#else + public List People { get; set; } +#endif + /// List all resource-specific permission grants of a user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PermissionGrants { get; set; } #nullable restore #else - public List People { get; set; } + public List PermissionGrants { get; set; } #endif /// The photo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ProfilePhoto? Photo { get; set; } + public global::ApiSdk.Models.ProfilePhoto? Photo { get; set; } #nullable restore #else - public ProfilePhoto Photo { get; set; } + public global::ApiSdk.Models.ProfilePhoto Photo { get; set; } #endif - /// The photos property + /// The collection of the user's profile photos in different sizes. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Photos { get; set; } + public List? Photos { get; set; } #nullable restore #else - public List Photos { get; set; } + public List Photos { get; set; } #endif /// The planner property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public PlannerUser? Planner { get; set; } + public global::ApiSdk.Models.PlannerUser? Planner { get; set; } #nullable restore #else - public PlannerUser Planner { get; set; } + public global::ApiSdk.Models.PlannerUser Planner { get; set; } #endif /// The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code. Maximum length is 40 characters. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -737,28 +761,28 @@ public class User : DirectoryObject, IParsable { /// The presence property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Presence? Presence { get; set; } + public global::ApiSdk.Models.Presence? Presence { get; set; } #nullable restore #else - public ApiSdk.Models.Presence Presence { get; set; } + public global::ApiSdk.Models.Presence Presence { get; set; } #endif /// The print property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public UserPrint? Print { get; set; } + public global::ApiSdk.Models.UserPrint? Print { get; set; } #nullable restore #else - public UserPrint Print { get; set; } + public global::ApiSdk.Models.UserPrint Print { get; set; } #endif /// The plans that are provisioned for the user. Read-only. Not nullable. Returned only on $select. Supports $filter (eq, not, ge, le). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ProvisionedPlans { get; set; } + public List? ProvisionedPlans { get; set; } #nullable restore #else - public List ProvisionedPlans { get; set; } + public List ProvisionedPlans { get; set; } #endif - /// For example: ['SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com']. Changes to the mail property will also update this collection to include the value as an SMTP address. For more information, see mail and proxyAddresses properties. The proxy address prefixed with SMTP (capitalized) is the primary proxy address while those prefixed with smtp are the secondary proxy addresses. For Azure AD B2C accounts, this property has a limit of 10 unique addresses. Read-only in Microsoft Graph; you can update this property only through the Microsoft 365 admin center. Not nullable. Returned only on $select. Supports $filter (eq, not, ge, le, startsWith, endsWith, /$count eq 0, /$count ne 0). + /// For example: ['SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com']. Changes to the mail property update this collection to include the value as an SMTP address. For more information, see mail and proxyAddresses properties. The proxy address prefixed with SMTP (capitalized) is the primary proxy address, while those addresses prefixed with smtp are the secondary proxy addresses. For Azure AD B2C accounts, this property has a limit of 10 unique addresses. Read-only in Microsoft Graph; you can update this property only through the Microsoft 365 admin center. Not nullable. Returned only on $select. Supports $filter (eq, not, ge, le, startsWith, endsWith, /$count eq 0, /$count ne 0). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? ProxyAddresses { get; set; } @@ -769,10 +793,10 @@ public class User : DirectoryObject, IParsable { /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? RegisteredDevices { get; set; } + public List? RegisteredDevices { get; set; } #nullable restore #else - public List RegisteredDevices { get; set; } + public List RegisteredDevices { get; set; } #endif /// A list for the user to enumerate their responsibilities. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -782,7 +806,7 @@ public class User : DirectoryObject, IParsable { #else public List Responsibilities { get; set; } #endif - /// A list for the user to enumerate the schools they have attended. Returned only on $select. + /// A list for the user to enumerate the schools they attended. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Schools { get; set; } @@ -793,10 +817,10 @@ public class User : DirectoryObject, IParsable { /// The scopedRoleMemberOf property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ScopedRoleMemberOf { get; set; } + public List? ScopedRoleMemberOf { get; set; } #nullable restore #else - public List ScopedRoleMemberOf { get; set; } + public List ScopedRoleMemberOf { get; set; } #endif /// Security identifier (SID) of the user, used in Windows scenarios. Read-only. Returned by default. Supports $select and $filter (eq, not, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -806,33 +830,33 @@ public class User : DirectoryObject, IParsable { #else public string SecurityIdentifier { get; set; } #endif - /// The serviceProvisioningErrors property + /// Errors published by a federated service describing a nontransient, service-specific error regarding the properties or link from a user object. Supports $filter (eq, not, for isResolved and serviceInstance). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? ServiceProvisioningErrors { get; set; } + public List? ServiceProvisioningErrors { get; set; } #nullable restore #else - public List ServiceProvisioningErrors { get; set; } + public List ServiceProvisioningErrors { get; set; } #endif /// The settings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public UserSettings? Settings { get; set; } + public global::ApiSdk.Models.UserSettings? Settings { get; set; } #nullable restore #else - public UserSettings Settings { get; set; } + public global::ApiSdk.Models.UserSettings Settings { get; set; } #endif /// Do not use in Microsoft Graph. Manage this property through the Microsoft 365 admin center instead. Represents whether the user should be included in the Outlook global address list. See Known issue. public bool? ShowInAddressList { get; set; } /// The signInActivity property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.SignInActivity? SignInActivity { get; set; } + public global::ApiSdk.Models.SignInActivity? SignInActivity { get; set; } #nullable restore #else - public ApiSdk.Models.SignInActivity SignInActivity { get; set; } + public global::ApiSdk.Models.SignInActivity SignInActivity { get; set; } #endif - /// Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications get an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). If this happens, the application needs to acquire a new refresh token by making a request to the authorize endpoint. Read-only. Use revokeSignInSessions to reset. Returned only on $select. + /// Any refresh tokens or session tokens (session cookies) issued before this time are invalid. Applications get an error when using an invalid refresh or session token to acquire a delegated access token (to access APIs such as Microsoft Graph). If this happens, the application needs to acquire a new refresh token by requesting the authorized endpoint. Read-only. Use revokeSignInSessions to reset. Returned only on $select. public DateTimeOffset? SignInSessionsValidFromDateTime { get; set; } /// A list for the user to enumerate their skills. Returned only on $select. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -841,6 +865,22 @@ public class User : DirectoryObject, IParsable { #nullable restore #else public List Skills { get; set; } +#endif + /// The solutions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.UserSolutionRoot? Solutions { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.UserSolutionRoot Solutions { get; set; } +#endif + /// The users and groups responsible for this guest's privileges in the tenant and keeping the guest's information and access updated. (HTTP Methods: GET, POST, DELETE.). Supports $expand. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Sponsors { get; set; } +#nullable restore +#else + public List Sponsors { get; set; } #endif /// The state or province in the user's address. Maximum length is 128 characters. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -850,7 +890,7 @@ public class User : DirectoryObject, IParsable { #else public string State { get; set; } #endif - /// The street address of the user's place of business. Maximum length is 1024 characters. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). + /// The street address of the user's place of business. Maximum length is 1,024 characters. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? StreetAddress { get; set; } @@ -869,28 +909,28 @@ public class User : DirectoryObject, IParsable { /// The teamwork property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public UserTeamwork? Teamwork { get; set; } + public global::ApiSdk.Models.UserTeamwork? Teamwork { get; set; } #nullable restore #else - public UserTeamwork Teamwork { get; set; } + public global::ApiSdk.Models.UserTeamwork Teamwork { get; set; } #endif /// The todo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Todo? Todo { get; set; } + public global::ApiSdk.Models.Todo? Todo { get; set; } #nullable restore #else - public ApiSdk.Models.Todo Todo { get; set; } + public global::ApiSdk.Models.Todo Todo { get; set; } #endif /// The groups, including nested groups, and directory roles that a user is a member of. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? TransitiveMemberOf { get; set; } + public List? TransitiveMemberOf { get; set; } #nullable restore #else - public List TransitiveMemberOf { get; set; } + public List TransitiveMemberOf { get; set; } #endif - /// A two letter country code (ISO standard 3166). Required for users that are assigned licenses due to legal requirement to check for availability of services in countries. Examples include: US, JP, and GB. Not nullable. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). + /// A two-letter country code (ISO standard 3166). Required for users that are assigned licenses due to legal requirements to check for availability of services in countries. Examples include: US, JP, and GB. Not nullable. Returned only on $select. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? UsageLocation { get; set; } @@ -898,7 +938,7 @@ public class User : DirectoryObject, IParsable { #else public string UsageLocation { get; set; } #endif - /// The user principal name (UPN) of the user. The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant's collection of verified domains. This property is required when a user is created. The verified domains for the tenant can be accessed from the verifiedDomains property of organization.NOTE: This property can't contain accent characters. Only the following characters are allowed A - Z, a - z, 0 - 9, ' . - _ ! # ^ ~. For the complete list of allowed characters, see username policies. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, endsWith) and $orderby. + /// The user principal name (UPN) of the user. The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. By convention, this value should map to the user's email name. The general format is alias@domain, where the domain must be present in the tenant's collection of verified domains. This property is required when a user is created. The verified domains for the tenant can be accessed from the verifiedDomains property of organization.NOTE: This property can't contain accent characters. Only the following characters are allowed A - Z, a - z, 0 - 9, ' . - _ ! # ^ ~. For the complete list of allowed characters, see username policies. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, endsWith) and $orderby. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? UserPrincipalName { get; set; } @@ -906,7 +946,7 @@ public class User : DirectoryObject, IParsable { #else public string UserPrincipalName { get; set; } #endif - /// A string value that can be used to classify user types in your directory, such as Member and Guest. Returned only on $select. Supports $filter (eq, ne, not, in, and eq on null values). NOTE: For more information about the permissions for member and guest users, see What are the default user permissions in Azure Active Directory? + /// A string value that can be used to classify user types in your directory. The possible values are Member and Guest. Returned only on $select. Supports $filter (eq, ne, not, in, and eq on null values). NOTE: For more information about the permissions for members and guests, see What are the default user permissions in Microsoft Entra ID? #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? UserType { get; set; } @@ -917,273 +957,290 @@ public class User : DirectoryObject, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new User CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.User CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new User(); + return new global::ApiSdk.Models.User(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"aboutMe", n => { AboutMe = n.GetStringValue(); } }, - {"accountEnabled", n => { AccountEnabled = n.GetBoolValue(); } }, - {"activities", n => { Activities = n.GetCollectionOfObjectValues(UserActivity.CreateFromDiscriminatorValue)?.ToList(); } }, - {"ageGroup", n => { AgeGroup = n.GetStringValue(); } }, - {"agreementAcceptances", n => { AgreementAcceptances = n.GetCollectionOfObjectValues(AgreementAcceptance.CreateFromDiscriminatorValue)?.ToList(); } }, - {"appRoleAssignments", n => { AppRoleAssignments = n.GetCollectionOfObjectValues(AppRoleAssignment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"assignedLicenses", n => { AssignedLicenses = n.GetCollectionOfObjectValues(AssignedLicense.CreateFromDiscriminatorValue)?.ToList(); } }, - {"assignedPlans", n => { AssignedPlans = n.GetCollectionOfObjectValues(AssignedPlan.CreateFromDiscriminatorValue)?.ToList(); } }, - {"authentication", n => { Authentication = n.GetObjectValue(ApiSdk.Models.Authentication.CreateFromDiscriminatorValue); } }, - {"authorizationInfo", n => { AuthorizationInfo = n.GetObjectValue(ApiSdk.Models.AuthorizationInfo.CreateFromDiscriminatorValue); } }, - {"birthday", n => { Birthday = n.GetDateTimeOffsetValue(); } }, - {"businessPhones", n => { BusinessPhones = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"calendar", n => { Calendar = n.GetObjectValue(ApiSdk.Models.Calendar.CreateFromDiscriminatorValue); } }, - {"calendarGroups", n => { CalendarGroups = n.GetCollectionOfObjectValues(CalendarGroup.CreateFromDiscriminatorValue)?.ToList(); } }, - {"calendarView", n => { CalendarView = n.GetCollectionOfObjectValues(Event.CreateFromDiscriminatorValue)?.ToList(); } }, - {"calendars", n => { Calendars = n.GetCollectionOfObjectValues(ApiSdk.Models.Calendar.CreateFromDiscriminatorValue)?.ToList(); } }, - {"chats", n => { Chats = n.GetCollectionOfObjectValues(Chat.CreateFromDiscriminatorValue)?.ToList(); } }, - {"city", n => { City = n.GetStringValue(); } }, - {"companyName", n => { CompanyName = n.GetStringValue(); } }, - {"consentProvidedForMinor", n => { ConsentProvidedForMinor = n.GetStringValue(); } }, - {"contactFolders", n => { ContactFolders = n.GetCollectionOfObjectValues(ContactFolder.CreateFromDiscriminatorValue)?.ToList(); } }, - {"contacts", n => { Contacts = n.GetCollectionOfObjectValues(Contact.CreateFromDiscriminatorValue)?.ToList(); } }, - {"country", n => { Country = n.GetStringValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"createdObjects", n => { CreatedObjects = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"creationType", n => { CreationType = n.GetStringValue(); } }, - {"customSecurityAttributes", n => { CustomSecurityAttributes = n.GetObjectValue(CustomSecurityAttributeValue.CreateFromDiscriminatorValue); } }, - {"department", n => { Department = n.GetStringValue(); } }, - {"deviceEnrollmentLimit", n => { DeviceEnrollmentLimit = n.GetIntValue(); } }, - {"deviceManagementTroubleshootingEvents", n => { DeviceManagementTroubleshootingEvents = n.GetCollectionOfObjectValues(DeviceManagementTroubleshootingEvent.CreateFromDiscriminatorValue)?.ToList(); } }, - {"directReports", n => { DirectReports = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"drive", n => { Drive = n.GetObjectValue(ApiSdk.Models.Drive.CreateFromDiscriminatorValue); } }, - {"drives", n => { Drives = n.GetCollectionOfObjectValues(ApiSdk.Models.Drive.CreateFromDiscriminatorValue)?.ToList(); } }, - {"employeeExperience", n => { EmployeeExperience = n.GetObjectValue(EmployeeExperienceUser.CreateFromDiscriminatorValue); } }, - {"employeeHireDate", n => { EmployeeHireDate = n.GetDateTimeOffsetValue(); } }, - {"employeeId", n => { EmployeeId = n.GetStringValue(); } }, - {"employeeLeaveDateTime", n => { EmployeeLeaveDateTime = n.GetDateTimeOffsetValue(); } }, - {"employeeOrgData", n => { EmployeeOrgData = n.GetObjectValue(ApiSdk.Models.EmployeeOrgData.CreateFromDiscriminatorValue); } }, - {"employeeType", n => { EmployeeType = n.GetStringValue(); } }, - {"events", n => { Events = n.GetCollectionOfObjectValues(Event.CreateFromDiscriminatorValue)?.ToList(); } }, - {"extensions", n => { Extensions = n.GetCollectionOfObjectValues(Extension.CreateFromDiscriminatorValue)?.ToList(); } }, - {"externalUserState", n => { ExternalUserState = n.GetStringValue(); } }, - {"externalUserStateChangeDateTime", n => { ExternalUserStateChangeDateTime = n.GetDateTimeOffsetValue(); } }, - {"faxNumber", n => { FaxNumber = n.GetStringValue(); } }, - {"followedSites", n => { FollowedSites = n.GetCollectionOfObjectValues(Site.CreateFromDiscriminatorValue)?.ToList(); } }, - {"givenName", n => { GivenName = n.GetStringValue(); } }, - {"hireDate", n => { HireDate = n.GetDateTimeOffsetValue(); } }, - {"identities", n => { Identities = n.GetCollectionOfObjectValues(ObjectIdentity.CreateFromDiscriminatorValue)?.ToList(); } }, - {"imAddresses", n => { ImAddresses = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"inferenceClassification", n => { InferenceClassification = n.GetObjectValue(ApiSdk.Models.InferenceClassification.CreateFromDiscriminatorValue); } }, - {"insights", n => { Insights = n.GetObjectValue(OfficeGraphInsights.CreateFromDiscriminatorValue); } }, - {"interests", n => { Interests = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"isResourceAccount", n => { IsResourceAccount = n.GetBoolValue(); } }, - {"jobTitle", n => { JobTitle = n.GetStringValue(); } }, - {"joinedTeams", n => { JoinedTeams = n.GetCollectionOfObjectValues(Team.CreateFromDiscriminatorValue)?.ToList(); } }, - {"lastPasswordChangeDateTime", n => { LastPasswordChangeDateTime = n.GetDateTimeOffsetValue(); } }, - {"legalAgeGroupClassification", n => { LegalAgeGroupClassification = n.GetStringValue(); } }, - {"licenseAssignmentStates", n => { LicenseAssignmentStates = n.GetCollectionOfObjectValues(LicenseAssignmentState.CreateFromDiscriminatorValue)?.ToList(); } }, - {"licenseDetails", n => { LicenseDetails = n.GetCollectionOfObjectValues(ApiSdk.Models.LicenseDetails.CreateFromDiscriminatorValue)?.ToList(); } }, - {"mail", n => { Mail = n.GetStringValue(); } }, - {"mailFolders", n => { MailFolders = n.GetCollectionOfObjectValues(MailFolder.CreateFromDiscriminatorValue)?.ToList(); } }, - {"mailNickname", n => { MailNickname = n.GetStringValue(); } }, - {"mailboxSettings", n => { MailboxSettings = n.GetObjectValue(ApiSdk.Models.MailboxSettings.CreateFromDiscriminatorValue); } }, - {"managedAppRegistrations", n => { ManagedAppRegistrations = n.GetCollectionOfObjectValues(ManagedAppRegistration.CreateFromDiscriminatorValue)?.ToList(); } }, - {"managedDevices", n => { ManagedDevices = n.GetCollectionOfObjectValues(ManagedDevice.CreateFromDiscriminatorValue)?.ToList(); } }, - {"manager", n => { Manager = n.GetObjectValue(DirectoryObject.CreateFromDiscriminatorValue); } }, - {"memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"messages", n => { Messages = n.GetCollectionOfObjectValues(Message.CreateFromDiscriminatorValue)?.ToList(); } }, - {"mobilePhone", n => { MobilePhone = n.GetStringValue(); } }, - {"mySite", n => { MySite = n.GetStringValue(); } }, - {"oauth2PermissionGrants", n => { Oauth2PermissionGrants = n.GetCollectionOfObjectValues(OAuth2PermissionGrant.CreateFromDiscriminatorValue)?.ToList(); } }, - {"officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, - {"onPremisesDistinguishedName", n => { OnPremisesDistinguishedName = n.GetStringValue(); } }, - {"onPremisesDomainName", n => { OnPremisesDomainName = n.GetStringValue(); } }, - {"onPremisesExtensionAttributes", n => { OnPremisesExtensionAttributes = n.GetObjectValue(ApiSdk.Models.OnPremisesExtensionAttributes.CreateFromDiscriminatorValue); } }, - {"onPremisesImmutableId", n => { OnPremisesImmutableId = n.GetStringValue(); } }, - {"onPremisesLastSyncDateTime", n => { OnPremisesLastSyncDateTime = n.GetDateTimeOffsetValue(); } }, - {"onPremisesProvisioningErrors", n => { OnPremisesProvisioningErrors = n.GetCollectionOfObjectValues(OnPremisesProvisioningError.CreateFromDiscriminatorValue)?.ToList(); } }, - {"onPremisesSamAccountName", n => { OnPremisesSamAccountName = n.GetStringValue(); } }, - {"onPremisesSecurityIdentifier", n => { OnPremisesSecurityIdentifier = n.GetStringValue(); } }, - {"onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, - {"onPremisesUserPrincipalName", n => { OnPremisesUserPrincipalName = n.GetStringValue(); } }, - {"onenote", n => { Onenote = n.GetObjectValue(ApiSdk.Models.Onenote.CreateFromDiscriminatorValue); } }, - {"onlineMeetings", n => { OnlineMeetings = n.GetCollectionOfObjectValues(OnlineMeeting.CreateFromDiscriminatorValue)?.ToList(); } }, - {"otherMails", n => { OtherMails = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"outlook", n => { Outlook = n.GetObjectValue(OutlookUser.CreateFromDiscriminatorValue); } }, - {"ownedDevices", n => { OwnedDevices = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"ownedObjects", n => { OwnedObjects = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"passwordPolicies", n => { PasswordPolicies = n.GetStringValue(); } }, - {"passwordProfile", n => { PasswordProfile = n.GetObjectValue(ApiSdk.Models.PasswordProfile.CreateFromDiscriminatorValue); } }, - {"pastProjects", n => { PastProjects = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"people", n => { People = n.GetCollectionOfObjectValues(Person.CreateFromDiscriminatorValue)?.ToList(); } }, - {"photo", n => { Photo = n.GetObjectValue(ProfilePhoto.CreateFromDiscriminatorValue); } }, - {"photos", n => { Photos = n.GetCollectionOfObjectValues(ProfilePhoto.CreateFromDiscriminatorValue)?.ToList(); } }, - {"planner", n => { Planner = n.GetObjectValue(PlannerUser.CreateFromDiscriminatorValue); } }, - {"postalCode", n => { PostalCode = n.GetStringValue(); } }, - {"preferredDataLocation", n => { PreferredDataLocation = n.GetStringValue(); } }, - {"preferredLanguage", n => { PreferredLanguage = n.GetStringValue(); } }, - {"preferredName", n => { PreferredName = n.GetStringValue(); } }, - {"presence", n => { Presence = n.GetObjectValue(ApiSdk.Models.Presence.CreateFromDiscriminatorValue); } }, - {"print", n => { Print = n.GetObjectValue(UserPrint.CreateFromDiscriminatorValue); } }, - {"provisionedPlans", n => { ProvisionedPlans = n.GetCollectionOfObjectValues(ProvisionedPlan.CreateFromDiscriminatorValue)?.ToList(); } }, - {"proxyAddresses", n => { ProxyAddresses = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"registeredDevices", n => { RegisteredDevices = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"responsibilities", n => { Responsibilities = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"schools", n => { Schools = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"scopedRoleMemberOf", n => { ScopedRoleMemberOf = n.GetCollectionOfObjectValues(ScopedRoleMembership.CreateFromDiscriminatorValue)?.ToList(); } }, - {"securityIdentifier", n => { SecurityIdentifier = n.GetStringValue(); } }, - {"serviceProvisioningErrors", n => { ServiceProvisioningErrors = n.GetCollectionOfObjectValues(ServiceProvisioningError.CreateFromDiscriminatorValue)?.ToList(); } }, - {"settings", n => { Settings = n.GetObjectValue(UserSettings.CreateFromDiscriminatorValue); } }, - {"showInAddressList", n => { ShowInAddressList = n.GetBoolValue(); } }, - {"signInActivity", n => { SignInActivity = n.GetObjectValue(ApiSdk.Models.SignInActivity.CreateFromDiscriminatorValue); } }, - {"signInSessionsValidFromDateTime", n => { SignInSessionsValidFromDateTime = n.GetDateTimeOffsetValue(); } }, - {"skills", n => { Skills = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, - {"state", n => { State = n.GetStringValue(); } }, - {"streetAddress", n => { StreetAddress = n.GetStringValue(); } }, - {"surname", n => { Surname = n.GetStringValue(); } }, - {"teamwork", n => { Teamwork = n.GetObjectValue(UserTeamwork.CreateFromDiscriminatorValue); } }, - {"todo", n => { Todo = n.GetObjectValue(ApiSdk.Models.Todo.CreateFromDiscriminatorValue); } }, - {"transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(DirectoryObject.CreateFromDiscriminatorValue)?.ToList(); } }, - {"usageLocation", n => { UsageLocation = n.GetStringValue(); } }, - {"userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, - {"userType", n => { UserType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "aboutMe", n => { AboutMe = n.GetStringValue(); } }, + { "accountEnabled", n => { AccountEnabled = n.GetBoolValue(); } }, + { "activities", n => { Activities = n.GetCollectionOfObjectValues(global::ApiSdk.Models.UserActivity.CreateFromDiscriminatorValue)?.AsList(); } }, + { "ageGroup", n => { AgeGroup = n.GetStringValue(); } }, + { "agreementAcceptances", n => { AgreementAcceptances = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AgreementAcceptance.CreateFromDiscriminatorValue)?.AsList(); } }, + { "appRoleAssignments", n => { AppRoleAssignments = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AppRoleAssignment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "assignedLicenses", n => { AssignedLicenses = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AssignedLicense.CreateFromDiscriminatorValue)?.AsList(); } }, + { "assignedPlans", n => { AssignedPlans = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AssignedPlan.CreateFromDiscriminatorValue)?.AsList(); } }, + { "authentication", n => { Authentication = n.GetObjectValue(global::ApiSdk.Models.Authentication.CreateFromDiscriminatorValue); } }, + { "authorizationInfo", n => { AuthorizationInfo = n.GetObjectValue(global::ApiSdk.Models.AuthorizationInfo.CreateFromDiscriminatorValue); } }, + { "birthday", n => { Birthday = n.GetDateTimeOffsetValue(); } }, + { "businessPhones", n => { BusinessPhones = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "calendar", n => { Calendar = n.GetObjectValue(global::ApiSdk.Models.Calendar.CreateFromDiscriminatorValue); } }, + { "calendarGroups", n => { CalendarGroups = n.GetCollectionOfObjectValues(global::ApiSdk.Models.CalendarGroup.CreateFromDiscriminatorValue)?.AsList(); } }, + { "calendarView", n => { CalendarView = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Event.CreateFromDiscriminatorValue)?.AsList(); } }, + { "calendars", n => { Calendars = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Calendar.CreateFromDiscriminatorValue)?.AsList(); } }, + { "chats", n => { Chats = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Chat.CreateFromDiscriminatorValue)?.AsList(); } }, + { "city", n => { City = n.GetStringValue(); } }, + { "cloudClipboard", n => { CloudClipboard = n.GetObjectValue(global::ApiSdk.Models.CloudClipboardRoot.CreateFromDiscriminatorValue); } }, + { "companyName", n => { CompanyName = n.GetStringValue(); } }, + { "consentProvidedForMinor", n => { ConsentProvidedForMinor = n.GetStringValue(); } }, + { "contactFolders", n => { ContactFolders = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ContactFolder.CreateFromDiscriminatorValue)?.AsList(); } }, + { "contacts", n => { Contacts = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Contact.CreateFromDiscriminatorValue)?.AsList(); } }, + { "country", n => { Country = n.GetStringValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "createdObjects", n => { CreatedObjects = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "creationType", n => { CreationType = n.GetStringValue(); } }, + { "customSecurityAttributes", n => { CustomSecurityAttributes = n.GetObjectValue(global::ApiSdk.Models.CustomSecurityAttributeValue.CreateFromDiscriminatorValue); } }, + { "department", n => { Department = n.GetStringValue(); } }, + { "deviceEnrollmentLimit", n => { DeviceEnrollmentLimit = n.GetIntValue(); } }, + { "deviceManagementTroubleshootingEvents", n => { DeviceManagementTroubleshootingEvents = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DeviceManagementTroubleshootingEvent.CreateFromDiscriminatorValue)?.AsList(); } }, + { "directReports", n => { DirectReports = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "drive", n => { Drive = n.GetObjectValue(global::ApiSdk.Models.Drive.CreateFromDiscriminatorValue); } }, + { "drives", n => { Drives = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Drive.CreateFromDiscriminatorValue)?.AsList(); } }, + { "employeeExperience", n => { EmployeeExperience = n.GetObjectValue(global::ApiSdk.Models.EmployeeExperienceUser.CreateFromDiscriminatorValue); } }, + { "employeeHireDate", n => { EmployeeHireDate = n.GetDateTimeOffsetValue(); } }, + { "employeeId", n => { EmployeeId = n.GetStringValue(); } }, + { "employeeLeaveDateTime", n => { EmployeeLeaveDateTime = n.GetDateTimeOffsetValue(); } }, + { "employeeOrgData", n => { EmployeeOrgData = n.GetObjectValue(global::ApiSdk.Models.EmployeeOrgData.CreateFromDiscriminatorValue); } }, + { "employeeType", n => { EmployeeType = n.GetStringValue(); } }, + { "events", n => { Events = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Event.CreateFromDiscriminatorValue)?.AsList(); } }, + { "extensions", n => { Extensions = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue)?.AsList(); } }, + { "externalUserState", n => { ExternalUserState = n.GetStringValue(); } }, + { "externalUserStateChangeDateTime", n => { ExternalUserStateChangeDateTime = n.GetDateTimeOffsetValue(); } }, + { "faxNumber", n => { FaxNumber = n.GetStringValue(); } }, + { "followedSites", n => { FollowedSites = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Site.CreateFromDiscriminatorValue)?.AsList(); } }, + { "givenName", n => { GivenName = n.GetStringValue(); } }, + { "hireDate", n => { HireDate = n.GetDateTimeOffsetValue(); } }, + { "identities", n => { Identities = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ObjectIdentity.CreateFromDiscriminatorValue)?.AsList(); } }, + { "imAddresses", n => { ImAddresses = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "inferenceClassification", n => { InferenceClassification = n.GetObjectValue(global::ApiSdk.Models.InferenceClassification.CreateFromDiscriminatorValue); } }, + { "insights", n => { Insights = n.GetObjectValue(global::ApiSdk.Models.ItemInsights.CreateFromDiscriminatorValue); } }, + { "interests", n => { Interests = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "isManagementRestricted", n => { IsManagementRestricted = n.GetBoolValue(); } }, + { "isResourceAccount", n => { IsResourceAccount = n.GetBoolValue(); } }, + { "jobTitle", n => { JobTitle = n.GetStringValue(); } }, + { "joinedTeams", n => { JoinedTeams = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Team.CreateFromDiscriminatorValue)?.AsList(); } }, + { "lastPasswordChangeDateTime", n => { LastPasswordChangeDateTime = n.GetDateTimeOffsetValue(); } }, + { "legalAgeGroupClassification", n => { LegalAgeGroupClassification = n.GetStringValue(); } }, + { "licenseAssignmentStates", n => { LicenseAssignmentStates = n.GetCollectionOfObjectValues(global::ApiSdk.Models.LicenseAssignmentState.CreateFromDiscriminatorValue)?.AsList(); } }, + { "licenseDetails", n => { LicenseDetails = n.GetCollectionOfObjectValues(global::ApiSdk.Models.LicenseDetails.CreateFromDiscriminatorValue)?.AsList(); } }, + { "mail", n => { Mail = n.GetStringValue(); } }, + { "mailFolders", n => { MailFolders = n.GetCollectionOfObjectValues(global::ApiSdk.Models.MailFolder.CreateFromDiscriminatorValue)?.AsList(); } }, + { "mailNickname", n => { MailNickname = n.GetStringValue(); } }, + { "mailboxSettings", n => { MailboxSettings = n.GetObjectValue(global::ApiSdk.Models.MailboxSettings.CreateFromDiscriminatorValue); } }, + { "managedAppRegistrations", n => { ManagedAppRegistrations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ManagedAppRegistration.CreateFromDiscriminatorValue)?.AsList(); } }, + { "managedDevices", n => { ManagedDevices = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ManagedDevice.CreateFromDiscriminatorValue)?.AsList(); } }, + { "manager", n => { Manager = n.GetObjectValue(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue); } }, + { "memberOf", n => { MemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "messages", n => { Messages = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Message.CreateFromDiscriminatorValue)?.AsList(); } }, + { "mobilePhone", n => { MobilePhone = n.GetStringValue(); } }, + { "mySite", n => { MySite = n.GetStringValue(); } }, + { "oauth2PermissionGrants", n => { Oauth2PermissionGrants = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OAuth2PermissionGrant.CreateFromDiscriminatorValue)?.AsList(); } }, + { "officeLocation", n => { OfficeLocation = n.GetStringValue(); } }, + { "onPremisesDistinguishedName", n => { OnPremisesDistinguishedName = n.GetStringValue(); } }, + { "onPremisesDomainName", n => { OnPremisesDomainName = n.GetStringValue(); } }, + { "onPremisesExtensionAttributes", n => { OnPremisesExtensionAttributes = n.GetObjectValue(global::ApiSdk.Models.OnPremisesExtensionAttributes.CreateFromDiscriminatorValue); } }, + { "onPremisesImmutableId", n => { OnPremisesImmutableId = n.GetStringValue(); } }, + { "onPremisesLastSyncDateTime", n => { OnPremisesLastSyncDateTime = n.GetDateTimeOffsetValue(); } }, + { "onPremisesProvisioningErrors", n => { OnPremisesProvisioningErrors = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnPremisesProvisioningError.CreateFromDiscriminatorValue)?.AsList(); } }, + { "onPremisesSamAccountName", n => { OnPremisesSamAccountName = n.GetStringValue(); } }, + { "onPremisesSecurityIdentifier", n => { OnPremisesSecurityIdentifier = n.GetStringValue(); } }, + { "onPremisesSyncEnabled", n => { OnPremisesSyncEnabled = n.GetBoolValue(); } }, + { "onPremisesUserPrincipalName", n => { OnPremisesUserPrincipalName = n.GetStringValue(); } }, + { "onenote", n => { Onenote = n.GetObjectValue(global::ApiSdk.Models.Onenote.CreateFromDiscriminatorValue); } }, + { "onlineMeetings", n => { OnlineMeetings = n.GetCollectionOfObjectValues(global::ApiSdk.Models.OnlineMeeting.CreateFromDiscriminatorValue)?.AsList(); } }, + { "otherMails", n => { OtherMails = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "outlook", n => { Outlook = n.GetObjectValue(global::ApiSdk.Models.OutlookUser.CreateFromDiscriminatorValue); } }, + { "ownedDevices", n => { OwnedDevices = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "ownedObjects", n => { OwnedObjects = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "passwordPolicies", n => { PasswordPolicies = n.GetStringValue(); } }, + { "passwordProfile", n => { PasswordProfile = n.GetObjectValue(global::ApiSdk.Models.PasswordProfile.CreateFromDiscriminatorValue); } }, + { "pastProjects", n => { PastProjects = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "people", n => { People = n.GetCollectionOfObjectValues(global::ApiSdk.Models.Person.CreateFromDiscriminatorValue)?.AsList(); } }, + { "permissionGrants", n => { PermissionGrants = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ResourceSpecificPermissionGrant.CreateFromDiscriminatorValue)?.AsList(); } }, + { "photo", n => { Photo = n.GetObjectValue(global::ApiSdk.Models.ProfilePhoto.CreateFromDiscriminatorValue); } }, + { "photos", n => { Photos = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ProfilePhoto.CreateFromDiscriminatorValue)?.AsList(); } }, + { "planner", n => { Planner = n.GetObjectValue(global::ApiSdk.Models.PlannerUser.CreateFromDiscriminatorValue); } }, + { "postalCode", n => { PostalCode = n.GetStringValue(); } }, + { "preferredDataLocation", n => { PreferredDataLocation = n.GetStringValue(); } }, + { "preferredLanguage", n => { PreferredLanguage = n.GetStringValue(); } }, + { "preferredName", n => { PreferredName = n.GetStringValue(); } }, + { "presence", n => { Presence = n.GetObjectValue(global::ApiSdk.Models.Presence.CreateFromDiscriminatorValue); } }, + { "print", n => { Print = n.GetObjectValue(global::ApiSdk.Models.UserPrint.CreateFromDiscriminatorValue); } }, + { "provisionedPlans", n => { ProvisionedPlans = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ProvisionedPlan.CreateFromDiscriminatorValue)?.AsList(); } }, + { "proxyAddresses", n => { ProxyAddresses = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "registeredDevices", n => { RegisteredDevices = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "responsibilities", n => { Responsibilities = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "schools", n => { Schools = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "scopedRoleMemberOf", n => { ScopedRoleMemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ScopedRoleMembership.CreateFromDiscriminatorValue)?.AsList(); } }, + { "securityIdentifier", n => { SecurityIdentifier = n.GetStringValue(); } }, + { "serviceProvisioningErrors", n => { ServiceProvisioningErrors = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ServiceProvisioningError.CreateFromDiscriminatorValue)?.AsList(); } }, + { "settings", n => { Settings = n.GetObjectValue(global::ApiSdk.Models.UserSettings.CreateFromDiscriminatorValue); } }, + { "showInAddressList", n => { ShowInAddressList = n.GetBoolValue(); } }, + { "signInActivity", n => { SignInActivity = n.GetObjectValue(global::ApiSdk.Models.SignInActivity.CreateFromDiscriminatorValue); } }, + { "signInSessionsValidFromDateTime", n => { SignInSessionsValidFromDateTime = n.GetDateTimeOffsetValue(); } }, + { "skills", n => { Skills = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "solutions", n => { Solutions = n.GetObjectValue(global::ApiSdk.Models.UserSolutionRoot.CreateFromDiscriminatorValue); } }, + { "sponsors", n => { Sponsors = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "state", n => { State = n.GetStringValue(); } }, + { "streetAddress", n => { StreetAddress = n.GetStringValue(); } }, + { "surname", n => { Surname = n.GetStringValue(); } }, + { "teamwork", n => { Teamwork = n.GetObjectValue(global::ApiSdk.Models.UserTeamwork.CreateFromDiscriminatorValue); } }, + { "todo", n => { Todo = n.GetObjectValue(global::ApiSdk.Models.Todo.CreateFromDiscriminatorValue); } }, + { "transitiveMemberOf", n => { TransitiveMemberOf = n.GetCollectionOfObjectValues(global::ApiSdk.Models.DirectoryObject.CreateFromDiscriminatorValue)?.AsList(); } }, + { "usageLocation", n => { UsageLocation = n.GetStringValue(); } }, + { "userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, + { "userType", n => { UserType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("aboutMe", AboutMe); writer.WriteBoolValue("accountEnabled", AccountEnabled); - writer.WriteCollectionOfObjectValues("activities", Activities); + writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteStringValue("ageGroup", AgeGroup); - writer.WriteCollectionOfObjectValues("agreementAcceptances", AgreementAcceptances); - writer.WriteCollectionOfObjectValues("appRoleAssignments", AppRoleAssignments); - writer.WriteCollectionOfObjectValues("assignedLicenses", AssignedLicenses); - writer.WriteCollectionOfObjectValues("assignedPlans", AssignedPlans); - writer.WriteObjectValue("authentication", Authentication); - writer.WriteObjectValue("authorizationInfo", AuthorizationInfo); + writer.WriteCollectionOfObjectValues("agreementAcceptances", AgreementAcceptances); + writer.WriteCollectionOfObjectValues("appRoleAssignments", AppRoleAssignments); + writer.WriteCollectionOfObjectValues("assignedLicenses", AssignedLicenses); + writer.WriteCollectionOfObjectValues("assignedPlans", AssignedPlans); + writer.WriteObjectValue("authentication", Authentication); + writer.WriteObjectValue("authorizationInfo", AuthorizationInfo); writer.WriteDateTimeOffsetValue("birthday", Birthday); writer.WriteCollectionOfPrimitiveValues("businessPhones", BusinessPhones); - writer.WriteObjectValue("calendar", Calendar); - writer.WriteCollectionOfObjectValues("calendarGroups", CalendarGroups); - writer.WriteCollectionOfObjectValues("calendars", Calendars); - writer.WriteCollectionOfObjectValues("calendarView", CalendarView); - writer.WriteCollectionOfObjectValues("chats", Chats); + writer.WriteObjectValue("calendar", Calendar); + writer.WriteCollectionOfObjectValues("calendarGroups", CalendarGroups); + writer.WriteCollectionOfObjectValues("calendars", Calendars); + writer.WriteCollectionOfObjectValues("calendarView", CalendarView); + writer.WriteCollectionOfObjectValues("chats", Chats); writer.WriteStringValue("city", City); + writer.WriteObjectValue("cloudClipboard", CloudClipboard); writer.WriteStringValue("companyName", CompanyName); writer.WriteStringValue("consentProvidedForMinor", ConsentProvidedForMinor); - writer.WriteCollectionOfObjectValues("contactFolders", ContactFolders); - writer.WriteCollectionOfObjectValues("contacts", Contacts); + writer.WriteCollectionOfObjectValues("contactFolders", ContactFolders); + writer.WriteCollectionOfObjectValues("contacts", Contacts); writer.WriteStringValue("country", Country); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteCollectionOfObjectValues("createdObjects", CreatedObjects); + writer.WriteCollectionOfObjectValues("createdObjects", CreatedObjects); writer.WriteStringValue("creationType", CreationType); - writer.WriteObjectValue("customSecurityAttributes", CustomSecurityAttributes); + writer.WriteObjectValue("customSecurityAttributes", CustomSecurityAttributes); writer.WriteStringValue("department", Department); writer.WriteIntValue("deviceEnrollmentLimit", DeviceEnrollmentLimit); - writer.WriteCollectionOfObjectValues("deviceManagementTroubleshootingEvents", DeviceManagementTroubleshootingEvents); - writer.WriteCollectionOfObjectValues("directReports", DirectReports); + writer.WriteCollectionOfObjectValues("deviceManagementTroubleshootingEvents", DeviceManagementTroubleshootingEvents); + writer.WriteCollectionOfObjectValues("directReports", DirectReports); writer.WriteStringValue("displayName", DisplayName); - writer.WriteObjectValue("drive", Drive); - writer.WriteCollectionOfObjectValues("drives", Drives); - writer.WriteObjectValue("employeeExperience", EmployeeExperience); + writer.WriteObjectValue("drive", Drive); + writer.WriteCollectionOfObjectValues("drives", Drives); + writer.WriteObjectValue("employeeExperience", EmployeeExperience); writer.WriteDateTimeOffsetValue("employeeHireDate", EmployeeHireDate); writer.WriteStringValue("employeeId", EmployeeId); writer.WriteDateTimeOffsetValue("employeeLeaveDateTime", EmployeeLeaveDateTime); - writer.WriteObjectValue("employeeOrgData", EmployeeOrgData); + writer.WriteObjectValue("employeeOrgData", EmployeeOrgData); writer.WriteStringValue("employeeType", EmployeeType); - writer.WriteCollectionOfObjectValues("events", Events); - writer.WriteCollectionOfObjectValues("extensions", Extensions); + writer.WriteCollectionOfObjectValues("events", Events); + writer.WriteCollectionOfObjectValues("extensions", Extensions); writer.WriteStringValue("externalUserState", ExternalUserState); writer.WriteDateTimeOffsetValue("externalUserStateChangeDateTime", ExternalUserStateChangeDateTime); writer.WriteStringValue("faxNumber", FaxNumber); - writer.WriteCollectionOfObjectValues("followedSites", FollowedSites); + writer.WriteCollectionOfObjectValues("followedSites", FollowedSites); writer.WriteStringValue("givenName", GivenName); writer.WriteDateTimeOffsetValue("hireDate", HireDate); - writer.WriteCollectionOfObjectValues("identities", Identities); + writer.WriteCollectionOfObjectValues("identities", Identities); writer.WriteCollectionOfPrimitiveValues("imAddresses", ImAddresses); - writer.WriteObjectValue("inferenceClassification", InferenceClassification); - writer.WriteObjectValue("insights", Insights); + writer.WriteObjectValue("inferenceClassification", InferenceClassification); + writer.WriteObjectValue("insights", Insights); writer.WriteCollectionOfPrimitiveValues("interests", Interests); + writer.WriteBoolValue("isManagementRestricted", IsManagementRestricted); writer.WriteBoolValue("isResourceAccount", IsResourceAccount); writer.WriteStringValue("jobTitle", JobTitle); - writer.WriteCollectionOfObjectValues("joinedTeams", JoinedTeams); + writer.WriteCollectionOfObjectValues("joinedTeams", JoinedTeams); writer.WriteDateTimeOffsetValue("lastPasswordChangeDateTime", LastPasswordChangeDateTime); writer.WriteStringValue("legalAgeGroupClassification", LegalAgeGroupClassification); - writer.WriteCollectionOfObjectValues("licenseAssignmentStates", LicenseAssignmentStates); - writer.WriteCollectionOfObjectValues("licenseDetails", LicenseDetails); + writer.WriteCollectionOfObjectValues("licenseAssignmentStates", LicenseAssignmentStates); + writer.WriteCollectionOfObjectValues("licenseDetails", LicenseDetails); writer.WriteStringValue("mail", Mail); - writer.WriteObjectValue("mailboxSettings", MailboxSettings); - writer.WriteCollectionOfObjectValues("mailFolders", MailFolders); + writer.WriteObjectValue("mailboxSettings", MailboxSettings); + writer.WriteCollectionOfObjectValues("mailFolders", MailFolders); writer.WriteStringValue("mailNickname", MailNickname); - writer.WriteCollectionOfObjectValues("managedAppRegistrations", ManagedAppRegistrations); - writer.WriteCollectionOfObjectValues("managedDevices", ManagedDevices); - writer.WriteObjectValue("manager", Manager); - writer.WriteCollectionOfObjectValues("memberOf", MemberOf); - writer.WriteCollectionOfObjectValues("messages", Messages); + writer.WriteCollectionOfObjectValues("managedAppRegistrations", ManagedAppRegistrations); + writer.WriteCollectionOfObjectValues("managedDevices", ManagedDevices); + writer.WriteObjectValue("manager", Manager); + writer.WriteCollectionOfObjectValues("memberOf", MemberOf); + writer.WriteCollectionOfObjectValues("messages", Messages); writer.WriteStringValue("mobilePhone", MobilePhone); writer.WriteStringValue("mySite", MySite); - writer.WriteCollectionOfObjectValues("oauth2PermissionGrants", Oauth2PermissionGrants); + writer.WriteCollectionOfObjectValues("oauth2PermissionGrants", Oauth2PermissionGrants); writer.WriteStringValue("officeLocation", OfficeLocation); - writer.WriteObjectValue("onenote", Onenote); - writer.WriteCollectionOfObjectValues("onlineMeetings", OnlineMeetings); + writer.WriteObjectValue("onenote", Onenote); + writer.WriteCollectionOfObjectValues("onlineMeetings", OnlineMeetings); writer.WriteStringValue("onPremisesDistinguishedName", OnPremisesDistinguishedName); writer.WriteStringValue("onPremisesDomainName", OnPremisesDomainName); - writer.WriteObjectValue("onPremisesExtensionAttributes", OnPremisesExtensionAttributes); + writer.WriteObjectValue("onPremisesExtensionAttributes", OnPremisesExtensionAttributes); writer.WriteStringValue("onPremisesImmutableId", OnPremisesImmutableId); writer.WriteDateTimeOffsetValue("onPremisesLastSyncDateTime", OnPremisesLastSyncDateTime); - writer.WriteCollectionOfObjectValues("onPremisesProvisioningErrors", OnPremisesProvisioningErrors); + writer.WriteCollectionOfObjectValues("onPremisesProvisioningErrors", OnPremisesProvisioningErrors); writer.WriteStringValue("onPremisesSamAccountName", OnPremisesSamAccountName); writer.WriteStringValue("onPremisesSecurityIdentifier", OnPremisesSecurityIdentifier); writer.WriteBoolValue("onPremisesSyncEnabled", OnPremisesSyncEnabled); writer.WriteStringValue("onPremisesUserPrincipalName", OnPremisesUserPrincipalName); writer.WriteCollectionOfPrimitiveValues("otherMails", OtherMails); - writer.WriteObjectValue("outlook", Outlook); - writer.WriteCollectionOfObjectValues("ownedDevices", OwnedDevices); - writer.WriteCollectionOfObjectValues("ownedObjects", OwnedObjects); + writer.WriteObjectValue("outlook", Outlook); + writer.WriteCollectionOfObjectValues("ownedDevices", OwnedDevices); + writer.WriteCollectionOfObjectValues("ownedObjects", OwnedObjects); writer.WriteStringValue("passwordPolicies", PasswordPolicies); - writer.WriteObjectValue("passwordProfile", PasswordProfile); + writer.WriteObjectValue("passwordProfile", PasswordProfile); writer.WriteCollectionOfPrimitiveValues("pastProjects", PastProjects); - writer.WriteCollectionOfObjectValues("people", People); - writer.WriteObjectValue("photo", Photo); - writer.WriteCollectionOfObjectValues("photos", Photos); - writer.WriteObjectValue("planner", Planner); + writer.WriteCollectionOfObjectValues("people", People); + writer.WriteCollectionOfObjectValues("permissionGrants", PermissionGrants); + writer.WriteObjectValue("photo", Photo); + writer.WriteCollectionOfObjectValues("photos", Photos); + writer.WriteObjectValue("planner", Planner); writer.WriteStringValue("postalCode", PostalCode); writer.WriteStringValue("preferredDataLocation", PreferredDataLocation); writer.WriteStringValue("preferredLanguage", PreferredLanguage); writer.WriteStringValue("preferredName", PreferredName); - writer.WriteObjectValue("presence", Presence); - writer.WriteObjectValue("print", Print); - writer.WriteCollectionOfObjectValues("provisionedPlans", ProvisionedPlans); + writer.WriteObjectValue("presence", Presence); + writer.WriteObjectValue("print", Print); + writer.WriteCollectionOfObjectValues("provisionedPlans", ProvisionedPlans); writer.WriteCollectionOfPrimitiveValues("proxyAddresses", ProxyAddresses); - writer.WriteCollectionOfObjectValues("registeredDevices", RegisteredDevices); + writer.WriteCollectionOfObjectValues("registeredDevices", RegisteredDevices); writer.WriteCollectionOfPrimitiveValues("responsibilities", Responsibilities); writer.WriteCollectionOfPrimitiveValues("schools", Schools); - writer.WriteCollectionOfObjectValues("scopedRoleMemberOf", ScopedRoleMemberOf); + writer.WriteCollectionOfObjectValues("scopedRoleMemberOf", ScopedRoleMemberOf); writer.WriteStringValue("securityIdentifier", SecurityIdentifier); - writer.WriteCollectionOfObjectValues("serviceProvisioningErrors", ServiceProvisioningErrors); - writer.WriteObjectValue("settings", Settings); + writer.WriteCollectionOfObjectValues("serviceProvisioningErrors", ServiceProvisioningErrors); + writer.WriteObjectValue("settings", Settings); writer.WriteBoolValue("showInAddressList", ShowInAddressList); - writer.WriteObjectValue("signInActivity", SignInActivity); + writer.WriteObjectValue("signInActivity", SignInActivity); writer.WriteDateTimeOffsetValue("signInSessionsValidFromDateTime", SignInSessionsValidFromDateTime); writer.WriteCollectionOfPrimitiveValues("skills", Skills); + writer.WriteObjectValue("solutions", Solutions); + writer.WriteCollectionOfObjectValues("sponsors", Sponsors); writer.WriteStringValue("state", State); writer.WriteStringValue("streetAddress", StreetAddress); writer.WriteStringValue("surname", Surname); - writer.WriteObjectValue("teamwork", Teamwork); - writer.WriteObjectValue("todo", Todo); - writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); + writer.WriteObjectValue("teamwork", Teamwork); + writer.WriteObjectValue("todo", Todo); + writer.WriteCollectionOfObjectValues("transitiveMemberOf", TransitiveMemberOf); writer.WriteStringValue("usageLocation", UsageLocation); writer.WriteStringValue("userPrincipalName", UserPrincipalName); writer.WriteStringValue("userType", UserType); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserActivity.cs b/src/sample/generated/Models/UserActivity.cs index f5dadaea..4beb3777 100644 --- a/src/sample/generated/Models/UserActivity.cs +++ b/src/sample/generated/Models/UserActivity.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class UserActivity : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserActivity : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Required. URL used to launch the activity in the best native experience represented by the appId. Might launch a web-based app if no native app exists. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -41,10 +47,10 @@ public class UserActivity : Entity, IParsable { /// The contentInfo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? ContentInfo { get; set; } + public global::ApiSdk.Models.Json? ContentInfo { get; set; } #nullable restore #else - public Json ContentInfo { get; set; } + public global::ApiSdk.Models.Json ContentInfo { get; set; } #endif /// Optional. Used in the event the content can be rendered outside of a native or web-based app experience (for example, a pointer to an item in an RSS feed). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -69,15 +75,15 @@ public class UserActivity : Entity, IParsable { /// Optional. NavigationProperty/Containment; navigation property to the activity's historyItems. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? HistoryItems { get; set; } + public List? HistoryItems { get; set; } #nullable restore #else - public List HistoryItems { get; set; } + public List HistoryItems { get; set; } #endif /// Set by the server. DateTime in UTC when the object was modified on the server. public DateTimeOffset? LastModifiedDateTime { get; set; } /// The status property - public ApiSdk.Models.Status? Status { get; set; } + public global::ApiSdk.Models.Status? Status { get; set; } /// Optional. The timezone in which the user's device used to generate the activity was located at activity creation time; values supplied as Olson IDs in order to support cross-platform representation. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -89,61 +95,68 @@ public class UserActivity : Entity, IParsable { /// The visualElements property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public VisualInfo? VisualElements { get; set; } + public global::ApiSdk.Models.VisualInfo? VisualElements { get; set; } #nullable restore #else - public VisualInfo VisualElements { get; set; } + public global::ApiSdk.Models.VisualInfo VisualElements { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new UserActivity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.UserActivity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new UserActivity(); + return new global::ApiSdk.Models.UserActivity(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"activationUrl", n => { ActivationUrl = n.GetStringValue(); } }, - {"activitySourceHost", n => { ActivitySourceHost = n.GetStringValue(); } }, - {"appActivityId", n => { AppActivityId = n.GetStringValue(); } }, - {"appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, - {"contentInfo", n => { ContentInfo = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, - {"contentUrl", n => { ContentUrl = n.GetStringValue(); } }, - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, - {"fallbackUrl", n => { FallbackUrl = n.GetStringValue(); } }, - {"historyItems", n => { HistoryItems = n.GetCollectionOfObjectValues(ActivityHistoryItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, - {"status", n => { Status = n.GetEnumValue(); } }, - {"userTimezone", n => { UserTimezone = n.GetStringValue(); } }, - {"visualElements", n => { VisualElements = n.GetObjectValue(VisualInfo.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "activationUrl", n => { ActivationUrl = n.GetStringValue(); } }, + { "activitySourceHost", n => { ActivitySourceHost = n.GetStringValue(); } }, + { "appActivityId", n => { AppActivityId = n.GetStringValue(); } }, + { "appDisplayName", n => { AppDisplayName = n.GetStringValue(); } }, + { "contentInfo", n => { ContentInfo = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, + { "contentUrl", n => { ContentUrl = n.GetStringValue(); } }, + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "fallbackUrl", n => { FallbackUrl = n.GetStringValue(); } }, + { "historyItems", n => { HistoryItems = n.GetCollectionOfObjectValues(global::ApiSdk.Models.ActivityHistoryItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "userTimezone", n => { UserTimezone = n.GetStringValue(); } }, + { "visualElements", n => { VisualElements = n.GetObjectValue(global::ApiSdk.Models.VisualInfo.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activationUrl", ActivationUrl); writer.WriteStringValue("activitySourceHost", ActivitySourceHost); writer.WriteStringValue("appActivityId", AppActivityId); writer.WriteStringValue("appDisplayName", AppDisplayName); - writer.WriteObjectValue("contentInfo", ContentInfo); + writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteStringValue("contentUrl", ContentUrl); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("fallbackUrl", FallbackUrl); - writer.WriteCollectionOfObjectValues("historyItems", HistoryItems); + writer.WriteCollectionOfObjectValues("historyItems", HistoryItems); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); - writer.WriteEnumValue("status", Status); + writer.WriteEnumValue("status", Status); writer.WriteStringValue("userTimezone", UserTimezone); - writer.WriteObjectValue("visualElements", VisualElements); + writer.WriteObjectValue("visualElements", VisualElements); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserCollectionResponse.cs b/src/sample/generated/Models/UserCollectionResponse.cs index 18b4efe8..2bf871a3 100644 --- a/src/sample/generated/Models/UserCollectionResponse.cs +++ b/src/sample/generated/Models/UserCollectionResponse.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class UserCollectionResponse : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The OdataNextLink property @@ -19,43 +25,51 @@ public class UserCollectionResponse : IAdditionalDataHolder, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Value { get; set; } + public List? Value { get; set; } #nullable restore #else - public List Value { get; set; } + public List Value { get; set; } #endif /// - /// Instantiates a new userCollectionResponse and sets the default values. + /// Instantiates a new and sets the default values. /// - public UserCollectionResponse() { + public UserCollectionResponse() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static UserCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.UserCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new UserCollectionResponse(); + return new global::ApiSdk.Models.UserCollectionResponse(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, - {"value", n => { Value = n.GetCollectionOfObjectValues(User.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.User.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.nextLink", OdataNextLink); - writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserIdentity.cs b/src/sample/generated/Models/UserIdentity.cs index 31106144..43717dc3 100644 --- a/src/sample/generated/Models/UserIdentity.cs +++ b/src/sample/generated/Models/UserIdentity.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class UserIdentity : Identity, IParsable { - /// Indicates the client IP address used by user performing the activity (audit log only). +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserIdentity : global::ApiSdk.Models.Identity, IParsable + #pragma warning restore CS1591 + { + /// Indicates the client IP address associated with the user performing the activity (audit log only). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? IpAddress { get; set; } @@ -25,25 +31,31 @@ public class UserIdentity : Identity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new UserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.UserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new UserIdentity(); + return new global::ApiSdk.Models.UserIdentity(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"ipAddress", n => { IpAddress = n.GetStringValue(); } }, - {"userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "ipAddress", n => { IpAddress = n.GetStringValue(); } }, + { "userPrincipalName", n => { UserPrincipalName = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("ipAddress", IpAddress); @@ -51,3 +63,4 @@ public class UserIdentity : Identity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserInsightsSettings.cs b/src/sample/generated/Models/UserInsightsSettings.cs new file mode 100644 index 00000000..5878238a --- /dev/null +++ b/src/sample/generated/Models/UserInsightsSettings.cs @@ -0,0 +1,50 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserInsightsSettings : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// True if the user's itemInsights and meeting hours insights are enabled; false if the user's itemInsights and meeting hours insights are disabled. The default value is true. Optional. + public bool? IsEnabled { get; set; } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.UserInsightsSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.UserInsightsSettings(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "isEnabled", n => { IsEnabled = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteBoolValue("isEnabled", IsEnabled); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserPrint.cs b/src/sample/generated/Models/UserPrint.cs index 06667c06..1f2e7a6d 100644 --- a/src/sample/generated/Models/UserPrint.cs +++ b/src/sample/generated/Models/UserPrint.cs @@ -1,51 +1,65 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class UserPrint : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserPrint : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The recentPrinterShares property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? RecentPrinterShares { get; set; } + public List? RecentPrinterShares { get; set; } #nullable restore #else - public List RecentPrinterShares { get; set; } + public List RecentPrinterShares { get; set; } #endif /// - /// Instantiates a new userPrint and sets the default values. + /// Instantiates a new and sets the default values. /// - public UserPrint() { + public UserPrint() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static UserPrint CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.UserPrint CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new UserPrint(); + return new global::ApiSdk.Models.UserPrint(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"recentPrinterShares", n => { RecentPrinterShares = n.GetCollectionOfObjectValues(PrinterShare.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "recentPrinterShares", n => { RecentPrinterShares = n.GetCollectionOfObjectValues(global::ApiSdk.Models.PrinterShare.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfObjectValues("recentPrinterShares", RecentPrinterShares); + writer.WriteCollectionOfObjectValues("recentPrinterShares", RecentPrinterShares); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserPurpose.cs b/src/sample/generated/Models/UserPurpose.cs index 7161a228..dcfe91e8 100644 --- a/src/sample/generated/Models/UserPurpose.cs +++ b/src/sample/generated/Models/UserPurpose.cs @@ -1,21 +1,40 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum UserPurpose { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum UserPurpose + #pragma warning restore CS1591 + { [EnumMember(Value = "user")] + #pragma warning disable CS1591 User, + #pragma warning restore CS1591 [EnumMember(Value = "linked")] + #pragma warning disable CS1591 Linked, + #pragma warning restore CS1591 [EnumMember(Value = "shared")] + #pragma warning disable CS1591 Shared, + #pragma warning restore CS1591 [EnumMember(Value = "room")] + #pragma warning disable CS1591 Room, + #pragma warning restore CS1591 [EnumMember(Value = "equipment")] + #pragma warning disable CS1591 Equipment, + #pragma warning restore CS1591 [EnumMember(Value = "others")] + #pragma warning disable CS1591 Others, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/UserScopeTeamsAppInstallation.cs b/src/sample/generated/Models/UserScopeTeamsAppInstallation.cs index 9fa13ead..870816ad 100644 --- a/src/sample/generated/Models/UserScopeTeamsAppInstallation.cs +++ b/src/sample/generated/Models/UserScopeTeamsAppInstallation.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class UserScopeTeamsAppInstallation : TeamsAppInstallation, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserScopeTeamsAppInstallation : global::ApiSdk.Models.TeamsAppInstallation, IParsable + #pragma warning restore CS1591 + { /// The chat property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Chat? Chat { get; set; } + public global::ApiSdk.Models.Chat? Chat { get; set; } #nullable restore #else - public ApiSdk.Models.Chat Chat { get; set; } + public global::ApiSdk.Models.Chat Chat { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new UserScopeTeamsAppInstallation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.UserScopeTeamsAppInstallation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new UserScopeTeamsAppInstallation(); + return new global::ApiSdk.Models.UserScopeTeamsAppInstallation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"chat", n => { Chat = n.GetObjectValue(ApiSdk.Models.Chat.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "chat", n => { Chat = n.GetObjectValue(global::ApiSdk.Models.Chat.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("chat", Chat); + writer.WriteObjectValue("chat", Chat); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserSettings.cs b/src/sample/generated/Models/UserSettings.cs index 8b9176b6..a9eb88f3 100644 --- a/src/sample/generated/Models/UserSettings.cs +++ b/src/sample/generated/Models/UserSettings.cs @@ -1,51 +1,94 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class UserSettings : Entity, IParsable { - /// Reflects the organization level setting controlling delegate access to the trending API. When set to true, the organization doesn't have access to Office Delve. The relevancy of the content displayed in Microsoft 365, for example in Suggested sites in SharePoint Home and the Discover view in OneDrive for Business is affected for the whole organization. This setting is read-only and can only be changed by administrators in the SharePoint admin center. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserSettings : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Reflects the organization level setting controlling delegate access to the trending API. When set to true, the organization doesn't have access to Office Delve. The relevancy of the content displayed in Microsoft 365, for example in Suggested sites in SharePoint Home and the Discover view in OneDrive for work or school is affected for the whole organization. This setting is read-only and can only be changed by administrators in the SharePoint admin center. public bool? ContributionToContentDiscoveryAsOrganizationDisabled { get; set; } - /// When set to true, the delegate access to the user's trending API is disabled. When set to true, documents in the user's Office Delve are disabled. When set to true, the relevancy of the content displayed in Microsoft 365, for example in Suggested sites in SharePoint Home and the Discover view in OneDrive for Business is affected. Users can control this setting in Office Delve. + /// When set to true, the delegate access to the user's trending API is disabled. When set to true, documents in the user's Office Delve are disabled. When set to true, the relevancy of the content displayed in Microsoft 365, for example in Suggested sites in SharePoint Home and the Discover view in OneDrive for work or school is affected. Users can control this setting in Office Delve. public bool? ContributionToContentDiscoveryDisabled { get; set; } + /// The itemInsights property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.UserInsightsSettings? ItemInsights { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.UserInsightsSettings ItemInsights { get; set; } +#endif /// The shiftPreferences property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ShiftPreferences? ShiftPreferences { get; set; } + public global::ApiSdk.Models.ShiftPreferences? ShiftPreferences { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.ShiftPreferences ShiftPreferences { get; set; } +#endif + /// The storage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.UserStorage? Storage { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.UserStorage Storage { get; set; } +#endif + /// The windows property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Windows { get; set; } #nullable restore #else - public ApiSdk.Models.ShiftPreferences ShiftPreferences { get; set; } + public List Windows { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new UserSettings CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.UserSettings CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new UserSettings(); + return new global::ApiSdk.Models.UserSettings(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"contributionToContentDiscoveryAsOrganizationDisabled", n => { ContributionToContentDiscoveryAsOrganizationDisabled = n.GetBoolValue(); } }, - {"contributionToContentDiscoveryDisabled", n => { ContributionToContentDiscoveryDisabled = n.GetBoolValue(); } }, - {"shiftPreferences", n => { ShiftPreferences = n.GetObjectValue(ApiSdk.Models.ShiftPreferences.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "contributionToContentDiscoveryAsOrganizationDisabled", n => { ContributionToContentDiscoveryAsOrganizationDisabled = n.GetBoolValue(); } }, + { "contributionToContentDiscoveryDisabled", n => { ContributionToContentDiscoveryDisabled = n.GetBoolValue(); } }, + { "itemInsights", n => { ItemInsights = n.GetObjectValue(global::ApiSdk.Models.UserInsightsSettings.CreateFromDiscriminatorValue); } }, + { "shiftPreferences", n => { ShiftPreferences = n.GetObjectValue(global::ApiSdk.Models.ShiftPreferences.CreateFromDiscriminatorValue); } }, + { "storage", n => { Storage = n.GetObjectValue(global::ApiSdk.Models.UserStorage.CreateFromDiscriminatorValue); } }, + { "windows", n => { Windows = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WindowsSetting.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("contributionToContentDiscoveryAsOrganizationDisabled", ContributionToContentDiscoveryAsOrganizationDisabled); writer.WriteBoolValue("contributionToContentDiscoveryDisabled", ContributionToContentDiscoveryDisabled); - writer.WriteObjectValue("shiftPreferences", ShiftPreferences); + writer.WriteObjectValue("itemInsights", ItemInsights); + writer.WriteObjectValue("shiftPreferences", ShiftPreferences); + writer.WriteObjectValue("storage", Storage); + writer.WriteCollectionOfObjectValues("windows", Windows); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserSolutionRoot.cs b/src/sample/generated/Models/UserSolutionRoot.cs new file mode 100644 index 00000000..a132d75e --- /dev/null +++ b/src/sample/generated/Models/UserSolutionRoot.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserSolutionRoot : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The workingTimeSchedule property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.WorkingTimeSchedule? WorkingTimeSchedule { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.WorkingTimeSchedule WorkingTimeSchedule { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.UserSolutionRoot CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.UserSolutionRoot(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "workingTimeSchedule", n => { WorkingTimeSchedule = n.GetObjectValue(global::ApiSdk.Models.WorkingTimeSchedule.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("workingTimeSchedule", WorkingTimeSchedule); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserStorage.cs b/src/sample/generated/Models/UserStorage.cs new file mode 100644 index 00000000..7bdd6fc4 --- /dev/null +++ b/src/sample/generated/Models/UserStorage.cs @@ -0,0 +1,56 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserStorage : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The quota property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::ApiSdk.Models.UnifiedStorageQuota? Quota { get; set; } +#nullable restore +#else + public global::ApiSdk.Models.UnifiedStorageQuota Quota { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.UserStorage CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.UserStorage(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "quota", n => { Quota = n.GetObjectValue(global::ApiSdk.Models.UnifiedStorageQuota.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("quota", Quota); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/UserTeamwork.cs b/src/sample/generated/Models/UserTeamwork.cs index 1c958b3e..3863d783 100644 --- a/src/sample/generated/Models/UserTeamwork.cs +++ b/src/sample/generated/Models/UserTeamwork.cs @@ -1,53 +1,86 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class UserTeamwork : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class UserTeamwork : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The list of associatedTeamInfo objects that a user is associated with. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? AssociatedTeams { get; set; } + public List? AssociatedTeams { get; set; } #nullable restore #else - public List AssociatedTeams { get; set; } + public List AssociatedTeams { get; set; } #endif /// The apps installed in the personal scope of this user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? InstalledApps { get; set; } + public List? InstalledApps { get; set; } #nullable restore #else - public List InstalledApps { get; set; } + public List InstalledApps { get; set; } +#endif + /// Represents the location that a user selected in Microsoft Teams and doesn't follow the Office's locale setting. A user’s locale is represented by their preferred language and country or region. For example, en-us. The language component follows two-letter codes as defined in ISO 639-1, and the country component follows two-letter codes as defined in ISO 3166-1 alpha-2. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Locale { get; set; } +#nullable restore +#else + public string Locale { get; set; } +#endif + /// Represents the region of the organization or the user. For users with multigeo licenses, the property contains the user's region (if available). For users without multigeo licenses, the property contains the organization's region.The region value can be any region supported by the Teams payload. The possible values are: Americas, Europe and MiddleEast, Asia Pacific, UAE, Australia, Brazil, Canada, Switzerland, Germany, France, India, Japan, South Korea, Norway, Singapore, United Kingdom, South Africa, Sweden, Qatar, Poland, Italy, Israel, Spain, Mexico, USGov Community Cloud, USGov Community Cloud High, USGov Department of Defense, and China. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Region { get; set; } +#nullable restore +#else + public string Region { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new UserTeamwork CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.UserTeamwork CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new UserTeamwork(); + return new global::ApiSdk.Models.UserTeamwork(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"associatedTeams", n => { AssociatedTeams = n.GetCollectionOfObjectValues(AssociatedTeamInfo.CreateFromDiscriminatorValue)?.ToList(); } }, - {"installedApps", n => { InstalledApps = n.GetCollectionOfObjectValues(UserScopeTeamsAppInstallation.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "associatedTeams", n => { AssociatedTeams = n.GetCollectionOfObjectValues(global::ApiSdk.Models.AssociatedTeamInfo.CreateFromDiscriminatorValue)?.AsList(); } }, + { "installedApps", n => { InstalledApps = n.GetCollectionOfObjectValues(global::ApiSdk.Models.UserScopeTeamsAppInstallation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "locale", n => { Locale = n.GetStringValue(); } }, + { "region", n => { Region = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("associatedTeams", AssociatedTeams); - writer.WriteCollectionOfObjectValues("installedApps", InstalledApps); + writer.WriteCollectionOfObjectValues("associatedTeams", AssociatedTeams); + writer.WriteCollectionOfObjectValues("installedApps", InstalledApps); + writer.WriteStringValue("locale", Locale); + writer.WriteStringValue("region", Region); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/VerifiedPublisher.cs b/src/sample/generated/Models/VerifiedPublisher.cs index f2554b0a..fdc2e763 100644 --- a/src/sample/generated/Models/VerifiedPublisher.cs +++ b/src/sample/generated/Models/VerifiedPublisher.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class VerifiedPublisher : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VerifiedPublisher : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// The timestamp when the verified publisher was first added or most recently updated. public DateTimeOffset? AddedDateTime { get; set; } /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. @@ -27,34 +33,41 @@ public class VerifiedPublisher : IAdditionalDataHolder, IParsable { public string VerifiedPublisherId { get; set; } #endif /// - /// Instantiates a new verifiedPublisher and sets the default values. + /// Instantiates a new and sets the default values. /// - public VerifiedPublisher() { + public VerifiedPublisher() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static VerifiedPublisher CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.VerifiedPublisher CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new VerifiedPublisher(); + return new global::ApiSdk.Models.VerifiedPublisher(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"addedDateTime", n => { AddedDateTime = n.GetDateTimeOffsetValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"verifiedPublisherId", n => { VerifiedPublisherId = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "addedDateTime", n => { AddedDateTime = n.GetDateTimeOffsetValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "verifiedPublisherId", n => { VerifiedPublisherId = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("addedDateTime", AddedDateTime); writer.WriteStringValue("displayName", DisplayName); @@ -63,3 +76,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Video.cs b/src/sample/generated/Models/Video.cs index de76c282..c095ff46 100644 --- a/src/sample/generated/Models/Video.cs +++ b/src/sample/generated/Models/Video.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Video : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Video : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Number of audio bits per sample. @@ -41,41 +47,48 @@ public class Video : IAdditionalDataHolder, IParsable { /// Width of the video, in pixels. public int? Width { get; set; } /// - /// Instantiates a new video and sets the default values. + /// Instantiates a new and sets the default values. /// - public Video() { + public Video() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Video CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Video CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Video(); + return new global::ApiSdk.Models.Video(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"audioBitsPerSample", n => { AudioBitsPerSample = n.GetIntValue(); } }, - {"audioChannels", n => { AudioChannels = n.GetIntValue(); } }, - {"audioFormat", n => { AudioFormat = n.GetStringValue(); } }, - {"audioSamplesPerSecond", n => { AudioSamplesPerSecond = n.GetIntValue(); } }, - {"bitrate", n => { Bitrate = n.GetIntValue(); } }, - {"duration", n => { Duration = n.GetLongValue(); } }, - {"fourCC", n => { FourCC = n.GetStringValue(); } }, - {"frameRate", n => { FrameRate = n.GetDoubleValue(); } }, - {"height", n => { Height = n.GetIntValue(); } }, - {"width", n => { Width = n.GetIntValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "audioBitsPerSample", n => { AudioBitsPerSample = n.GetIntValue(); } }, + { "audioChannels", n => { AudioChannels = n.GetIntValue(); } }, + { "audioFormat", n => { AudioFormat = n.GetStringValue(); } }, + { "audioSamplesPerSecond", n => { AudioSamplesPerSecond = n.GetIntValue(); } }, + { "bitrate", n => { Bitrate = n.GetIntValue(); } }, + { "duration", n => { Duration = n.GetLongValue(); } }, + { "fourCC", n => { FourCC = n.GetStringValue(); } }, + { "frameRate", n => { FrameRate = n.GetDoubleValue(); } }, + { "height", n => { Height = n.GetIntValue(); } }, + { "width", n => { Width = n.GetIntValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("audioBitsPerSample", AudioBitsPerSample); writer.WriteIntValue("audioChannels", AudioChannels); @@ -91,3 +104,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/VisualInfo.cs b/src/sample/generated/Models/VisualInfo.cs index 709c6e0b..003757ca 100644 --- a/src/sample/generated/Models/VisualInfo.cs +++ b/src/sample/generated/Models/VisualInfo.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class VisualInfo : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class VisualInfo : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The attribution property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ImageInfo? Attribution { get; set; } + public global::ApiSdk.Models.ImageInfo? Attribution { get; set; } #nullable restore #else - public ImageInfo Attribution { get; set; } + public global::ApiSdk.Models.ImageInfo Attribution { get; set; } #endif /// Optional. Background color used to render the activity in the UI - brand color for the application source of the activity. Must be a valid hex color #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -27,10 +33,10 @@ public class VisualInfo : IAdditionalDataHolder, IParsable { /// The content property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? Content { get; set; } + public global::ApiSdk.Models.Json? Content { get; set; } #nullable restore #else - public Json Content { get; set; } + public global::ApiSdk.Models.Json Content { get; set; } #endif /// Optional. Longer text description of the user's unique activity (example: document name, first sentence, and/or metadata) #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -49,43 +55,51 @@ public class VisualInfo : IAdditionalDataHolder, IParsable { public string DisplayText { get; set; } #endif /// - /// Instantiates a new visualInfo and sets the default values. + /// Instantiates a new and sets the default values. /// - public VisualInfo() { + public VisualInfo() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static VisualInfo CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.VisualInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new VisualInfo(); + return new global::ApiSdk.Models.VisualInfo(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"attribution", n => { Attribution = n.GetObjectValue(ImageInfo.CreateFromDiscriminatorValue); } }, - {"backgroundColor", n => { BackgroundColor = n.GetStringValue(); } }, - {"content", n => { Content = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, - {"description", n => { Description = n.GetStringValue(); } }, - {"displayText", n => { DisplayText = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "attribution", n => { Attribution = n.GetObjectValue(global::ApiSdk.Models.ImageInfo.CreateFromDiscriminatorValue); } }, + { "backgroundColor", n => { BackgroundColor = n.GetStringValue(); } }, + { "content", n => { Content = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "displayText", n => { DisplayText = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("attribution", Attribution); + writer.WriteObjectValue("attribution", Attribution); writer.WriteStringValue("backgroundColor", BackgroundColor); - writer.WriteObjectValue("content", Content); + writer.WriteObjectValue("content", Content); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayText", DisplayText); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WatermarkProtectionValues.cs b/src/sample/generated/Models/WatermarkProtectionValues.cs index febcb599..5fba8e4c 100644 --- a/src/sample/generated/Models/WatermarkProtectionValues.cs +++ b/src/sample/generated/Models/WatermarkProtectionValues.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WatermarkProtectionValues : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WatermarkProtectionValues : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Indicates whether to apply a watermark to any shared content. @@ -13,33 +19,40 @@ public class WatermarkProtectionValues : IAdditionalDataHolder, IParsable { /// Indicates whether to apply a watermark to everyone's video feed. public bool? IsEnabledForVideo { get; set; } /// - /// Instantiates a new watermarkProtectionValues and sets the default values. + /// Instantiates a new and sets the default values. /// - public WatermarkProtectionValues() { + public WatermarkProtectionValues() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static WatermarkProtectionValues CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.WatermarkProtectionValues CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WatermarkProtectionValues(); + return new global::ApiSdk.Models.WatermarkProtectionValues(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"isEnabledForContentSharing", n => { IsEnabledForContentSharing = n.GetBoolValue(); } }, - {"isEnabledForVideo", n => { IsEnabledForVideo = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "isEnabledForContentSharing", n => { IsEnabledForContentSharing = n.GetBoolValue(); } }, + { "isEnabledForVideo", n => { IsEnabledForVideo = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabledForContentSharing", IsEnabledForContentSharing); writer.WriteBoolValue("isEnabledForVideo", IsEnabledForVideo); @@ -47,3 +60,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WeakAlgorithms.cs b/src/sample/generated/Models/WeakAlgorithms.cs index 6e3d4f37..7ffada81 100644 --- a/src/sample/generated/Models/WeakAlgorithms.cs +++ b/src/sample/generated/Models/WeakAlgorithms.cs @@ -1,12 +1,21 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] [Flags] - public enum WeakAlgorithms { + #pragma warning disable CS1591 + public enum WeakAlgorithms + #pragma warning restore CS1591 + { [EnumMember(Value = "rsaSha1")] + #pragma warning disable CS1591 RsaSha1 = 1, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue = 2, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/WebApplication.cs b/src/sample/generated/Models/WebApplication.cs index b1cc6dc6..591f024a 100644 --- a/src/sample/generated/Models/WebApplication.cs +++ b/src/sample/generated/Models/WebApplication.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WebApplication : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WebApplication : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Home page or landing page of the application. @@ -19,10 +25,10 @@ public class WebApplication : IAdditionalDataHolder, IParsable { /// The implicitGrantSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.ImplicitGrantSettings? ImplicitGrantSettings { get; set; } + public global::ApiSdk.Models.ImplicitGrantSettings? ImplicitGrantSettings { get; set; } #nullable restore #else - public ApiSdk.Models.ImplicitGrantSettings ImplicitGrantSettings { get; set; } + public global::ApiSdk.Models.ImplicitGrantSettings ImplicitGrantSettings { get; set; } #endif /// Specifies the URL that is used by Microsoft's authorization service to log out a user using front-channel, back-channel or SAML logout protocols. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -43,49 +49,57 @@ public class WebApplication : IAdditionalDataHolder, IParsable { /// The redirectUriSettings property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? RedirectUriSettings { get; set; } + public List? RedirectUriSettings { get; set; } #nullable restore #else - public List RedirectUriSettings { get; set; } + public List RedirectUriSettings { get; set; } #endif /// - /// Instantiates a new webApplication and sets the default values. + /// Instantiates a new and sets the default values. /// - public WebApplication() { + public WebApplication() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static WebApplication CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.WebApplication CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WebApplication(); + return new global::ApiSdk.Models.WebApplication(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"homePageUrl", n => { HomePageUrl = n.GetStringValue(); } }, - {"implicitGrantSettings", n => { ImplicitGrantSettings = n.GetObjectValue(ApiSdk.Models.ImplicitGrantSettings.CreateFromDiscriminatorValue); } }, - {"logoutUrl", n => { LogoutUrl = n.GetStringValue(); } }, - {"redirectUriSettings", n => { RedirectUriSettings = n.GetCollectionOfObjectValues(ApiSdk.Models.RedirectUriSettings.CreateFromDiscriminatorValue)?.ToList(); } }, - {"redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "homePageUrl", n => { HomePageUrl = n.GetStringValue(); } }, + { "implicitGrantSettings", n => { ImplicitGrantSettings = n.GetObjectValue(global::ApiSdk.Models.ImplicitGrantSettings.CreateFromDiscriminatorValue); } }, + { "logoutUrl", n => { LogoutUrl = n.GetStringValue(); } }, + { "redirectUriSettings", n => { RedirectUriSettings = n.GetCollectionOfObjectValues(global::ApiSdk.Models.RedirectUriSettings.CreateFromDiscriminatorValue)?.AsList(); } }, + { "redirectUris", n => { RedirectUris = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("homePageUrl", HomePageUrl); - writer.WriteObjectValue("implicitGrantSettings", ImplicitGrantSettings); + writer.WriteObjectValue("implicitGrantSettings", ImplicitGrantSettings); writer.WriteStringValue("logoutUrl", LogoutUrl); writer.WriteCollectionOfPrimitiveValues("redirectUris", RedirectUris); - writer.WriteCollectionOfObjectValues("redirectUriSettings", RedirectUriSettings); + writer.WriteCollectionOfObjectValues("redirectUriSettings", RedirectUriSettings); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/Website.cs b/src/sample/generated/Models/Website.cs index 621e837c..e72a27f7 100644 --- a/src/sample/generated/Models/Website.cs +++ b/src/sample/generated/Models/Website.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Website : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Website : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The URL of the website. @@ -25,41 +31,49 @@ public class Website : IAdditionalDataHolder, IParsable { public string DisplayName { get; set; } #endif /// The type property - public WebsiteType? Type { get; set; } + public global::ApiSdk.Models.WebsiteType? Type { get; set; } /// - /// Instantiates a new website and sets the default values. + /// Instantiates a new and sets the default values. /// - public Website() { + public Website() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static Website CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.Website CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Website(); + return new global::ApiSdk.Models.Website(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"address", n => { Address = n.GetStringValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"type", n => { Type = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "address", n => { Address = n.GetStringValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "type", n => { Type = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("displayName", DisplayName); - writer.WriteEnumValue("type", Type); + writer.WriteEnumValue("type", Type); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WebsiteType.cs b/src/sample/generated/Models/WebsiteType.cs index 0b857425..f7f1b35a 100644 --- a/src/sample/generated/Models/WebsiteType.cs +++ b/src/sample/generated/Models/WebsiteType.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum WebsiteType { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum WebsiteType + #pragma warning restore CS1591 + { [EnumMember(Value = "other")] + #pragma warning disable CS1591 Other, + #pragma warning restore CS1591 [EnumMember(Value = "home")] + #pragma warning disable CS1591 Home, + #pragma warning restore CS1591 [EnumMember(Value = "work")] + #pragma warning disable CS1591 Work, + #pragma warning restore CS1591 [EnumMember(Value = "blog")] + #pragma warning disable CS1591 Blog, + #pragma warning restore CS1591 [EnumMember(Value = "profile")] + #pragma warning disable CS1591 Profile, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/WeekIndex.cs b/src/sample/generated/Models/WeekIndex.cs index 49f81c8c..1d50a635 100644 --- a/src/sample/generated/Models/WeekIndex.cs +++ b/src/sample/generated/Models/WeekIndex.cs @@ -1,17 +1,32 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum WeekIndex { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum WeekIndex + #pragma warning restore CS1591 + { [EnumMember(Value = "first")] + #pragma warning disable CS1591 First, + #pragma warning restore CS1591 [EnumMember(Value = "second")] + #pragma warning disable CS1591 Second, + #pragma warning restore CS1591 [EnumMember(Value = "third")] + #pragma warning disable CS1591 Third, + #pragma warning restore CS1591 [EnumMember(Value = "fourth")] + #pragma warning disable CS1591 Fourth, + #pragma warning restore CS1591 [EnumMember(Value = "last")] + #pragma warning disable CS1591 Last, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/WellknownListName.cs b/src/sample/generated/Models/WellknownListName.cs index f2f0c6b2..70e03ce9 100644 --- a/src/sample/generated/Models/WellknownListName.cs +++ b/src/sample/generated/Models/WellknownListName.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum WellknownListName { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum WellknownListName + #pragma warning restore CS1591 + { [EnumMember(Value = "none")] + #pragma warning disable CS1591 None, + #pragma warning restore CS1591 [EnumMember(Value = "defaultList")] + #pragma warning disable CS1591 DefaultList, + #pragma warning restore CS1591 [EnumMember(Value = "flaggedEmails")] + #pragma warning disable CS1591 FlaggedEmails, + #pragma warning restore CS1591 [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 UnknownFutureValue, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/WindowsDefenderProductStatus.cs b/src/sample/generated/Models/WindowsDefenderProductStatus.cs index a719d02b..0a227446 100644 --- a/src/sample/generated/Models/WindowsDefenderProductStatus.cs +++ b/src/sample/generated/Models/WindowsDefenderProductStatus.cs @@ -1,10 +1,13 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Product Status of Windows Defender + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] [Flags] - public enum WindowsDefenderProductStatus { + public enum WindowsDefenderProductStatus + { /// No status [EnumMember(Value = "noStatus")] NoStatus = 1, diff --git a/src/sample/generated/Models/WindowsDeviceHealthState.cs b/src/sample/generated/Models/WindowsDeviceHealthState.cs index 4c7c4319..41949066 100644 --- a/src/sample/generated/Models/WindowsDeviceHealthState.cs +++ b/src/sample/generated/Models/WindowsDeviceHealthState.cs @@ -1,10 +1,13 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Computer endpoint protection state + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] [Flags] - public enum WindowsDeviceHealthState { + public enum WindowsDeviceHealthState + { /// Computer is clean and no action is required [EnumMember(Value = "clean")] Clean = 1, diff --git a/src/sample/generated/Models/WindowsDeviceMalwareState.cs b/src/sample/generated/Models/WindowsDeviceMalwareState.cs index 2148d5d6..d2ccefaf 100644 --- a/src/sample/generated/Models/WindowsDeviceMalwareState.cs +++ b/src/sample/generated/Models/WindowsDeviceMalwareState.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Malware detection entity. /// - public class WindowsDeviceMalwareState : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WindowsDeviceMalwareState : global::ApiSdk.Models.Entity, IParsable + { /// Information URL to learn more about the malware #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -18,7 +22,7 @@ public class WindowsDeviceMalwareState : Entity, IParsable { public string AdditionalInformationUrl { get; set; } #endif /// Malware category id - public WindowsMalwareCategory? Category { get; set; } + public global::ApiSdk.Models.WindowsMalwareCategory? Category { get; set; } /// Number of times the malware is detected public int? DetectionCount { get; set; } /// Malware name @@ -30,59 +34,66 @@ public class WindowsDeviceMalwareState : Entity, IParsable { public string DisplayName { get; set; } #endif /// Malware execution status - public WindowsMalwareExecutionState? ExecutionState { get; set; } + public global::ApiSdk.Models.WindowsMalwareExecutionState? ExecutionState { get; set; } /// Initial detection datetime of the malware public DateTimeOffset? InitialDetectionDateTime { get; set; } /// The last time this particular threat was changed public DateTimeOffset? LastStateChangeDateTime { get; set; } /// Malware severity - public WindowsMalwareSeverity? Severity { get; set; } + public global::ApiSdk.Models.WindowsMalwareSeverity? Severity { get; set; } /// Malware current status - public WindowsMalwareState? State { get; set; } + public global::ApiSdk.Models.WindowsMalwareState? State { get; set; } /// Malware threat status - public WindowsMalwareThreatState? ThreatState { get; set; } + public global::ApiSdk.Models.WindowsMalwareThreatState? ThreatState { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WindowsDeviceMalwareState CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WindowsDeviceMalwareState CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WindowsDeviceMalwareState(); + return new global::ApiSdk.Models.WindowsDeviceMalwareState(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"additionalInformationUrl", n => { AdditionalInformationUrl = n.GetStringValue(); } }, - {"category", n => { Category = n.GetEnumValue(); } }, - {"detectionCount", n => { DetectionCount = n.GetIntValue(); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"executionState", n => { ExecutionState = n.GetEnumValue(); } }, - {"initialDetectionDateTime", n => { InitialDetectionDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastStateChangeDateTime", n => { LastStateChangeDateTime = n.GetDateTimeOffsetValue(); } }, - {"severity", n => { Severity = n.GetEnumValue(); } }, - {"state", n => { State = n.GetEnumValue(); } }, - {"threatState", n => { ThreatState = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "additionalInformationUrl", n => { AdditionalInformationUrl = n.GetStringValue(); } }, + { "category", n => { Category = n.GetEnumValue(); } }, + { "detectionCount", n => { DetectionCount = n.GetIntValue(); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "executionState", n => { ExecutionState = n.GetEnumValue(); } }, + { "initialDetectionDateTime", n => { InitialDetectionDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastStateChangeDateTime", n => { LastStateChangeDateTime = n.GetDateTimeOffsetValue(); } }, + { "severity", n => { Severity = n.GetEnumValue(); } }, + { "state", n => { State = n.GetEnumValue(); } }, + { "threatState", n => { ThreatState = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("additionalInformationUrl", AdditionalInformationUrl); - writer.WriteEnumValue("category", Category); + writer.WriteEnumValue("category", Category); writer.WriteIntValue("detectionCount", DetectionCount); writer.WriteStringValue("displayName", DisplayName); - writer.WriteEnumValue("executionState", ExecutionState); + writer.WriteEnumValue("executionState", ExecutionState); writer.WriteDateTimeOffsetValue("initialDetectionDateTime", InitialDetectionDateTime); writer.WriteDateTimeOffsetValue("lastStateChangeDateTime", LastStateChangeDateTime); - writer.WriteEnumValue("severity", Severity); - writer.WriteEnumValue("state", State); - writer.WriteEnumValue("threatState", ThreatState); + writer.WriteEnumValue("severity", Severity); + writer.WriteEnumValue("state", State); + writer.WriteEnumValue("threatState", ThreatState); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WindowsHelloForBusinessAuthenticationMethod.cs b/src/sample/generated/Models/WindowsHelloForBusinessAuthenticationMethod.cs index 1bb45b0a..7d92ea3b 100644 --- a/src/sample/generated/Models/WindowsHelloForBusinessAuthenticationMethod.cs +++ b/src/sample/generated/Models/WindowsHelloForBusinessAuthenticationMethod.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WindowsHelloForBusinessAuthenticationMethod : AuthenticationMethod, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WindowsHelloForBusinessAuthenticationMethod : global::ApiSdk.Models.AuthenticationMethod, IParsable + #pragma warning restore CS1591 + { /// The date and time that this Windows Hello for Business key was registered. public DateTimeOffset? CreatedDateTime { get; set; } /// The device property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public ApiSdk.Models.Device? Device { get; set; } + public global::ApiSdk.Models.Device? Device { get; set; } #nullable restore #else - public ApiSdk.Models.Device Device { get; set; } + public global::ApiSdk.Models.Device Device { get; set; } #endif /// The name of the device on which Windows Hello for Business is registered #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -25,37 +31,44 @@ public class WindowsHelloForBusinessAuthenticationMethod : AuthenticationMethod, public string DisplayName { get; set; } #endif /// The keyStrength property - public AuthenticationMethodKeyStrength? KeyStrength { get; set; } + public global::ApiSdk.Models.AuthenticationMethodKeyStrength? KeyStrength { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WindowsHelloForBusinessAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WindowsHelloForBusinessAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WindowsHelloForBusinessAuthenticationMethod(); + return new global::ApiSdk.Models.WindowsHelloForBusinessAuthenticationMethod(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, - {"device", n => { Device = n.GetObjectValue(ApiSdk.Models.Device.CreateFromDiscriminatorValue); } }, - {"displayName", n => { DisplayName = n.GetStringValue(); } }, - {"keyStrength", n => { KeyStrength = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "device", n => { Device = n.GetObjectValue(global::ApiSdk.Models.Device.CreateFromDiscriminatorValue); } }, + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "keyStrength", n => { KeyStrength = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); - writer.WriteObjectValue("device", Device); + writer.WriteObjectValue("device", Device); writer.WriteStringValue("displayName", DisplayName); - writer.WriteEnumValue("keyStrength", KeyStrength); + writer.WriteEnumValue("keyStrength", KeyStrength); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WindowsMalwareCategory.cs b/src/sample/generated/Models/WindowsMalwareCategory.cs index 4904e4c9..90cf64ce 100644 --- a/src/sample/generated/Models/WindowsMalwareCategory.cs +++ b/src/sample/generated/Models/WindowsMalwareCategory.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Malware category id - public enum WindowsMalwareCategory { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WindowsMalwareCategory + { /// Invalid [EnumMember(Value = "invalid")] Invalid, diff --git a/src/sample/generated/Models/WindowsMalwareExecutionState.cs b/src/sample/generated/Models/WindowsMalwareExecutionState.cs index a526c0f5..f872fcb9 100644 --- a/src/sample/generated/Models/WindowsMalwareExecutionState.cs +++ b/src/sample/generated/Models/WindowsMalwareExecutionState.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Malware execution status - public enum WindowsMalwareExecutionState { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WindowsMalwareExecutionState + { /// Unknown [EnumMember(Value = "unknown")] Unknown, diff --git a/src/sample/generated/Models/WindowsMalwareSeverity.cs b/src/sample/generated/Models/WindowsMalwareSeverity.cs index a1fbf385..9f8347e4 100644 --- a/src/sample/generated/Models/WindowsMalwareSeverity.cs +++ b/src/sample/generated/Models/WindowsMalwareSeverity.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Malware severity - public enum WindowsMalwareSeverity { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WindowsMalwareSeverity + { /// Unknown [EnumMember(Value = "unknown")] Unknown, diff --git a/src/sample/generated/Models/WindowsMalwareState.cs b/src/sample/generated/Models/WindowsMalwareState.cs index cfbcd344..06e2a7b2 100644 --- a/src/sample/generated/Models/WindowsMalwareState.cs +++ b/src/sample/generated/Models/WindowsMalwareState.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Malware current status - public enum WindowsMalwareState { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WindowsMalwareState + { /// Unknown [EnumMember(Value = "unknown")] Unknown, diff --git a/src/sample/generated/Models/WindowsMalwareThreatState.cs b/src/sample/generated/Models/WindowsMalwareThreatState.cs index 65fe2b58..f2585761 100644 --- a/src/sample/generated/Models/WindowsMalwareThreatState.cs +++ b/src/sample/generated/Models/WindowsMalwareThreatState.cs @@ -1,9 +1,12 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// Malware threat status - public enum WindowsMalwareThreatState { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public enum WindowsMalwareThreatState + { /// Active [EnumMember(Value = "active")] Active, diff --git a/src/sample/generated/Models/WindowsProtectionState.cs b/src/sample/generated/Models/WindowsProtectionState.cs index 35f98652..0e7f66e7 100644 --- a/src/sample/generated/Models/WindowsProtectionState.cs +++ b/src/sample/generated/Models/WindowsProtectionState.cs @@ -1,14 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { +namespace ApiSdk.Models +{ /// /// Device protection status entity. /// - public class WindowsProtectionState : Entity, IParsable { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WindowsProtectionState : global::ApiSdk.Models.Entity, IParsable + { /// Current anti malware version #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -20,13 +24,13 @@ public class WindowsProtectionState : Entity, IParsable { /// Device malware list #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DetectedMalwareState { get; set; } + public List? DetectedMalwareState { get; set; } #nullable restore #else - public List DetectedMalwareState { get; set; } + public List DetectedMalwareState { get; set; } #endif /// Computer endpoint protection state - public WindowsDeviceHealthState? DeviceState { get; set; } + public global::ApiSdk.Models.WindowsDeviceHealthState? DeviceState { get; set; } /// Current endpoint protection engine's version #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -68,7 +72,7 @@ public class WindowsProtectionState : Entity, IParsable { /// When TRUE indicates network inspection system enabled, when FALSE indicates network inspection system is not enabled. Defaults to setting on client device. public bool? NetworkInspectionSystemEnabled { get; set; } /// Product Status of Windows Defender - public WindowsDefenderProductStatus? ProductStatus { get; set; } + public global::ApiSdk.Models.WindowsDefenderProductStatus? ProductStatus { get; set; } /// When TRUE indicates quick scan is overdue, when FALSE indicates quick scan is not overdue. Defaults to setting on client device. public bool? QuickScanOverdue { get; set; } /// When TRUE indicates real time protection is enabled, when FALSE indicates real time protection is not enabled. Defaults to setting on client device. @@ -90,49 +94,55 @@ public class WindowsProtectionState : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WindowsProtectionState CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WindowsProtectionState CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WindowsProtectionState(); + return new global::ApiSdk.Models.WindowsProtectionState(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"antiMalwareVersion", n => { AntiMalwareVersion = n.GetStringValue(); } }, - {"detectedMalwareState", n => { DetectedMalwareState = n.GetCollectionOfObjectValues(WindowsDeviceMalwareState.CreateFromDiscriminatorValue)?.ToList(); } }, - {"deviceState", n => { DeviceState = n.GetEnumValue(); } }, - {"engineVersion", n => { EngineVersion = n.GetStringValue(); } }, - {"fullScanOverdue", n => { FullScanOverdue = n.GetBoolValue(); } }, - {"fullScanRequired", n => { FullScanRequired = n.GetBoolValue(); } }, - {"isVirtualMachine", n => { IsVirtualMachine = n.GetBoolValue(); } }, - {"lastFullScanDateTime", n => { LastFullScanDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastFullScanSignatureVersion", n => { LastFullScanSignatureVersion = n.GetStringValue(); } }, - {"lastQuickScanDateTime", n => { LastQuickScanDateTime = n.GetDateTimeOffsetValue(); } }, - {"lastQuickScanSignatureVersion", n => { LastQuickScanSignatureVersion = n.GetStringValue(); } }, - {"lastReportedDateTime", n => { LastReportedDateTime = n.GetDateTimeOffsetValue(); } }, - {"malwareProtectionEnabled", n => { MalwareProtectionEnabled = n.GetBoolValue(); } }, - {"networkInspectionSystemEnabled", n => { NetworkInspectionSystemEnabled = n.GetBoolValue(); } }, - {"productStatus", n => { ProductStatus = n.GetEnumValue(); } }, - {"quickScanOverdue", n => { QuickScanOverdue = n.GetBoolValue(); } }, - {"realTimeProtectionEnabled", n => { RealTimeProtectionEnabled = n.GetBoolValue(); } }, - {"rebootRequired", n => { RebootRequired = n.GetBoolValue(); } }, - {"signatureUpdateOverdue", n => { SignatureUpdateOverdue = n.GetBoolValue(); } }, - {"signatureVersion", n => { SignatureVersion = n.GetStringValue(); } }, - {"tamperProtectionEnabled", n => { TamperProtectionEnabled = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "antiMalwareVersion", n => { AntiMalwareVersion = n.GetStringValue(); } }, + { "detectedMalwareState", n => { DetectedMalwareState = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WindowsDeviceMalwareState.CreateFromDiscriminatorValue)?.AsList(); } }, + { "deviceState", n => { DeviceState = n.GetEnumValue(); } }, + { "engineVersion", n => { EngineVersion = n.GetStringValue(); } }, + { "fullScanOverdue", n => { FullScanOverdue = n.GetBoolValue(); } }, + { "fullScanRequired", n => { FullScanRequired = n.GetBoolValue(); } }, + { "isVirtualMachine", n => { IsVirtualMachine = n.GetBoolValue(); } }, + { "lastFullScanDateTime", n => { LastFullScanDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastFullScanSignatureVersion", n => { LastFullScanSignatureVersion = n.GetStringValue(); } }, + { "lastQuickScanDateTime", n => { LastQuickScanDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastQuickScanSignatureVersion", n => { LastQuickScanSignatureVersion = n.GetStringValue(); } }, + { "lastReportedDateTime", n => { LastReportedDateTime = n.GetDateTimeOffsetValue(); } }, + { "malwareProtectionEnabled", n => { MalwareProtectionEnabled = n.GetBoolValue(); } }, + { "networkInspectionSystemEnabled", n => { NetworkInspectionSystemEnabled = n.GetBoolValue(); } }, + { "productStatus", n => { ProductStatus = n.GetEnumValue(); } }, + { "quickScanOverdue", n => { QuickScanOverdue = n.GetBoolValue(); } }, + { "realTimeProtectionEnabled", n => { RealTimeProtectionEnabled = n.GetBoolValue(); } }, + { "rebootRequired", n => { RebootRequired = n.GetBoolValue(); } }, + { "signatureUpdateOverdue", n => { SignatureUpdateOverdue = n.GetBoolValue(); } }, + { "signatureVersion", n => { SignatureVersion = n.GetStringValue(); } }, + { "tamperProtectionEnabled", n => { TamperProtectionEnabled = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("antiMalwareVersion", AntiMalwareVersion); - writer.WriteCollectionOfObjectValues("detectedMalwareState", DetectedMalwareState); - writer.WriteEnumValue("deviceState", DeviceState); + writer.WriteCollectionOfObjectValues("detectedMalwareState", DetectedMalwareState); + writer.WriteEnumValue("deviceState", DeviceState); writer.WriteStringValue("engineVersion", EngineVersion); writer.WriteBoolValue("fullScanOverdue", FullScanOverdue); writer.WriteBoolValue("fullScanRequired", FullScanRequired); @@ -144,7 +154,7 @@ public class WindowsProtectionState : Entity, IParsable { writer.WriteDateTimeOffsetValue("lastReportedDateTime", LastReportedDateTime); writer.WriteBoolValue("malwareProtectionEnabled", MalwareProtectionEnabled); writer.WriteBoolValue("networkInspectionSystemEnabled", NetworkInspectionSystemEnabled); - writer.WriteEnumValue("productStatus", ProductStatus); + writer.WriteEnumValue("productStatus", ProductStatus); writer.WriteBoolValue("quickScanOverdue", QuickScanOverdue); writer.WriteBoolValue("realTimeProtectionEnabled", RealTimeProtectionEnabled); writer.WriteBoolValue("rebootRequired", RebootRequired); @@ -154,3 +164,4 @@ public class WindowsProtectionState : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WindowsSetting.cs b/src/sample/generated/Models/WindowsSetting.cs new file mode 100644 index 00000000..c1377094 --- /dev/null +++ b/src/sample/generated/Models/WindowsSetting.cs @@ -0,0 +1,80 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WindowsSetting : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// A collection of setting values for a given windowsSetting. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Instances { get; set; } +#nullable restore +#else + public List Instances { get; set; } +#endif + /// The type of setting payloads contained in the instances navigation property. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PayloadType { get; set; } +#nullable restore +#else + public string PayloadType { get; set; } +#endif + /// The settingType property + public global::ApiSdk.Models.WindowsSettingType? SettingType { get; set; } + /// A unique identifier for the device the setting might belong to if it is of the settingType backup. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? WindowsDeviceId { get; set; } +#nullable restore +#else + public string WindowsDeviceId { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.WindowsSetting CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.WindowsSetting(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "instances", n => { Instances = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WindowsSettingInstance.CreateFromDiscriminatorValue)?.AsList(); } }, + { "payloadType", n => { PayloadType = n.GetStringValue(); } }, + { "settingType", n => { SettingType = n.GetEnumValue(); } }, + { "windowsDeviceId", n => { WindowsDeviceId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("instances", Instances); + writer.WriteStringValue("payloadType", PayloadType); + writer.WriteEnumValue("settingType", SettingType); + writer.WriteStringValue("windowsDeviceId", WindowsDeviceId); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WindowsSettingCollectionResponse.cs b/src/sample/generated/Models/WindowsSettingCollectionResponse.cs new file mode 100644 index 00000000..9525d4ac --- /dev/null +++ b/src/sample/generated/Models/WindowsSettingCollectionResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WindowsSettingCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The OdataNextLink property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataNextLink { get; set; } +#nullable restore +#else + public string OdataNextLink { get; set; } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { get; set; } +#nullable restore +#else + public List Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WindowsSettingCollectionResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.WindowsSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.WindowsSettingCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WindowsSetting.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.nextLink", OdataNextLink); + writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WindowsSettingInstance.cs b/src/sample/generated/Models/WindowsSettingInstance.cs new file mode 100644 index 00000000..c9df0011 --- /dev/null +++ b/src/sample/generated/Models/WindowsSettingInstance.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WindowsSettingInstance : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Set by the server. Represents the dateTime in UTC when the object was created on the server. + public DateTimeOffset? CreatedDateTime { get; set; } + /// Set by the server. The object expires at the specified dateTime in UTC, making it unavailable after that time. + public DateTimeOffset? ExpirationDateTime { get; set; } + /// Set by the server if not provided in the request from the Windows client device. Refers to the user's Windows device that modified the object at the specified dateTime in UTC. + public DateTimeOffset? LastModifiedDateTime { get; set; } + /// Base64-encoded JSON setting value. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Payload { get; set; } +#nullable restore +#else + public string Payload { get; set; } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.WindowsSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.WindowsSettingInstance(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, + { "expirationDateTime", n => { ExpirationDateTime = n.GetDateTimeOffsetValue(); } }, + { "lastModifiedDateTime", n => { LastModifiedDateTime = n.GetDateTimeOffsetValue(); } }, + { "payload", n => { Payload = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); + writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); + writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); + writer.WriteStringValue("payload", Payload); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WindowsSettingInstanceCollectionResponse.cs b/src/sample/generated/Models/WindowsSettingInstanceCollectionResponse.cs new file mode 100644 index 00000000..9ee5507a --- /dev/null +++ b/src/sample/generated/Models/WindowsSettingInstanceCollectionResponse.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WindowsSettingInstanceCollectionResponse : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The OdataNextLink property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataNextLink { get; set; } +#nullable restore +#else + public string OdataNextLink { get; set; } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { get; set; } +#nullable restore +#else + public List Value { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WindowsSettingInstanceCollectionResponse() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::ApiSdk.Models.WindowsSettingInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.WindowsSettingInstanceCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.nextLink", n => { OdataNextLink = n.GetStringValue(); } }, + { "value", n => { Value = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WindowsSettingInstance.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.nextLink", OdataNextLink); + writer.WriteCollectionOfObjectValues("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WindowsSettingType.cs b/src/sample/generated/Models/WindowsSettingType.cs new file mode 100644 index 00000000..1a563a6c --- /dev/null +++ b/src/sample/generated/Models/WindowsSettingType.cs @@ -0,0 +1,24 @@ +// +using System.Runtime.Serialization; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum WindowsSettingType + #pragma warning restore CS1591 + { + [EnumMember(Value = "roaming")] + #pragma warning disable CS1591 + Roaming, + #pragma warning restore CS1591 + [EnumMember(Value = "backup")] + #pragma warning disable CS1591 + Backup, + #pragma warning restore CS1591 + [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 + UnknownFutureValue, + #pragma warning restore CS1591 + } +} diff --git a/src/sample/generated/Models/Workbook.cs b/src/sample/generated/Models/Workbook.cs index c25c2be3..02f50429 100644 --- a/src/sample/generated/Models/Workbook.cs +++ b/src/sample/generated/Models/Workbook.cs @@ -1,103 +1,116 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class Workbook : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class Workbook : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The application property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookApplication? Application { get; set; } + public global::ApiSdk.Models.WorkbookApplication? Application { get; set; } #nullable restore #else - public WorkbookApplication Application { get; set; } + public global::ApiSdk.Models.WorkbookApplication Application { get; set; } #endif /// Represents a collection of comments in a workbook. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Comments { get; set; } + public List? Comments { get; set; } #nullable restore #else - public List Comments { get; set; } + public List Comments { get; set; } #endif /// The functions property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookFunctions? Functions { get; set; } + public global::ApiSdk.Models.WorkbookFunctions? Functions { get; set; } #nullable restore #else - public WorkbookFunctions Functions { get; set; } + public global::ApiSdk.Models.WorkbookFunctions Functions { get; set; } #endif /// Represents a collection of workbooks scoped named items (named ranges and constants). Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Names { get; set; } + public List? Names { get; set; } #nullable restore #else - public List Names { get; set; } + public List Names { get; set; } #endif /// 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. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Operations { get; set; } + public List? Operations { get; set; } #nullable restore #else - public List Operations { get; set; } + public List Operations { get; set; } #endif /// Represents a collection of tables associated with the workbook. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tables { get; set; } + public List? Tables { get; set; } #nullable restore #else - public List Tables { get; set; } + public List Tables { get; set; } #endif /// Represents a collection of worksheets associated with the workbook. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Worksheets { get; set; } + public List? Worksheets { get; set; } #nullable restore #else - public List Worksheets { get; set; } + public List Worksheets { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new Workbook CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.Workbook CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new Workbook(); + return new global::ApiSdk.Models.Workbook(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"application", n => { Application = n.GetObjectValue(WorkbookApplication.CreateFromDiscriminatorValue); } }, - {"comments", n => { Comments = n.GetCollectionOfObjectValues(WorkbookComment.CreateFromDiscriminatorValue)?.ToList(); } }, - {"functions", n => { Functions = n.GetObjectValue(WorkbookFunctions.CreateFromDiscriminatorValue); } }, - {"names", n => { Names = n.GetCollectionOfObjectValues(WorkbookNamedItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"operations", n => { Operations = n.GetCollectionOfObjectValues(WorkbookOperation.CreateFromDiscriminatorValue)?.ToList(); } }, - {"tables", n => { Tables = n.GetCollectionOfObjectValues(WorkbookTable.CreateFromDiscriminatorValue)?.ToList(); } }, - {"worksheets", n => { Worksheets = n.GetCollectionOfObjectValues(WorkbookWorksheet.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "application", n => { Application = n.GetObjectValue(global::ApiSdk.Models.WorkbookApplication.CreateFromDiscriminatorValue); } }, + { "comments", n => { Comments = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookComment.CreateFromDiscriminatorValue)?.AsList(); } }, + { "functions", n => { Functions = n.GetObjectValue(global::ApiSdk.Models.WorkbookFunctions.CreateFromDiscriminatorValue); } }, + { "names", n => { Names = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookNamedItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "operations", n => { Operations = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookOperation.CreateFromDiscriminatorValue)?.AsList(); } }, + { "tables", n => { Tables = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookTable.CreateFromDiscriminatorValue)?.AsList(); } }, + { "worksheets", n => { Worksheets = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookWorksheet.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("application", Application); - writer.WriteCollectionOfObjectValues("comments", Comments); - writer.WriteObjectValue("functions", Functions); - writer.WriteCollectionOfObjectValues("names", Names); - writer.WriteCollectionOfObjectValues("operations", Operations); - writer.WriteCollectionOfObjectValues("tables", Tables); - writer.WriteCollectionOfObjectValues("worksheets", Worksheets); + writer.WriteObjectValue("application", Application); + writer.WriteCollectionOfObjectValues("comments", Comments); + writer.WriteObjectValue("functions", Functions); + writer.WriteCollectionOfObjectValues("names", Names); + writer.WriteCollectionOfObjectValues("operations", Operations); + writer.WriteCollectionOfObjectValues("tables", Tables); + writer.WriteCollectionOfObjectValues("worksheets", Worksheets); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookApplication.cs b/src/sample/generated/Models/WorkbookApplication.cs index d6088930..509bb380 100644 --- a/src/sample/generated/Models/WorkbookApplication.cs +++ b/src/sample/generated/Models/WorkbookApplication.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookApplication : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookApplication : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// Returns the calculation mode used in the workbook. Possible values are: Automatic, AutomaticExceptTables, Manual. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -17,27 +23,34 @@ public class WorkbookApplication : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookApplication CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookApplication CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookApplication(); + return new global::ApiSdk.Models.WorkbookApplication(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"calculationMode", n => { CalculationMode = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "calculationMode", n => { CalculationMode = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("calculationMode", CalculationMode); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChart.cs b/src/sample/generated/Models/WorkbookChart.cs index 661ccd3e..8719d832 100644 --- a/src/sample/generated/Models/WorkbookChart.cs +++ b/src/sample/generated/Models/WorkbookChart.cs @@ -1,34 +1,40 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChart : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChart : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The axes property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartAxes? Axes { get; set; } + public global::ApiSdk.Models.WorkbookChartAxes? Axes { get; set; } #nullable restore #else - public WorkbookChartAxes Axes { get; set; } + public global::ApiSdk.Models.WorkbookChartAxes Axes { get; set; } #endif /// The dataLabels property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartDataLabels? DataLabels { get; set; } + public global::ApiSdk.Models.WorkbookChartDataLabels? DataLabels { get; set; } #nullable restore #else - public WorkbookChartDataLabels DataLabels { get; set; } + public global::ApiSdk.Models.WorkbookChartDataLabels DataLabels { get; set; } #endif /// The format property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartAreaFormat? Format { get; set; } + public global::ApiSdk.Models.WorkbookChartAreaFormat? Format { get; set; } #nullable restore #else - public WorkbookChartAreaFormat Format { get; set; } + public global::ApiSdk.Models.WorkbookChartAreaFormat Format { get; set; } #endif /// Represents the height, in points, of the chart object. public double? Height { get; set; } @@ -37,10 +43,10 @@ public class WorkbookChart : Entity, IParsable { /// The legend property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartLegend? Legend { get; set; } + public global::ApiSdk.Models.WorkbookChartLegend? Legend { get; set; } #nullable restore #else - public WorkbookChartLegend Legend { get; set; } + public global::ApiSdk.Models.WorkbookChartLegend Legend { get; set; } #endif /// Represents the name of a chart object. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -53,18 +59,18 @@ public class WorkbookChart : Entity, IParsable { /// Represents either a single series or collection of series in the chart. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Series { get; set; } + public List? Series { get; set; } #nullable restore #else - public List Series { get; set; } + public List Series { get; set; } #endif /// The title property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartTitle? Title { get; set; } + public global::ApiSdk.Models.WorkbookChartTitle? Title { get; set; } #nullable restore #else - public WorkbookChartTitle Title { get; set; } + public global::ApiSdk.Models.WorkbookChartTitle Title { get; set; } #endif /// Represents the distance, in points, from the top edge of the object to the top of row 1 (on a worksheet) or the top of the chart area (on a chart). public double? Top { get; set; } @@ -73,57 +79,64 @@ public class WorkbookChart : Entity, IParsable { /// The worksheet property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookWorksheet? Worksheet { get; set; } + public global::ApiSdk.Models.WorkbookWorksheet? Worksheet { get; set; } #nullable restore #else - public WorkbookWorksheet Worksheet { get; set; } + public global::ApiSdk.Models.WorkbookWorksheet Worksheet { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChart CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChart CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChart(); + return new global::ApiSdk.Models.WorkbookChart(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"axes", n => { Axes = n.GetObjectValue(WorkbookChartAxes.CreateFromDiscriminatorValue); } }, - {"dataLabels", n => { DataLabels = n.GetObjectValue(WorkbookChartDataLabels.CreateFromDiscriminatorValue); } }, - {"format", n => { Format = n.GetObjectValue(WorkbookChartAreaFormat.CreateFromDiscriminatorValue); } }, - {"height", n => { Height = n.GetDoubleValue(); } }, - {"left", n => { Left = n.GetDoubleValue(); } }, - {"legend", n => { Legend = n.GetObjectValue(WorkbookChartLegend.CreateFromDiscriminatorValue); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"series", n => { Series = n.GetCollectionOfObjectValues(WorkbookChartSeries.CreateFromDiscriminatorValue)?.ToList(); } }, - {"title", n => { Title = n.GetObjectValue(WorkbookChartTitle.CreateFromDiscriminatorValue); } }, - {"top", n => { Top = n.GetDoubleValue(); } }, - {"width", n => { Width = n.GetDoubleValue(); } }, - {"worksheet", n => { Worksheet = n.GetObjectValue(WorkbookWorksheet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "axes", n => { Axes = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartAxes.CreateFromDiscriminatorValue); } }, + { "dataLabels", n => { DataLabels = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartDataLabels.CreateFromDiscriminatorValue); } }, + { "format", n => { Format = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartAreaFormat.CreateFromDiscriminatorValue); } }, + { "height", n => { Height = n.GetDoubleValue(); } }, + { "left", n => { Left = n.GetDoubleValue(); } }, + { "legend", n => { Legend = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartLegend.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "series", n => { Series = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookChartSeries.CreateFromDiscriminatorValue)?.AsList(); } }, + { "title", n => { Title = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartTitle.CreateFromDiscriminatorValue); } }, + { "top", n => { Top = n.GetDoubleValue(); } }, + { "width", n => { Width = n.GetDoubleValue(); } }, + { "worksheet", n => { Worksheet = n.GetObjectValue(global::ApiSdk.Models.WorkbookWorksheet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("axes", Axes); - writer.WriteObjectValue("dataLabels", DataLabels); - writer.WriteObjectValue("format", Format); + writer.WriteObjectValue("axes", Axes); + writer.WriteObjectValue("dataLabels", DataLabels); + writer.WriteObjectValue("format", Format); writer.WriteDoubleValue("height", Height); writer.WriteDoubleValue("left", Left); - writer.WriteObjectValue("legend", Legend); + writer.WriteObjectValue("legend", Legend); writer.WriteStringValue("name", Name); - writer.WriteCollectionOfObjectValues("series", Series); - writer.WriteObjectValue("title", Title); + writer.WriteCollectionOfObjectValues("series", Series); + writer.WriteObjectValue("title", Title); writer.WriteDoubleValue("top", Top); writer.WriteDoubleValue("width", Width); - writer.WriteObjectValue("worksheet", Worksheet); + writer.WriteObjectValue("worksheet", Worksheet); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartAreaFormat.cs b/src/sample/generated/Models/WorkbookChartAreaFormat.cs index 53229385..f181d483 100644 --- a/src/sample/generated/Models/WorkbookChartAreaFormat.cs +++ b/src/sample/generated/Models/WorkbookChartAreaFormat.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartAreaFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartAreaFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The fill property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFill? Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill? Fill { get; set; } #nullable restore #else - public WorkbookChartFill Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill Fill { get; set; } #endif /// The font property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFont? Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont? Font { get; set; } #nullable restore #else - public WorkbookChartFont Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont Font { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartAreaFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartAreaFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartAreaFormat(); + return new global::ApiSdk.Models.WorkbookChartAreaFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"fill", n => { Fill = n.GetObjectValue(WorkbookChartFill.CreateFromDiscriminatorValue); } }, - {"font", n => { Font = n.GetObjectValue(WorkbookChartFont.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "fill", n => { Fill = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFill.CreateFromDiscriminatorValue); } }, + { "font", n => { Font = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFont.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("fill", Fill); - writer.WriteObjectValue("font", Font); + writer.WriteObjectValue("fill", Fill); + writer.WriteObjectValue("font", Font); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartAxes.cs b/src/sample/generated/Models/WorkbookChartAxes.cs index d1aa4366..aecf65e5 100644 --- a/src/sample/generated/Models/WorkbookChartAxes.cs +++ b/src/sample/generated/Models/WorkbookChartAxes.cs @@ -1,63 +1,76 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartAxes : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartAxes : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The categoryAxis property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartAxis? CategoryAxis { get; set; } + public global::ApiSdk.Models.WorkbookChartAxis? CategoryAxis { get; set; } #nullable restore #else - public WorkbookChartAxis CategoryAxis { get; set; } + public global::ApiSdk.Models.WorkbookChartAxis CategoryAxis { get; set; } #endif /// The seriesAxis property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartAxis? SeriesAxis { get; set; } + public global::ApiSdk.Models.WorkbookChartAxis? SeriesAxis { get; set; } #nullable restore #else - public WorkbookChartAxis SeriesAxis { get; set; } + public global::ApiSdk.Models.WorkbookChartAxis SeriesAxis { get; set; } #endif /// The valueAxis property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartAxis? ValueAxis { get; set; } + public global::ApiSdk.Models.WorkbookChartAxis? ValueAxis { get; set; } #nullable restore #else - public WorkbookChartAxis ValueAxis { get; set; } + public global::ApiSdk.Models.WorkbookChartAxis ValueAxis { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartAxes CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartAxes CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartAxes(); + return new global::ApiSdk.Models.WorkbookChartAxes(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"categoryAxis", n => { CategoryAxis = n.GetObjectValue(WorkbookChartAxis.CreateFromDiscriminatorValue); } }, - {"seriesAxis", n => { SeriesAxis = n.GetObjectValue(WorkbookChartAxis.CreateFromDiscriminatorValue); } }, - {"valueAxis", n => { ValueAxis = n.GetObjectValue(WorkbookChartAxis.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "categoryAxis", n => { CategoryAxis = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartAxis.CreateFromDiscriminatorValue); } }, + { "seriesAxis", n => { SeriesAxis = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartAxis.CreateFromDiscriminatorValue); } }, + { "valueAxis", n => { ValueAxis = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartAxis.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("categoryAxis", CategoryAxis); - writer.WriteObjectValue("seriesAxis", SeriesAxis); - writer.WriteObjectValue("valueAxis", ValueAxis); + writer.WriteObjectValue("categoryAxis", CategoryAxis); + writer.WriteObjectValue("seriesAxis", SeriesAxis); + writer.WriteObjectValue("valueAxis", ValueAxis); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartAxis.cs b/src/sample/generated/Models/WorkbookChartAxis.cs index 35c33f1c..afaee38f 100644 --- a/src/sample/generated/Models/WorkbookChartAxis.cs +++ b/src/sample/generated/Models/WorkbookChartAxis.cs @@ -1,113 +1,126 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartAxis : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartAxis : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The format property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartAxisFormat? Format { get; set; } + public global::ApiSdk.Models.WorkbookChartAxisFormat? Format { get; set; } #nullable restore #else - public WorkbookChartAxisFormat Format { get; set; } + public global::ApiSdk.Models.WorkbookChartAxisFormat Format { get; set; } #endif /// The majorGridlines property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartGridlines? MajorGridlines { get; set; } + public global::ApiSdk.Models.WorkbookChartGridlines? MajorGridlines { get; set; } #nullable restore #else - public WorkbookChartGridlines MajorGridlines { get; set; } + public global::ApiSdk.Models.WorkbookChartGridlines MajorGridlines { get; set; } #endif /// The majorUnit property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? MajorUnit { get; set; } + public global::ApiSdk.Models.Json? MajorUnit { get; set; } #nullable restore #else - public Json MajorUnit { get; set; } + public global::ApiSdk.Models.Json MajorUnit { get; set; } #endif /// The maximum property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? Maximum { get; set; } + public global::ApiSdk.Models.Json? Maximum { get; set; } #nullable restore #else - public Json Maximum { get; set; } + public global::ApiSdk.Models.Json Maximum { get; set; } #endif /// The minimum property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? Minimum { get; set; } + public global::ApiSdk.Models.Json? Minimum { get; set; } #nullable restore #else - public Json Minimum { get; set; } + public global::ApiSdk.Models.Json Minimum { get; set; } #endif /// The minorGridlines property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartGridlines? MinorGridlines { get; set; } + public global::ApiSdk.Models.WorkbookChartGridlines? MinorGridlines { get; set; } #nullable restore #else - public WorkbookChartGridlines MinorGridlines { get; set; } + public global::ApiSdk.Models.WorkbookChartGridlines MinorGridlines { get; set; } #endif /// The minorUnit property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? MinorUnit { get; set; } + public global::ApiSdk.Models.Json? MinorUnit { get; set; } #nullable restore #else - public Json MinorUnit { get; set; } + public global::ApiSdk.Models.Json MinorUnit { get; set; } #endif /// The title property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartAxisTitle? Title { get; set; } + public global::ApiSdk.Models.WorkbookChartAxisTitle? Title { get; set; } #nullable restore #else - public WorkbookChartAxisTitle Title { get; set; } + public global::ApiSdk.Models.WorkbookChartAxisTitle Title { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartAxis CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartAxis CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartAxis(); + return new global::ApiSdk.Models.WorkbookChartAxis(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"format", n => { Format = n.GetObjectValue(WorkbookChartAxisFormat.CreateFromDiscriminatorValue); } }, - {"majorGridlines", n => { MajorGridlines = n.GetObjectValue(WorkbookChartGridlines.CreateFromDiscriminatorValue); } }, - {"majorUnit", n => { MajorUnit = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, - {"maximum", n => { Maximum = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, - {"minimum", n => { Minimum = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, - {"minorGridlines", n => { MinorGridlines = n.GetObjectValue(WorkbookChartGridlines.CreateFromDiscriminatorValue); } }, - {"minorUnit", n => { MinorUnit = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, - {"title", n => { Title = n.GetObjectValue(WorkbookChartAxisTitle.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "format", n => { Format = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartAxisFormat.CreateFromDiscriminatorValue); } }, + { "majorGridlines", n => { MajorGridlines = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartGridlines.CreateFromDiscriminatorValue); } }, + { "majorUnit", n => { MajorUnit = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, + { "maximum", n => { Maximum = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, + { "minimum", n => { Minimum = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, + { "minorGridlines", n => { MinorGridlines = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartGridlines.CreateFromDiscriminatorValue); } }, + { "minorUnit", n => { MinorUnit = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, + { "title", n => { Title = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartAxisTitle.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("format", Format); - writer.WriteObjectValue("majorGridlines", MajorGridlines); - writer.WriteObjectValue("majorUnit", MajorUnit); - writer.WriteObjectValue("maximum", Maximum); - writer.WriteObjectValue("minimum", Minimum); - writer.WriteObjectValue("minorGridlines", MinorGridlines); - writer.WriteObjectValue("minorUnit", MinorUnit); - writer.WriteObjectValue("title", Title); + writer.WriteObjectValue("format", Format); + writer.WriteObjectValue("majorGridlines", MajorGridlines); + writer.WriteObjectValue("majorUnit", MajorUnit); + writer.WriteObjectValue("maximum", Maximum); + writer.WriteObjectValue("minimum", Minimum); + writer.WriteObjectValue("minorGridlines", MinorGridlines); + writer.WriteObjectValue("minorUnit", MinorUnit); + writer.WriteObjectValue("title", Title); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartAxisFormat.cs b/src/sample/generated/Models/WorkbookChartAxisFormat.cs index b0e2e632..a9065905 100644 --- a/src/sample/generated/Models/WorkbookChartAxisFormat.cs +++ b/src/sample/generated/Models/WorkbookChartAxisFormat.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartAxisFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartAxisFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The font property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFont? Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont? Font { get; set; } #nullable restore #else - public WorkbookChartFont Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont Font { get; set; } #endif /// The line property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartLineFormat? Line { get; set; } + public global::ApiSdk.Models.WorkbookChartLineFormat? Line { get; set; } #nullable restore #else - public WorkbookChartLineFormat Line { get; set; } + public global::ApiSdk.Models.WorkbookChartLineFormat Line { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartAxisFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartAxisFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartAxisFormat(); + return new global::ApiSdk.Models.WorkbookChartAxisFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"font", n => { Font = n.GetObjectValue(WorkbookChartFont.CreateFromDiscriminatorValue); } }, - {"line", n => { Line = n.GetObjectValue(WorkbookChartLineFormat.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "font", n => { Font = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFont.CreateFromDiscriminatorValue); } }, + { "line", n => { Line = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartLineFormat.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("font", Font); - writer.WriteObjectValue("line", Line); + writer.WriteObjectValue("font", Font); + writer.WriteObjectValue("line", Line); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartAxisTitle.cs b/src/sample/generated/Models/WorkbookChartAxisTitle.cs index 22604cd9..960d3e2f 100644 --- a/src/sample/generated/Models/WorkbookChartAxisTitle.cs +++ b/src/sample/generated/Models/WorkbookChartAxisTitle.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartAxisTitle : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartAxisTitle : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The format property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartAxisTitleFormat? Format { get; set; } + public global::ApiSdk.Models.WorkbookChartAxisTitleFormat? Format { get; set; } #nullable restore #else - public WorkbookChartAxisTitleFormat Format { get; set; } + public global::ApiSdk.Models.WorkbookChartAxisTitleFormat Format { get; set; } #endif /// Represents the axis title. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -22,36 +28,43 @@ public class WorkbookChartAxisTitle : Entity, IParsable { #else public string Text { get; set; } #endif - /// A boolean that specifies the visibility of an axis title. + /// A Boolean that specifies the visibility of an axis title. public bool? Visible { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartAxisTitle CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartAxisTitle CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartAxisTitle(); + return new global::ApiSdk.Models.WorkbookChartAxisTitle(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"format", n => { Format = n.GetObjectValue(WorkbookChartAxisTitleFormat.CreateFromDiscriminatorValue); } }, - {"text", n => { Text = n.GetStringValue(); } }, - {"visible", n => { Visible = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "format", n => { Format = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartAxisTitleFormat.CreateFromDiscriminatorValue); } }, + { "text", n => { Text = n.GetStringValue(); } }, + { "visible", n => { Visible = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("format", Format); + writer.WriteObjectValue("format", Format); writer.WriteStringValue("text", Text); writer.WriteBoolValue("visible", Visible); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartAxisTitleFormat.cs b/src/sample/generated/Models/WorkbookChartAxisTitleFormat.cs index b9845436..99054f5d 100644 --- a/src/sample/generated/Models/WorkbookChartAxisTitleFormat.cs +++ b/src/sample/generated/Models/WorkbookChartAxisTitleFormat.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartAxisTitleFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartAxisTitleFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The font property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFont? Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont? Font { get; set; } #nullable restore #else - public WorkbookChartFont Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont Font { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartAxisTitleFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartAxisTitleFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartAxisTitleFormat(); + return new global::ApiSdk.Models.WorkbookChartAxisTitleFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"font", n => { Font = n.GetObjectValue(WorkbookChartFont.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "font", n => { Font = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFont.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("font", Font); + writer.WriteObjectValue("font", Font); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartDataLabelFormat.cs b/src/sample/generated/Models/WorkbookChartDataLabelFormat.cs index b65b2f90..75a13667 100644 --- a/src/sample/generated/Models/WorkbookChartDataLabelFormat.cs +++ b/src/sample/generated/Models/WorkbookChartDataLabelFormat.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartDataLabelFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartDataLabelFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The fill property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFill? Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill? Fill { get; set; } #nullable restore #else - public WorkbookChartFill Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill Fill { get; set; } #endif /// The font property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFont? Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont? Font { get; set; } #nullable restore #else - public WorkbookChartFont Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont Font { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartDataLabelFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartDataLabelFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartDataLabelFormat(); + return new global::ApiSdk.Models.WorkbookChartDataLabelFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"fill", n => { Fill = n.GetObjectValue(WorkbookChartFill.CreateFromDiscriminatorValue); } }, - {"font", n => { Font = n.GetObjectValue(WorkbookChartFont.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "fill", n => { Fill = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFill.CreateFromDiscriminatorValue); } }, + { "font", n => { Font = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFont.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("fill", Fill); - writer.WriteObjectValue("font", Font); + writer.WriteObjectValue("fill", Fill); + writer.WriteObjectValue("font", Font); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartDataLabels.cs b/src/sample/generated/Models/WorkbookChartDataLabels.cs index ec7a12bb..0f602329 100644 --- a/src/sample/generated/Models/WorkbookChartDataLabels.cs +++ b/src/sample/generated/Models/WorkbookChartDataLabels.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartDataLabels : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartDataLabels : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The format property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartDataLabelFormat? Format { get; set; } + public global::ApiSdk.Models.WorkbookChartDataLabelFormat? Format { get; set; } #nullable restore #else - public WorkbookChartDataLabelFormat Format { get; set; } + public global::ApiSdk.Models.WorkbookChartDataLabelFormat Format { get; set; } #endif /// DataLabelPosition value that represents the position of the data label. The possible values are: None, Center, InsideEnd, InsideBase, OutsideEnd, Left, Right, Top, Bottom, BestFit, Callout. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -22,7 +28,7 @@ public class WorkbookChartDataLabels : Entity, IParsable { #else public string Position { get; set; } #endif - /// String representing the separator used for the data labels on a chart. + /// String that represents the separator used for the data labels on a chart. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Separator { get; set; } @@ -30,50 +36,56 @@ public class WorkbookChartDataLabels : Entity, IParsable { #else public string Separator { get; set; } #endif - /// Boolean value representing if the data label bubble size is visible or not. + /// Boolean value that represents whether the data label bubble size is visible. public bool? ShowBubbleSize { get; set; } - /// Boolean value representing if the data label category name is visible or not. + /// Boolean value that represents whether the data label category name is visible. public bool? ShowCategoryName { get; set; } - /// Boolean value representing if the data label legend key is visible or not. + /// Boolean value that represents whether the data label legend key is visible. public bool? ShowLegendKey { get; set; } - /// Boolean value representing if the data label percentage is visible or not. + /// Boolean value that represents whether the data label percentage is visible. public bool? ShowPercentage { get; set; } - /// Boolean value representing if the data label series name is visible or not. + /// Boolean value that represents whether the data label series name is visible. public bool? ShowSeriesName { get; set; } - /// Boolean value representing if the data label value is visible or not. + /// Boolean value that represents whether the data label value is visible. public bool? ShowValue { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartDataLabels CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartDataLabels CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartDataLabels(); + return new global::ApiSdk.Models.WorkbookChartDataLabels(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"format", n => { Format = n.GetObjectValue(WorkbookChartDataLabelFormat.CreateFromDiscriminatorValue); } }, - {"position", n => { Position = n.GetStringValue(); } }, - {"separator", n => { Separator = n.GetStringValue(); } }, - {"showBubbleSize", n => { ShowBubbleSize = n.GetBoolValue(); } }, - {"showCategoryName", n => { ShowCategoryName = n.GetBoolValue(); } }, - {"showLegendKey", n => { ShowLegendKey = n.GetBoolValue(); } }, - {"showPercentage", n => { ShowPercentage = n.GetBoolValue(); } }, - {"showSeriesName", n => { ShowSeriesName = n.GetBoolValue(); } }, - {"showValue", n => { ShowValue = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "format", n => { Format = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartDataLabelFormat.CreateFromDiscriminatorValue); } }, + { "position", n => { Position = n.GetStringValue(); } }, + { "separator", n => { Separator = n.GetStringValue(); } }, + { "showBubbleSize", n => { ShowBubbleSize = n.GetBoolValue(); } }, + { "showCategoryName", n => { ShowCategoryName = n.GetBoolValue(); } }, + { "showLegendKey", n => { ShowLegendKey = n.GetBoolValue(); } }, + { "showPercentage", n => { ShowPercentage = n.GetBoolValue(); } }, + { "showSeriesName", n => { ShowSeriesName = n.GetBoolValue(); } }, + { "showValue", n => { ShowValue = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("format", Format); + writer.WriteObjectValue("format", Format); writer.WriteStringValue("position", Position); writer.WriteStringValue("separator", Separator); writer.WriteBoolValue("showBubbleSize", ShowBubbleSize); @@ -85,3 +97,4 @@ public class WorkbookChartDataLabels : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartFill.cs b/src/sample/generated/Models/WorkbookChartFill.cs index d5fe7361..fac1587c 100644 --- a/src/sample/generated/Models/WorkbookChartFill.cs +++ b/src/sample/generated/Models/WorkbookChartFill.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartFill : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartFill : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartFill CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartFill CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartFill(); + return new global::ApiSdk.Models.WorkbookChartFill(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartFont.cs b/src/sample/generated/Models/WorkbookChartFont.cs index 88724953..314dd0d6 100644 --- a/src/sample/generated/Models/WorkbookChartFont.cs +++ b/src/sample/generated/Models/WorkbookChartFont.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartFont : Entity, IParsable { - /// Represents the bold status of font. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartFont : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// Indicates whether the fond is bold. public bool? Bold { get; set; } - /// HTML color code representation of the text color. for example #FF0000 represents Red. + /// The HTML color code representation of the text color. For example #FF0000 represents Red. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Color { get; set; } @@ -16,9 +22,9 @@ public class WorkbookChartFont : Entity, IParsable { #else public string Color { get; set; } #endif - /// Represents the italic status of the font. + /// Indicates whether the fond is italic. public bool? Italic { get; set; } - /// Font name (for example 'Calibri') + /// The font name. For example 'Calibri'. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } @@ -26,9 +32,9 @@ public class WorkbookChartFont : Entity, IParsable { #else public string Name { get; set; } #endif - /// Size of the font (for example 11) + /// The size of the font. For example, 11. public double? Size { get; set; } - /// Type of underline applied to the font. The possible values are: None, Single. + /// The type of underlining applied to the font. The possible values are: None, Single. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Underline { get; set; } @@ -39,29 +45,35 @@ public class WorkbookChartFont : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartFont CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartFont CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartFont(); + return new global::ApiSdk.Models.WorkbookChartFont(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"bold", n => { Bold = n.GetBoolValue(); } }, - {"color", n => { Color = n.GetStringValue(); } }, - {"italic", n => { Italic = n.GetBoolValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"size", n => { Size = n.GetDoubleValue(); } }, - {"underline", n => { Underline = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "bold", n => { Bold = n.GetBoolValue(); } }, + { "color", n => { Color = n.GetStringValue(); } }, + { "italic", n => { Italic = n.GetBoolValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "size", n => { Size = n.GetDoubleValue(); } }, + { "underline", n => { Underline = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("bold", Bold); @@ -73,3 +85,4 @@ public class WorkbookChartFont : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartGridlines.cs b/src/sample/generated/Models/WorkbookChartGridlines.cs index 5ecd5b2a..d23865f6 100644 --- a/src/sample/generated/Models/WorkbookChartGridlines.cs +++ b/src/sample/generated/Models/WorkbookChartGridlines.cs @@ -1,47 +1,60 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartGridlines : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartGridlines : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The format property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartGridlinesFormat? Format { get; set; } + public global::ApiSdk.Models.WorkbookChartGridlinesFormat? Format { get; set; } #nullable restore #else - public WorkbookChartGridlinesFormat Format { get; set; } + public global::ApiSdk.Models.WorkbookChartGridlinesFormat Format { get; set; } #endif - /// Boolean value representing if the axis gridlines are visible or not. + /// Indicates whether the axis gridlines are visible. public bool? Visible { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartGridlines CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartGridlines CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartGridlines(); + return new global::ApiSdk.Models.WorkbookChartGridlines(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"format", n => { Format = n.GetObjectValue(WorkbookChartGridlinesFormat.CreateFromDiscriminatorValue); } }, - {"visible", n => { Visible = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "format", n => { Format = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartGridlinesFormat.CreateFromDiscriminatorValue); } }, + { "visible", n => { Visible = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("format", Format); + writer.WriteObjectValue("format", Format); writer.WriteBoolValue("visible", Visible); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartGridlinesFormat.cs b/src/sample/generated/Models/WorkbookChartGridlinesFormat.cs index 8e38800e..c326056b 100644 --- a/src/sample/generated/Models/WorkbookChartGridlinesFormat.cs +++ b/src/sample/generated/Models/WorkbookChartGridlinesFormat.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartGridlinesFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartGridlinesFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The line property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartLineFormat? Line { get; set; } + public global::ApiSdk.Models.WorkbookChartLineFormat? Line { get; set; } #nullable restore #else - public WorkbookChartLineFormat Line { get; set; } + public global::ApiSdk.Models.WorkbookChartLineFormat Line { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartGridlinesFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartGridlinesFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartGridlinesFormat(); + return new global::ApiSdk.Models.WorkbookChartGridlinesFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"line", n => { Line = n.GetObjectValue(WorkbookChartLineFormat.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "line", n => { Line = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartLineFormat.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("line", Line); + writer.WriteObjectValue("line", Line); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartLegend.cs b/src/sample/generated/Models/WorkbookChartLegend.cs index 6b78345a..9aaf47e9 100644 --- a/src/sample/generated/Models/WorkbookChartLegend.cs +++ b/src/sample/generated/Models/WorkbookChartLegend.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartLegend : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartLegend : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The format property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartLegendFormat? Format { get; set; } + public global::ApiSdk.Models.WorkbookChartLegendFormat? Format { get; set; } #nullable restore #else - public WorkbookChartLegendFormat Format { get; set; } + public global::ApiSdk.Models.WorkbookChartLegendFormat Format { get; set; } #endif - /// Boolean value for whether the chart legend should overlap with the main body of the chart. + /// Indicates whether the chart legend should overlap with the main body of the chart. public bool? Overlay { get; set; } /// Represents the position of the legend on the chart. The possible values are: Top, Bottom, Left, Right, Corner, Custom. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -24,38 +30,45 @@ public class WorkbookChartLegend : Entity, IParsable { #else public string Position { get; set; } #endif - /// A boolean value the represents the visibility of a ChartLegend object. + /// Indicates whether the chart legend is visible. public bool? Visible { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartLegend CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartLegend CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartLegend(); + return new global::ApiSdk.Models.WorkbookChartLegend(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"format", n => { Format = n.GetObjectValue(WorkbookChartLegendFormat.CreateFromDiscriminatorValue); } }, - {"overlay", n => { Overlay = n.GetBoolValue(); } }, - {"position", n => { Position = n.GetStringValue(); } }, - {"visible", n => { Visible = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "format", n => { Format = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartLegendFormat.CreateFromDiscriminatorValue); } }, + { "overlay", n => { Overlay = n.GetBoolValue(); } }, + { "position", n => { Position = n.GetStringValue(); } }, + { "visible", n => { Visible = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("format", Format); + writer.WriteObjectValue("format", Format); writer.WriteBoolValue("overlay", Overlay); writer.WriteStringValue("position", Position); writer.WriteBoolValue("visible", Visible); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartLegendFormat.cs b/src/sample/generated/Models/WorkbookChartLegendFormat.cs index dfff670f..45a9b833 100644 --- a/src/sample/generated/Models/WorkbookChartLegendFormat.cs +++ b/src/sample/generated/Models/WorkbookChartLegendFormat.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartLegendFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartLegendFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The fill property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFill? Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill? Fill { get; set; } #nullable restore #else - public WorkbookChartFill Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill Fill { get; set; } #endif /// The font property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFont? Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont? Font { get; set; } #nullable restore #else - public WorkbookChartFont Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont Font { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartLegendFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartLegendFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartLegendFormat(); + return new global::ApiSdk.Models.WorkbookChartLegendFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"fill", n => { Fill = n.GetObjectValue(WorkbookChartFill.CreateFromDiscriminatorValue); } }, - {"font", n => { Font = n.GetObjectValue(WorkbookChartFont.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "fill", n => { Fill = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFill.CreateFromDiscriminatorValue); } }, + { "font", n => { Font = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFont.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("fill", Fill); - writer.WriteObjectValue("font", Font); + writer.WriteObjectValue("fill", Fill); + writer.WriteObjectValue("font", Font); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartLineFormat.cs b/src/sample/generated/Models/WorkbookChartLineFormat.cs index 69b030fe..271b115b 100644 --- a/src/sample/generated/Models/WorkbookChartLineFormat.cs +++ b/src/sample/generated/Models/WorkbookChartLineFormat.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartLineFormat : Entity, IParsable { - /// HTML color code representing the color of lines in the chart. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartLineFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The HTML color code that represents the color of lines in the chart. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Color { get; set; } @@ -17,27 +23,34 @@ public class WorkbookChartLineFormat : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartLineFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartLineFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartLineFormat(); + return new global::ApiSdk.Models.WorkbookChartLineFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"color", n => { Color = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "color", n => { Color = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("color", Color); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartPoint.cs b/src/sample/generated/Models/WorkbookChartPoint.cs index c546dca5..b79f1bd9 100644 --- a/src/sample/generated/Models/WorkbookChartPoint.cs +++ b/src/sample/generated/Models/WorkbookChartPoint.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartPoint : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartPoint : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The format property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartPointFormat? Format { get; set; } + public global::ApiSdk.Models.WorkbookChartPointFormat? Format { get; set; } #nullable restore #else - public WorkbookChartPointFormat Format { get; set; } + public global::ApiSdk.Models.WorkbookChartPointFormat Format { get; set; } #endif /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? Value { get; set; } + public global::ApiSdk.Models.Json? Value { get; set; } #nullable restore #else - public Json Value { get; set; } + public global::ApiSdk.Models.Json Value { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartPoint CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartPoint CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartPoint(); + return new global::ApiSdk.Models.WorkbookChartPoint(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"format", n => { Format = n.GetObjectValue(WorkbookChartPointFormat.CreateFromDiscriminatorValue); } }, - {"value", n => { Value = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "format", n => { Format = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartPointFormat.CreateFromDiscriminatorValue); } }, + { "value", n => { Value = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("format", Format); - writer.WriteObjectValue("value", Value); + writer.WriteObjectValue("format", Format); + writer.WriteObjectValue("value", Value); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartPointFormat.cs b/src/sample/generated/Models/WorkbookChartPointFormat.cs index a60e5b04..760d20d0 100644 --- a/src/sample/generated/Models/WorkbookChartPointFormat.cs +++ b/src/sample/generated/Models/WorkbookChartPointFormat.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartPointFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartPointFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The fill property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFill? Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill? Fill { get; set; } #nullable restore #else - public WorkbookChartFill Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill Fill { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartPointFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartPointFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartPointFormat(); + return new global::ApiSdk.Models.WorkbookChartPointFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"fill", n => { Fill = n.GetObjectValue(WorkbookChartFill.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "fill", n => { Fill = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFill.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("fill", Fill); + writer.WriteObjectValue("fill", Fill); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartSeries.cs b/src/sample/generated/Models/WorkbookChartSeries.cs index 1cba4b34..4bbbe515 100644 --- a/src/sample/generated/Models/WorkbookChartSeries.cs +++ b/src/sample/generated/Models/WorkbookChartSeries.cs @@ -1,20 +1,26 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartSeries : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartSeries : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The format property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartSeriesFormat? Format { get; set; } + public global::ApiSdk.Models.WorkbookChartSeriesFormat? Format { get; set; } #nullable restore #else - public WorkbookChartSeriesFormat Format { get; set; } + public global::ApiSdk.Models.WorkbookChartSeriesFormat Format { get; set; } #endif - /// Represents the name of a series in a chart. + /// The name of a series in a chart. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } @@ -22,42 +28,49 @@ public class WorkbookChartSeries : Entity, IParsable { #else public string Name { get; set; } #endif - /// Represents a collection of all points in the series. Read-only. + /// A collection of all points in the series. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Points { get; set; } + public List? Points { get; set; } #nullable restore #else - public List Points { get; set; } + public List Points { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartSeries CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartSeries CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartSeries(); + return new global::ApiSdk.Models.WorkbookChartSeries(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"format", n => { Format = n.GetObjectValue(WorkbookChartSeriesFormat.CreateFromDiscriminatorValue); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"points", n => { Points = n.GetCollectionOfObjectValues(WorkbookChartPoint.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "format", n => { Format = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartSeriesFormat.CreateFromDiscriminatorValue); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "points", n => { Points = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookChartPoint.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("format", Format); + writer.WriteObjectValue("format", Format); writer.WriteStringValue("name", Name); - writer.WriteCollectionOfObjectValues("points", Points); + writer.WriteCollectionOfObjectValues("points", Points); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartSeriesFormat.cs b/src/sample/generated/Models/WorkbookChartSeriesFormat.cs index 67003c0f..577e8726 100644 --- a/src/sample/generated/Models/WorkbookChartSeriesFormat.cs +++ b/src/sample/generated/Models/WorkbookChartSeriesFormat.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartSeriesFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartSeriesFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The fill property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFill? Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill? Fill { get; set; } #nullable restore #else - public WorkbookChartFill Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill Fill { get; set; } #endif /// The line property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartLineFormat? Line { get; set; } + public global::ApiSdk.Models.WorkbookChartLineFormat? Line { get; set; } #nullable restore #else - public WorkbookChartLineFormat Line { get; set; } + public global::ApiSdk.Models.WorkbookChartLineFormat Line { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartSeriesFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartSeriesFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartSeriesFormat(); + return new global::ApiSdk.Models.WorkbookChartSeriesFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"fill", n => { Fill = n.GetObjectValue(WorkbookChartFill.CreateFromDiscriminatorValue); } }, - {"line", n => { Line = n.GetObjectValue(WorkbookChartLineFormat.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "fill", n => { Fill = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFill.CreateFromDiscriminatorValue); } }, + { "line", n => { Line = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartLineFormat.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("fill", Fill); - writer.WriteObjectValue("line", Line); + writer.WriteObjectValue("fill", Fill); + writer.WriteObjectValue("line", Line); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartTitle.cs b/src/sample/generated/Models/WorkbookChartTitle.cs index 9acdcb1f..46c40863 100644 --- a/src/sample/generated/Models/WorkbookChartTitle.cs +++ b/src/sample/generated/Models/WorkbookChartTitle.cs @@ -1,22 +1,28 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartTitle : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartTitle : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The format property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartTitleFormat? Format { get; set; } + public global::ApiSdk.Models.WorkbookChartTitleFormat? Format { get; set; } #nullable restore #else - public WorkbookChartTitleFormat Format { get; set; } + public global::ApiSdk.Models.WorkbookChartTitleFormat Format { get; set; } #endif - /// Boolean value representing if the chart title will overlay the chart or not. + /// Indicates whether the chart title will overlay the chart or not. public bool? Overlay { get; set; } - /// Represents the title text of a chart. + /// The title text of the chart. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Text { get; set; } @@ -24,38 +30,45 @@ public class WorkbookChartTitle : Entity, IParsable { #else public string Text { get; set; } #endif - /// A boolean value that represents the visibility of a chart title object. + /// Indicates whether the chart title is visible. public bool? Visible { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartTitle CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartTitle CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartTitle(); + return new global::ApiSdk.Models.WorkbookChartTitle(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"format", n => { Format = n.GetObjectValue(WorkbookChartTitleFormat.CreateFromDiscriminatorValue); } }, - {"overlay", n => { Overlay = n.GetBoolValue(); } }, - {"text", n => { Text = n.GetStringValue(); } }, - {"visible", n => { Visible = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "format", n => { Format = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartTitleFormat.CreateFromDiscriminatorValue); } }, + { "overlay", n => { Overlay = n.GetBoolValue(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + { "visible", n => { Visible = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("format", Format); + writer.WriteObjectValue("format", Format); writer.WriteBoolValue("overlay", Overlay); writer.WriteStringValue("text", Text); writer.WriteBoolValue("visible", Visible); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookChartTitleFormat.cs b/src/sample/generated/Models/WorkbookChartTitleFormat.cs index 486cee0f..2a1d27f5 100644 --- a/src/sample/generated/Models/WorkbookChartTitleFormat.cs +++ b/src/sample/generated/Models/WorkbookChartTitleFormat.cs @@ -1,53 +1,66 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookChartTitleFormat : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookChartTitleFormat : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The fill property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFill? Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill? Fill { get; set; } #nullable restore #else - public WorkbookChartFill Fill { get; set; } + public global::ApiSdk.Models.WorkbookChartFill Fill { get; set; } #endif /// The font property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookChartFont? Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont? Font { get; set; } #nullable restore #else - public WorkbookChartFont Font { get; set; } + public global::ApiSdk.Models.WorkbookChartFont Font { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookChartTitleFormat CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookChartTitleFormat CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookChartTitleFormat(); + return new global::ApiSdk.Models.WorkbookChartTitleFormat(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"fill", n => { Fill = n.GetObjectValue(WorkbookChartFill.CreateFromDiscriminatorValue); } }, - {"font", n => { Font = n.GetObjectValue(WorkbookChartFont.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "fill", n => { Fill = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFill.CreateFromDiscriminatorValue); } }, + { "font", n => { Font = n.GetObjectValue(global::ApiSdk.Models.WorkbookChartFont.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("fill", Fill); - writer.WriteObjectValue("font", Font); + writer.WriteObjectValue("fill", Fill); + writer.WriteObjectValue("font", Font); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookComment.cs b/src/sample/generated/Models/WorkbookComment.cs index 20544d0c..d800c93c 100644 --- a/src/sample/generated/Models/WorkbookComment.cs +++ b/src/sample/generated/Models/WorkbookComment.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookComment : Entity, IParsable { - /// The content of comment. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookComment : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The content of the comment. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Content { get; set; } @@ -14,7 +20,7 @@ public class WorkbookComment : Entity, IParsable { #else public string Content { get; set; } #endif - /// Indicates the type for the comment. + /// The content type of the comment. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ContentType { get; set; } @@ -22,42 +28,49 @@ public class WorkbookComment : Entity, IParsable { #else public string ContentType { get; set; } #endif - /// The replies property + /// The list of replies to the comment. Read-only. Nullable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Replies { get; set; } + public List? Replies { get; set; } #nullable restore #else - public List Replies { get; set; } + public List Replies { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookComment CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookComment CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookComment(); + return new global::ApiSdk.Models.WorkbookComment(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"content", n => { Content = n.GetStringValue(); } }, - {"contentType", n => { ContentType = n.GetStringValue(); } }, - {"replies", n => { Replies = n.GetCollectionOfObjectValues(WorkbookCommentReply.CreateFromDiscriminatorValue)?.ToList(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "content", n => { Content = n.GetStringValue(); } }, + { "contentType", n => { ContentType = n.GetStringValue(); } }, + { "replies", n => { Replies = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookCommentReply.CreateFromDiscriminatorValue)?.AsList(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); writer.WriteStringValue("contentType", ContentType); - writer.WriteCollectionOfObjectValues("replies", Replies); + writer.WriteCollectionOfObjectValues("replies", Replies); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookCommentReply.cs b/src/sample/generated/Models/WorkbookCommentReply.cs index 7289b28c..a66362d2 100644 --- a/src/sample/generated/Models/WorkbookCommentReply.cs +++ b/src/sample/generated/Models/WorkbookCommentReply.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookCommentReply : Entity, IParsable { - /// The content of a comment reply. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookCommentReply : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The content of the reply. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Content { get; set; } @@ -14,7 +20,7 @@ public class WorkbookCommentReply : Entity, IParsable { #else public string Content { get; set; } #endif - /// Indicates the type for the comment reply. + /// The content type for the reply. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ContentType { get; set; } @@ -25,25 +31,31 @@ public class WorkbookCommentReply : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookCommentReply CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookCommentReply CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookCommentReply(); + return new global::ApiSdk.Models.WorkbookCommentReply(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"content", n => { Content = n.GetStringValue(); } }, - {"contentType", n => { ContentType = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "content", n => { Content = n.GetStringValue(); } }, + { "contentType", n => { ContentType = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); @@ -51,3 +63,4 @@ public class WorkbookCommentReply : Entity, IParsable { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookFilter.cs b/src/sample/generated/Models/WorkbookFilter.cs index 41816acd..35ced735 100644 --- a/src/sample/generated/Models/WorkbookFilter.cs +++ b/src/sample/generated/Models/WorkbookFilter.cs @@ -1,43 +1,56 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookFilter : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookFilter : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The criteria property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookFilterCriteria? Criteria { get; set; } + public global::ApiSdk.Models.WorkbookFilterCriteria? Criteria { get; set; } #nullable restore #else - public WorkbookFilterCriteria Criteria { get; set; } + public global::ApiSdk.Models.WorkbookFilterCriteria Criteria { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookFilter CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookFilter CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookFilter(); + return new global::ApiSdk.Models.WorkbookFilter(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"criteria", n => { Criteria = n.GetObjectValue(WorkbookFilterCriteria.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "criteria", n => { Criteria = n.GetObjectValue(global::ApiSdk.Models.WorkbookFilterCriteria.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("criteria", Criteria); + writer.WriteObjectValue("criteria", Criteria); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookFilterCriteria.cs b/src/sample/generated/Models/WorkbookFilterCriteria.cs index 5088e1bf..7f6c096f 100644 --- a/src/sample/generated/Models/WorkbookFilterCriteria.cs +++ b/src/sample/generated/Models/WorkbookFilterCriteria.cs @@ -1,14 +1,20 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookFilterCriteria : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookFilterCriteria : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The color property + /// The color applied to the cell. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Color { get; set; } @@ -16,7 +22,7 @@ public class WorkbookFilterCriteria : IAdditionalDataHolder, IParsable { #else public string Color { get; set; } #endif - /// The criterion1 property + /// A custom criterion. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Criterion1 { get; set; } @@ -24,7 +30,7 @@ public class WorkbookFilterCriteria : IAdditionalDataHolder, IParsable { #else public string Criterion1 { get; set; } #endif - /// The criterion2 property + /// A custom criterion. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Criterion2 { get; set; } @@ -32,7 +38,7 @@ public class WorkbookFilterCriteria : IAdditionalDataHolder, IParsable { #else public string Criterion2 { get; set; } #endif - /// The dynamicCriteria property + /// A dynamic formula specified in a custom filter. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DynamicCriteria { get; set; } @@ -40,7 +46,7 @@ public class WorkbookFilterCriteria : IAdditionalDataHolder, IParsable { #else public string DynamicCriteria { get; set; } #endif - /// The filterOn property + /// Indicates whether a filter is applied to a column. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? FilterOn { get; set; } @@ -51,12 +57,12 @@ public class WorkbookFilterCriteria : IAdditionalDataHolder, IParsable { /// The icon property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookIcon? Icon { get; set; } + public global::ApiSdk.Models.WorkbookIcon? Icon { get; set; } #nullable restore #else - public WorkbookIcon Icon { get; set; } + public global::ApiSdk.Models.WorkbookIcon Icon { get; set; } #endif - /// The operator property + /// An operator in a cell; for example, =, >, <, <=, or <>. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Operator { get; set; } @@ -67,55 +73,63 @@ public class WorkbookFilterCriteria : IAdditionalDataHolder, IParsable { /// The values property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? Values { get; set; } + public global::ApiSdk.Models.Json? Values { get; set; } #nullable restore #else - public Json Values { get; set; } + public global::ApiSdk.Models.Json Values { get; set; } #endif /// - /// Instantiates a new workbookFilterCriteria and sets the default values. + /// Instantiates a new and sets the default values. /// - public WorkbookFilterCriteria() { + public WorkbookFilterCriteria() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static WorkbookFilterCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.WorkbookFilterCriteria CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookFilterCriteria(); + return new global::ApiSdk.Models.WorkbookFilterCriteria(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"color", n => { Color = n.GetStringValue(); } }, - {"criterion1", n => { Criterion1 = n.GetStringValue(); } }, - {"criterion2", n => { Criterion2 = n.GetStringValue(); } }, - {"dynamicCriteria", n => { DynamicCriteria = n.GetStringValue(); } }, - {"filterOn", n => { FilterOn = n.GetStringValue(); } }, - {"icon", n => { Icon = n.GetObjectValue(WorkbookIcon.CreateFromDiscriminatorValue); } }, - {"operator", n => { Operator = n.GetStringValue(); } }, - {"values", n => { Values = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "color", n => { Color = n.GetStringValue(); } }, + { "criterion1", n => { Criterion1 = n.GetStringValue(); } }, + { "criterion2", n => { Criterion2 = n.GetStringValue(); } }, + { "dynamicCriteria", n => { DynamicCriteria = n.GetStringValue(); } }, + { "filterOn", n => { FilterOn = n.GetStringValue(); } }, + { "icon", n => { Icon = n.GetObjectValue(global::ApiSdk.Models.WorkbookIcon.CreateFromDiscriminatorValue); } }, + { "operator", n => { Operator = n.GetStringValue(); } }, + { "values", n => { Values = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteStringValue("criterion1", Criterion1); writer.WriteStringValue("criterion2", Criterion2); writer.WriteStringValue("dynamicCriteria", DynamicCriteria); writer.WriteStringValue("filterOn", FilterOn); - writer.WriteObjectValue("icon", Icon); + writer.WriteObjectValue("icon", Icon); writer.WriteStringValue("operator", Operator); - writer.WriteObjectValue("values", Values); + writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookFunctions.cs b/src/sample/generated/Models/WorkbookFunctions.cs index 6b822745..378a376f 100644 --- a/src/sample/generated/Models/WorkbookFunctions.cs +++ b/src/sample/generated/Models/WorkbookFunctions.cs @@ -1,33 +1,46 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookFunctions : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookFunctions : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookFunctions CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookFunctions CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookFunctions(); + return new global::ApiSdk.Models.WorkbookFunctions(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookIcon.cs b/src/sample/generated/Models/WorkbookIcon.cs index 38a2b2f5..eed65571 100644 --- a/src/sample/generated/Models/WorkbookIcon.cs +++ b/src/sample/generated/Models/WorkbookIcon.cs @@ -1,16 +1,22 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookIcon : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookIcon : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// Represents the index of the icon in the given set. + /// The index of the icon in the given set. public int? Index { get; set; } - /// Represents the set that the icon is part of. The possible values are: Invalid, ThreeArrows, ThreeArrowsGray, ThreeFlags, ThreeTrafficLights1, ThreeTrafficLights2, ThreeSigns, ThreeSymbols, ThreeSymbols2, FourArrows, FourArrowsGray, FourRedToBlack, FourRating, FourTrafficLights, FiveArrows, FiveArrowsGray, FiveRating, FiveQuarters, ThreeStars, ThreeTriangles, FiveBoxes. + /// The set that the icon is part of. The possible values are: Invalid, ThreeArrows, ThreeArrowsGray, ThreeFlags, ThreeTrafficLights1, ThreeTrafficLights2, ThreeSigns, ThreeSymbols, ThreeSymbols2, FourArrows, FourArrowsGray, FourRedToBlack, FourRating, FourTrafficLights, FiveArrows, FiveArrowsGray, FiveRating, FiveQuarters, ThreeStars, ThreeTriangles, FiveBoxes. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Set { get; set; } @@ -19,33 +25,40 @@ public class WorkbookIcon : IAdditionalDataHolder, IParsable { public string Set { get; set; } #endif /// - /// Instantiates a new workbookIcon and sets the default values. + /// Instantiates a new and sets the default values. /// - public WorkbookIcon() { + public WorkbookIcon() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static WorkbookIcon CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.WorkbookIcon CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookIcon(); + return new global::ApiSdk.Models.WorkbookIcon(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"index", n => { Index = n.GetIntValue(); } }, - {"set", n => { Set = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "index", n => { Index = n.GetIntValue(); } }, + { "set", n => { Set = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("index", Index); writer.WriteStringValue("set", Set); @@ -53,3 +66,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookNamedItem.cs b/src/sample/generated/Models/WorkbookNamedItem.cs index 69860541..5c34e75e 100644 --- a/src/sample/generated/Models/WorkbookNamedItem.cs +++ b/src/sample/generated/Models/WorkbookNamedItem.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookNamedItem : Entity, IParsable { - /// Represents the comment associated with this name. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookNamedItem : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The comment associated with this name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Comment { get; set; } @@ -30,7 +36,7 @@ public class WorkbookNamedItem : Entity, IParsable { #else public string Scope { get; set; } #endif - /// Indicates what type of reference is associated with the name. The possible values are: String, Integer, Double, Boolean, Range. Read-only. + /// The type of reference is associated with the name. Possible values are: String, Integer, Double, Boolean, Range. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Type { get; set; } @@ -41,57 +47,64 @@ public class WorkbookNamedItem : Entity, IParsable { /// The value property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? Value { get; set; } + public global::ApiSdk.Models.Json? Value { get; set; } #nullable restore #else - public Json Value { get; set; } + public global::ApiSdk.Models.Json Value { get; set; } #endif - /// Specifies whether the object is visible or not. + /// Indicates whether the object is visible. public bool? Visible { get; set; } /// The worksheet property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookWorksheet? Worksheet { get; set; } + public global::ApiSdk.Models.WorkbookWorksheet? Worksheet { get; set; } #nullable restore #else - public WorkbookWorksheet Worksheet { get; set; } + public global::ApiSdk.Models.WorkbookWorksheet Worksheet { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookNamedItem CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookNamedItem CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookNamedItem(); + return new global::ApiSdk.Models.WorkbookNamedItem(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"comment", n => { Comment = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"scope", n => { Scope = n.GetStringValue(); } }, - {"type", n => { Type = n.GetStringValue(); } }, - {"value", n => { Value = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, - {"visible", n => { Visible = n.GetBoolValue(); } }, - {"worksheet", n => { Worksheet = n.GetObjectValue(WorkbookWorksheet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "comment", n => { Comment = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "scope", n => { Scope = n.GetStringValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "value", n => { Value = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, + { "visible", n => { Visible = n.GetBoolValue(); } }, + { "worksheet", n => { Worksheet = n.GetObjectValue(global::ApiSdk.Models.WorkbookWorksheet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("comment", Comment); writer.WriteStringValue("name", Name); writer.WriteStringValue("scope", Scope); writer.WriteStringValue("type", Type); - writer.WriteObjectValue("value", Value); + writer.WriteObjectValue("value", Value); writer.WriteBoolValue("visible", Visible); - writer.WriteObjectValue("worksheet", Worksheet); + writer.WriteObjectValue("worksheet", Worksheet); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookOperation.cs b/src/sample/generated/Models/WorkbookOperation.cs index 0d8eb076..1bc481d7 100644 --- a/src/sample/generated/Models/WorkbookOperation.cs +++ b/src/sample/generated/Models/WorkbookOperation.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookOperation : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookOperation : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The error property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookOperationError? Error { get; set; } + public global::ApiSdk.Models.WorkbookOperationError? Error { get; set; } #nullable restore #else - public WorkbookOperationError Error { get; set; } + public global::ApiSdk.Models.WorkbookOperationError Error { get; set; } #endif /// The resource URI for the result. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -23,35 +29,42 @@ public class WorkbookOperation : Entity, IParsable { public string ResourceLocation { get; set; } #endif /// The status property - public WorkbookOperationStatus? Status { get; set; } + public global::ApiSdk.Models.WorkbookOperationStatus? Status { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookOperation CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookOperation CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookOperation(); + return new global::ApiSdk.Models.WorkbookOperation(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"error", n => { Error = n.GetObjectValue(WorkbookOperationError.CreateFromDiscriminatorValue); } }, - {"resourceLocation", n => { ResourceLocation = n.GetStringValue(); } }, - {"status", n => { Status = n.GetEnumValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "error", n => { Error = n.GetObjectValue(global::ApiSdk.Models.WorkbookOperationError.CreateFromDiscriminatorValue); } }, + { "resourceLocation", n => { ResourceLocation = n.GetStringValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("error", Error); + writer.WriteObjectValue("error", Error); writer.WriteStringValue("resourceLocation", ResourceLocation); - writer.WriteEnumValue("status", Status); + writer.WriteEnumValue("status", Status); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookOperationError.cs b/src/sample/generated/Models/WorkbookOperationError.cs index bdcf304d..568ffc7b 100644 --- a/src/sample/generated/Models/WorkbookOperationError.cs +++ b/src/sample/generated/Models/WorkbookOperationError.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookOperationError : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookOperationError : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The error code. @@ -19,10 +25,10 @@ public class WorkbookOperationError : IAdditionalDataHolder, IParsable { /// The innerError property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookOperationError? InnerError { get; set; } + public global::ApiSdk.Models.WorkbookOperationError? InnerError { get; set; } #nullable restore #else - public WorkbookOperationError InnerError { get; set; } + public global::ApiSdk.Models.WorkbookOperationError InnerError { get; set; } #endif /// The error message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -33,39 +39,47 @@ public class WorkbookOperationError : IAdditionalDataHolder, IParsable { public string Message { get; set; } #endif /// - /// Instantiates a new workbookOperationError and sets the default values. + /// Instantiates a new and sets the default values. /// - public WorkbookOperationError() { + public WorkbookOperationError() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static WorkbookOperationError CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.WorkbookOperationError CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookOperationError(); + return new global::ApiSdk.Models.WorkbookOperationError(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"code", n => { Code = n.GetStringValue(); } }, - {"innerError", n => { InnerError = n.GetObjectValue(WorkbookOperationError.CreateFromDiscriminatorValue); } }, - {"message", n => { Message = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "innerError", n => { InnerError = n.GetObjectValue(global::ApiSdk.Models.WorkbookOperationError.CreateFromDiscriminatorValue); } }, + { "message", n => { Message = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); - writer.WriteObjectValue("innerError", InnerError); + writer.WriteObjectValue("innerError", InnerError); writer.WriteStringValue("message", Message); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookOperationStatus.cs b/src/sample/generated/Models/WorkbookOperationStatus.cs index 9a1a51a8..84b774b1 100644 --- a/src/sample/generated/Models/WorkbookOperationStatus.cs +++ b/src/sample/generated/Models/WorkbookOperationStatus.cs @@ -1,15 +1,28 @@ // using System.Runtime.Serialization; using System; -namespace ApiSdk.Models { - public enum WorkbookOperationStatus { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum WorkbookOperationStatus + #pragma warning restore CS1591 + { [EnumMember(Value = "notStarted")] + #pragma warning disable CS1591 NotStarted, + #pragma warning restore CS1591 [EnumMember(Value = "running")] + #pragma warning disable CS1591 Running, + #pragma warning restore CS1591 [EnumMember(Value = "succeeded")] + #pragma warning disable CS1591 Succeeded, + #pragma warning restore CS1591 [EnumMember(Value = "failed")] + #pragma warning disable CS1591 Failed, + #pragma warning restore CS1591 } } diff --git a/src/sample/generated/Models/WorkbookPivotTable.cs b/src/sample/generated/Models/WorkbookPivotTable.cs index bc53cdf9..6360b59b 100644 --- a/src/sample/generated/Models/WorkbookPivotTable.cs +++ b/src/sample/generated/Models/WorkbookPivotTable.cs @@ -1,12 +1,18 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookPivotTable : Entity, IParsable { - /// Name of the PivotTable. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookPivotTable : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The name of the pivot table. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } @@ -17,37 +23,44 @@ public class WorkbookPivotTable : Entity, IParsable { /// The worksheet property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookWorksheet? Worksheet { get; set; } + public global::ApiSdk.Models.WorkbookWorksheet? Worksheet { get; set; } #nullable restore #else - public WorkbookWorksheet Worksheet { get; set; } + public global::ApiSdk.Models.WorkbookWorksheet Worksheet { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookPivotTable CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookPivotTable CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookPivotTable(); + return new global::ApiSdk.Models.WorkbookPivotTable(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"name", n => { Name = n.GetStringValue(); } }, - {"worksheet", n => { Worksheet = n.GetObjectValue(WorkbookWorksheet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "name", n => { Name = n.GetStringValue(); } }, + { "worksheet", n => { Worksheet = n.GetObjectValue(global::ApiSdk.Models.WorkbookWorksheet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); - writer.WriteObjectValue("worksheet", Worksheet); + writer.WriteObjectValue("worksheet", Worksheet); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookSortField.cs b/src/sample/generated/Models/WorkbookSortField.cs index 43393e33..b4fbf648 100644 --- a/src/sample/generated/Models/WorkbookSortField.cs +++ b/src/sample/generated/Models/WorkbookSortField.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookSortField : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookSortField : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Represents whether the sorting is done in an ascending fashion. @@ -29,10 +35,10 @@ public class WorkbookSortField : IAdditionalDataHolder, IParsable { /// The icon property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookIcon? Icon { get; set; } + public global::ApiSdk.Models.WorkbookIcon? Icon { get; set; } #nullable restore #else - public WorkbookIcon Icon { get; set; } + public global::ApiSdk.Models.WorkbookIcon Icon { get; set; } #endif /// Represents the column (or row, depending on the sort orientation) that the condition is on. Represented as an offset from the first column (or row). public int? Key { get; set; } @@ -45,45 +51,53 @@ public class WorkbookSortField : IAdditionalDataHolder, IParsable { public string SortOn { get; set; } #endif /// - /// Instantiates a new workbookSortField and sets the default values. + /// Instantiates a new and sets the default values. /// - public WorkbookSortField() { + public WorkbookSortField() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static WorkbookSortField CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.WorkbookSortField CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookSortField(); + return new global::ApiSdk.Models.WorkbookSortField(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"ascending", n => { Ascending = n.GetBoolValue(); } }, - {"color", n => { Color = n.GetStringValue(); } }, - {"dataOption", n => { DataOption = n.GetStringValue(); } }, - {"icon", n => { Icon = n.GetObjectValue(WorkbookIcon.CreateFromDiscriminatorValue); } }, - {"key", n => { Key = n.GetIntValue(); } }, - {"sortOn", n => { SortOn = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "ascending", n => { Ascending = n.GetBoolValue(); } }, + { "color", n => { Color = n.GetStringValue(); } }, + { "dataOption", n => { DataOption = n.GetStringValue(); } }, + { "icon", n => { Icon = n.GetObjectValue(global::ApiSdk.Models.WorkbookIcon.CreateFromDiscriminatorValue); } }, + { "key", n => { Key = n.GetIntValue(); } }, + { "sortOn", n => { SortOn = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("ascending", Ascending); writer.WriteStringValue("color", Color); writer.WriteStringValue("dataOption", DataOption); - writer.WriteObjectValue("icon", Icon); + writer.WriteObjectValue("icon", Icon); writer.WriteIntValue("key", Key); writer.WriteStringValue("sortOn", SortOn); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookTable.cs b/src/sample/generated/Models/WorkbookTable.cs index b7b321c7..18d5f1bd 100644 --- a/src/sample/generated/Models/WorkbookTable.cs +++ b/src/sample/generated/Models/WorkbookTable.cs @@ -1,24 +1,30 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookTable : Entity, IParsable { - /// Represents a collection of all the columns in the table. Read-only. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookTable : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The list of all the columns in the table. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Columns { get; set; } + public List? Columns { get; set; } #nullable restore #else - public List Columns { get; set; } + public List Columns { get; set; } #endif /// Indicates whether the first column contains special formatting. public bool? HighlightFirstColumn { get; set; } /// Indicates whether the last column contains special formatting. public bool? HighlightLastColumn { get; set; } - /// Legacy ID used in older Excel clients. The value of the identifier remains the same even when the table is renamed. This property should be interpreted as an opaque string value and shouldn't be parsed to any other type. Read-only. + /// A legacy identifier used in older Excel clients. The value of the identifier remains the same even when the table is renamed. This property should be interpreted as an opaque string value and shouldn't be parsed to any other type. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? LegacyId { get; set; } @@ -26,7 +32,7 @@ public class WorkbookTable : Entity, IParsable { #else public string LegacyId { get; set; } #endif - /// Name of the table. + /// The name of the table. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } @@ -34,13 +40,13 @@ public class WorkbookTable : Entity, IParsable { #else public string Name { get; set; } #endif - /// Represents a collection of all the rows in the table. Read-only. + /// The list of all the rows in the table. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Rows { get; set; } + public List? Rows { get; set; } #nullable restore #else - public List Rows { get; set; } + public List Rows { get; set; } #endif /// Indicates whether the columns show banded formatting in which odd columns are highlighted differently from even ones to make reading the table easier. public bool? ShowBandedColumns { get; set; } @@ -55,12 +61,12 @@ public class WorkbookTable : Entity, IParsable { /// The sort property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookTableSort? Sort { get; set; } + public global::ApiSdk.Models.WorkbookTableSort? Sort { get; set; } #nullable restore #else - public WorkbookTableSort Sort { get; set; } + public global::ApiSdk.Models.WorkbookTableSort Sort { get; set; } #endif - /// Constant value that represents the Table style. The possible values are: TableStyleLight1 through TableStyleLight21, TableStyleMedium1 through TableStyleMedium28, TableStyleStyleDark1 through TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. + /// A constant value that represents the Table style. Possible values are: TableStyleLight1 through TableStyleLight21, TableStyleMedium1 through TableStyleMedium28, TableStyleStyleDark1 through TableStyleStyleDark11. A custom user-defined style present in the workbook can also be specified. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Style { get; set; } @@ -71,61 +77,68 @@ public class WorkbookTable : Entity, IParsable { /// The worksheet property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookWorksheet? Worksheet { get; set; } + public global::ApiSdk.Models.WorkbookWorksheet? Worksheet { get; set; } #nullable restore #else - public WorkbookWorksheet Worksheet { get; set; } + public global::ApiSdk.Models.WorkbookWorksheet Worksheet { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookTable CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookTable CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookTable(); + return new global::ApiSdk.Models.WorkbookTable(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"columns", n => { Columns = n.GetCollectionOfObjectValues(WorkbookTableColumn.CreateFromDiscriminatorValue)?.ToList(); } }, - {"highlightFirstColumn", n => { HighlightFirstColumn = n.GetBoolValue(); } }, - {"highlightLastColumn", n => { HighlightLastColumn = n.GetBoolValue(); } }, - {"legacyId", n => { LegacyId = n.GetStringValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"rows", n => { Rows = n.GetCollectionOfObjectValues(WorkbookTableRow.CreateFromDiscriminatorValue)?.ToList(); } }, - {"showBandedColumns", n => { ShowBandedColumns = n.GetBoolValue(); } }, - {"showBandedRows", n => { ShowBandedRows = n.GetBoolValue(); } }, - {"showFilterButton", n => { ShowFilterButton = n.GetBoolValue(); } }, - {"showHeaders", n => { ShowHeaders = n.GetBoolValue(); } }, - {"showTotals", n => { ShowTotals = n.GetBoolValue(); } }, - {"sort", n => { Sort = n.GetObjectValue(WorkbookTableSort.CreateFromDiscriminatorValue); } }, - {"style", n => { Style = n.GetStringValue(); } }, - {"worksheet", n => { Worksheet = n.GetObjectValue(WorkbookWorksheet.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "columns", n => { Columns = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookTableColumn.CreateFromDiscriminatorValue)?.AsList(); } }, + { "highlightFirstColumn", n => { HighlightFirstColumn = n.GetBoolValue(); } }, + { "highlightLastColumn", n => { HighlightLastColumn = n.GetBoolValue(); } }, + { "legacyId", n => { LegacyId = n.GetStringValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "rows", n => { Rows = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookTableRow.CreateFromDiscriminatorValue)?.AsList(); } }, + { "showBandedColumns", n => { ShowBandedColumns = n.GetBoolValue(); } }, + { "showBandedRows", n => { ShowBandedRows = n.GetBoolValue(); } }, + { "showFilterButton", n => { ShowFilterButton = n.GetBoolValue(); } }, + { "showHeaders", n => { ShowHeaders = n.GetBoolValue(); } }, + { "showTotals", n => { ShowTotals = n.GetBoolValue(); } }, + { "sort", n => { Sort = n.GetObjectValue(global::ApiSdk.Models.WorkbookTableSort.CreateFromDiscriminatorValue); } }, + { "style", n => { Style = n.GetStringValue(); } }, + { "worksheet", n => { Worksheet = n.GetObjectValue(global::ApiSdk.Models.WorkbookWorksheet.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("columns", Columns); + writer.WriteCollectionOfObjectValues("columns", Columns); writer.WriteBoolValue("highlightFirstColumn", HighlightFirstColumn); writer.WriteBoolValue("highlightLastColumn", HighlightLastColumn); writer.WriteStringValue("legacyId", LegacyId); writer.WriteStringValue("name", Name); - writer.WriteCollectionOfObjectValues("rows", Rows); + writer.WriteCollectionOfObjectValues("rows", Rows); writer.WriteBoolValue("showBandedColumns", ShowBandedColumns); writer.WriteBoolValue("showBandedRows", ShowBandedRows); writer.WriteBoolValue("showFilterButton", ShowFilterButton); writer.WriteBoolValue("showHeaders", ShowHeaders); writer.WriteBoolValue("showTotals", ShowTotals); - writer.WriteObjectValue("sort", Sort); + writer.WriteObjectValue("sort", Sort); writer.WriteStringValue("style", Style); - writer.WriteObjectValue("worksheet", Worksheet); + writer.WriteObjectValue("worksheet", Worksheet); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookTableColumn.cs b/src/sample/generated/Models/WorkbookTableColumn.cs index 6658f513..d634ceca 100644 --- a/src/sample/generated/Models/WorkbookTableColumn.cs +++ b/src/sample/generated/Models/WorkbookTableColumn.cs @@ -1,22 +1,28 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookTableColumn : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookTableColumn : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The filter property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookFilter? Filter { get; set; } + public global::ApiSdk.Models.WorkbookFilter? Filter { get; set; } #nullable restore #else - public WorkbookFilter Filter { get; set; } + public global::ApiSdk.Models.WorkbookFilter Filter { get; set; } #endif - /// Returns the index number of the column within the columns collection of the table. Zero-indexed. Read-only. + /// The index of the column within the columns collection of the table. Zero-indexed. Read-only. public int? Index { get; set; } - /// Returns the name of the table column. + /// The name of the table column. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } @@ -27,41 +33,48 @@ public class WorkbookTableColumn : Entity, IParsable { /// The values property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? Values { get; set; } + public global::ApiSdk.Models.Json? Values { get; set; } #nullable restore #else - public Json Values { get; set; } + public global::ApiSdk.Models.Json Values { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookTableColumn CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookTableColumn CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookTableColumn(); + return new global::ApiSdk.Models.WorkbookTableColumn(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"filter", n => { Filter = n.GetObjectValue(WorkbookFilter.CreateFromDiscriminatorValue); } }, - {"index", n => { Index = n.GetIntValue(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"values", n => { Values = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "filter", n => { Filter = n.GetObjectValue(global::ApiSdk.Models.WorkbookFilter.CreateFromDiscriminatorValue); } }, + { "index", n => { Index = n.GetIntValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "values", n => { Values = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("filter", Filter); + writer.WriteObjectValue("filter", Filter); writer.WriteIntValue("index", Index); writer.WriteStringValue("name", Name); - writer.WriteObjectValue("values", Values); + writer.WriteObjectValue("values", Values); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookTableRow.cs b/src/sample/generated/Models/WorkbookTableRow.cs index 5f09b131..1657a9a4 100644 --- a/src/sample/generated/Models/WorkbookTableRow.cs +++ b/src/sample/generated/Models/WorkbookTableRow.cs @@ -1,47 +1,60 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookTableRow : Entity, IParsable { - /// Returns the index number of the row within the rows collection of the table. Zero-indexed. Read-only. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookTableRow : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The index of the row within the rows collection of the table. Zero-based. Read-only. public int? Index { get; set; } /// The values property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public Json? Values { get; set; } + public global::ApiSdk.Models.Json? Values { get; set; } #nullable restore #else - public Json Values { get; set; } + public global::ApiSdk.Models.Json Values { get; set; } #endif /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookTableRow CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookTableRow CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookTableRow(); + return new global::ApiSdk.Models.WorkbookTableRow(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"index", n => { Index = n.GetIntValue(); } }, - {"values", n => { Values = n.GetObjectValue(Json.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "index", n => { Index = n.GetIntValue(); } }, + { "values", n => { Values = n.GetObjectValue(global::ApiSdk.Models.Json.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("index", Index); - writer.WriteObjectValue("values", Values); + writer.WriteObjectValue("values", Values); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookTableSort.cs b/src/sample/generated/Models/WorkbookTableSort.cs index cee07429..d1b4a614 100644 --- a/src/sample/generated/Models/WorkbookTableSort.cs +++ b/src/sample/generated/Models/WorkbookTableSort.cs @@ -1,22 +1,28 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookTableSort : Entity, IParsable { - /// Represents the current conditions used to last sort the table. Read-only. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookTableSort : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The list of the current conditions last used to sort the table. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Fields { get; set; } + public List? Fields { get; set; } #nullable restore #else - public List Fields { get; set; } + public List Fields { get; set; } #endif - /// Represents whether the casing impacted the last sort of the table. Read-only. + /// Indicates whether the casing impacted the last sort of the table. Read-only. public bool? MatchCase { get; set; } - /// Represents Chinese character ordering method last used to sort the table. The possible values are: PinYin, StrokeCount. Read-only. + /// The Chinese character ordering method last used to sort the table. The possible values are: PinYin, StrokeCount. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Method { get; set; } @@ -27,31 +33,38 @@ public class WorkbookTableSort : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookTableSort CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookTableSort CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookTableSort(); + return new global::ApiSdk.Models.WorkbookTableSort(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"fields", n => { Fields = n.GetCollectionOfObjectValues(WorkbookSortField.CreateFromDiscriminatorValue)?.ToList(); } }, - {"matchCase", n => { MatchCase = n.GetBoolValue(); } }, - {"method", n => { Method = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "fields", n => { Fields = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookSortField.CreateFromDiscriminatorValue)?.AsList(); } }, + { "matchCase", n => { MatchCase = n.GetBoolValue(); } }, + { "method", n => { Method = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("fields", Fields); + writer.WriteCollectionOfObjectValues("fields", Fields); writer.WriteBoolValue("matchCase", MatchCase); writer.WriteStringValue("method", Method); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookWorksheet.cs b/src/sample/generated/Models/WorkbookWorksheet.cs index 02684f0b..f2ab871b 100644 --- a/src/sample/generated/Models/WorkbookWorksheet.cs +++ b/src/sample/generated/Models/WorkbookWorksheet.cs @@ -1,18 +1,24 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookWorksheet : Entity, IParsable { - /// Returns collection of charts that are part of the worksheet. Read-only. +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookWorksheet : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The list of charts that are part of the worksheet. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Charts { get; set; } + public List? Charts { get; set; } #nullable restore #else - public List Charts { get; set; } + public List Charts { get; set; } #endif /// The display name of the worksheet. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -22,41 +28,41 @@ public class WorkbookWorksheet : Entity, IParsable { #else public string Name { get; set; } #endif - /// Returns collection of names that are associated with the worksheet. Read-only. + /// The list of names that are associated with the worksheet. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Names { get; set; } + public List? Names { get; set; } #nullable restore #else - public List Names { get; set; } + public List Names { get; set; } #endif - /// Collection of PivotTables that are part of the worksheet. + /// The list of piot tables that are part of the worksheet. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? PivotTables { get; set; } + public List? PivotTables { get; set; } #nullable restore #else - public List PivotTables { get; set; } + public List PivotTables { get; set; } #endif /// The zero-based position of the worksheet within the workbook. public int? Position { get; set; } /// The protection property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookWorksheetProtection? Protection { get; set; } + public global::ApiSdk.Models.WorkbookWorksheetProtection? Protection { get; set; } #nullable restore #else - public WorkbookWorksheetProtection Protection { get; set; } + public global::ApiSdk.Models.WorkbookWorksheetProtection Protection { get; set; } #endif - /// Collection of tables that are part of the worksheet. Read-only. + /// The list of tables that are part of the worksheet. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Tables { get; set; } + public List? Tables { get; set; } #nullable restore #else - public List Tables { get; set; } + public List Tables { get; set; } #endif - /// The Visibility of the worksheet. The possible values are: Visible, Hidden, VeryHidden. + /// The visibility of the worksheet. The possible values are: Visible, Hidden, VeryHidden. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Visibility { get; set; } @@ -67,41 +73,48 @@ public class WorkbookWorksheet : Entity, IParsable { /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookWorksheet CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookWorksheet CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookWorksheet(); + return new global::ApiSdk.Models.WorkbookWorksheet(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"charts", n => { Charts = n.GetCollectionOfObjectValues(WorkbookChart.CreateFromDiscriminatorValue)?.ToList(); } }, - {"name", n => { Name = n.GetStringValue(); } }, - {"names", n => { Names = n.GetCollectionOfObjectValues(WorkbookNamedItem.CreateFromDiscriminatorValue)?.ToList(); } }, - {"pivotTables", n => { PivotTables = n.GetCollectionOfObjectValues(WorkbookPivotTable.CreateFromDiscriminatorValue)?.ToList(); } }, - {"position", n => { Position = n.GetIntValue(); } }, - {"protection", n => { Protection = n.GetObjectValue(WorkbookWorksheetProtection.CreateFromDiscriminatorValue); } }, - {"tables", n => { Tables = n.GetCollectionOfObjectValues(WorkbookTable.CreateFromDiscriminatorValue)?.ToList(); } }, - {"visibility", n => { Visibility = n.GetStringValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "charts", n => { Charts = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookChart.CreateFromDiscriminatorValue)?.AsList(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "names", n => { Names = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookNamedItem.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pivotTables", n => { PivotTables = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookPivotTable.CreateFromDiscriminatorValue)?.AsList(); } }, + { "position", n => { Position = n.GetIntValue(); } }, + { "protection", n => { Protection = n.GetObjectValue(global::ApiSdk.Models.WorkbookWorksheetProtection.CreateFromDiscriminatorValue); } }, + { "tables", n => { Tables = n.GetCollectionOfObjectValues(global::ApiSdk.Models.WorkbookTable.CreateFromDiscriminatorValue)?.AsList(); } }, + { "visibility", n => { Visibility = n.GetStringValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteCollectionOfObjectValues("charts", Charts); + writer.WriteCollectionOfObjectValues("charts", Charts); writer.WriteStringValue("name", Name); - writer.WriteCollectionOfObjectValues("names", Names); - writer.WriteCollectionOfObjectValues("pivotTables", PivotTables); + writer.WriteCollectionOfObjectValues("names", Names); + writer.WriteCollectionOfObjectValues("pivotTables", PivotTables); writer.WriteIntValue("position", Position); - writer.WriteObjectValue("protection", Protection); - writer.WriteCollectionOfObjectValues("tables", Tables); + writer.WriteObjectValue("protection", Protection); + writer.WriteCollectionOfObjectValues("tables", Tables); writer.WriteStringValue("visibility", Visibility); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookWorksheetProtection.cs b/src/sample/generated/Models/WorkbookWorksheetProtection.cs index 170af2cf..8ba3829b 100644 --- a/src/sample/generated/Models/WorkbookWorksheetProtection.cs +++ b/src/sample/generated/Models/WorkbookWorksheetProtection.cs @@ -1,47 +1,60 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookWorksheetProtection : Entity, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookWorksheetProtection : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { /// The options property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public WorkbookWorksheetProtectionOptions? Options { get; set; } + public global::ApiSdk.Models.WorkbookWorksheetProtectionOptions? Options { get; set; } #nullable restore #else - public WorkbookWorksheetProtectionOptions Options { get; set; } + public global::ApiSdk.Models.WorkbookWorksheetProtectionOptions Options { get; set; } #endif - /// Indicates if the worksheet is protected. Read-only. + /// Indicates whether the worksheet is protected. Read-only. public bool? Protected { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static new WorkbookWorksheetProtection CreateFromDiscriminatorValue(IParseNode parseNode) { + public static new global::ApiSdk.Models.WorkbookWorksheetProtection CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookWorksheetProtection(); + return new global::ApiSdk.Models.WorkbookWorksheetProtection(); } /// /// The deserialization information for the current model /// - public new IDictionary> GetFieldDeserializers() { - return new Dictionary>(base.GetFieldDeserializers()) { - {"options", n => { Options = n.GetObjectValue(WorkbookWorksheetProtectionOptions.CreateFromDiscriminatorValue); } }, - {"protected", n => { Protected = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "options", n => { Options = n.GetObjectValue(global::ApiSdk.Models.WorkbookWorksheetProtectionOptions.CreateFromDiscriminatorValue); } }, + { "protected", n => { Protected = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public new void Serialize(ISerializationWriter writer) { + public override void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); - writer.WriteObjectValue("options", Options); + writer.WriteObjectValue("options", Options); writer.WriteBoolValue("protected", Protected); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkbookWorksheetProtectionOptions.cs b/src/sample/generated/Models/WorkbookWorksheetProtectionOptions.cs index 8a814b2e..ecf5b0d6 100644 --- a/src/sample/generated/Models/WorkbookWorksheetProtectionOptions.cs +++ b/src/sample/generated/Models/WorkbookWorksheetProtectionOptions.cs @@ -1,11 +1,17 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkbookWorksheetProtectionOptions : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkbookWorksheetProtectionOptions : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// Represents the worksheet protection option of allowing using auto filter feature. @@ -31,42 +37,49 @@ public class WorkbookWorksheetProtectionOptions : IAdditionalDataHolder, IParsab /// Represents the worksheet protection option of allowing using sort feature. public bool? AllowSort { get; set; } /// - /// Instantiates a new workbookWorksheetProtectionOptions and sets the default values. + /// Instantiates a new and sets the default values. /// - public WorkbookWorksheetProtectionOptions() { + public WorkbookWorksheetProtectionOptions() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static WorkbookWorksheetProtectionOptions CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.WorkbookWorksheetProtectionOptions CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkbookWorksheetProtectionOptions(); + return new global::ApiSdk.Models.WorkbookWorksheetProtectionOptions(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"allowAutoFilter", n => { AllowAutoFilter = n.GetBoolValue(); } }, - {"allowDeleteColumns", n => { AllowDeleteColumns = n.GetBoolValue(); } }, - {"allowDeleteRows", n => { AllowDeleteRows = n.GetBoolValue(); } }, - {"allowFormatCells", n => { AllowFormatCells = n.GetBoolValue(); } }, - {"allowFormatColumns", n => { AllowFormatColumns = n.GetBoolValue(); } }, - {"allowFormatRows", n => { AllowFormatRows = n.GetBoolValue(); } }, - {"allowInsertColumns", n => { AllowInsertColumns = n.GetBoolValue(); } }, - {"allowInsertHyperlinks", n => { AllowInsertHyperlinks = n.GetBoolValue(); } }, - {"allowInsertRows", n => { AllowInsertRows = n.GetBoolValue(); } }, - {"allowPivotTables", n => { AllowPivotTables = n.GetBoolValue(); } }, - {"allowSort", n => { AllowSort = n.GetBoolValue(); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "allowAutoFilter", n => { AllowAutoFilter = n.GetBoolValue(); } }, + { "allowDeleteColumns", n => { AllowDeleteColumns = n.GetBoolValue(); } }, + { "allowDeleteRows", n => { AllowDeleteRows = n.GetBoolValue(); } }, + { "allowFormatCells", n => { AllowFormatCells = n.GetBoolValue(); } }, + { "allowFormatColumns", n => { AllowFormatColumns = n.GetBoolValue(); } }, + { "allowFormatRows", n => { AllowFormatRows = n.GetBoolValue(); } }, + { "allowInsertColumns", n => { AllowInsertColumns = n.GetBoolValue(); } }, + { "allowInsertHyperlinks", n => { AllowInsertHyperlinks = n.GetBoolValue(); } }, + { "allowInsertRows", n => { AllowInsertRows = n.GetBoolValue(); } }, + { "allowPivotTables", n => { AllowPivotTables = n.GetBoolValue(); } }, + { "allowSort", n => { AllowSort = n.GetBoolValue(); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowAutoFilter", AllowAutoFilter); writer.WriteBoolValue("allowDeleteColumns", AllowDeleteColumns); @@ -83,3 +96,4 @@ public void Serialize(ISerializationWriter writer) { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkingHours.cs b/src/sample/generated/Models/WorkingHours.cs index cc0d23e1..e16c4d71 100644 --- a/src/sample/generated/Models/WorkingHours.cs +++ b/src/sample/generated/Models/WorkingHours.cs @@ -1,21 +1,27 @@ // +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; using System.IO; -using System.Linq; using System; -namespace ApiSdk.Models { - public class WorkingHours : IAdditionalDataHolder, IParsable { +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkingHours : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } /// The days of the week on which the user works. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? DaysOfWeek { get; set; } + public List? DaysOfWeek { get; set; } #nullable restore #else - public List DaysOfWeek { get; set; } + public List DaysOfWeek { get; set; } #endif /// The time of the day that the user stops working. public Time? EndTime { get; set; } @@ -24,47 +30,55 @@ public class WorkingHours : IAdditionalDataHolder, IParsable { /// The timeZone property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public TimeZoneBase? TimeZone { get; set; } + public global::ApiSdk.Models.TimeZoneBase? TimeZone { get; set; } #nullable restore #else - public TimeZoneBase TimeZone { get; set; } + public global::ApiSdk.Models.TimeZoneBase TimeZone { get; set; } #endif /// - /// Instantiates a new workingHours and sets the default values. + /// Instantiates a new and sets the default values. /// - public WorkingHours() { + public WorkingHours() + { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// + /// A /// The parse node to use to read the discriminator value and create the object - public static WorkingHours CreateFromDiscriminatorValue(IParseNode parseNode) { + public static global::ApiSdk.Models.WorkingHours CreateFromDiscriminatorValue(IParseNode parseNode) + { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new WorkingHours(); + return new global::ApiSdk.Models.WorkingHours(); } /// /// The deserialization information for the current model /// - public IDictionary> GetFieldDeserializers() { - return new Dictionary> { - {"daysOfWeek", n => { DaysOfWeek = n.GetCollectionOfEnumValues()?.ToList(); } }, - {"endTime", n => { EndTime = n.GetTimeValue(); } }, - {"startTime", n => { StartTime = n.GetTimeValue(); } }, - {"timeZone", n => { TimeZone = n.GetObjectValue(TimeZoneBase.CreateFromDiscriminatorValue); } }, + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "daysOfWeek", n => { DaysOfWeek = n.GetCollectionOfEnumValues()?.AsList(); } }, + { "endTime", n => { EndTime = n.GetTimeValue(); } }, + { "startTime", n => { StartTime = n.GetTimeValue(); } }, + { "timeZone", n => { TimeZone = n.GetObjectValue(global::ApiSdk.Models.TimeZoneBase.CreateFromDiscriminatorValue); } }, }; } /// /// Serializes information the current object /// /// Serialization writer to use to serialize this model - public void Serialize(ISerializationWriter writer) { + public virtual void Serialize(ISerializationWriter writer) + { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfEnumValues("daysOfWeek", DaysOfWeek); + writer.WriteCollectionOfEnumValues("daysOfWeek", DaysOfWeek); writer.WriteTimeValue("endTime", EndTime); writer.WriteTimeValue("startTime", StartTime); - writer.WriteObjectValue("timeZone", TimeZone); + writer.WriteObjectValue("timeZone", TimeZone); writer.WriteAdditionalData(AdditionalData); } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Models/WorkingTimeSchedule.cs b/src/sample/generated/Models/WorkingTimeSchedule.cs new file mode 100644 index 00000000..f77ad4ab --- /dev/null +++ b/src/sample/generated/Models/WorkingTimeSchedule.cs @@ -0,0 +1,46 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace ApiSdk.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class WorkingTimeSchedule : global::ApiSdk.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::ApiSdk.Models.WorkingTimeSchedule CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::ApiSdk.Models.WorkingTimeSchedule(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Count/CountRequestBuilder.cs index 679a9215..525864be 100644 --- a/src/sample/generated/Users/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Count { +namespace ApiSdk.Users.Count +{ /// /// Builds and executes requests for operations under \users\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var consistencyLevelOption = new Option("--consistency-level", description: "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries") { @@ -60,47 +67,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -124,3 +128,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/CreatedObjects/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/CreatedObjects/Count/CountRequestBuilder.cs index a4c30216..603c4859 100644 --- a/src/sample/generated/Users/Item/CreatedObjects/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/CreatedObjects/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.CreatedObjects.Count { +namespace ApiSdk.Users.Item.CreatedObjects.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\createdObjects\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -59,47 +66,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -123,3 +127,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/CreatedObjects/CreatedObjectsRequestBuilder.cs b/src/sample/generated/Users/Item/CreatedObjects/CreatedObjectsRequestBuilder.cs index 9898336b..9ae4cd27 100644 --- a/src/sample/generated/Users/Item/CreatedObjects/CreatedObjectsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/CreatedObjects/CreatedObjectsRequestBuilder.cs @@ -1,9 +1,11 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.CreatedObjects.Count; using ApiSdk.Users.Item.CreatedObjects.Item; using ApiSdk.Users.Item.CreatedObjects.MicrosoftGraphServicePrincipal; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -17,18 +19,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.CreatedObjects { +namespace ApiSdk.Users.Item.CreatedObjects +{ /// /// Builds and executes requests for operations under \users\{user-id}\createdObjects /// - public class CreatedObjectsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CreatedObjectsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.createdObjects.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new DirectoryObjectItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.CreatedObjects.Item.DirectoryObjectItemRequestBuilder(PathParameters); executables.Add(builder.BuildGetCommand()); commands.Add(builder.BuildMicrosoftGraphServicePrincipalByIdNavCommand()); return new(executables, commands); @@ -36,10 +43,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.CreatedObjects.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -49,12 +58,13 @@ public Command BuildCountNavCommand() { return command; } /// - /// Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Directory objects that the user created. Read-only. Nullable. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-createdobjects?view=graph-rest-1.0"; + command.Description = "Directory objects that the user created. Read-only. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -136,7 +146,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -150,10 +162,12 @@ public Command BuildListCommand() { /// /// The microsoftGraphServicePrincipal property /// - public Command BuildMicrosoftGraphServicePrincipalNavCommand() { + /// A + public Command BuildMicrosoftGraphServicePrincipalNavCommand() + { var command = new Command("microsoft-graph-service-principal"); command.Description = "The microsoftGraphServicePrincipal property"; - var builder = new MicrosoftGraphServicePrincipalRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.CreatedObjects.MicrosoftGraphServicePrincipal.MicrosoftGraphServicePrincipalRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -169,47 +183,44 @@ public Command BuildMicrosoftGraphServicePrincipalNavCommand() { return command; } /// - /// Instantiates a new CreatedObjectsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CreatedObjectsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public CreatedObjectsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new CreatedObjectsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CreatedObjectsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public CreatedObjectsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. This API is supported in the following national cloud deployments. + /// Directory objects that the user created. Read-only. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get a list of directory objects that were created by the user. This API returns only those directory objects that were created by a user who isn't in any administrator role; otherwise, it returns an empty object. This API is supported in the following national cloud deployments. + /// Directory objects that the user created. Read-only. Nullable. /// - public class CreatedObjectsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CreatedObjectsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -272,3 +283,4 @@ public class CreatedObjectsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/CreatedObjects/Item/DirectoryObjectItemRequestBuilder.cs b/src/sample/generated/Users/Item/CreatedObjects/Item/DirectoryObjectItemRequestBuilder.cs index 1f89d012..e99ccb6a 100644 --- a/src/sample/generated/Users/Item/CreatedObjects/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/CreatedObjects/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.CreatedObjects.Item.MicrosoftGraphServicePrincipal; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,15 +17,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.CreatedObjects.Item { +namespace ApiSdk.Users.Item.CreatedObjects.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\createdObjects\{directoryObject-id} /// - public class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder + { /// /// Directory objects that the user created. Read-only. Nullable. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Directory objects that the user created. Read-only. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -79,10 +86,12 @@ public Command BuildGetCommand() { /// /// The microsoftGraphServicePrincipal property /// - public Command BuildMicrosoftGraphServicePrincipalByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphServicePrincipalByIdNavCommand() + { var command = new Command("microsoft-graph-service-principal-by-id"); command.Description = "The microsoftGraphServicePrincipal property"; - var builder = new MicrosoftGraphServicePrincipalRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.CreatedObjects.Item.MicrosoftGraphServicePrincipal.MicrosoftGraphServicePrincipalRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -92,47 +101,44 @@ public Command BuildMicrosoftGraphServicePrincipalByIdNavCommand() { return command; } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/{directoryObject%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/{directoryObject%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// Directory objects that the user created. Read-only. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Directory objects that the user created. Read-only. Nullable. /// - public class DirectoryObjectItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -156,3 +162,4 @@ public class DirectoryObjectItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/CreatedObjects/Item/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs b/src/sample/generated/Users/Item/CreatedObjects/Item/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs index c822b6a3..b7f3e27b 100644 --- a/src/sample/generated/Users/Item/CreatedObjects/Item/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs +++ b/src/sample/generated/Users/Item/CreatedObjects/Item/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.CreatedObjects.Item.MicrosoftGraphServicePrincipal { +namespace ApiSdk.Users.Item.CreatedObjects.Item.MicrosoftGraphServicePrincipal +{ /// /// Builds and executes requests for operations under \users\{user-id}\createdObjects\{directoryObject-id}\microsoft.graph.servicePrincipal /// - public class MicrosoftGraphServicePrincipalRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphServicePrincipalRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -76,47 +83,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphServicePrincipalRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphServicePrincipalRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/{directoryObject%2Did}/microsoft.graph.servicePrincipal{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphServicePrincipalRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/{directoryObject%2Did}/microsoft.graph.servicePrincipal{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphServicePrincipalRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphServicePrincipalRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/{directoryObject%2Did}/microsoft.graph.servicePrincipal{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphServicePrincipalRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/{directoryObject%2Did}/microsoft.graph.servicePrincipal{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal /// - public class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -140,3 +144,4 @@ public class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/CreatedObjects/MicrosoftGraphServicePrincipal/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/CreatedObjects/MicrosoftGraphServicePrincipal/Count/CountRequestBuilder.cs index 06818f89..3a1e3553 100644 --- a/src/sample/generated/Users/Item/CreatedObjects/MicrosoftGraphServicePrincipal/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/CreatedObjects/MicrosoftGraphServicePrincipal/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.CreatedObjects.MicrosoftGraphServicePrincipal.Count { +namespace ApiSdk.Users.Item.CreatedObjects.MicrosoftGraphServicePrincipal.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\createdObjects\microsoft.graph.servicePrincipal\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -59,47 +66,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/microsoft.graph.servicePrincipal/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/microsoft.graph.servicePrincipal/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/microsoft.graph.servicePrincipal/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/microsoft.graph.servicePrincipal/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -123,3 +127,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/CreatedObjects/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs b/src/sample/generated/Users/Item/CreatedObjects/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs index 5773e02f..1976222a 100644 --- a/src/sample/generated/Users/Item/CreatedObjects/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs +++ b/src/sample/generated/Users/Item/CreatedObjects/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.CreatedObjects.MicrosoftGraphServicePrincipal.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.CreatedObjects.MicrosoftGraphServicePrincipal { +namespace ApiSdk.Users.Item.CreatedObjects.MicrosoftGraphServicePrincipal +{ /// /// Builds and executes requests for operations under \users\{user-id}\createdObjects\microsoft.graph.servicePrincipal /// - public class MicrosoftGraphServicePrincipalRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphServicePrincipalRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.CreatedObjects.MicrosoftGraphServicePrincipal.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -122,7 +131,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -134,47 +145,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphServicePrincipalRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphServicePrincipalRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/microsoft.graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphServicePrincipalRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/createdObjects/microsoft.graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphServicePrincipalRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphServicePrincipalRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/microsoft.graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphServicePrincipalRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/createdObjects/microsoft.graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -237,3 +245,4 @@ public class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/DirectReports/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/DirectReports/Count/CountRequestBuilder.cs index 2967b89c..bab1f350 100644 --- a/src/sample/generated/Users/Item/DirectReports/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/DirectReports/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.DirectReports.Count { +namespace ApiSdk.Users.Item.DirectReports.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\directReports\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/DirectReports/DirectReportsRequestBuilder.cs b/src/sample/generated/Users/Item/DirectReports/DirectReportsRequestBuilder.cs index ddf21caa..9216de6a 100644 --- a/src/sample/generated/Users/Item/DirectReports/DirectReportsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/DirectReports/DirectReportsRequestBuilder.cs @@ -1,10 +1,12 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.DirectReports.Count; using ApiSdk.Users.Item.DirectReports.Item; using ApiSdk.Users.Item.DirectReports.MicrosoftGraphOrgContact; using ApiSdk.Users.Item.DirectReports.MicrosoftGraphUser; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -18,18 +20,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.DirectReports { +namespace ApiSdk.Users.Item.DirectReports +{ /// /// Builds and executes requests for operations under \users\{user-id}\directReports /// - public class DirectReportsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectReportsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.directReports.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new DirectoryObjectItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.DirectReports.Item.DirectoryObjectItemRequestBuilder(PathParameters); executables.Add(builder.BuildGetCommand()); commands.Add(builder.BuildMicrosoftGraphOrgContactByIdNavCommand()); commands.Add(builder.BuildMicrosoftGraphUserByIdNavCommand()); @@ -38,10 +45,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.DirectReports.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -52,11 +61,12 @@ public Command BuildCountNavCommand() { } /// /// The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. - /// Find more info here /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-directreports?view=graph-rest-1.0"; + command.Description = "The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -145,7 +155,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -159,10 +171,12 @@ public Command BuildListCommand() { /// /// The microsoftGraphOrgContact property /// - public Command BuildMicrosoftGraphOrgContactNavCommand() { + /// A + public Command BuildMicrosoftGraphOrgContactNavCommand() + { var command = new Command("microsoft-graph-org-contact"); command.Description = "The microsoftGraphOrgContact property"; - var builder = new MicrosoftGraphOrgContactRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.DirectReports.MicrosoftGraphOrgContact.MicrosoftGraphOrgContactRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -180,10 +194,12 @@ public Command BuildMicrosoftGraphOrgContactNavCommand() { /// /// The microsoftGraphUser property /// - public Command BuildMicrosoftGraphUserNavCommand() { + /// A + public Command BuildMicrosoftGraphUserNavCommand() + { var command = new Command("microsoft-graph-user"); command.Description = "The microsoftGraphUser property"; - var builder = new MicrosoftGraphUserRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.DirectReports.MicrosoftGraphUser.MicrosoftGraphUserRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -199,47 +215,44 @@ public Command BuildMicrosoftGraphUserNavCommand() { return command; } /// - /// Instantiates a new DirectReportsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public DirectReportsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public DirectReportsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new DirectReportsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public DirectReportsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public DirectReportsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. /// - public class DirectReportsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectReportsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -302,3 +315,4 @@ public class DirectReportsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/DirectReports/Item/DirectoryObjectItemRequestBuilder.cs b/src/sample/generated/Users/Item/DirectReports/Item/DirectoryObjectItemRequestBuilder.cs index da092caa..a7612d96 100644 --- a/src/sample/generated/Users/Item/DirectReports/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/DirectReports/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.DirectReports.Item.MicrosoftGraphOrgContact; using ApiSdk.Users.Item.DirectReports.Item.MicrosoftGraphUser; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,15 +18,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.DirectReports.Item { +namespace ApiSdk.Users.Item.DirectReports.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\directReports\{directoryObject-id} /// - public class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder + { /// /// The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -87,10 +94,12 @@ public Command BuildGetCommand() { /// /// The microsoftGraphOrgContact property /// - public Command BuildMicrosoftGraphOrgContactByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphOrgContactByIdNavCommand() + { var command = new Command("microsoft-graph-org-contact-by-id"); command.Description = "The microsoftGraphOrgContact property"; - var builder = new MicrosoftGraphOrgContactRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.DirectReports.Item.MicrosoftGraphOrgContact.MicrosoftGraphOrgContactRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -102,10 +111,12 @@ public Command BuildMicrosoftGraphOrgContactByIdNavCommand() { /// /// The microsoftGraphUser property /// - public Command BuildMicrosoftGraphUserByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphUserByIdNavCommand() + { var command = new Command("microsoft-graph-user-by-id"); command.Description = "The microsoftGraphUser property"; - var builder = new MicrosoftGraphUserRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.DirectReports.Item.MicrosoftGraphUser.MicrosoftGraphUserRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -115,47 +126,44 @@ public Command BuildMicrosoftGraphUserByIdNavCommand() { return command; } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The users and contacts that report to the user. (The users and contacts that have their manager property set to this user.) Read-only. Nullable. Supports $expand. /// - public class DirectoryObjectItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -179,3 +187,4 @@ public class DirectoryObjectItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/DirectReports/Item/MicrosoftGraphOrgContact/MicrosoftGraphOrgContactRequestBuilder.cs b/src/sample/generated/Users/Item/DirectReports/Item/MicrosoftGraphOrgContact/MicrosoftGraphOrgContactRequestBuilder.cs index 3436bad6..8823ad39 100644 --- a/src/sample/generated/Users/Item/DirectReports/Item/MicrosoftGraphOrgContact/MicrosoftGraphOrgContactRequestBuilder.cs +++ b/src/sample/generated/Users/Item/DirectReports/Item/MicrosoftGraphOrgContact/MicrosoftGraphOrgContactRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.DirectReports.Item.MicrosoftGraphOrgContact { +namespace ApiSdk.Users.Item.DirectReports.Item.MicrosoftGraphOrgContact +{ /// /// Builds and executes requests for operations under \users\{user-id}\directReports\{directoryObject-id}\microsoft.graph.orgContact /// - public class MicrosoftGraphOrgContactRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphOrgContactRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphOrgContactRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphOrgContactRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}/microsoft.graph.orgContact{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphOrgContactRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}/microsoft.graph.orgContact{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphOrgContactRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphOrgContactRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}/microsoft.graph.orgContact{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphOrgContactRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}/microsoft.graph.orgContact{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.orgContact /// - public class MicrosoftGraphOrgContactRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphOrgContactRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphOrgContactRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/DirectReports/Item/MicrosoftGraphUser/MicrosoftGraphUserRequestBuilder.cs b/src/sample/generated/Users/Item/DirectReports/Item/MicrosoftGraphUser/MicrosoftGraphUserRequestBuilder.cs index 65634d12..69e4e0d3 100644 --- a/src/sample/generated/Users/Item/DirectReports/Item/MicrosoftGraphUser/MicrosoftGraphUserRequestBuilder.cs +++ b/src/sample/generated/Users/Item/DirectReports/Item/MicrosoftGraphUser/MicrosoftGraphUserRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.DirectReports.Item.MicrosoftGraphUser { +namespace ApiSdk.Users.Item.DirectReports.Item.MicrosoftGraphUser +{ /// /// Builds and executes requests for operations under \users\{user-id}\directReports\{directoryObject-id}\microsoft.graph.user /// - public class MicrosoftGraphUserRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphUserRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.user /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.user"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphUserRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphUserRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}/microsoft.graph.user{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphUserRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}/microsoft.graph.user{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphUserRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphUserRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}/microsoft.graph.user{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphUserRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/{directoryObject%2Did}/microsoft.graph.user{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.user /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.user /// - public class MicrosoftGraphUserRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphUserRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphUserRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphOrgContact/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphOrgContact/Count/CountRequestBuilder.cs index c7de0223..2e03ef0e 100644 --- a/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphOrgContact/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphOrgContact/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.DirectReports.MicrosoftGraphOrgContact.Count { +namespace ApiSdk.Users.Item.DirectReports.MicrosoftGraphOrgContact.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\directReports\microsoft.graph.orgContact\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.orgContact/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.orgContact/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.orgContact/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.orgContact/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphOrgContact/MicrosoftGraphOrgContactRequestBuilder.cs b/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphOrgContact/MicrosoftGraphOrgContactRequestBuilder.cs index 04f41568..4d71bc78 100644 --- a/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphOrgContact/MicrosoftGraphOrgContactRequestBuilder.cs +++ b/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphOrgContact/MicrosoftGraphOrgContactRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.DirectReports.MicrosoftGraphOrgContact.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.DirectReports.MicrosoftGraphOrgContact { +namespace ApiSdk.Users.Item.DirectReports.MicrosoftGraphOrgContact +{ /// /// Builds and executes requests for operations under \users\{user-id}\directReports\microsoft.graph.orgContact /// - public class MicrosoftGraphOrgContactRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphOrgContactRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.DirectReports.MicrosoftGraphOrgContact.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphOrgContactRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphOrgContactRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.orgContact{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphOrgContactRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.orgContact{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphOrgContactRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphOrgContactRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.orgContact{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphOrgContactRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.orgContact{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.orgContact in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphOrgContactRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphOrgContactRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphOrgContactRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphUser/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphUser/Count/CountRequestBuilder.cs index 95ec85f3..9e96b935 100644 --- a/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphUser/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphUser/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.DirectReports.MicrosoftGraphUser.Count { +namespace ApiSdk.Users.Item.DirectReports.MicrosoftGraphUser.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\directReports\microsoft.graph.user\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.user/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.user/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.user/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.user/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphUser/MicrosoftGraphUserRequestBuilder.cs b/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphUser/MicrosoftGraphUserRequestBuilder.cs index 2ff17c59..8ca5c191 100644 --- a/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphUser/MicrosoftGraphUserRequestBuilder.cs +++ b/src/sample/generated/Users/Item/DirectReports/MicrosoftGraphUser/MicrosoftGraphUserRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.DirectReports.MicrosoftGraphUser.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.DirectReports.MicrosoftGraphUser { +namespace ApiSdk.Users.Item.DirectReports.MicrosoftGraphUser +{ /// /// Builds and executes requests for operations under \users\{user-id}\directReports\microsoft.graph.user /// - public class MicrosoftGraphUserRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphUserRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.DirectReports.MicrosoftGraphUser.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphUserRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphUserRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphUserRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.user{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphUserRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphUserRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.user{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphUserRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/directReports/microsoft.graph.user{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.user in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphUserRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphUserRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphUserRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Extensions/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Extensions/Count/CountRequestBuilder.cs index 5a433a1a..aa0f40f5 100644 --- a/src/sample/generated/Users/Item/Extensions/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Extensions/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Extensions.Count { +namespace ApiSdk.Users.Item.Extensions.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\extensions\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -59,47 +66,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/extensions/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/extensions/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/extensions/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/extensions/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -123,3 +127,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Extensions/ExtensionsRequestBuilder.cs b/src/sample/generated/Users/Item/Extensions/ExtensionsRequestBuilder.cs index 24a67918..fbcad3a5 100644 --- a/src/sample/generated/Users/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Extensions/ExtensionsRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Extensions.Count; using ApiSdk.Users.Item.Extensions.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,17 +18,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Extensions { +namespace ApiSdk.Users.Item.Extensions +{ /// /// Builds and executes requests for operations under \users\{user-id}\extensions /// - public class ExtensionsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.extensions.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); - var builder = new ExtensionItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Extensions.Item.ExtensionItemRequestBuilder(PathParameters); executables.Add(builder.BuildDeleteCommand()); executables.Add(builder.BuildGetCommand()); executables.Add(builder.BuildPatchCommand()); @@ -35,10 +42,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Extensions.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -50,7 +59,9 @@ public Command BuildCountNavCommand() { /// /// Create new navigation property to extensions for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); command.Description = "Create new navigation property to extensions for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -75,8 +86,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(Extension.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -99,7 +110,9 @@ public Command BuildCreateCommand() { /// /// The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); command.Description = "The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -183,7 +196,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -195,75 +210,65 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new ExtensionsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ExtensionsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public ExtensionsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/extensions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new ExtensionsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ExtensionsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public ExtensionsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/extensions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Create new navigation property to extensions for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Extension body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.Extension body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(Extension body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.Extension body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. /// - public class ExtensionsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -326,3 +331,4 @@ public class ExtensionsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/sample/generated/Users/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 972cc7f9..c694aac1 100644 --- a/src/sample/generated/Users/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Extensions.Item { +namespace ApiSdk.Users.Item.Extensions.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\extensions\{extension-id} /// - public class ExtensionItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionItemRequestBuilder : BaseCliRequestBuilder + { /// /// Delete navigation property extensions for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); command.Description = "Delete navigation property extensions for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -73,7 +80,9 @@ public Command BuildDeleteCommand() { /// /// The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { /// /// Update the navigation property extensions in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); command.Description = "Update the navigation property extensions in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -159,8 +170,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(Extension.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -182,100 +193,84 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new ExtensionItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ExtensionItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/extensions/{extension%2Did}{?%24select,%24expand}", pathParameters) { + public ExtensionItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/extensions/{extension%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new ExtensionItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ExtensionItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/extensions/{extension%2Did}{?%24select,%24expand}", rawUrl) { + public ExtensionItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/extensions/{extension%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// Delete navigation property extensions for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Update the navigation property extensions in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(Extension body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Extension body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(Extension body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Extension body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The collection of open extensions defined for the user. Read-only. Supports $expand. Nullable. /// - public class ExtensionItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -299,3 +294,4 @@ public class ExtensionItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/InsightsRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/InsightsRequestBuilder.cs new file mode 100644 index 00000000..9ec870a6 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/InsightsRequestBuilder.cs @@ -0,0 +1,363 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Insights.Shared; +using ApiSdk.Users.Item.Insights.Trending; +using ApiSdk.Users.Item.Insights.Used; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InsightsRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property insights for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property insights for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// Represents relationships between a user and items such as OneDrive for work or school documents, calculated using advanced analytics and machine learning techniques. Read-only. Nullable. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Represents relationships between a user and items such as OneDrive for work or school documents, calculated using advanced analytics and machine learning techniques. Read-only. Nullable."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Update the navigation property insights in users + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the navigation property insights in users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.ItemInsights.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// The shared property + /// + /// A + public Command BuildSharedNavCommand() + { + var command = new Command("shared"); + command.Description = "The shared property"; + var builder = new global::ApiSdk.Users.Item.Insights.Shared.SharedRequestBuilder(PathParameters); + var execCommands = new List(); + var nonExecCommands = new List(); + nonExecCommands.Add(builder.BuildCountNavCommand()); + execCommands.Add(builder.BuildCreateCommand()); + execCommands.Add(builder.BuildListCommand()); + var cmds = builder.BuildCommand(); + execCommands.AddRange(cmds.Item1); + nonExecCommands.AddRange(cmds.Item2); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + foreach (var cmd in nonExecCommands.OrderBy(static c => c.Name, StringComparer.Ordinal)) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// The trending property + /// + /// A + public Command BuildTrendingNavCommand() + { + var command = new Command("trending"); + command.Description = "The trending property"; + var builder = new global::ApiSdk.Users.Item.Insights.Trending.TrendingRequestBuilder(PathParameters); + var execCommands = new List(); + var nonExecCommands = new List(); + nonExecCommands.Add(builder.BuildCountNavCommand()); + execCommands.Add(builder.BuildCreateCommand()); + execCommands.Add(builder.BuildListCommand()); + var cmds = builder.BuildCommand(); + execCommands.AddRange(cmds.Item1); + nonExecCommands.AddRange(cmds.Item2); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + foreach (var cmd in nonExecCommands.OrderBy(static c => c.Name, StringComparer.Ordinal)) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// The used property + /// + /// A + public Command BuildUsedNavCommand() + { + var command = new Command("used"); + command.Description = "The used property"; + var builder = new global::ApiSdk.Users.Item.Insights.Used.UsedRequestBuilder(PathParameters); + var execCommands = new List(); + var nonExecCommands = new List(); + nonExecCommands.Add(builder.BuildCountNavCommand()); + execCommands.Add(builder.BuildCreateCommand()); + execCommands.Add(builder.BuildListCommand()); + var cmds = builder.BuildCommand(); + execCommands.AddRange(cmds.Item1); + nonExecCommands.AddRange(cmds.Item2); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + foreach (var cmd in nonExecCommands.OrderBy(static c => c.Name, StringComparer.Ordinal)) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public InsightsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public InsightsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property insights for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Represents relationships between a user and items such as OneDrive for work or school documents, calculated using advanced analytics and machine learning techniques. Read-only. Nullable. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the navigation property insights in users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ItemInsights body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ItemInsights body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Represents relationships between a user and items such as OneDrive for work or school documents, calculated using advanced analytics and machine learning techniques. Read-only. Nullable. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InsightsRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Shared/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Shared/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..79327d47 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Shared/Count/CountRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Shared.Count +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\shared\$count + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { + /// + /// Get the number of the resource + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get the number of the resource"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + var formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/shared/$count{?%24filter,%24search}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/shared/$count{?%24filter,%24search}", rawUrl) + { + } + /// + /// Get the number of the resource + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain"); + return requestInfo; + } + /// + /// Get the number of the resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Shared/Item/LastSharedMethod/LastSharedMethodRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Shared/Item/LastSharedMethod/LastSharedMethodRequestBuilder.cs new file mode 100644 index 00000000..664c6f1d --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Shared/Item/LastSharedMethod/LastSharedMethodRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Shared.Item.LastSharedMethod +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\shared\{sharedInsight-id}\lastSharedMethod + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LastSharedMethodRequestBuilder : BaseCliRequestBuilder + { + /// + /// Get lastSharedMethod from users + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get lastSharedMethod from users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var sharedInsightIdOption = new Option("--shared-insight-id", description: "The unique identifier of sharedInsight") { + }; + sharedInsightIdOption.IsRequired = true; + command.AddOption(sharedInsightIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var sharedInsightId = invocationContext.ParseResult.GetValueForOption(sharedInsightIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (sharedInsightId is not null) requestInfo.PathParameters.Add("sharedInsight%2Did", sharedInsightId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public LastSharedMethodRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/shared/{sharedInsight%2Did}/lastSharedMethod{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public LastSharedMethodRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/shared/{sharedInsight%2Did}/lastSharedMethod{?%24expand,%24select}", rawUrl) + { + } + /// + /// Get lastSharedMethod from users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get lastSharedMethod from users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LastSharedMethodRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Shared/Item/Resource/ResourceRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Shared/Item/Resource/ResourceRequestBuilder.cs new file mode 100644 index 00000000..9f5cc380 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Shared/Item/Resource/ResourceRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Shared.Item.Resource +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\shared\{sharedInsight-id}\resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResourceRequestBuilder : BaseCliRequestBuilder + { + /// + /// Used for navigating to the item that was shared. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Used for navigating to the item that was shared. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var sharedInsightIdOption = new Option("--shared-insight-id", description: "The unique identifier of sharedInsight") { + }; + sharedInsightIdOption.IsRequired = true; + command.AddOption(sharedInsightIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var sharedInsightId = invocationContext.ParseResult.GetValueForOption(sharedInsightIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (sharedInsightId is not null) requestInfo.PathParameters.Add("sharedInsight%2Did", sharedInsightId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public ResourceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/shared/{sharedInsight%2Did}/resource{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public ResourceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/shared/{sharedInsight%2Did}/resource{?%24expand,%24select}", rawUrl) + { + } + /// + /// Used for navigating to the item that was shared. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Used for navigating to the item that was shared. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResourceRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Shared/Item/SharedInsightItemRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Shared/Item/SharedInsightItemRequestBuilder.cs new file mode 100644 index 00000000..8aaef22e --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Shared/Item/SharedInsightItemRequestBuilder.cs @@ -0,0 +1,333 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Insights.Shared.Item.LastSharedMethod; +using ApiSdk.Users.Item.Insights.Shared.Item.Resource; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Shared.Item +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\shared\{sharedInsight-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SharedInsightItemRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property shared for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property shared for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var sharedInsightIdOption = new Option("--shared-insight-id", description: "The unique identifier of sharedInsight") { + }; + sharedInsightIdOption.IsRequired = true; + command.AddOption(sharedInsightIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var sharedInsightId = invocationContext.ParseResult.GetValueForOption(sharedInsightIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (sharedInsightId is not null) requestInfo.PathParameters.Add("sharedInsight%2Did", sharedInsightId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var sharedInsightIdOption = new Option("--shared-insight-id", description: "The unique identifier of sharedInsight") { + }; + sharedInsightIdOption.IsRequired = true; + command.AddOption(sharedInsightIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var sharedInsightId = invocationContext.ParseResult.GetValueForOption(sharedInsightIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (sharedInsightId is not null) requestInfo.PathParameters.Add("sharedInsight%2Did", sharedInsightId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// The lastSharedMethod property + /// + /// A + public Command BuildLastSharedMethodNavCommand() + { + var command = new Command("last-shared-method"); + command.Description = "The lastSharedMethod property"; + var builder = new global::ApiSdk.Users.Item.Insights.Shared.Item.LastSharedMethod.LastSharedMethodRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Update the navigation property shared in users + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the navigation property shared in users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var sharedInsightIdOption = new Option("--shared-insight-id", description: "The unique identifier of sharedInsight") { + }; + sharedInsightIdOption.IsRequired = true; + command.AddOption(sharedInsightIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var sharedInsightId = invocationContext.ParseResult.GetValueForOption(sharedInsightIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.SharedInsight.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (sharedInsightId is not null) requestInfo.PathParameters.Add("sharedInsight%2Did", sharedInsightId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// The resource property + /// + /// A + public Command BuildResourceNavCommand() + { + var command = new Command("resource"); + command.Description = "The resource property"; + var builder = new global::ApiSdk.Users.Item.Insights.Shared.Item.Resource.ResourceRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public SharedInsightItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/shared/{sharedInsight%2Did}{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public SharedInsightItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/shared/{sharedInsight%2Did}{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property shared for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the navigation property shared in users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.SharedInsight body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.SharedInsight body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SharedInsightItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Shared/SharedRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Shared/SharedRequestBuilder.cs new file mode 100644 index 00000000..7a06dbf2 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Shared/SharedRequestBuilder.cs @@ -0,0 +1,337 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Insights.Shared.Count; +using ApiSdk.Users.Item.Insights.Shared.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Shared +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\shared + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SharedRequestBuilder : BaseCliRequestBuilder + { + /// + /// Gets an item from the ApiSdk.users.item.insights.shared.item collection + /// + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { + var executables = new List(); + var commands = new List(); + var builder = new global::ApiSdk.Users.Item.Insights.Shared.Item.SharedInsightItemRequestBuilder(PathParameters); + executables.Add(builder.BuildDeleteCommand()); + executables.Add(builder.BuildGetCommand()); + commands.Add(builder.BuildLastSharedMethodNavCommand()); + executables.Add(builder.BuildPatchCommand()); + commands.Add(builder.BuildResourceNavCommand()); + return new(executables, commands); + } + /// + /// The Count property + /// + /// A + public Command BuildCountNavCommand() + { + var command = new Command("count"); + command.Description = "The Count property"; + var builder = new global::ApiSdk.Users.Item.Insights.Shared.Count.CountRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Create new navigation property to shared for users + /// + /// A + public Command BuildCreateCommand() + { + var command = new Command("create"); + command.Description = "Create new navigation property to shared for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.SharedInsight.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPostRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. + /// + /// A + public Command BuildListCommand() + { + var command = new Command("list"); + command.Description = "Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var topOption = new Option("--top", description: "Show only the first n items") { + }; + topOption.IsRequired = false; + command.AddOption(topOption); + var skipOption = new Option("--skip", description: "Skip the first n items") { + }; + skipOption.IsRequired = false; + command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + var countOption = new Option("--count", description: "Include count of items") { + }; + countOption.IsRequired = false; + command.AddOption(countOption); + var orderbyOption = new Option("--orderby", description: "Order items by property values") { + Arity = ArgumentArity.ZeroOrMore + }; + orderbyOption.IsRequired = false; + command.AddOption(orderbyOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + var allOption = new Option("--all"); + command.AddOption(allOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var top = invocationContext.ParseResult.GetValueForOption(topOption); + var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + var count = invocationContext.ParseResult.GetValueForOption(countOption); + var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + var all = invocationContext.ParseResult.GetValueForOption(allOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + IPagingService pagingService = invocationContext.BindingContext.GetService(typeof(IPagingService)) as IPagingService ?? throw new ArgumentNullException("pagingService"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Top = top; + q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + q.QueryParameters.Count = count; + q.QueryParameters.Orderby = orderby; + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); + var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); + var response = pageResponse?.Response; +#nullable enable + IOutputFormatter? formatter = null; +#nullable restore + if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { + formatter = outputFormatterFactory.GetFormatter(output); + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + } else { + formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + } + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public SharedRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/shared{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public SharedRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/shared{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { + } + /// + /// Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create new navigation property to shared for users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.SharedInsight body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.SharedInsight body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Calculated relationship that identifies documents shared with or by the user. This includes URLs, file attachments, and reference attachments to OneDrive for work or school and SharePoint files found in Outlook messages and meetings. This also includes URLs and reference attachments to Teams conversations. Ordered by recency of share. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SharedRequestBuilderGetQueryParameters + { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Trending/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Trending/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..5d352d84 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Trending/Count/CountRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Trending.Count +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\trending\$count + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { + /// + /// Get the number of the resource + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get the number of the resource"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + var formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/trending/$count{?%24filter,%24search}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/trending/$count{?%24filter,%24search}", rawUrl) + { + } + /// + /// Get the number of the resource + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain"); + return requestInfo; + } + /// + /// Get the number of the resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Trending/Item/Resource/ResourceRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Trending/Item/Resource/ResourceRequestBuilder.cs new file mode 100644 index 00000000..7fdabded --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Trending/Item/Resource/ResourceRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Trending.Item.Resource +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\trending\{trending-id}\resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResourceRequestBuilder : BaseCliRequestBuilder + { + /// + /// Used for navigating to the trending document. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Used for navigating to the trending document."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var trendingIdOption = new Option("--trending-id", description: "The unique identifier of trending") { + }; + trendingIdOption.IsRequired = true; + command.AddOption(trendingIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var trendingId = invocationContext.ParseResult.GetValueForOption(trendingIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (trendingId is not null) requestInfo.PathParameters.Add("trending%2Did", trendingId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public ResourceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/trending/{trending%2Did}/resource{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public ResourceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/trending/{trending%2Did}/resource{?%24expand,%24select}", rawUrl) + { + } + /// + /// Used for navigating to the trending document. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Used for navigating to the trending document. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResourceRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Trending/Item/TrendingItemRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Trending/Item/TrendingItemRequestBuilder.cs new file mode 100644 index 00000000..86145d45 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Trending/Item/TrendingItemRequestBuilder.cs @@ -0,0 +1,315 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Insights.Trending.Item.Resource; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Trending.Item +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\trending\{trending-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TrendingItemRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property trending for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property trending for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var trendingIdOption = new Option("--trending-id", description: "The unique identifier of trending") { + }; + trendingIdOption.IsRequired = true; + command.AddOption(trendingIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var trendingId = invocationContext.ParseResult.GetValueForOption(trendingIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (trendingId is not null) requestInfo.PathParameters.Add("trending%2Did", trendingId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// Calculated relationship that identifies 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 work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Calculated relationship that identifies 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 work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var trendingIdOption = new Option("--trending-id", description: "The unique identifier of trending") { + }; + trendingIdOption.IsRequired = true; + command.AddOption(trendingIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var trendingId = invocationContext.ParseResult.GetValueForOption(trendingIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (trendingId is not null) requestInfo.PathParameters.Add("trending%2Did", trendingId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Update the navigation property trending in users + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the navigation property trending in users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var trendingIdOption = new Option("--trending-id", description: "The unique identifier of trending") { + }; + trendingIdOption.IsRequired = true; + command.AddOption(trendingIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var trendingId = invocationContext.ParseResult.GetValueForOption(trendingIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.Trending.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (trendingId is not null) requestInfo.PathParameters.Add("trending%2Did", trendingId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// The resource property + /// + /// A + public Command BuildResourceNavCommand() + { + var command = new Command("resource"); + command.Description = "The resource property"; + var builder = new global::ApiSdk.Users.Item.Insights.Trending.Item.Resource.ResourceRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public TrendingItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/trending/{trending%2Did}{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public TrendingItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/trending/{trending%2Did}{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property trending for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Calculated relationship that identifies 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 work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the navigation property trending in users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Trending body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Trending body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Calculated relationship that identifies 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 work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TrendingItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Trending/TrendingRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Trending/TrendingRequestBuilder.cs new file mode 100644 index 00000000..df3bce82 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Trending/TrendingRequestBuilder.cs @@ -0,0 +1,336 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Insights.Trending.Count; +using ApiSdk.Users.Item.Insights.Trending.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Trending +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\trending + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TrendingRequestBuilder : BaseCliRequestBuilder + { + /// + /// Gets an item from the ApiSdk.users.item.insights.trending.item collection + /// + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { + var executables = new List(); + var commands = new List(); + var builder = new global::ApiSdk.Users.Item.Insights.Trending.Item.TrendingItemRequestBuilder(PathParameters); + executables.Add(builder.BuildDeleteCommand()); + executables.Add(builder.BuildGetCommand()); + executables.Add(builder.BuildPatchCommand()); + commands.Add(builder.BuildResourceNavCommand()); + return new(executables, commands); + } + /// + /// The Count property + /// + /// A + public Command BuildCountNavCommand() + { + var command = new Command("count"); + command.Description = "The Count property"; + var builder = new global::ApiSdk.Users.Item.Insights.Trending.Count.CountRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Create new navigation property to trending for users + /// + /// A + public Command BuildCreateCommand() + { + var command = new Command("create"); + command.Description = "Create new navigation property to trending for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.Trending.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPostRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Calculated relationship that identifies 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 work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. + /// + /// A + public Command BuildListCommand() + { + var command = new Command("list"); + command.Description = "Calculated relationship that identifies 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 work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var topOption = new Option("--top", description: "Show only the first n items") { + }; + topOption.IsRequired = false; + command.AddOption(topOption); + var skipOption = new Option("--skip", description: "Skip the first n items") { + }; + skipOption.IsRequired = false; + command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + var countOption = new Option("--count", description: "Include count of items") { + }; + countOption.IsRequired = false; + command.AddOption(countOption); + var orderbyOption = new Option("--orderby", description: "Order items by property values") { + Arity = ArgumentArity.ZeroOrMore + }; + orderbyOption.IsRequired = false; + command.AddOption(orderbyOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + var allOption = new Option("--all"); + command.AddOption(allOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var top = invocationContext.ParseResult.GetValueForOption(topOption); + var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + var count = invocationContext.ParseResult.GetValueForOption(countOption); + var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + var all = invocationContext.ParseResult.GetValueForOption(allOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + IPagingService pagingService = invocationContext.BindingContext.GetService(typeof(IPagingService)) as IPagingService ?? throw new ArgumentNullException("pagingService"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Top = top; + q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + q.QueryParameters.Count = count; + q.QueryParameters.Orderby = orderby; + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); + var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); + var response = pageResponse?.Response; +#nullable enable + IOutputFormatter? formatter = null; +#nullable restore + if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { + formatter = outputFormatterFactory.GetFormatter(output); + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + } else { + formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + } + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public TrendingRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/trending{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public TrendingRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/trending{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { + } + /// + /// Calculated relationship that identifies 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 work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create new navigation property to trending for users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.Trending body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.Trending body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Calculated relationship that identifies 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 work or school and SharePoint. Trending insights help the user to discover potentially useful content that the user has access to, but has never viewed before. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TrendingRequestBuilderGetQueryParameters + { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Used/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Used/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..8de88ca2 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Used/Count/CountRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Used.Count +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\used\$count + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { + /// + /// Get the number of the resource + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get the number of the resource"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + var formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/used/$count{?%24filter,%24search}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/used/$count{?%24filter,%24search}", rawUrl) + { + } + /// + /// Get the number of the resource + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain"); + return requestInfo; + } + /// + /// Get the number of the resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Used/Item/Resource/ResourceRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Used/Item/Resource/ResourceRequestBuilder.cs new file mode 100644 index 00000000..b07b02f7 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Used/Item/Resource/ResourceRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Used.Item.Resource +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\used\{usedInsight-id}\resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResourceRequestBuilder : BaseCliRequestBuilder + { + /// + /// Used for navigating to the item that was used. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Used for navigating to the item that was used. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var usedInsightIdOption = new Option("--used-insight-id", description: "The unique identifier of usedInsight") { + }; + usedInsightIdOption.IsRequired = true; + command.AddOption(usedInsightIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var usedInsightId = invocationContext.ParseResult.GetValueForOption(usedInsightIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (usedInsightId is not null) requestInfo.PathParameters.Add("usedInsight%2Did", usedInsightId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public ResourceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/used/{usedInsight%2Did}/resource{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public ResourceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/used/{usedInsight%2Did}/resource{?%24expand,%24select}", rawUrl) + { + } + /// + /// Used for navigating to the item that was used. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Used for navigating to the item that was used. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ResourceRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Used/Item/UsedInsightItemRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Used/Item/UsedInsightItemRequestBuilder.cs new file mode 100644 index 00000000..59d20f0c --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Used/Item/UsedInsightItemRequestBuilder.cs @@ -0,0 +1,315 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Insights.Used.Item.Resource; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Used.Item +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\used\{usedInsight-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsedInsightItemRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property used for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property used for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var usedInsightIdOption = new Option("--used-insight-id", description: "The unique identifier of usedInsight") { + }; + usedInsightIdOption.IsRequired = true; + command.AddOption(usedInsightIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var usedInsightId = invocationContext.ParseResult.GetValueForOption(usedInsightIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (usedInsightId is not null) requestInfo.PathParameters.Add("usedInsight%2Did", usedInsightId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var usedInsightIdOption = new Option("--used-insight-id", description: "The unique identifier of usedInsight") { + }; + usedInsightIdOption.IsRequired = true; + command.AddOption(usedInsightIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var usedInsightId = invocationContext.ParseResult.GetValueForOption(usedInsightIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (usedInsightId is not null) requestInfo.PathParameters.Add("usedInsight%2Did", usedInsightId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Update the navigation property used in users + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the navigation property used in users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var usedInsightIdOption = new Option("--used-insight-id", description: "The unique identifier of usedInsight") { + }; + usedInsightIdOption.IsRequired = true; + command.AddOption(usedInsightIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var usedInsightId = invocationContext.ParseResult.GetValueForOption(usedInsightIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.UsedInsight.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (usedInsightId is not null) requestInfo.PathParameters.Add("usedInsight%2Did", usedInsightId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// The resource property + /// + /// A + public Command BuildResourceNavCommand() + { + var command = new Command("resource"); + command.Description = "The resource property"; + var builder = new global::ApiSdk.Users.Item.Insights.Used.Item.Resource.ResourceRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public UsedInsightItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/used/{usedInsight%2Did}{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public UsedInsightItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/used/{usedInsight%2Did}{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property used for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the navigation property used in users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UsedInsight body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UsedInsight body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsedInsightItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Insights/Used/UsedRequestBuilder.cs b/src/sample/generated/Users/Item/Insights/Used/UsedRequestBuilder.cs new file mode 100644 index 00000000..a1529334 --- /dev/null +++ b/src/sample/generated/Users/Item/Insights/Used/UsedRequestBuilder.cs @@ -0,0 +1,336 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Insights.Used.Count; +using ApiSdk.Users.Item.Insights.Used.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Insights.Used +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\insights\used + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsedRequestBuilder : BaseCliRequestBuilder + { + /// + /// Gets an item from the ApiSdk.users.item.insights.used.item collection + /// + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { + var executables = new List(); + var commands = new List(); + var builder = new global::ApiSdk.Users.Item.Insights.Used.Item.UsedInsightItemRequestBuilder(PathParameters); + executables.Add(builder.BuildDeleteCommand()); + executables.Add(builder.BuildGetCommand()); + executables.Add(builder.BuildPatchCommand()); + commands.Add(builder.BuildResourceNavCommand()); + return new(executables, commands); + } + /// + /// The Count property + /// + /// A + public Command BuildCountNavCommand() + { + var command = new Command("count"); + command.Description = "The Count property"; + var builder = new global::ApiSdk.Users.Item.Insights.Used.Count.CountRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Create new navigation property to used for users + /// + /// A + public Command BuildCreateCommand() + { + var command = new Command("create"); + command.Description = "Create new navigation property to used for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.UsedInsight.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPostRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use. + /// + /// A + public Command BuildListCommand() + { + var command = new Command("list"); + command.Description = "Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var topOption = new Option("--top", description: "Show only the first n items") { + }; + topOption.IsRequired = false; + command.AddOption(topOption); + var skipOption = new Option("--skip", description: "Skip the first n items") { + }; + skipOption.IsRequired = false; + command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + var countOption = new Option("--count", description: "Include count of items") { + }; + countOption.IsRequired = false; + command.AddOption(countOption); + var orderbyOption = new Option("--orderby", description: "Order items by property values") { + Arity = ArgumentArity.ZeroOrMore + }; + orderbyOption.IsRequired = false; + command.AddOption(orderbyOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + var allOption = new Option("--all"); + command.AddOption(allOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var top = invocationContext.ParseResult.GetValueForOption(topOption); + var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + var count = invocationContext.ParseResult.GetValueForOption(countOption); + var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + var all = invocationContext.ParseResult.GetValueForOption(allOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + IPagingService pagingService = invocationContext.BindingContext.GetService(typeof(IPagingService)) as IPagingService ?? throw new ArgumentNullException("pagingService"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Top = top; + q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + q.QueryParameters.Count = count; + q.QueryParameters.Orderby = orderby; + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); + var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); + var response = pageResponse?.Response; +#nullable enable + IOutputFormatter? formatter = null; +#nullable restore + if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { + formatter = outputFormatterFactory.GetFormatter(output); + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + } else { + formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + } + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public UsedRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/insights/used{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public UsedRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/insights/used{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { + } + /// + /// Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create new navigation property to used for users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.UsedInsight body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.UsedInsight body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Calculated relationship that identifies the latest documents viewed or modified by a user, including OneDrive for work or school and SharePoint documents, ranked by recency of use. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsedRequestBuilderGetQueryParameters + { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/LicenseDetails/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/LicenseDetails/Count/CountRequestBuilder.cs index 4e84e0da..d5bdc5bb 100644 --- a/src/sample/generated/Users/Item/LicenseDetails/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/LicenseDetails/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.LicenseDetails.Count { +namespace ApiSdk.Users.Item.LicenseDetails.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\licenseDetails\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -59,47 +66,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/licenseDetails/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/licenseDetails/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/licenseDetails/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/licenseDetails/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -123,3 +127,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/LicenseDetails/Item/LicenseDetailsItemRequestBuilder.cs b/src/sample/generated/Users/Item/LicenseDetails/Item/LicenseDetailsItemRequestBuilder.cs index a74209b1..6b13eea6 100644 --- a/src/sample/generated/Users/Item/LicenseDetails/Item/LicenseDetailsItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/LicenseDetails/Item/LicenseDetailsItemRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.LicenseDetails.Item { +namespace ApiSdk.Users.Item.LicenseDetails.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\licenseDetails\{licenseDetails-id} /// - public class LicenseDetailsItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicenseDetailsItemRequestBuilder : BaseCliRequestBuilder + { /// /// Delete navigation property licenseDetails for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); command.Description = "Delete navigation property licenseDetails for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -73,7 +80,9 @@ public Command BuildDeleteCommand() { /// /// A collection of this user's license details. Read-only. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "A collection of this user's license details. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { /// /// Update the navigation property licenseDetails in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); command.Description = "Update the navigation property licenseDetails in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -159,8 +170,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ApiSdk.Models.LicenseDetails.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.LicenseDetails.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -182,100 +193,84 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new LicenseDetailsItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public LicenseDetailsItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/licenseDetails/{licenseDetails%2Did}{?%24select,%24expand}", pathParameters) { + public LicenseDetailsItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/licenseDetails/{licenseDetails%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new LicenseDetailsItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public LicenseDetailsItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/licenseDetails/{licenseDetails%2Did}{?%24select,%24expand}", rawUrl) { + public LicenseDetailsItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/licenseDetails/{licenseDetails%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// Delete navigation property licenseDetails for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// A collection of this user's license details. Read-only. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Update the navigation property licenseDetails in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(ApiSdk.Models.LicenseDetails body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.LicenseDetails body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(ApiSdk.Models.LicenseDetails body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.LicenseDetails body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// A collection of this user's license details. Read-only. /// - public class LicenseDetailsItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicenseDetailsItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -299,3 +294,4 @@ public class LicenseDetailsItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/LicenseDetails/LicenseDetailsRequestBuilder.cs b/src/sample/generated/Users/Item/LicenseDetails/LicenseDetailsRequestBuilder.cs index b7f1ffca..e7ee903f 100644 --- a/src/sample/generated/Users/Item/LicenseDetails/LicenseDetailsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/LicenseDetails/LicenseDetailsRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.LicenseDetails.Count; using ApiSdk.Users.Item.LicenseDetails.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,17 +18,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.LicenseDetails { +namespace ApiSdk.Users.Item.LicenseDetails +{ /// /// Builds and executes requests for operations under \users\{user-id}\licenseDetails /// - public class LicenseDetailsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicenseDetailsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.licenseDetails.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); - var builder = new LicenseDetailsItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.LicenseDetails.Item.LicenseDetailsItemRequestBuilder(PathParameters); executables.Add(builder.BuildDeleteCommand()); executables.Add(builder.BuildGetCommand()); executables.Add(builder.BuildPatchCommand()); @@ -35,10 +42,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.LicenseDetails.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -50,7 +59,9 @@ public Command BuildCountNavCommand() { /// /// Create new navigation property to licenseDetails for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); command.Description = "Create new navigation property to licenseDetails for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -75,8 +86,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ApiSdk.Models.LicenseDetails.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.LicenseDetails.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -97,12 +108,13 @@ public Command BuildCreateCommand() { return command; } /// - /// Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. This API is supported in the following national cloud deployments. - /// Find more info here + /// A collection of this user's license details. Read-only. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-licensedetails?view=graph-rest-1.0"; + command.Description = "A collection of this user's license details. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -184,7 +196,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -196,75 +210,65 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new LicenseDetailsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public LicenseDetailsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/licenseDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public LicenseDetailsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/licenseDetails{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new LicenseDetailsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public LicenseDetailsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/licenseDetails{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public LicenseDetailsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/licenseDetails{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. This API is supported in the following national cloud deployments. + /// A collection of this user's license details. Read-only. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Create new navigation property to licenseDetails for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(ApiSdk.Models.LicenseDetails body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.LicenseDetails body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(ApiSdk.Models.LicenseDetails body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.LicenseDetails body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Retrieve a list of licenseDetails objects for enterprise users. This API returns details for licenses that are directly assigned and those transitively assigned through memberships in licensed groups. This API is supported in the following national cloud deployments. + /// A collection of this user's license details. Read-only. /// - public class LicenseDetailsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LicenseDetailsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -327,3 +331,4 @@ public class LicenseDetailsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/sample/generated/Users/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs index 57ac7e85..2128a327 100644 --- a/src/sample/generated/Users/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,17 +16,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MailboxSettings { +namespace ApiSdk.Users.Item.MailboxSettings +{ /// /// Builds and executes requests for operations under \users\{user-id}\mailboxSettings /// - public class MailboxSettingsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MailboxSettingsRequestBuilder : BaseCliRequestBuilder + { /// - /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select."; + command.Description = "Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -72,7 +79,9 @@ public Command BuildGetCommand() { /// /// Update property mailboxSettings value. /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); command.Description = "Update property mailboxSettings value."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -97,8 +106,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ApiSdk.Models.MailboxSettings.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.MailboxSettings.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -119,75 +128,65 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MailboxSettingsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/mailboxSettings{?%24select,%24expand}", pathParameters) { + public MailboxSettingsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/mailboxSettings{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MailboxSettingsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/mailboxSettings{?%24select,%24expand}", rawUrl) { + public MailboxSettingsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/mailboxSettings{?%24expand,%24select}", rawUrl) + { } /// - /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Update property mailboxSettings value. /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(ApiSdk.Models.MailboxSettings body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.MailboxSettings body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(ApiSdk.Models.MailboxSettings body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.MailboxSettings body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale and time zone. Returned only on $select. + /// Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. /// - public class MailboxSettingsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MailboxSettingsRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -211,3 +210,4 @@ public class MailboxSettingsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Manager/ManagerRequestBuilder.cs b/src/sample/generated/Users/Item/Manager/ManagerRequestBuilder.cs index 988f1582..849d7db1 100644 --- a/src/sample/generated/Users/Item/Manager/ManagerRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Manager/ManagerRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Manager.Ref; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,64 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Manager { +namespace ApiSdk.Users.Item.Manager +{ /// /// Builds and executes requests for operations under \users\{user-id}\manager /// - public class ManagerRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ManagerRequestBuilder : BaseCliRequestBuilder + { /// - /// Remove a user's manager. This API is supported in the following national cloud deployments. - /// Find more info here - /// - public Command BuildDeleteCommand() { - var command = new Command("delete"); - command.Description = "Remove a user's manager. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-delete-manager?view=graph-rest-1.0"; - var userIdOption = new Option("--user-id", description: "The unique identifier of user") { - }; - userIdOption.IsRequired = true; - command.AddOption(userIdOption); - var ifMatchOption = new Option("--if-match", description: "ETag") { - Arity = ArgumentArity.ZeroOrMore - }; - ifMatchOption.IsRequired = false; - command.AddOption(ifMatchOption); - var outputFileOption = new Option("--output-file"); - command.AddOption(outputFileOption); - command.SetHandler(async (invocationContext) => { - var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); - var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); - var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); - var cancellationToken = invocationContext.GetCancellationToken(); - var reqAdapter = invocationContext.GetRequestAdapter(); - var requestInfo = ToDeleteRequestInformation(q => { - }); - if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); - if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); - var errorMapping = new Dictionary> { - {"4XX", ODataError.CreateFromDiscriminatorValue}, - {"5XX", ODataError.CreateFromDiscriminatorValue}, - }; - var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; - if (outputFile == null) { - using var reader = new StreamReader(response); - var strContent = reader.ReadToEnd(); - Console.Write(strContent); - } - else { - using var writeStream = outputFile.OpenWrite(); - await response.CopyToAsync(writeStream); - Console.WriteLine($"Content written to {outputFile.FullName}."); - } - }); - return command; - } - /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is supported in the following national cloud deployments. + /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. /// Find more info here /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-manager?view=graph-rest-1.0"; + command.Description = "Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-manager?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -120,10 +81,12 @@ public Command BuildGetCommand() { /// /// The Ref property /// - public Command BuildRefNavCommand() { + /// A + public Command BuildRefNavCommand() + { var command = new Command("ref"); command.Description = "The Ref property"; - var builder = new RefRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Manager.Ref.RefRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildDeleteCommand()); execCommands.Add(builder.BuildGetCommand()); @@ -135,72 +98,44 @@ public Command BuildRefNavCommand() { return command; } /// - /// Instantiates a new ManagerRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ManagerRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/manager{?%24select,%24expand}", pathParameters) { + public ManagerRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/manager{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new ManagerRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ManagerRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/manager{?%24select,%24expand}", rawUrl) { - } - /// - /// Remove a user's manager. This API is supported in the following national cloud deployments. - /// - /// Configuration for the request such as headers, query parameters, and middleware options. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { -#endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } - return requestInfo; + public ManagerRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/manager{?%24expand,%24select}", rawUrl) + { } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is supported in the following national cloud deployments. + /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is supported in the following national cloud deployments. + /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. /// - public class ManagerRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ManagerRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -224,3 +159,4 @@ public class ManagerRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Manager/Ref/RefRequestBuilder.cs b/src/sample/generated/Users/Item/Manager/Ref/RefRequestBuilder.cs index c13251e1..13d9a27d 100644 --- a/src/sample/generated/Users/Item/Manager/Ref/RefRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Manager/Ref/RefRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,18 +16,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Manager.Ref { +namespace ApiSdk.Users.Item.Manager.Ref +{ /// /// Builds and executes requests for operations under \users\{user-id}\manager\$ref /// - public class RefRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RefRequestBuilder : BaseCliRequestBuilder + { /// - /// Remove a user's manager. This API is supported in the following national cloud deployments. + /// Remove a user's manager. /// Find more info here /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); - command.Description = "Remove a user's manager. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-delete-manager?view=graph-rest-1.0"; + command.Description = "Remove a user's manager.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-delete-manager?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -66,12 +73,14 @@ public Command BuildDeleteCommand() { return command; } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is supported in the following national cloud deployments. + /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. /// Find more info here /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-manager?view=graph-rest-1.0"; + command.Description = "Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-manager?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -95,12 +104,14 @@ public Command BuildGetCommand() { return command; } /// - /// Assign a user's manager. This API is supported in the following national cloud deployments. + /// Assign a user's manager. /// Find more info here /// - public Command BuildPutCommand() { + /// A + public Command BuildPutCommand() + { var command = new Command("put"); - command.Description = "Assign a user's manager. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-post-manager?view=graph-rest-1.0"; + command.Description = "Assign a user's manager.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-post-manager?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -118,8 +129,8 @@ public Command BuildPutCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ReferenceUpdate.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.ReferenceUpdate.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -147,94 +158,78 @@ public Command BuildPutCommand() { return command; } /// - /// Instantiates a new RefRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public RefRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/manager/$ref", pathParameters) { + public RefRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/manager/$ref", pathParameters) + { } /// - /// Instantiates a new RefRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public RefRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/manager/$ref", rawUrl) { + public RefRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/manager/$ref", rawUrl) + { } /// - /// Remove a user's manager. This API is supported in the following national cloud deployments. + /// Remove a user's manager. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. This API is supported in the following national cloud deployments. + /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Assign a user's manager. This API is supported in the following national cloud deployments. + /// Assign a user's manager. /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPutRequestInformation(ReferenceUpdate body, Action>? requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(global::ApiSdk.Models.ReferenceUpdate body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPutRequestInformation(ReferenceUpdate body, Action> requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(global::ApiSdk.Models.ReferenceUpdate body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PUT, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/Count/CountRequestBuilder.cs index 4732c9e9..3e977022 100644 --- a/src/sample/generated/Users/Item/MemberOf/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.Count { +namespace ApiSdk.Users.Item.MemberOf.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs index 1a5a3c11..db4158ba 100644 --- a/src/sample/generated/Users/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,9 +1,11 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphAdministrativeUnit; using ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphDirectoryRole; using ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphGroup; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -17,15 +19,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.Item { +namespace ApiSdk.Users.Item.MemberOf.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\{directoryObject-id} /// - public class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder + { /// /// The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -88,10 +95,12 @@ public Command BuildGetCommand() { /// /// The microsoftGraphAdministrativeUnit property /// - public Command BuildMicrosoftGraphAdministrativeUnitByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphAdministrativeUnitByIdNavCommand() + { var command = new Command("microsoft-graph-administrative-unit-by-id"); command.Description = "The microsoftGraphAdministrativeUnit property"; - var builder = new MicrosoftGraphAdministrativeUnitRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphAdministrativeUnit.MicrosoftGraphAdministrativeUnitRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -103,10 +112,12 @@ public Command BuildMicrosoftGraphAdministrativeUnitByIdNavCommand() { /// /// The microsoftGraphDirectoryRole property /// - public Command BuildMicrosoftGraphDirectoryRoleByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphDirectoryRoleByIdNavCommand() + { var command = new Command("microsoft-graph-directory-role-by-id"); command.Description = "The microsoftGraphDirectoryRole property"; - var builder = new MicrosoftGraphDirectoryRoleRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphDirectoryRole.MicrosoftGraphDirectoryRoleRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -118,10 +129,12 @@ public Command BuildMicrosoftGraphDirectoryRoleByIdNavCommand() { /// /// The microsoftGraphGroup property /// - public Command BuildMicrosoftGraphGroupByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphGroupByIdNavCommand() + { var command = new Command("microsoft-graph-group-by-id"); command.Description = "The microsoftGraphGroup property"; - var builder = new MicrosoftGraphGroupRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphGroup.MicrosoftGraphGroupRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -131,47 +144,44 @@ public Command BuildMicrosoftGraphGroupByIdNavCommand() { return command; } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. /// - public class DirectoryObjectItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -195,3 +205,4 @@ public class DirectoryObjectItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs index 49577407..ca511050 100644 --- a/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphAdministrativeUnit { +namespace ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphAdministrativeUnit +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\{directoryObject-id}\microsoft.graph.administrativeUnit /// - public class MicrosoftGraphAdministrativeUnitRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAdministrativeUnitRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphAdministrativeUnitRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphAdministrativeUnitRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.administrativeUnit{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphAdministrativeUnitRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.administrativeUnit{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphAdministrativeUnitRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphAdministrativeUnitRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.administrativeUnit{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphAdministrativeUnitRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.administrativeUnit{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit /// - public class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs index f478e667..647d52f5 100644 --- a/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphDirectoryRole { +namespace ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphDirectoryRole +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\{directoryObject-id}\microsoft.graph.directoryRole /// - public class MicrosoftGraphDirectoryRoleRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDirectoryRoleRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphDirectoryRoleRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphDirectoryRoleRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.directoryRole{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphDirectoryRoleRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.directoryRole{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphDirectoryRoleRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphDirectoryRoleRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.directoryRole{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphDirectoryRoleRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.directoryRole{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole /// - public class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs index 676b28f4..e8920749 100644 --- a/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,17 +16,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphGroup { +namespace ApiSdk.Users.Item.MemberOf.Item.MicrosoftGraphGroup +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\{directoryObject-id}\microsoft.graph.group /// - public class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder + { /// - /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + /// Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API. + /// Find more info here /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.group"; + command.Description = "Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-memberof?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -83,47 +91,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.group{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.group{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.group{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/{directoryObject%2Did}/microsoft.graph.group{?%24expand,%24select}", rawUrl) + { } /// - /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + /// Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.group + /// Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API. /// - public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +152,4 @@ public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/MemberOfRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/MemberOfRequestBuilder.cs index d6cd649a..b52e7bb4 100644 --- a/src/sample/generated/Users/Item/MemberOf/MemberOfRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/MemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.MemberOf.Count; @@ -6,6 +7,7 @@ using ApiSdk.Users.Item.MemberOf.MicrosoftGraphAdministrativeUnit; using ApiSdk.Users.Item.MemberOf.MicrosoftGraphDirectoryRole; using ApiSdk.Users.Item.MemberOf.MicrosoftGraphGroup; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -19,18 +21,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf { +namespace ApiSdk.Users.Item.MemberOf +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf /// - public class MemberOfRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MemberOfRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.memberOf.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new DirectoryObjectItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.Item.DirectoryObjectItemRequestBuilder(PathParameters); executables.Add(builder.BuildGetCommand()); commands.Add(builder.BuildMicrosoftGraphAdministrativeUnitByIdNavCommand()); commands.Add(builder.BuildMicrosoftGraphDirectoryRoleByIdNavCommand()); @@ -40,10 +47,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -53,12 +62,14 @@ public Command BuildCountNavCommand() { return command; } /// - /// The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. + /// Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API. /// Find more info here /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-memberof?view=graph-rest-1.0"; + command.Description = "Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-memberof?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -147,7 +158,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -161,10 +174,12 @@ public Command BuildListCommand() { /// /// The microsoftGraphAdministrativeUnit property /// - public Command BuildMicrosoftGraphAdministrativeUnitNavCommand() { + /// A + public Command BuildMicrosoftGraphAdministrativeUnitNavCommand() + { var command = new Command("microsoft-graph-administrative-unit"); command.Description = "The microsoftGraphAdministrativeUnit property"; - var builder = new MicrosoftGraphAdministrativeUnitRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.MicrosoftGraphAdministrativeUnit.MicrosoftGraphAdministrativeUnitRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -182,10 +197,12 @@ public Command BuildMicrosoftGraphAdministrativeUnitNavCommand() { /// /// The microsoftGraphDirectoryRole property /// - public Command BuildMicrosoftGraphDirectoryRoleNavCommand() { + /// A + public Command BuildMicrosoftGraphDirectoryRoleNavCommand() + { var command = new Command("microsoft-graph-directory-role"); command.Description = "The microsoftGraphDirectoryRole property"; - var builder = new MicrosoftGraphDirectoryRoleRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.MicrosoftGraphDirectoryRole.MicrosoftGraphDirectoryRoleRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -203,10 +220,12 @@ public Command BuildMicrosoftGraphDirectoryRoleNavCommand() { /// /// The microsoftGraphGroup property /// - public Command BuildMicrosoftGraphGroupNavCommand() { + /// A + public Command BuildMicrosoftGraphGroupNavCommand() + { var command = new Command("microsoft-graph-group"); command.Description = "The microsoftGraphGroup property"; - var builder = new MicrosoftGraphGroupRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.MicrosoftGraphGroup.MicrosoftGraphGroupRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -222,47 +241,44 @@ public Command BuildMicrosoftGraphGroupNavCommand() { return command; } /// - /// Instantiates a new MemberOfRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MemberOfRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MemberOfRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MemberOfRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MemberOfRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MemberOfRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. + /// Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. + /// Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API. /// - public class MemberOfRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MemberOfRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -325,3 +341,4 @@ public class MemberOfRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphAdministrativeUnit/Count/CountRequestBuilder.cs index dc10a558..1eed49bb 100644 --- a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphAdministrativeUnit/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphAdministrativeUnit.Count { +namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphAdministrativeUnit.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\microsoft.graph.administrativeUnit\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.administrativeUnit/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.administrativeUnit/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.administrativeUnit/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.administrativeUnit/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs index 128cdd3b..ed2c4de9 100644 --- a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.MemberOf.MicrosoftGraphAdministrativeUnit.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphAdministrativeUnit { +namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphAdministrativeUnit +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\microsoft.graph.administrativeUnit /// - public class MicrosoftGraphAdministrativeUnitRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAdministrativeUnitRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.MicrosoftGraphAdministrativeUnit.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphAdministrativeUnitRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphAdministrativeUnitRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphAdministrativeUnitRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.administrativeUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphAdministrativeUnitRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphAdministrativeUnitRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphAdministrativeUnitRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.administrativeUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphDirectoryRole/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphDirectoryRole/Count/CountRequestBuilder.cs index 6ecc625e..98156303 100644 --- a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphDirectoryRole/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphDirectoryRole/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphDirectoryRole.Count { +namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphDirectoryRole.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\microsoft.graph.directoryRole\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.directoryRole/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.directoryRole/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.directoryRole/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.directoryRole/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs index c39612f6..b177cb0d 100644 --- a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.MemberOf.MicrosoftGraphDirectoryRole.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphDirectoryRole { +namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphDirectoryRole +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\microsoft.graph.directoryRole /// - public class MicrosoftGraphDirectoryRoleRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDirectoryRoleRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.MicrosoftGraphDirectoryRole.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphDirectoryRoleRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphDirectoryRoleRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.directoryRole{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphDirectoryRoleRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.directoryRole{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphDirectoryRoleRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphDirectoryRoleRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.directoryRole{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphDirectoryRoleRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.directoryRole{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphGroup/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphGroup/Count/CountRequestBuilder.cs index aca38817..be9d4889 100644 --- a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphGroup/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphGroup/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphGroup.Count { +namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphGroup.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\microsoft.graph.group\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.group/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.group/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.group/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.group/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs index 1813cf45..875a9e17 100644 --- a/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs +++ b/src/sample/generated/Users/Item/MemberOf/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.MemberOf.MicrosoftGraphGroup.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphGroup { +namespace ApiSdk.Users.Item.MemberOf.MicrosoftGraphGroup +{ /// /// Builds and executes requests for operations under \users\{user-id}\memberOf\microsoft.graph.group /// - public class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.MicrosoftGraphGroup.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -36,11 +43,14 @@ public Command BuildCountNavCommand() { return command; } /// - /// Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + /// Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API. + /// Find more info here /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection"; + command.Description = "Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-memberof?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -129,7 +139,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +153,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/memberOf/microsoft.graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + /// Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection + /// Get groups, directory roles, and administrative units that the user is a direct member of. This operation isn't transitive. To retrieve groups, directory roles, and administrative units that the user is a member through transitive membership, use the List user transitive memberOf API. /// - public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +253,4 @@ public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Oauth2PermissionGrants/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Oauth2PermissionGrants/Count/CountRequestBuilder.cs index 778c9767..73b3abfc 100644 --- a/src/sample/generated/Users/Item/Oauth2PermissionGrants/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Oauth2PermissionGrants/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Oauth2PermissionGrants.Count { +namespace ApiSdk.Users.Item.Oauth2PermissionGrants.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\oauth2PermissionGrants\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -59,47 +66,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -123,3 +127,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Oauth2PermissionGrants/Item/OAuth2PermissionGrantItemRequestBuilder.cs b/src/sample/generated/Users/Item/Oauth2PermissionGrants/Item/OAuth2PermissionGrantItemRequestBuilder.cs index a1b413c4..37842581 100644 --- a/src/sample/generated/Users/Item/Oauth2PermissionGrants/Item/OAuth2PermissionGrantItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Oauth2PermissionGrants/Item/OAuth2PermissionGrantItemRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Oauth2PermissionGrants.Item { +namespace ApiSdk.Users.Item.Oauth2PermissionGrants.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\oauth2PermissionGrants\{oAuth2PermissionGrant-id} /// - public class OAuth2PermissionGrantItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OAuth2PermissionGrantItemRequestBuilder : BaseCliRequestBuilder + { /// /// Get oauth2PermissionGrants from users /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get oauth2PermissionGrants from users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -76,47 +83,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new OAuth2PermissionGrantItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public OAuth2PermissionGrantItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants/{oAuth2PermissionGrant%2Did}{?%24select,%24expand}", pathParameters) { + public OAuth2PermissionGrantItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants/{oAuth2PermissionGrant%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new OAuth2PermissionGrantItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public OAuth2PermissionGrantItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants/{oAuth2PermissionGrant%2Did}{?%24select,%24expand}", rawUrl) { + public OAuth2PermissionGrantItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants/{oAuth2PermissionGrant%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// Get oauth2PermissionGrants from users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get oauth2PermissionGrants from users /// - public class OAuth2PermissionGrantItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OAuth2PermissionGrantItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -140,3 +144,4 @@ public class OAuth2PermissionGrantItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Oauth2PermissionGrants/Oauth2PermissionGrantsRequestBuilder.cs b/src/sample/generated/Users/Item/Oauth2PermissionGrants/Oauth2PermissionGrantsRequestBuilder.cs index d818fc53..6532045f 100644 --- a/src/sample/generated/Users/Item/Oauth2PermissionGrants/Oauth2PermissionGrantsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Oauth2PermissionGrants/Oauth2PermissionGrantsRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Oauth2PermissionGrants.Count; using ApiSdk.Users.Item.Oauth2PermissionGrants.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,27 +18,34 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Oauth2PermissionGrants { +namespace ApiSdk.Users.Item.Oauth2PermissionGrants +{ /// /// Builds and executes requests for operations under \users\{user-id}\oauth2PermissionGrants /// - public class Oauth2PermissionGrantsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Oauth2PermissionGrantsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.oauth2PermissionGrants.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); - var builder = new OAuth2PermissionGrantItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Oauth2PermissionGrants.Item.OAuth2PermissionGrantItemRequestBuilder(PathParameters); executables.Add(builder.BuildGetCommand()); return new(executables, new(0)); } /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Oauth2PermissionGrants.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -46,12 +55,14 @@ public Command BuildCountNavCommand() { return command; } /// - /// Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. This API is supported in the following national cloud deployments. + /// Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. /// Find more info here /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-oauth2permissiongrants?view=graph-rest-1.0"; + command.Description = "Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-oauth2permissiongrants?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -133,7 +144,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -145,47 +158,44 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new Oauth2PermissionGrantsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public Oauth2PermissionGrantsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public Oauth2PermissionGrantsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new Oauth2PermissionGrantsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public Oauth2PermissionGrantsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public Oauth2PermissionGrantsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/oauth2PermissionGrants{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. This API is supported in the following national cloud deployments. + /// Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. This API is supported in the following national cloud deployments. + /// Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. /// - public class Oauth2PermissionGrantsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class Oauth2PermissionGrantsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -248,3 +258,4 @@ public class Oauth2PermissionGrantsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Outlook/MasterCategories/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Outlook/MasterCategories/Count/CountRequestBuilder.cs index c3687742..b6342465 100644 --- a/src/sample/generated/Users/Item/Outlook/MasterCategories/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Outlook/MasterCategories/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,32 +15,43 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Outlook.MasterCategories.Count { +namespace ApiSdk.Users.Item.Outlook.MasterCategories.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\outlook\masterCategories\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; command.AddOption(userIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); var filterOption = new Option("--filter", description: "Filter items by property values") { }; filterOption.IsRequired = false; command.AddOption(filterOption); command.SetHandler(async (invocationContext) => { var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); var filter = invocationContext.ParseResult.GetValueForOption(filterOption); IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); @@ -53,47 +66,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories/$count{?%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories/$count{?%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -103,7 +113,18 @@ public class CountRequestBuilderGetQueryParameters { #else [QueryParameter("%24filter")] public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } #endif } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs b/src/sample/generated/Users/Item/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs index ebf63ac9..9ac453a8 100644 --- a/src/sample/generated/Users/Item/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,18 +16,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Outlook.MasterCategories.Item { +namespace ApiSdk.Users.Item.Outlook.MasterCategories.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\outlook\masterCategories\{outlookCategory-id} /// - public class OutlookCategoryItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OutlookCategoryItemRequestBuilder : BaseCliRequestBuilder + { /// - /// Delete the specified outlookCategory object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Delete navigation property masterCategories for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); - command.Description = "Delete the specified outlookCategory object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/outlookcategory-delete?view=graph-rest-1.0"; + command.Description = "Delete navigation property masterCategories for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -72,12 +78,13 @@ public Command BuildDeleteCommand() { return command; } /// - /// Get the properties and relationships of the specified outlookCategory object. This API is supported in the following national cloud deployments. - /// Find more info here + /// A list of categories defined for the user. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Get the properties and relationships of the specified outlookCategory object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/outlookcategory-get?view=graph-rest-1.0"; + command.Description = "A list of categories defined for the user."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -91,6 +98,11 @@ public Command BuildGetCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -99,6 +111,7 @@ public Command BuildGetCommand() { var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); var outlookCategoryId = invocationContext.ParseResult.GetValueForOption(outlookCategoryIdOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); @@ -107,6 +120,7 @@ public Command BuildGetCommand() { var reqAdapter = invocationContext.GetRequestAdapter(); var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); if (outlookCategoryId is not null) requestInfo.PathParameters.Add("outlookCategory%2Did", outlookCategoryId); @@ -122,12 +136,13 @@ public Command BuildGetCommand() { return command; } /// - /// Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. This API is supported in the following national cloud deployments. - /// Find more info here + /// Update the navigation property masterCategories in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); - command.Description = "Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/outlookcategory-update?view=graph-rest-1.0"; + command.Description = "Update the navigation property masterCategories in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -155,8 +170,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(OutlookCategory.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.OutlookCategory.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -178,100 +193,94 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new OutlookCategoryItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public OutlookCategoryItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories/{outlookCategory%2Did}{?%24select}", pathParameters) { + public OutlookCategoryItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories/{outlookCategory%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new OutlookCategoryItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public OutlookCategoryItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories/{outlookCategory%2Did}{?%24select}", rawUrl) { + public OutlookCategoryItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories/{outlookCategory%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Delete the specified outlookCategory object. This API is supported in the following national cloud deployments. + /// Delete navigation property masterCategories for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get the properties and relationships of the specified outlookCategory object. This API is supported in the following national cloud deployments. + /// A list of categories defined for the user. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update the writable property, color, of the specified outlookCategory object. You can't modify the displayName propertyonce you have created the category. This API is supported in the following national cloud deployments. + /// Update the navigation property masterCategories in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(OutlookCategory body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.OutlookCategory body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(OutlookCategory body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.OutlookCategory body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get the properties and relationships of the specified outlookCategory object. This API is supported in the following national cloud deployments. + /// A list of categories defined for the user. /// - public class OutlookCategoryItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OutlookCategoryItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -285,3 +294,4 @@ public class OutlookCategoryItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Outlook/MasterCategories/MasterCategoriesRequestBuilder.cs b/src/sample/generated/Users/Item/Outlook/MasterCategories/MasterCategoriesRequestBuilder.cs index 4d3cbbeb..8fef1d11 100644 --- a/src/sample/generated/Users/Item/Outlook/MasterCategories/MasterCategoriesRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Outlook/MasterCategories/MasterCategoriesRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Outlook.MasterCategories.Count; using ApiSdk.Users.Item.Outlook.MasterCategories.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,17 +18,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Outlook.MasterCategories { +namespace ApiSdk.Users.Item.Outlook.MasterCategories +{ /// /// Builds and executes requests for operations under \users\{user-id}\outlook\masterCategories /// - public class MasterCategoriesRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MasterCategoriesRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.outlook.masterCategories.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); - var builder = new OutlookCategoryItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Outlook.MasterCategories.Item.OutlookCategoryItemRequestBuilder(PathParameters); executables.Add(builder.BuildDeleteCommand()); executables.Add(builder.BuildGetCommand()); executables.Add(builder.BuildPatchCommand()); @@ -35,10 +42,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Outlook.MasterCategories.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -48,12 +57,13 @@ public Command BuildCountNavCommand() { return command; } /// - /// Create an outlookCategory object in the user's master list of categories. This API is supported in the following national cloud deployments. - /// Find more info here + /// Create new navigation property to masterCategories for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); - command.Description = "Create an outlookCategory object in the user's master list of categories. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/outlookuser-post-mastercategories?view=graph-rest-1.0"; + command.Description = "Create new navigation property to masterCategories for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -76,8 +86,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(OutlookCategory.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.OutlookCategory.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -98,12 +108,13 @@ public Command BuildCreateCommand() { return command; } /// - /// Get all the categories that have been defined for the user. This API is supported in the following national cloud deployments. - /// Find more info here + /// A list of categories defined for the user. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Get all the categories that have been defined for the user. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/outlookuser-list-mastercategories?view=graph-rest-1.0"; + command.Description = "A list of categories defined for the user."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -116,6 +127,10 @@ public Command BuildListCommand() { }; skipOption.IsRequired = false; command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); var filterOption = new Option("--filter", description: "Filter items by property values") { }; filterOption.IsRequired = false; @@ -134,6 +149,11 @@ public Command BuildListCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -144,10 +164,12 @@ public Command BuildListCommand() { var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); var top = invocationContext.ParseResult.GetValueForOption(topOption); var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); var filter = invocationContext.ParseResult.GetValueForOption(filterOption); var count = invocationContext.ParseResult.GetValueForOption(countOption); var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); var all = invocationContext.ParseResult.GetValueForOption(allOption); @@ -159,10 +181,12 @@ public Command BuildListCommand() { var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Top = top; q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; q.QueryParameters.Count = count; q.QueryParameters.Orderby = orderby; q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); var errorMapping = new Dictionary> { @@ -172,7 +196,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -184,78 +210,78 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new MasterCategoriesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MasterCategoriesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}", pathParameters) { + public MasterCategoriesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MasterCategoriesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MasterCategoriesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}", rawUrl) { + public MasterCategoriesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/outlook/masterCategories{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Get all the categories that have been defined for the user. This API is supported in the following national cloud deployments. + /// A list of categories defined for the user. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Create an outlookCategory object in the user's master list of categories. This API is supported in the following national cloud deployments. + /// Create new navigation property to masterCategories for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(OutlookCategory body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.OutlookCategory body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(OutlookCategory body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.OutlookCategory body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get all the categories that have been defined for the user. This API is supported in the following national cloud deployments. + /// A list of categories defined for the user. /// - public class MasterCategoriesRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MasterCategoriesRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -275,6 +301,16 @@ public class MasterCategoriesRequestBuilderGetQueryParameters { #else [QueryParameter("%24orderby")] public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } #endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -295,3 +331,4 @@ public class MasterCategoriesRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Outlook/OutlookRequestBuilder.cs b/src/sample/generated/Users/Item/Outlook/OutlookRequestBuilder.cs index 64d68219..586c7675 100644 --- a/src/sample/generated/Users/Item/Outlook/OutlookRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Outlook/OutlookRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Outlook.MasterCategories; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,15 +17,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Outlook { +namespace ApiSdk.Users.Item.Outlook +{ /// /// Builds and executes requests for operations under \users\{user-id}\outlook /// - public class OutlookRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OutlookRequestBuilder : BaseCliRequestBuilder + { /// /// Get outlook from users /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get outlook from users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -35,6 +42,11 @@ public Command BuildGetCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -42,6 +54,7 @@ public Command BuildGetCommand() { command.SetHandler(async (invocationContext) => { var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); @@ -50,6 +63,7 @@ public Command BuildGetCommand() { var reqAdapter = invocationContext.GetRequestAdapter(); var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); var errorMapping = new Dictionary> { @@ -66,10 +80,12 @@ public Command BuildGetCommand() { /// /// The masterCategories property /// - public Command BuildMasterCategoriesNavCommand() { + /// A + public Command BuildMasterCategoriesNavCommand() + { var command = new Command("master-categories"); command.Description = "The masterCategories property"; - var builder = new MasterCategoriesRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Outlook.MasterCategories.MasterCategoriesRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -89,47 +105,54 @@ public Command BuildMasterCategoriesNavCommand() { return command; } /// - /// Instantiates a new OutlookRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public OutlookRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/outlook{?%24select}", pathParameters) { + public OutlookRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/outlook{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new OutlookRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public OutlookRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/outlook{?%24select}", rawUrl) { + public OutlookRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/outlook{?%24expand,%24select}", rawUrl) + { } /// /// Get outlook from users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get outlook from users /// - public class OutlookRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OutlookRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -143,3 +166,4 @@ public class OutlookRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/Count/CountRequestBuilder.cs index 18563580..5eb8c5ee 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.Count { +namespace ApiSdk.Users.Item.OwnedDevices.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/Item/DirectoryObjectItemRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/Item/DirectoryObjectItemRequestBuilder.cs index 4bc970f2..48fc28d6 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,9 +1,11 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphAppRoleAssignment; using ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphDevice; using ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphEndpoint; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -17,17 +19,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.Item { +namespace ApiSdk.Users.Item.OwnedDevices.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\{directoryObject-id} /// - public class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder + { /// - /// Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Devices the user owns. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1)."; + command.Description = "Devices the user owns. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1)."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -88,10 +95,12 @@ public Command BuildGetCommand() { /// /// The microsoftGraphAppRoleAssignment property /// - public Command BuildMicrosoftGraphAppRoleAssignmentByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphAppRoleAssignmentByIdNavCommand() + { var command = new Command("microsoft-graph-app-role-assignment-by-id"); command.Description = "The microsoftGraphAppRoleAssignment property"; - var builder = new MicrosoftGraphAppRoleAssignmentRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphAppRoleAssignment.MicrosoftGraphAppRoleAssignmentRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -103,10 +112,12 @@ public Command BuildMicrosoftGraphAppRoleAssignmentByIdNavCommand() { /// /// The microsoftGraphDevice property /// - public Command BuildMicrosoftGraphDeviceByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphDeviceByIdNavCommand() + { var command = new Command("microsoft-graph-device-by-id"); command.Description = "The microsoftGraphDevice property"; - var builder = new MicrosoftGraphDeviceRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphDevice.MicrosoftGraphDeviceRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -118,10 +129,12 @@ public Command BuildMicrosoftGraphDeviceByIdNavCommand() { /// /// The microsoftGraphEndpoint property /// - public Command BuildMicrosoftGraphEndpointByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphEndpointByIdNavCommand() + { var command = new Command("microsoft-graph-endpoint-by-id"); command.Description = "The microsoftGraphEndpoint property"; - var builder = new MicrosoftGraphEndpointRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphEndpoint.MicrosoftGraphEndpointRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -131,47 +144,44 @@ public Command BuildMicrosoftGraphEndpointByIdNavCommand() { return command; } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Devices the user owns. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Devices the user owns. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// - public class DirectoryObjectItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -195,3 +205,4 @@ public class DirectoryObjectItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs index 8e562c00..82c3c2ec 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphAppRoleAssignment { +namespace ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphAppRoleAssignment +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\{directoryObject-id}\microsoft.graph.appRoleAssignment /// - public class MicrosoftGraphAppRoleAssignmentRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAppRoleAssignmentRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphAppRoleAssignmentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphAppRoleAssignmentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.appRoleAssignment{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphAppRoleAssignmentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.appRoleAssignment{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphAppRoleAssignmentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphAppRoleAssignmentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.appRoleAssignment{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphAppRoleAssignmentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.appRoleAssignment{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment /// - public class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs index 681f7606..70a94e32 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphDevice { +namespace ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphDevice +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\{directoryObject-id}\microsoft.graph.device /// - public class MicrosoftGraphDeviceRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDeviceRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.device /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.device"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphDeviceRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphDeviceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.device{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphDeviceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.device{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphDeviceRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphDeviceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.device{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphDeviceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.device{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.device /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.device /// - public class MicrosoftGraphDeviceRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDeviceRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphDeviceRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs index d122981e..d8a8b79a 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/Item/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphEndpoint { +namespace ApiSdk.Users.Item.OwnedDevices.Item.MicrosoftGraphEndpoint +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\{directoryObject-id}\microsoft.graph.endpoint /// - public class MicrosoftGraphEndpointRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphEndpointRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphEndpointRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphEndpointRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.endpoint{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphEndpointRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.endpoint{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphEndpointRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphEndpointRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.endpoint{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphEndpointRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/{directoryObject%2Did}/microsoft.graph.endpoint{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint /// - public class MicrosoftGraphEndpointRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphEndpointRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphEndpointRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphAppRoleAssignment/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphAppRoleAssignment/Count/CountRequestBuilder.cs index 5902f304..65abc570 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphAppRoleAssignment/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphAppRoleAssignment/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphAppRoleAssignment.Count { +namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphAppRoleAssignment.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\microsoft.graph.appRoleAssignment\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.appRoleAssignment/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.appRoleAssignment/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.appRoleAssignment/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.appRoleAssignment/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs index f6c496fc..65094a2c 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphAppRoleAssignment.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphAppRoleAssignment { +namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphAppRoleAssignment +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\microsoft.graph.appRoleAssignment /// - public class MicrosoftGraphAppRoleAssignmentRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAppRoleAssignmentRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphAppRoleAssignment.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphAppRoleAssignmentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphAppRoleAssignmentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.appRoleAssignment{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphAppRoleAssignmentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.appRoleAssignment{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphAppRoleAssignmentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphAppRoleAssignmentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.appRoleAssignment{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphAppRoleAssignmentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.appRoleAssignment{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphDevice/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphDevice/Count/CountRequestBuilder.cs index b3db8889..1c330dc3 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphDevice/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphDevice/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphDevice.Count { +namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphDevice.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\microsoft.graph.device\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.device/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.device/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.device/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.device/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs index 406b1fa0..8a512ea1 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphDevice.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphDevice { +namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphDevice +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\microsoft.graph.device /// - public class MicrosoftGraphDeviceRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDeviceRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphDevice.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphDeviceRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphDeviceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.device{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphDeviceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.device{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphDeviceRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphDeviceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.device{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphDeviceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.device{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphDeviceRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDeviceRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphDeviceRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphEndpoint/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphEndpoint/Count/CountRequestBuilder.cs index 0362ea62..d4f6f8a7 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphEndpoint/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphEndpoint/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphEndpoint.Count { +namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphEndpoint.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\microsoft.graph.endpoint\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.endpoint/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.endpoint/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.endpoint/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.endpoint/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs index af1d22c5..b6404937 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphEndpoint.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphEndpoint { +namespace ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphEndpoint +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices\microsoft.graph.endpoint /// - public class MicrosoftGraphEndpointRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphEndpointRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphEndpoint.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphEndpointRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphEndpointRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.endpoint{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphEndpointRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.endpoint{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphEndpointRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphEndpointRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.endpoint{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphEndpointRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices/microsoft.graph.endpoint{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphEndpointRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphEndpointRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphEndpointRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedDevices/OwnedDevicesRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedDevices/OwnedDevicesRequestBuilder.cs index 0fd1f47e..1686d3d6 100644 --- a/src/sample/generated/Users/Item/OwnedDevices/OwnedDevicesRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedDevices/OwnedDevicesRequestBuilder.cs @@ -1,4 +1,5 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedDevices.Count; @@ -6,6 +7,7 @@ using ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphAppRoleAssignment; using ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphDevice; using ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphEndpoint; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -19,18 +21,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedDevices { +namespace ApiSdk.Users.Item.OwnedDevices +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedDevices /// - public class OwnedDevicesRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OwnedDevicesRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.ownedDevices.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new DirectoryObjectItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.Item.DirectoryObjectItemRequestBuilder(PathParameters); executables.Add(builder.BuildGetCommand()); commands.Add(builder.BuildMicrosoftGraphAppRoleAssignmentByIdNavCommand()); commands.Add(builder.BuildMicrosoftGraphDeviceByIdNavCommand()); @@ -40,10 +47,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -53,12 +62,13 @@ public Command BuildCountNavCommand() { return command; } /// - /// Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - /// Find more info here + /// Devices the user owns. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1).\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-owneddevices?view=graph-rest-1.0"; + command.Description = "Devices the user owns. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1)."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -147,7 +157,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -161,10 +173,12 @@ public Command BuildListCommand() { /// /// The microsoftGraphAppRoleAssignment property /// - public Command BuildMicrosoftGraphAppRoleAssignmentNavCommand() { + /// A + public Command BuildMicrosoftGraphAppRoleAssignmentNavCommand() + { var command = new Command("microsoft-graph-app-role-assignment"); command.Description = "The microsoftGraphAppRoleAssignment property"; - var builder = new MicrosoftGraphAppRoleAssignmentRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphAppRoleAssignment.MicrosoftGraphAppRoleAssignmentRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -182,10 +196,12 @@ public Command BuildMicrosoftGraphAppRoleAssignmentNavCommand() { /// /// The microsoftGraphDevice property /// - public Command BuildMicrosoftGraphDeviceNavCommand() { + /// A + public Command BuildMicrosoftGraphDeviceNavCommand() + { var command = new Command("microsoft-graph-device"); command.Description = "The microsoftGraphDevice property"; - var builder = new MicrosoftGraphDeviceRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphDevice.MicrosoftGraphDeviceRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -203,10 +219,12 @@ public Command BuildMicrosoftGraphDeviceNavCommand() { /// /// The microsoftGraphEndpoint property /// - public Command BuildMicrosoftGraphEndpointNavCommand() { + /// A + public Command BuildMicrosoftGraphEndpointNavCommand() + { var command = new Command("microsoft-graph-endpoint"); command.Description = "The microsoftGraphEndpoint property"; - var builder = new MicrosoftGraphEndpointRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.MicrosoftGraphEndpoint.MicrosoftGraphEndpointRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -222,47 +240,44 @@ public Command BuildMicrosoftGraphEndpointNavCommand() { return command; } /// - /// Instantiates a new OwnedDevicesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public OwnedDevicesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public OwnedDevicesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedDevices{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new OwnedDevicesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public OwnedDevicesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public OwnedDevicesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedDevices{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Devices the user owns. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Devices that are owned by the user. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Devices the user owns. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// - public class OwnedDevicesRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OwnedDevicesRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -325,3 +340,4 @@ public class OwnedDevicesRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/Count/CountRequestBuilder.cs index 328b5dad..05cabda4 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.Count { +namespace ApiSdk.Users.Item.OwnedObjects.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/Item/DirectoryObjectItemRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/Item/DirectoryObjectItemRequestBuilder.cs index 966fdd34..d0f637a9 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,9 +1,11 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphApplication; using ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphGroup; using ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphServicePrincipal; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -17,17 +19,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.Item { +namespace ApiSdk.Users.Item.OwnedObjects.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\{directoryObject-id} /// - public class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder + { /// - /// Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Directory objects the user owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1)."; + command.Description = "Directory objects the user owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1)."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -88,10 +95,12 @@ public Command BuildGetCommand() { /// /// The microsoftGraphApplication property /// - public Command BuildMicrosoftGraphApplicationByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphApplicationByIdNavCommand() + { var command = new Command("microsoft-graph-application-by-id"); command.Description = "The microsoftGraphApplication property"; - var builder = new MicrosoftGraphApplicationRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphApplication.MicrosoftGraphApplicationRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -103,10 +112,12 @@ public Command BuildMicrosoftGraphApplicationByIdNavCommand() { /// /// The microsoftGraphGroup property /// - public Command BuildMicrosoftGraphGroupByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphGroupByIdNavCommand() + { var command = new Command("microsoft-graph-group-by-id"); command.Description = "The microsoftGraphGroup property"; - var builder = new MicrosoftGraphGroupRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphGroup.MicrosoftGraphGroupRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -118,10 +129,12 @@ public Command BuildMicrosoftGraphGroupByIdNavCommand() { /// /// The microsoftGraphServicePrincipal property /// - public Command BuildMicrosoftGraphServicePrincipalByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphServicePrincipalByIdNavCommand() + { var command = new Command("microsoft-graph-service-principal-by-id"); command.Description = "The microsoftGraphServicePrincipal property"; - var builder = new MicrosoftGraphServicePrincipalRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphServicePrincipal.MicrosoftGraphServicePrincipalRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -131,47 +144,44 @@ public Command BuildMicrosoftGraphServicePrincipalByIdNavCommand() { return command; } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Directory objects the user owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Directory objects the user owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// - public class DirectoryObjectItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -195,3 +205,4 @@ public class DirectoryObjectItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphApplication/MicrosoftGraphApplicationRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphApplication/MicrosoftGraphApplicationRequestBuilder.cs index 158b6f08..29f77abc 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphApplication/MicrosoftGraphApplicationRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphApplication/MicrosoftGraphApplicationRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphApplication { +namespace ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphApplication +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\{directoryObject-id}\microsoft.graph.application /// - public class MicrosoftGraphApplicationRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphApplicationRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.application /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.application"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphApplicationRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphApplicationRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.application{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphApplicationRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.application{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphApplicationRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphApplicationRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.application{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphApplicationRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.application{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.application /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.application /// - public class MicrosoftGraphApplicationRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphApplicationRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphApplicationRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs index 6185bc3d..0758ea6d 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphGroup { +namespace ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphGroup +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\{directoryObject-id}\microsoft.graph.group /// - public class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.group /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.group"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.group{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.group{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.group{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.group{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.group /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.group /// - public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs index 319c0ce7..8146e65f 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/Item/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphServicePrincipal { +namespace ApiSdk.Users.Item.OwnedObjects.Item.MicrosoftGraphServicePrincipal +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\{directoryObject-id}\microsoft.graph.servicePrincipal /// - public class MicrosoftGraphServicePrincipalRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphServicePrincipalRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphServicePrincipalRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphServicePrincipalRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.servicePrincipal{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphServicePrincipalRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.servicePrincipal{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphServicePrincipalRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphServicePrincipalRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.servicePrincipal{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphServicePrincipalRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/{directoryObject%2Did}/microsoft.graph.servicePrincipal{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.servicePrincipal /// - public class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphApplication/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphApplication/Count/CountRequestBuilder.cs index 4e1a7d6c..30d4d95f 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphApplication/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphApplication/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphApplication.Count { +namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphApplication.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\microsoft.graph.application\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.application/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.application/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.application/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.application/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphApplication/MicrosoftGraphApplicationRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphApplication/MicrosoftGraphApplicationRequestBuilder.cs index dd5ed5ac..67530935 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphApplication/MicrosoftGraphApplicationRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphApplication/MicrosoftGraphApplicationRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphApplication.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphApplication { +namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphApplication +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\microsoft.graph.application /// - public class MicrosoftGraphApplicationRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphApplicationRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphApplication.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphApplicationRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphApplicationRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.application{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphApplicationRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.application{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphApplicationRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphApplicationRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.application{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphApplicationRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.application{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.application in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphApplicationRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphApplicationRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphApplicationRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphGroup/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphGroup/Count/CountRequestBuilder.cs index 0c04b9a3..825b51bf 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphGroup/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphGroup/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphGroup.Count { +namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphGroup.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\microsoft.graph.group\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.group/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.group/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.group/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.group/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs index 7906509c..26eb1896 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphGroup.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphGroup { +namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphGroup +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\microsoft.graph.group /// - public class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphGroup.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphServicePrincipal/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphServicePrincipal/Count/CountRequestBuilder.cs index 33125248..4e175066 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphServicePrincipal/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphServicePrincipal/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphServicePrincipal.Count { +namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphServicePrincipal.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\microsoft.graph.servicePrincipal\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.servicePrincipal/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.servicePrincipal/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.servicePrincipal/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.servicePrincipal/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs index f25cc606..47625c78 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/MicrosoftGraphServicePrincipal/MicrosoftGraphServicePrincipalRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphServicePrincipal.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphServicePrincipal { +namespace ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphServicePrincipal +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects\microsoft.graph.servicePrincipal /// - public class MicrosoftGraphServicePrincipalRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphServicePrincipalRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphServicePrincipal.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphServicePrincipalRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphServicePrincipalRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphServicePrincipalRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphServicePrincipalRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphServicePrincipalRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.servicePrincipal{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphServicePrincipalRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects/microsoft.graph.servicePrincipal{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.servicePrincipal in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphServicePrincipalRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/OwnedObjects/OwnedObjectsRequestBuilder.cs b/src/sample/generated/Users/Item/OwnedObjects/OwnedObjectsRequestBuilder.cs index 61d8479c..e1a55038 100644 --- a/src/sample/generated/Users/Item/OwnedObjects/OwnedObjectsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/OwnedObjects/OwnedObjectsRequestBuilder.cs @@ -1,4 +1,5 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.OwnedObjects.Count; @@ -6,6 +7,7 @@ using ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphApplication; using ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphGroup; using ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphServicePrincipal; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -19,18 +21,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.OwnedObjects { +namespace ApiSdk.Users.Item.OwnedObjects +{ /// /// Builds and executes requests for operations under \users\{user-id}\ownedObjects /// - public class OwnedObjectsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OwnedObjectsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.ownedObjects.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new DirectoryObjectItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.Item.DirectoryObjectItemRequestBuilder(PathParameters); executables.Add(builder.BuildGetCommand()); commands.Add(builder.BuildMicrosoftGraphApplicationByIdNavCommand()); commands.Add(builder.BuildMicrosoftGraphGroupByIdNavCommand()); @@ -40,10 +47,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -53,12 +62,13 @@ public Command BuildCountNavCommand() { return command; } /// - /// Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). - /// Find more info here + /// Directory objects the user owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1).\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-ownedobjects?view=graph-rest-1.0"; + command.Description = "Directory objects the user owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1)."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -147,7 +157,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -161,10 +173,12 @@ public Command BuildListCommand() { /// /// The microsoftGraphApplication property /// - public Command BuildMicrosoftGraphApplicationNavCommand() { + /// A + public Command BuildMicrosoftGraphApplicationNavCommand() + { var command = new Command("microsoft-graph-application"); command.Description = "The microsoftGraphApplication property"; - var builder = new MicrosoftGraphApplicationRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphApplication.MicrosoftGraphApplicationRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -182,10 +196,12 @@ public Command BuildMicrosoftGraphApplicationNavCommand() { /// /// The microsoftGraphGroup property /// - public Command BuildMicrosoftGraphGroupNavCommand() { + /// A + public Command BuildMicrosoftGraphGroupNavCommand() + { var command = new Command("microsoft-graph-group"); command.Description = "The microsoftGraphGroup property"; - var builder = new MicrosoftGraphGroupRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphGroup.MicrosoftGraphGroupRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -203,10 +219,12 @@ public Command BuildMicrosoftGraphGroupNavCommand() { /// /// The microsoftGraphServicePrincipal property /// - public Command BuildMicrosoftGraphServicePrincipalNavCommand() { + /// A + public Command BuildMicrosoftGraphServicePrincipalNavCommand() + { var command = new Command("microsoft-graph-service-principal"); command.Description = "The microsoftGraphServicePrincipal property"; - var builder = new MicrosoftGraphServicePrincipalRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.MicrosoftGraphServicePrincipal.MicrosoftGraphServicePrincipalRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -222,47 +240,44 @@ public Command BuildMicrosoftGraphServicePrincipalNavCommand() { return command; } /// - /// Instantiates a new OwnedObjectsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public OwnedObjectsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public OwnedObjectsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/ownedObjects{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new OwnedObjectsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public OwnedObjectsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public OwnedObjectsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/ownedObjects{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Directory objects the user owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Directory objects that are owned by the user. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + /// Directory objects the user owns. Read-only. Nullable. Supports $expand, $select nested in $expand, and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). /// - public class OwnedObjectsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class OwnedObjectsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -325,3 +340,4 @@ public class OwnedObjectsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Photo/PhotoRequestBuilder.cs b/src/sample/generated/Users/Item/Photo/PhotoRequestBuilder.cs index 0b8c3180..7eab5c6e 100644 --- a/src/sample/generated/Users/Item/Photo/PhotoRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Photo/PhotoRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Photo.Value; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,19 +17,25 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Photo { +namespace ApiSdk.Users.Item.Photo +{ /// /// Builds and executes requests for operations under \users\{user-id}\photo /// - public class PhotoRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotoRequestBuilder : BaseCliRequestBuilder + { /// /// The Content property /// - public Command BuildContentNavCommand() { + /// A + public Command BuildContentNavCommand() + { var command = new Command("content"); command.Description = "The Content property"; - var builder = new ContentRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Photo.Value.ContentRequestBuilder(PathParameters); var execCommands = new List(); + execCommands.Add(builder.BuildDeleteCommand()); execCommands.Add(builder.BuildGetCommand()); execCommands.Add(builder.BuildPutCommand()); foreach (var cmd in execCommands) @@ -39,7 +47,9 @@ public Command BuildContentNavCommand() { /// /// Delete navigation property photo for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); command.Description = "Delete navigation property photo for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -82,12 +92,13 @@ public Command BuildDeleteCommand() { return command; } /// - /// Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is supported in the following national cloud deployments. - /// Find more info here + /// The user's profile photo. Read-only. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0"; + command.Description = "The user's profile photo. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -97,6 +108,11 @@ public Command BuildGetCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -104,6 +120,7 @@ public Command BuildGetCommand() { command.SetHandler(async (invocationContext) => { var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); @@ -112,6 +129,7 @@ public Command BuildGetCommand() { var reqAdapter = invocationContext.GetRequestAdapter(); var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); var errorMapping = new Dictionary> { @@ -128,7 +146,9 @@ public Command BuildGetCommand() { /// /// Update the navigation property photo in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); command.Description = "Update the navigation property photo in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -153,8 +173,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ProfilePhoto.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.ProfilePhoto.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -175,100 +195,94 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new PhotoRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public PhotoRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photo{?%24select}", pathParameters) { + public PhotoRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photo{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new PhotoRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public PhotoRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photo{?%24select}", rawUrl) { + public PhotoRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photo{?%24expand,%24select}", rawUrl) + { } /// /// Delete navigation property photo for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is supported in the following national cloud deployments. + /// The user's profile photo. Read-only. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Update the navigation property photo in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(ProfilePhoto body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ProfilePhoto body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(ProfilePhoto body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ProfilePhoto body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get the specified profilePhoto or its metadata (profilePhoto properties). The supported sizes of HD photos on Microsoft 365 are as follows: 48x48, 64x64, 96x96, 120x120, 240x240,360x360, 432x432, 504x504, and 648x648. Photos can be any dimension if they are stored in Azure Active Directory. You can get the metadata of the largest available photo, or specify a size to get the metadata for that photo size.If the size you request is not available, you can still get a smaller size that the user has uploaded and made available.For example, if the user uploads a photo that is 504x504 pixels, all but the 648x648 size of photo will be available for download. This API is supported in the following national cloud deployments. + /// The user's profile photo. Read-only. /// - public class PhotoRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotoRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -282,3 +296,4 @@ public class PhotoRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Photo/Value/ContentRequestBuilder.cs b/src/sample/generated/Users/Item/Photo/Value/ContentRequestBuilder.cs index 9d047939..a442a9d3 100644 --- a/src/sample/generated/Users/Item/Photo/Value/ContentRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Photo/Value/ContentRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,18 +15,69 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Photo.Value { +namespace ApiSdk.Users.Item.Photo.Value +{ /// /// Builds and executes requests for operations under \users\{user-id}\photo\$value /// - public class ContentRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContentRequestBuilder : BaseCliRequestBuilder + { /// - /// Get media content for the navigation property photo from users - /// Find more info here + /// The user's profile photo. Read-only. /// - public Command BuildGetCommand() { + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "The user's profile photo. Read-only."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// The user's profile photo. Read-only. + /// + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Get media content for the navigation property photo from users\n\nFind more info here:\n https://learn.microsoft.com/graph/api/profilephoto-get?view=graph-rest-1.0"; + command.Description = "The user's profile photo. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -58,11 +111,13 @@ public Command BuildGetCommand() { return command; } /// - /// Update media content for the navigation property photo in users + /// The user's profile photo. Read-only. /// - public Command BuildPutCommand() { + /// A + public Command BuildPutCommand() + { var command = new Command("put"); - command.Description = "Update media content for the navigation property photo in users"; + command.Description = "The user's profile photo. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -106,69 +161,79 @@ public Command BuildPutCommand() { return command; } /// - /// Instantiates a new ContentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ContentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photo/$value", pathParameters) { + public ContentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photo/$value", pathParameters) + { } /// - /// Instantiates a new ContentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ContentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photo/$value", rawUrl) { + public ContentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photo/$value", rawUrl) + { } /// - /// Get media content for the navigation property photo from users + /// The user's profile photo. Read-only. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update media content for the navigation property photo in users + /// The user's profile photo. Read-only. /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); + return requestInfo; + } + /// + /// The user's profile photo. Read-only. + /// + /// A /// Binary request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPutRequestInformation(Stream body, Action>? requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(Stream body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PUT, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } - requestInfo.SetStreamContent(body); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetStreamContent(body, "application/octet-stream"); return requestInfo; } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Photos/Item/ProfilePhotoItemRequestBuilder.cs b/src/sample/generated/Users/Item/Photos/Item/ProfilePhotoItemRequestBuilder.cs index 686314f6..36a11764 100644 --- a/src/sample/generated/Users/Item/Photos/Item/ProfilePhotoItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Photos/Item/ProfilePhotoItemRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Photos.Item.Value; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,19 +17,25 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Photos.Item { +namespace ApiSdk.Users.Item.Photos.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\photos\{profilePhoto-id} /// - public class ProfilePhotoItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProfilePhotoItemRequestBuilder : BaseCliRequestBuilder + { /// /// The Content property /// - public Command BuildContentNavCommand() { + /// A + public Command BuildContentNavCommand() + { var command = new Command("content"); command.Description = "The Content property"; - var builder = new ContentRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Photos.Item.Value.ContentRequestBuilder(PathParameters); var execCommands = new List(); + execCommands.Add(builder.BuildDeleteCommand()); execCommands.Add(builder.BuildGetCommand()); execCommands.Add(builder.BuildPutCommand()); foreach (var cmd in execCommands) @@ -37,11 +45,13 @@ public Command BuildContentNavCommand() { return command; } /// - /// Get photos from users + /// The collection of the user's profile photos in different sizes. Read-only. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Get photos from users"; + command.Description = "The collection of the user's profile photos in different sizes. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -55,6 +65,11 @@ public Command BuildGetCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -63,6 +78,7 @@ public Command BuildGetCommand() { var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); var profilePhotoId = invocationContext.ParseResult.GetValueForOption(profilePhotoIdOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); @@ -71,6 +87,7 @@ public Command BuildGetCommand() { var reqAdapter = invocationContext.GetRequestAdapter(); var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); if (profilePhotoId is not null) requestInfo.PathParameters.Add("profilePhoto%2Did", profilePhotoId); @@ -86,47 +103,54 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new ProfilePhotoItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ProfilePhotoItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photos/{profilePhoto%2Did}{?%24select}", pathParameters) { + public ProfilePhotoItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photos/{profilePhoto%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new ProfilePhotoItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ProfilePhotoItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photos/{profilePhoto%2Did}{?%24select}", rawUrl) { + public ProfilePhotoItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photos/{profilePhoto%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Get photos from users + /// The collection of the user's profile photos in different sizes. Read-only. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get photos from users + /// The collection of the user's profile photos in different sizes. Read-only. /// - public class ProfilePhotoItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ProfilePhotoItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -140,3 +164,4 @@ public class ProfilePhotoItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Photos/Item/Value/ContentRequestBuilder.cs b/src/sample/generated/Users/Item/Photos/Item/Value/ContentRequestBuilder.cs index cd64fa47..919831b3 100644 --- a/src/sample/generated/Users/Item/Photos/Item/Value/ContentRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Photos/Item/Value/ContentRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,17 +15,75 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Photos.Item.Value { +namespace ApiSdk.Users.Item.Photos.Item.Value +{ /// /// Builds and executes requests for operations under \users\{user-id}\photos\{profilePhoto-id}\$value /// - public class ContentRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContentRequestBuilder : BaseCliRequestBuilder + { /// - /// Get media content for the navigation property photos from users + /// The unique identifier for an entity. Read-only. /// - public Command BuildGetCommand() { + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "The unique identifier for an entity. Read-only."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var profilePhotoIdOption = new Option("--profile-photo-id", description: "The unique identifier of profilePhoto") { + }; + profilePhotoIdOption.IsRequired = true; + command.AddOption(profilePhotoIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var profilePhotoId = invocationContext.ParseResult.GetValueForOption(profilePhotoIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (profilePhotoId is not null) requestInfo.PathParameters.Add("profilePhoto%2Did", profilePhotoId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// The unique identifier for an entity. Read-only. + /// + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Get media content for the navigation property photos from users"; + command.Description = "The unique identifier for an entity. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -63,11 +123,13 @@ public Command BuildGetCommand() { return command; } /// - /// Update media content for the navigation property photos in users + /// The unique identifier for an entity. Read-only. /// - public Command BuildPutCommand() { + /// A + public Command BuildPutCommand() + { var command = new Command("put"); - command.Description = "Update media content for the navigation property photos in users"; + command.Description = "The unique identifier for an entity. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -117,69 +179,79 @@ public Command BuildPutCommand() { return command; } /// - /// Instantiates a new ContentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ContentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photos/{profilePhoto%2Did}/$value", pathParameters) { + public ContentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photos/{profilePhoto%2Did}/$value", pathParameters) + { } /// - /// Instantiates a new ContentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ContentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photos/{profilePhoto%2Did}/$value", rawUrl) { + public ContentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photos/{profilePhoto%2Did}/$value", rawUrl) + { } /// - /// Get media content for the navigation property photos from users + /// The unique identifier for an entity. Read-only. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update media content for the navigation property photos in users + /// The unique identifier for an entity. Read-only. /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); + return requestInfo; + } + /// + /// The unique identifier for an entity. Read-only. + /// + /// A /// Binary request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPutRequestInformation(Stream body, Action>? requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(Stream body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PUT, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } - requestInfo.SetStreamContent(body); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetStreamContent(body, "application/octet-stream"); return requestInfo; } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Photos/PhotosRequestBuilder.cs b/src/sample/generated/Users/Item/Photos/PhotosRequestBuilder.cs index 7f6f22c0..05f7c6c6 100644 --- a/src/sample/generated/Users/Item/Photos/PhotosRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Photos/PhotosRequestBuilder.cs @@ -1,8 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; -using ApiSdk.Users.Item.Photos.Count; using ApiSdk.Users.Item.Photos.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,43 +17,35 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Photos { +namespace ApiSdk.Users.Item.Photos +{ /// /// Builds and executes requests for operations under \users\{user-id}\photos /// - public class PhotosRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotosRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.photos.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new ProfilePhotoItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Photos.Item.ProfilePhotoItemRequestBuilder(PathParameters); commands.Add(builder.BuildContentNavCommand()); executables.Add(builder.BuildGetCommand()); return new(executables, commands); } /// - /// The Count property + /// The collection of the user's profile photos in different sizes. Read-only. /// - public Command BuildCountNavCommand() { - var command = new Command("count"); - command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); - var execCommands = new List(); - execCommands.Add(builder.BuildGetCommand()); - foreach (var cmd in execCommands) - { - command.AddCommand(cmd); - } - return command; - } - /// - /// Get photos from users - /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Get photos from users"; + command.Description = "The collection of the user's profile photos in different sizes. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -65,6 +58,10 @@ public Command BuildListCommand() { }; skipOption.IsRequired = false; command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); var filterOption = new Option("--filter", description: "Filter items by property values") { }; filterOption.IsRequired = false; @@ -83,6 +80,11 @@ public Command BuildListCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -93,10 +95,12 @@ public Command BuildListCommand() { var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); var top = invocationContext.ParseResult.GetValueForOption(topOption); var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); var filter = invocationContext.ParseResult.GetValueForOption(filterOption); var count = invocationContext.ParseResult.GetValueForOption(countOption); var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); var all = invocationContext.ParseResult.GetValueForOption(allOption); @@ -108,10 +112,12 @@ public Command BuildListCommand() { var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Top = top; q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; q.QueryParameters.Count = count; q.QueryParameters.Orderby = orderby; q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); var errorMapping = new Dictionary> { @@ -121,7 +127,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -133,50 +141,57 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new PhotosRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public PhotosRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photos{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}", pathParameters) { + public PhotosRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/photos{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new PhotosRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public PhotosRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photos{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}", rawUrl) { + public PhotosRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/photos{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Get photos from users + /// The collection of the user's profile photos in different sizes. Read-only. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get photos from users + /// The collection of the user's profile photos in different sizes. Read-only. /// - public class PhotosRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class PhotosRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -196,6 +211,16 @@ public class PhotosRequestBuilderGetQueryParameters { #else [QueryParameter("%24orderby")] public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } #endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -216,3 +241,4 @@ public class PhotosRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/Count/CountRequestBuilder.cs index cf13215c..26f97834 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.Count { +namespace ApiSdk.Users.Item.RegisteredDevices.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs index e8b81dc8..4a7e0606 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,9 +1,11 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphAppRoleAssignment; using ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphDevice; using ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphEndpoint; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -17,15 +19,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.Item { +namespace ApiSdk.Users.Item.RegisteredDevices.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\{directoryObject-id} /// - public class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder + { /// /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -88,10 +95,12 @@ public Command BuildGetCommand() { /// /// The microsoftGraphAppRoleAssignment property /// - public Command BuildMicrosoftGraphAppRoleAssignmentByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphAppRoleAssignmentByIdNavCommand() + { var command = new Command("microsoft-graph-app-role-assignment-by-id"); command.Description = "The microsoftGraphAppRoleAssignment property"; - var builder = new MicrosoftGraphAppRoleAssignmentRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphAppRoleAssignment.MicrosoftGraphAppRoleAssignmentRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -103,10 +112,12 @@ public Command BuildMicrosoftGraphAppRoleAssignmentByIdNavCommand() { /// /// The microsoftGraphDevice property /// - public Command BuildMicrosoftGraphDeviceByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphDeviceByIdNavCommand() + { var command = new Command("microsoft-graph-device-by-id"); command.Description = "The microsoftGraphDevice property"; - var builder = new MicrosoftGraphDeviceRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphDevice.MicrosoftGraphDeviceRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -118,10 +129,12 @@ public Command BuildMicrosoftGraphDeviceByIdNavCommand() { /// /// The microsoftGraphEndpoint property /// - public Command BuildMicrosoftGraphEndpointByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphEndpointByIdNavCommand() + { var command = new Command("microsoft-graph-endpoint-by-id"); command.Description = "The microsoftGraphEndpoint property"; - var builder = new MicrosoftGraphEndpointRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphEndpoint.MicrosoftGraphEndpointRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -131,47 +144,44 @@ public Command BuildMicrosoftGraphEndpointByIdNavCommand() { return command; } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// - public class DirectoryObjectItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -195,3 +205,4 @@ public class DirectoryObjectItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs index 94641de4..5f27b64f 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphAppRoleAssignment { +namespace ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphAppRoleAssignment +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\{directoryObject-id}\microsoft.graph.appRoleAssignment /// - public class MicrosoftGraphAppRoleAssignmentRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAppRoleAssignmentRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphAppRoleAssignmentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphAppRoleAssignmentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.appRoleAssignment{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphAppRoleAssignmentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.appRoleAssignment{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphAppRoleAssignmentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphAppRoleAssignmentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.appRoleAssignment{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphAppRoleAssignmentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.appRoleAssignment{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.appRoleAssignment /// - public class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs index f1b9be0c..e5d30f4b 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphDevice { +namespace ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphDevice +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\{directoryObject-id}\microsoft.graph.device /// - public class MicrosoftGraphDeviceRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDeviceRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.device /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.device"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphDeviceRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphDeviceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.device{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphDeviceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.device{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphDeviceRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphDeviceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.device{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphDeviceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.device{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.device /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.device /// - public class MicrosoftGraphDeviceRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDeviceRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphDeviceRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs index 34da4bd3..d969a4a5 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/Item/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphEndpoint { +namespace ApiSdk.Users.Item.RegisteredDevices.Item.MicrosoftGraphEndpoint +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\{directoryObject-id}\microsoft.graph.endpoint /// - public class MicrosoftGraphEndpointRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphEndpointRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphEndpointRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphEndpointRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.endpoint{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphEndpointRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.endpoint{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphEndpointRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphEndpointRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.endpoint{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphEndpointRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/{directoryObject%2Did}/microsoft.graph.endpoint{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.endpoint /// - public class MicrosoftGraphEndpointRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphEndpointRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphEndpointRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphAppRoleAssignment/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphAppRoleAssignment/Count/CountRequestBuilder.cs index ef2dc90f..512b7df5 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphAppRoleAssignment/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphAppRoleAssignment/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphAppRoleAssignment.Count { +namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphAppRoleAssignment.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\microsoft.graph.appRoleAssignment\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.appRoleAssignment/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.appRoleAssignment/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.appRoleAssignment/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.appRoleAssignment/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs index eb0f82cf..341daf7a 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphAppRoleAssignment/MicrosoftGraphAppRoleAssignmentRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphAppRoleAssignment.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphAppRoleAssignment { +namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphAppRoleAssignment +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\microsoft.graph.appRoleAssignment /// - public class MicrosoftGraphAppRoleAssignmentRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAppRoleAssignmentRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphAppRoleAssignment.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphAppRoleAssignmentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphAppRoleAssignmentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.appRoleAssignment{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphAppRoleAssignmentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.appRoleAssignment{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphAppRoleAssignmentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphAppRoleAssignmentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.appRoleAssignment{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphAppRoleAssignmentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.appRoleAssignment{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.appRoleAssignment in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphAppRoleAssignmentRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphDevice/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphDevice/Count/CountRequestBuilder.cs index 3b0f97a5..7bd8d409 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphDevice/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphDevice/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphDevice.Count { +namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphDevice.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\microsoft.graph.device\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.device/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.device/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.device/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.device/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs index 5c45e87d..3a027201 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphDevice/MicrosoftGraphDeviceRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphDevice.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphDevice { +namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphDevice +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\microsoft.graph.device /// - public class MicrosoftGraphDeviceRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDeviceRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphDevice.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphDeviceRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphDeviceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.device{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphDeviceRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.device{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphDeviceRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphDeviceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.device{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphDeviceRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.device{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.device in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphDeviceRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDeviceRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphDeviceRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphEndpoint/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphEndpoint/Count/CountRequestBuilder.cs index 52f1dfa1..19d8a479 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphEndpoint/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphEndpoint/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphEndpoint.Count { +namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphEndpoint.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\microsoft.graph.endpoint\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.endpoint/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.endpoint/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.endpoint/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.endpoint/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs index cb3668ad..0459c075 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/MicrosoftGraphEndpoint/MicrosoftGraphEndpointRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphEndpoint.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphEndpoint { +namespace ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphEndpoint +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices\microsoft.graph.endpoint /// - public class MicrosoftGraphEndpointRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphEndpointRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphEndpoint.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphEndpointRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphEndpointRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.endpoint{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphEndpointRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.endpoint{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphEndpointRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphEndpointRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.endpoint{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphEndpointRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices/microsoft.graph.endpoint{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.endpoint in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphEndpointRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphEndpointRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphEndpointRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/RegisteredDevices/RegisteredDevicesRequestBuilder.cs b/src/sample/generated/Users/Item/RegisteredDevices/RegisteredDevicesRequestBuilder.cs index 330c180d..cfa00781 100644 --- a/src/sample/generated/Users/Item/RegisteredDevices/RegisteredDevicesRequestBuilder.cs +++ b/src/sample/generated/Users/Item/RegisteredDevices/RegisteredDevicesRequestBuilder.cs @@ -1,4 +1,5 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.RegisteredDevices.Count; @@ -6,6 +7,7 @@ using ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphAppRoleAssignment; using ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphDevice; using ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphEndpoint; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -19,18 +21,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.RegisteredDevices { +namespace ApiSdk.Users.Item.RegisteredDevices +{ /// /// Builds and executes requests for operations under \users\{user-id}\registeredDevices /// - public class RegisteredDevicesRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RegisteredDevicesRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.registeredDevices.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new DirectoryObjectItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.Item.DirectoryObjectItemRequestBuilder(PathParameters); executables.Add(builder.BuildGetCommand()); commands.Add(builder.BuildMicrosoftGraphAppRoleAssignmentByIdNavCommand()); commands.Add(builder.BuildMicrosoftGraphDeviceByIdNavCommand()); @@ -40,10 +47,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -54,11 +63,12 @@ public Command BuildCountNavCommand() { } /// /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. - /// Find more info here /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-registereddevices?view=graph-rest-1.0"; + command.Description = "Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -147,7 +157,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -161,10 +173,12 @@ public Command BuildListCommand() { /// /// The microsoftGraphAppRoleAssignment property /// - public Command BuildMicrosoftGraphAppRoleAssignmentNavCommand() { + /// A + public Command BuildMicrosoftGraphAppRoleAssignmentNavCommand() + { var command = new Command("microsoft-graph-app-role-assignment"); command.Description = "The microsoftGraphAppRoleAssignment property"; - var builder = new MicrosoftGraphAppRoleAssignmentRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphAppRoleAssignment.MicrosoftGraphAppRoleAssignmentRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -182,10 +196,12 @@ public Command BuildMicrosoftGraphAppRoleAssignmentNavCommand() { /// /// The microsoftGraphDevice property /// - public Command BuildMicrosoftGraphDeviceNavCommand() { + /// A + public Command BuildMicrosoftGraphDeviceNavCommand() + { var command = new Command("microsoft-graph-device"); command.Description = "The microsoftGraphDevice property"; - var builder = new MicrosoftGraphDeviceRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphDevice.MicrosoftGraphDeviceRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -203,10 +219,12 @@ public Command BuildMicrosoftGraphDeviceNavCommand() { /// /// The microsoftGraphEndpoint property /// - public Command BuildMicrosoftGraphEndpointNavCommand() { + /// A + public Command BuildMicrosoftGraphEndpointNavCommand() + { var command = new Command("microsoft-graph-endpoint"); command.Description = "The microsoftGraphEndpoint property"; - var builder = new MicrosoftGraphEndpointRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.MicrosoftGraphEndpoint.MicrosoftGraphEndpointRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -222,47 +240,44 @@ public Command BuildMicrosoftGraphEndpointNavCommand() { return command; } /// - /// Instantiates a new RegisteredDevicesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public RegisteredDevicesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public RegisteredDevicesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/registeredDevices{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new RegisteredDevicesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public RegisteredDevicesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public RegisteredDevicesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/registeredDevices{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Devices that are registered for the user. Read-only. Nullable. Supports $expand and returns up to 100 objects. /// - public class RegisteredDevicesRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class RegisteredDevicesRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -325,3 +340,4 @@ public class RegisteredDevicesRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/ItemInsights/ItemInsightsRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/ItemInsights/ItemInsightsRequestBuilder.cs new file mode 100644 index 00000000..05fcccde --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/ItemInsights/ItemInsightsRequestBuilder.cs @@ -0,0 +1,280 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.ItemInsights +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\itemInsights + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemInsightsRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property itemInsights for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property itemInsights for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// The user's settings for the visibility of meeting hour insights, and insights derived between a user and other items in Microsoft 365, such as documents or sites. Get userInsightsSettings through this navigation property. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "The user's settings for the visibility of meeting hour insights, and insights derived between a user and other items in Microsoft 365, such as documents or sites. Get userInsightsSettings through this navigation property."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Update the privacy settings for itemInsights and meeting hours insights of a user. + /// Find more info here + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the privacy settings for itemInsights and meeting hours insights of a user.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/userinsightssettings-update?view=graph-rest-1.0"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.UserInsightsSettings.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public ItemInsightsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/itemInsights{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public ItemInsightsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/itemInsights{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property itemInsights for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// The user's settings for the visibility of meeting hour insights, and insights derived between a user and other items in Microsoft 365, such as documents or sites. Get userInsightsSettings through this navigation property. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the privacy settings for itemInsights and meeting hours insights of a user. + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UserInsightsSettings body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UserInsightsSettings body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// The user's settings for the visibility of meeting hour insights, and insights derived between a user and other items in Microsoft 365, such as documents or sites. Get userInsightsSettings through this navigation property. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ItemInsightsRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/SettingsRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/SettingsRequestBuilder.cs index bf857b64..97b1f384 100644 --- a/src/sample/generated/Users/Item/Settings/SettingsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Settings/SettingsRequestBuilder.cs @@ -1,7 +1,12 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using ApiSdk.Users.Item.Settings.ItemInsights; using ApiSdk.Users.Item.Settings.ShiftPreferences; +using ApiSdk.Users.Item.Settings.Storage; +using ApiSdk.Users.Item.Settings.Windows; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,15 +20,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Settings { +namespace ApiSdk.Users.Item.Settings +{ /// /// Builds and executes requests for operations under \users\{user-id}\settings /// - public class SettingsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SettingsRequestBuilder : BaseCliRequestBuilder + { /// /// Delete navigation property settings for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); command.Description = "Delete navigation property settings for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,12 +76,13 @@ public Command BuildDeleteCommand() { return command; } /// - /// Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. This API is supported in the following national cloud deployments. - /// Find more info here + /// Get settings from users /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/usersettings-get?view=graph-rest-1.0"; + command.Description = "Get settings from users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -117,12 +128,32 @@ public Command BuildGetCommand() { return command; } /// - /// Update the properties of the userSettings object. Users in the same organization can have different settings based on their preference or on the organization policies. To get the user current settings, see current user settings. This API is supported in the following national cloud deployments. - /// Find more info here + /// The itemInsights property /// - public Command BuildPatchCommand() { + /// A + public Command BuildItemInsightsNavCommand() + { + var command = new Command("item-insights"); + command.Description = "The itemInsights property"; + var builder = new global::ApiSdk.Users.Item.Settings.ItemInsights.ItemInsightsRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildDeleteCommand()); + execCommands.Add(builder.BuildGetCommand()); + execCommands.Add(builder.BuildPatchCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Update the navigation property settings in users + /// + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); - command.Description = "Update the properties of the userSettings object. Users in the same organization can have different settings based on their preference or on the organization policies. To get the user current settings, see current user settings. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/usersettings-update?view=graph-rest-1.0"; + command.Description = "Update the navigation property settings in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -145,8 +176,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(UserSettings.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.UserSettings.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -169,115 +200,153 @@ public Command BuildPatchCommand() { /// /// The shiftPreferences property /// - public Command BuildShiftPreferencesNavCommand() { + /// A + public Command BuildShiftPreferencesNavCommand() + { var command = new Command("shift-preferences"); command.Description = "The shiftPreferences property"; - var builder = new ShiftPreferencesRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Settings.ShiftPreferences.ShiftPreferencesRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildDeleteCommand()); + execCommands.Add(builder.BuildGetCommand()); + execCommands.Add(builder.BuildPatchCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// The storage property + /// + /// A + public Command BuildStorageNavCommand() + { + var command = new Command("storage"); + command.Description = "The storage property"; + var builder = new global::ApiSdk.Users.Item.Settings.Storage.StorageRequestBuilder(PathParameters); var execCommands = new List(); + var nonExecCommands = new List(); execCommands.Add(builder.BuildDeleteCommand()); execCommands.Add(builder.BuildGetCommand()); execCommands.Add(builder.BuildPatchCommand()); + nonExecCommands.Add(builder.BuildQuotaNavCommand()); foreach (var cmd in execCommands) { command.AddCommand(cmd); } + foreach (var cmd in nonExecCommands) + { + command.AddCommand(cmd); + } return command; } /// - /// Instantiates a new SettingsRequestBuilder and sets the default values. + /// The windows property + /// + /// A + public Command BuildWindowsNavCommand() + { + var command = new Command("windows"); + command.Description = "The windows property"; + var builder = new global::ApiSdk.Users.Item.Settings.Windows.WindowsRequestBuilder(PathParameters); + var execCommands = new List(); + var nonExecCommands = new List(); + nonExecCommands.Add(builder.BuildCountNavCommand()); + execCommands.Add(builder.BuildCreateCommand()); + execCommands.Add(builder.BuildListCommand()); + var cmds = builder.BuildCommand(); + execCommands.AddRange(cmds.Item1); + nonExecCommands.AddRange(cmds.Item2); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + foreach (var cmd in nonExecCommands.OrderBy(static c => c.Name, StringComparer.Ordinal)) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public SettingsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings{?%24select,%24expand}", pathParameters) { + public SettingsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new SettingsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public SettingsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings{?%24select,%24expand}", rawUrl) { + public SettingsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings{?%24expand,%24select}", rawUrl) + { } /// /// Delete navigation property settings for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. This API is supported in the following national cloud deployments. + /// Get settings from users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update the properties of the userSettings object. Users in the same organization can have different settings based on their preference or on the organization policies. To get the user current settings, see current user settings. This API is supported in the following national cloud deployments. + /// Update the navigation property settings in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(UserSettings body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UserSettings body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(UserSettings body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UserSettings body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the user and organization userSettings object.To learn how to update the properties of the userSettings object, see update user settings. This API is supported in the following national cloud deployments. + /// Get settings from users /// - public class SettingsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SettingsRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -301,3 +370,4 @@ public class SettingsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/ShiftPreferences/ShiftPreferencesRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/ShiftPreferences/ShiftPreferencesRequestBuilder.cs index 0f6b1dd4..cafdc964 100644 --- a/src/sample/generated/Users/Item/Settings/ShiftPreferences/ShiftPreferencesRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Settings/ShiftPreferences/ShiftPreferencesRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Settings.ShiftPreferences { +namespace ApiSdk.Users.Item.Settings.ShiftPreferences +{ /// /// Builds and executes requests for operations under \users\{user-id}\settings\shiftPreferences /// - public class ShiftPreferencesRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ShiftPreferencesRequestBuilder : BaseCliRequestBuilder + { /// /// Delete navigation property shiftPreferences for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); command.Description = "Delete navigation property shiftPreferences for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -65,12 +72,14 @@ public Command BuildDeleteCommand() { return command; } /// - /// Retrieve the properties and relationships of a shiftPreferences object by ID. This API is supported in the following national cloud deployments. + /// Retrieve the properties and relationships of a shiftPreferences object by ID. /// Find more info here /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Retrieve the properties and relationships of a shiftPreferences object by ID. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/shiftpreferences-get?view=graph-rest-1.0"; + command.Description = "Retrieve the properties and relationships of a shiftPreferences object by ID.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/shiftpreferences-get?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -116,12 +125,14 @@ public Command BuildGetCommand() { return command; } /// - /// Update the properties and relationships of a shiftPreferences object. This API is supported in the following national cloud deployments. + /// Update the properties and relationships of a shiftPreferences object. /// Find more info here /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); - command.Description = "Update the properties and relationships of a shiftPreferences object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/shiftpreferences-put?view=graph-rest-1.0"; + command.Description = "Update the properties and relationships of a shiftPreferences object.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/shiftpreferences-put?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -144,8 +155,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ApiSdk.Models.ShiftPreferences.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.ShiftPreferences.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -166,100 +177,84 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new ShiftPreferencesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ShiftPreferencesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/shiftPreferences{?%24select,%24expand}", pathParameters) { + public ShiftPreferencesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/shiftPreferences{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new ShiftPreferencesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ShiftPreferencesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/shiftPreferences{?%24select,%24expand}", rawUrl) { + public ShiftPreferencesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/shiftPreferences{?%24expand,%24select}", rawUrl) + { } /// /// Delete navigation property shiftPreferences for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Retrieve the properties and relationships of a shiftPreferences object by ID. This API is supported in the following national cloud deployments. + /// Retrieve the properties and relationships of a shiftPreferences object by ID. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update the properties and relationships of a shiftPreferences object. This API is supported in the following national cloud deployments. + /// Update the properties and relationships of a shiftPreferences object. /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(ApiSdk.Models.ShiftPreferences body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ShiftPreferences body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(ApiSdk.Models.ShiftPreferences body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ShiftPreferences body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Retrieve the properties and relationships of a shiftPreferences object by ID. This API is supported in the following national cloud deployments. + /// Retrieve the properties and relationships of a shiftPreferences object by ID. /// - public class ShiftPreferencesRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ShiftPreferencesRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -283,3 +278,4 @@ public class ShiftPreferencesRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Storage/Quota/QuotaRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Storage/Quota/QuotaRequestBuilder.cs new file mode 100644 index 00000000..42c9b52b --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Storage/Quota/QuotaRequestBuilder.cs @@ -0,0 +1,307 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Settings.Storage.Quota.Services; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Storage.Quota +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\storage\quota + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class QuotaRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property quota for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property quota for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// Get quota from users + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get quota from users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Update the navigation property quota in users + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the navigation property quota in users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.UnifiedStorageQuota.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// The services property + /// + /// A + public Command BuildServicesNavCommand() + { + var command = new Command("services"); + command.Description = "The services property"; + var builder = new global::ApiSdk.Users.Item.Settings.Storage.Quota.Services.ServicesRequestBuilder(PathParameters); + var execCommands = new List(); + var nonExecCommands = new List(); + nonExecCommands.Add(builder.BuildCountNavCommand()); + execCommands.Add(builder.BuildCreateCommand()); + execCommands.Add(builder.BuildListCommand()); + var cmds = builder.BuildCommand(); + execCommands.AddRange(cmds.Item1); + nonExecCommands.AddRange(cmds.Item2); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + foreach (var cmd in nonExecCommands.OrderBy(static c => c.Name, StringComparer.Ordinal)) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public QuotaRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/storage/quota{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public QuotaRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/storage/quota{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property quota for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get quota from users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the navigation property quota in users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UnifiedStorageQuota body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UnifiedStorageQuota body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get quota from users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class QuotaRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Storage/Quota/Services/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Storage/Quota/Services/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..7456fccb --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Storage/Quota/Services/Count/CountRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Storage.Quota.Services.Count +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\storage\quota\services\$count + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { + /// + /// Get the number of the resource + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get the number of the resource"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + var formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/storage/quota/services/$count{?%24filter,%24search}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/storage/quota/services/$count{?%24filter,%24search}", rawUrl) + { + } + /// + /// Get the number of the resource + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain"); + return requestInfo; + } + /// + /// Get the number of the resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Storage/Quota/Services/Item/ServiceStorageQuotaBreakdownItemRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Storage/Quota/Services/Item/ServiceStorageQuotaBreakdownItemRequestBuilder.cs new file mode 100644 index 00000000..9013abe2 --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Storage/Quota/Services/Item/ServiceStorageQuotaBreakdownItemRequestBuilder.cs @@ -0,0 +1,297 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Storage.Quota.Services.Item +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\storage\quota\services\{serviceStorageQuotaBreakdown-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ServiceStorageQuotaBreakdownItemRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property services for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property services for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var serviceStorageQuotaBreakdownIdOption = new Option("--service-storage-quota-breakdown-id", description: "The unique identifier of serviceStorageQuotaBreakdown") { + }; + serviceStorageQuotaBreakdownIdOption.IsRequired = true; + command.AddOption(serviceStorageQuotaBreakdownIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var serviceStorageQuotaBreakdownId = invocationContext.ParseResult.GetValueForOption(serviceStorageQuotaBreakdownIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (serviceStorageQuotaBreakdownId is not null) requestInfo.PathParameters.Add("serviceStorageQuotaBreakdown%2Did", serviceStorageQuotaBreakdownId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// Get services from users + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get services from users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var serviceStorageQuotaBreakdownIdOption = new Option("--service-storage-quota-breakdown-id", description: "The unique identifier of serviceStorageQuotaBreakdown") { + }; + serviceStorageQuotaBreakdownIdOption.IsRequired = true; + command.AddOption(serviceStorageQuotaBreakdownIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var serviceStorageQuotaBreakdownId = invocationContext.ParseResult.GetValueForOption(serviceStorageQuotaBreakdownIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (serviceStorageQuotaBreakdownId is not null) requestInfo.PathParameters.Add("serviceStorageQuotaBreakdown%2Did", serviceStorageQuotaBreakdownId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Update the navigation property services in users + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the navigation property services in users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var serviceStorageQuotaBreakdownIdOption = new Option("--service-storage-quota-breakdown-id", description: "The unique identifier of serviceStorageQuotaBreakdown") { + }; + serviceStorageQuotaBreakdownIdOption.IsRequired = true; + command.AddOption(serviceStorageQuotaBreakdownIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var serviceStorageQuotaBreakdownId = invocationContext.ParseResult.GetValueForOption(serviceStorageQuotaBreakdownIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.ServiceStorageQuotaBreakdown.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (serviceStorageQuotaBreakdownId is not null) requestInfo.PathParameters.Add("serviceStorageQuotaBreakdown%2Did", serviceStorageQuotaBreakdownId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public ServiceStorageQuotaBreakdownItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/storage/quota/services/{serviceStorageQuotaBreakdown%2Did}{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public ServiceStorageQuotaBreakdownItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/storage/quota/services/{serviceStorageQuotaBreakdown%2Did}{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property services for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get services from users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the navigation property services in users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ServiceStorageQuotaBreakdown body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ServiceStorageQuotaBreakdown body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get services from users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ServiceStorageQuotaBreakdownItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Storage/Quota/Services/ServicesRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Storage/Quota/Services/ServicesRequestBuilder.cs new file mode 100644 index 00000000..b4ea855d --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Storage/Quota/Services/ServicesRequestBuilder.cs @@ -0,0 +1,334 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Settings.Storage.Quota.Services.Count; +using ApiSdk.Users.Item.Settings.Storage.Quota.Services.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Storage.Quota.Services +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\storage\quota\services + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ServicesRequestBuilder : BaseCliRequestBuilder + { + /// + /// Gets an item from the ApiSdk.users.item.settings.storage.quota.services.item collection + /// + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { + var executables = new List(); + var builder = new global::ApiSdk.Users.Item.Settings.Storage.Quota.Services.Item.ServiceStorageQuotaBreakdownItemRequestBuilder(PathParameters); + executables.Add(builder.BuildDeleteCommand()); + executables.Add(builder.BuildGetCommand()); + executables.Add(builder.BuildPatchCommand()); + return new(executables, new(0)); + } + /// + /// The Count property + /// + /// A + public Command BuildCountNavCommand() + { + var command = new Command("count"); + command.Description = "The Count property"; + var builder = new global::ApiSdk.Users.Item.Settings.Storage.Quota.Services.Count.CountRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Create new navigation property to services for users + /// + /// A + public Command BuildCreateCommand() + { + var command = new Command("create"); + command.Description = "Create new navigation property to services for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.ServiceStorageQuotaBreakdown.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPostRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Get services from users + /// + /// A + public Command BuildListCommand() + { + var command = new Command("list"); + command.Description = "Get services from users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var topOption = new Option("--top", description: "Show only the first n items") { + }; + topOption.IsRequired = false; + command.AddOption(topOption); + var skipOption = new Option("--skip", description: "Skip the first n items") { + }; + skipOption.IsRequired = false; + command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + var countOption = new Option("--count", description: "Include count of items") { + }; + countOption.IsRequired = false; + command.AddOption(countOption); + var orderbyOption = new Option("--orderby", description: "Order items by property values") { + Arity = ArgumentArity.ZeroOrMore + }; + orderbyOption.IsRequired = false; + command.AddOption(orderbyOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + var allOption = new Option("--all"); + command.AddOption(allOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var top = invocationContext.ParseResult.GetValueForOption(topOption); + var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + var count = invocationContext.ParseResult.GetValueForOption(countOption); + var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + var all = invocationContext.ParseResult.GetValueForOption(allOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + IPagingService pagingService = invocationContext.BindingContext.GetService(typeof(IPagingService)) as IPagingService ?? throw new ArgumentNullException("pagingService"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Top = top; + q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + q.QueryParameters.Count = count; + q.QueryParameters.Orderby = orderby; + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); + var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); + var response = pageResponse?.Response; +#nullable enable + IOutputFormatter? formatter = null; +#nullable restore + if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { + formatter = outputFormatterFactory.GetFormatter(output); + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + } else { + formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + } + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public ServicesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/storage/quota/services{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public ServicesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/storage/quota/services{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { + } + /// + /// Get services from users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create new navigation property to services for users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.ServiceStorageQuotaBreakdown body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.ServiceStorageQuotaBreakdown body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get services from users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ServicesRequestBuilderGetQueryParameters + { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Storage/StorageRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Storage/StorageRequestBuilder.cs new file mode 100644 index 00000000..cbfeb635 --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Storage/StorageRequestBuilder.cs @@ -0,0 +1,305 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Settings.Storage.Quota; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Storage +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\storage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StorageRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property storage for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property storage for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// Get storage from users + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get storage from users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Update the navigation property storage in users + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the navigation property storage in users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.UserStorage.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// The quota property + /// + /// A + public Command BuildQuotaNavCommand() + { + var command = new Command("quota"); + command.Description = "The quota property"; + var builder = new global::ApiSdk.Users.Item.Settings.Storage.Quota.QuotaRequestBuilder(PathParameters); + var execCommands = new List(); + var nonExecCommands = new List(); + execCommands.Add(builder.BuildDeleteCommand()); + execCommands.Add(builder.BuildGetCommand()); + execCommands.Add(builder.BuildPatchCommand()); + nonExecCommands.Add(builder.BuildServicesNavCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + foreach (var cmd in nonExecCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public StorageRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/storage{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public StorageRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/storage{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property storage for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get storage from users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the navigation property storage in users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UserStorage body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.UserStorage body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get storage from users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class StorageRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Windows/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Windows/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..6ac3a69e --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Windows/Count/CountRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Windows.Count +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\windows\$count + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { + /// + /// Get the number of the resource + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get the number of the resource"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + var formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/windows/$count{?%24filter,%24search}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/windows/$count{?%24filter,%24search}", rawUrl) + { + } + /// + /// Get the number of the resource + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain"); + return requestInfo; + } + /// + /// Get the number of the resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Windows/Item/Instances/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Windows/Item/Instances/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..f8a46279 --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Windows/Item/Instances/Count/CountRequestBuilder.cs @@ -0,0 +1,136 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Windows.Item.Instances.Count +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\windows\{windowsSetting-id}\instances\$count + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { + /// + /// Get the number of the resource + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get the number of the resource"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var windowsSettingIdOption = new Option("--windows-setting-id", description: "The unique identifier of windowsSetting") { + }; + windowsSettingIdOption.IsRequired = true; + command.AddOption(windowsSettingIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var windowsSettingId = invocationContext.ParseResult.GetValueForOption(windowsSettingIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (windowsSettingId is not null) requestInfo.PathParameters.Add("windowsSetting%2Did", windowsSettingId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + var formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/windows/{windowsSetting%2Did}/instances/$count{?%24filter,%24search}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/windows/{windowsSetting%2Did}/instances/$count{?%24filter,%24search}", rawUrl) + { + } + /// + /// Get the number of the resource + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain"); + return requestInfo; + } + /// + /// Get the number of the resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Windows/Item/Instances/InstancesRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Windows/Item/Instances/InstancesRequestBuilder.cs new file mode 100644 index 00000000..99c72a95 --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Windows/Item/Instances/InstancesRequestBuilder.cs @@ -0,0 +1,346 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Settings.Windows.Item.Instances.Count; +using ApiSdk.Users.Item.Settings.Windows.Item.Instances.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Windows.Item.Instances +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\windows\{windowsSetting-id}\instances + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstancesRequestBuilder : BaseCliRequestBuilder + { + /// + /// Gets an item from the ApiSdk.users.item.settings.windows.item.instances.item collection + /// + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { + var executables = new List(); + var builder = new global::ApiSdk.Users.Item.Settings.Windows.Item.Instances.Item.WindowsSettingInstanceItemRequestBuilder(PathParameters); + executables.Add(builder.BuildDeleteCommand()); + executables.Add(builder.BuildGetCommand()); + executables.Add(builder.BuildPatchCommand()); + return new(executables, new(0)); + } + /// + /// The Count property + /// + /// A + public Command BuildCountNavCommand() + { + var command = new Command("count"); + command.Description = "The Count property"; + var builder = new global::ApiSdk.Users.Item.Settings.Windows.Item.Instances.Count.CountRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Create new navigation property to instances for users + /// + /// A + public Command BuildCreateCommand() + { + var command = new Command("create"); + command.Description = "Create new navigation property to instances for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var windowsSettingIdOption = new Option("--windows-setting-id", description: "The unique identifier of windowsSetting") { + }; + windowsSettingIdOption.IsRequired = true; + command.AddOption(windowsSettingIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var windowsSettingId = invocationContext.ParseResult.GetValueForOption(windowsSettingIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.WindowsSettingInstance.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPostRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (windowsSettingId is not null) requestInfo.PathParameters.Add("windowsSetting%2Did", windowsSettingId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// A collection of setting values for a given windowsSetting. + /// + /// A + public Command BuildListCommand() + { + var command = new Command("list"); + command.Description = "A collection of setting values for a given windowsSetting."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var windowsSettingIdOption = new Option("--windows-setting-id", description: "The unique identifier of windowsSetting") { + }; + windowsSettingIdOption.IsRequired = true; + command.AddOption(windowsSettingIdOption); + var topOption = new Option("--top", description: "Show only the first n items") { + }; + topOption.IsRequired = false; + command.AddOption(topOption); + var skipOption = new Option("--skip", description: "Skip the first n items") { + }; + skipOption.IsRequired = false; + command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + var countOption = new Option("--count", description: "Include count of items") { + }; + countOption.IsRequired = false; + command.AddOption(countOption); + var orderbyOption = new Option("--orderby", description: "Order items by property values") { + Arity = ArgumentArity.ZeroOrMore + }; + orderbyOption.IsRequired = false; + command.AddOption(orderbyOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + var allOption = new Option("--all"); + command.AddOption(allOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var windowsSettingId = invocationContext.ParseResult.GetValueForOption(windowsSettingIdOption); + var top = invocationContext.ParseResult.GetValueForOption(topOption); + var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + var count = invocationContext.ParseResult.GetValueForOption(countOption); + var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + var all = invocationContext.ParseResult.GetValueForOption(allOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + IPagingService pagingService = invocationContext.BindingContext.GetService(typeof(IPagingService)) as IPagingService ?? throw new ArgumentNullException("pagingService"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Top = top; + q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + q.QueryParameters.Count = count; + q.QueryParameters.Orderby = orderby; + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (windowsSettingId is not null) requestInfo.PathParameters.Add("windowsSetting%2Did", windowsSettingId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); + var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); + var response = pageResponse?.Response; +#nullable enable + IOutputFormatter? formatter = null; +#nullable restore + if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { + formatter = outputFormatterFactory.GetFormatter(output); + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + } else { + formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + } + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public InstancesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/windows/{windowsSetting%2Did}/instances{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public InstancesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/windows/{windowsSetting%2Did}/instances{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { + } + /// + /// A collection of setting values for a given windowsSetting. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create new navigation property to instances for users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.WindowsSettingInstance body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.WindowsSettingInstance body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// A collection of setting values for a given windowsSetting. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class InstancesRequestBuilderGetQueryParameters + { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Windows/Item/Instances/Item/WindowsSettingInstanceItemRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Windows/Item/Instances/Item/WindowsSettingInstanceItemRequestBuilder.cs new file mode 100644 index 00000000..cd23c7f1 --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Windows/Item/Instances/Item/WindowsSettingInstanceItemRequestBuilder.cs @@ -0,0 +1,315 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Windows.Item.Instances.Item +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\windows\{windowsSetting-id}\instances\{windowsSettingInstance-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WindowsSettingInstanceItemRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property instances for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property instances for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var windowsSettingIdOption = new Option("--windows-setting-id", description: "The unique identifier of windowsSetting") { + }; + windowsSettingIdOption.IsRequired = true; + command.AddOption(windowsSettingIdOption); + var windowsSettingInstanceIdOption = new Option("--windows-setting-instance-id", description: "The unique identifier of windowsSettingInstance") { + }; + windowsSettingInstanceIdOption.IsRequired = true; + command.AddOption(windowsSettingInstanceIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var windowsSettingId = invocationContext.ParseResult.GetValueForOption(windowsSettingIdOption); + var windowsSettingInstanceId = invocationContext.ParseResult.GetValueForOption(windowsSettingInstanceIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (windowsSettingId is not null) requestInfo.PathParameters.Add("windowsSetting%2Did", windowsSettingId); + if (windowsSettingInstanceId is not null) requestInfo.PathParameters.Add("windowsSettingInstance%2Did", windowsSettingInstanceId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// A collection of setting values for a given windowsSetting. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "A collection of setting values for a given windowsSetting."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var windowsSettingIdOption = new Option("--windows-setting-id", description: "The unique identifier of windowsSetting") { + }; + windowsSettingIdOption.IsRequired = true; + command.AddOption(windowsSettingIdOption); + var windowsSettingInstanceIdOption = new Option("--windows-setting-instance-id", description: "The unique identifier of windowsSettingInstance") { + }; + windowsSettingInstanceIdOption.IsRequired = true; + command.AddOption(windowsSettingInstanceIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var windowsSettingId = invocationContext.ParseResult.GetValueForOption(windowsSettingIdOption); + var windowsSettingInstanceId = invocationContext.ParseResult.GetValueForOption(windowsSettingInstanceIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (windowsSettingId is not null) requestInfo.PathParameters.Add("windowsSetting%2Did", windowsSettingId); + if (windowsSettingInstanceId is not null) requestInfo.PathParameters.Add("windowsSettingInstance%2Did", windowsSettingInstanceId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Update the navigation property instances in users + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the navigation property instances in users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var windowsSettingIdOption = new Option("--windows-setting-id", description: "The unique identifier of windowsSetting") { + }; + windowsSettingIdOption.IsRequired = true; + command.AddOption(windowsSettingIdOption); + var windowsSettingInstanceIdOption = new Option("--windows-setting-instance-id", description: "The unique identifier of windowsSettingInstance") { + }; + windowsSettingInstanceIdOption.IsRequired = true; + command.AddOption(windowsSettingInstanceIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var windowsSettingId = invocationContext.ParseResult.GetValueForOption(windowsSettingIdOption); + var windowsSettingInstanceId = invocationContext.ParseResult.GetValueForOption(windowsSettingInstanceIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.WindowsSettingInstance.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (windowsSettingId is not null) requestInfo.PathParameters.Add("windowsSetting%2Did", windowsSettingId); + if (windowsSettingInstanceId is not null) requestInfo.PathParameters.Add("windowsSettingInstance%2Did", windowsSettingInstanceId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public WindowsSettingInstanceItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/windows/{windowsSetting%2Did}/instances/{windowsSettingInstance%2Did}{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public WindowsSettingInstanceItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/windows/{windowsSetting%2Did}/instances/{windowsSettingInstance%2Did}{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property instances for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// A collection of setting values for a given windowsSetting. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the navigation property instances in users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.WindowsSettingInstance body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.WindowsSettingInstance body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// A collection of setting values for a given windowsSetting. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WindowsSettingInstanceItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Windows/Item/WindowsSettingItemRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Windows/Item/WindowsSettingItemRequestBuilder.cs new file mode 100644 index 00000000..bffda740 --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Windows/Item/WindowsSettingItemRequestBuilder.cs @@ -0,0 +1,325 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Settings.Windows.Item.Instances; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Windows.Item +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\windows\{windowsSetting-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WindowsSettingItemRequestBuilder : BaseCliRequestBuilder + { + /// + /// Delete navigation property windows for users + /// + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "Delete navigation property windows for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var windowsSettingIdOption = new Option("--windows-setting-id", description: "The unique identifier of windowsSetting") { + }; + windowsSettingIdOption.IsRequired = true; + command.AddOption(windowsSettingIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var windowsSettingId = invocationContext.ParseResult.GetValueForOption(windowsSettingIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (windowsSettingId is not null) requestInfo.PathParameters.Add("windowsSetting%2Did", windowsSettingId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// Get windows from users + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get windows from users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var windowsSettingIdOption = new Option("--windows-setting-id", description: "The unique identifier of windowsSetting") { + }; + windowsSettingIdOption.IsRequired = true; + command.AddOption(windowsSettingIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var windowsSettingId = invocationContext.ParseResult.GetValueForOption(windowsSettingIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (windowsSettingId is not null) requestInfo.PathParameters.Add("windowsSetting%2Did", windowsSettingId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// The instances property + /// + /// A + public Command BuildInstancesNavCommand() + { + var command = new Command("instances"); + command.Description = "The instances property"; + var builder = new global::ApiSdk.Users.Item.Settings.Windows.Item.Instances.InstancesRequestBuilder(PathParameters); + var execCommands = new List(); + var nonExecCommands = new List(); + nonExecCommands.Add(builder.BuildCountNavCommand()); + execCommands.Add(builder.BuildCreateCommand()); + execCommands.Add(builder.BuildListCommand()); + var cmds = builder.BuildCommand(); + execCommands.AddRange(cmds.Item1); + nonExecCommands.AddRange(cmds.Item2); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + foreach (var cmd in nonExecCommands.OrderBy(static c => c.Name, StringComparer.Ordinal)) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Update the navigation property windows in users + /// + /// A + public Command BuildPatchCommand() + { + var command = new Command("patch"); + command.Description = "Update the navigation property windows in users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var windowsSettingIdOption = new Option("--windows-setting-id", description: "The unique identifier of windowsSetting") { + }; + windowsSettingIdOption.IsRequired = true; + command.AddOption(windowsSettingIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var windowsSettingId = invocationContext.ParseResult.GetValueForOption(windowsSettingIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.WindowsSetting.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPatchRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (windowsSettingId is not null) requestInfo.PathParameters.Add("windowsSetting%2Did", windowsSettingId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public WindowsSettingItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/windows/{windowsSetting%2Did}{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public WindowsSettingItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/windows/{windowsSetting%2Did}{?%24expand,%24select}", rawUrl) + { + } + /// + /// Delete navigation property windows for users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get windows from users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Update the navigation property windows in users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.WindowsSetting body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.WindowsSetting body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get windows from users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WindowsSettingItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Settings/Windows/WindowsRequestBuilder.cs b/src/sample/generated/Users/Item/Settings/Windows/WindowsRequestBuilder.cs new file mode 100644 index 00000000..5fc86dbc --- /dev/null +++ b/src/sample/generated/Users/Item/Settings/Windows/WindowsRequestBuilder.cs @@ -0,0 +1,336 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Settings.Windows.Count; +using ApiSdk.Users.Item.Settings.Windows.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Settings.Windows +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\settings\windows + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WindowsRequestBuilder : BaseCliRequestBuilder + { + /// + /// Gets an item from the ApiSdk.users.item.settings.windows.item collection + /// + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { + var executables = new List(); + var commands = new List(); + var builder = new global::ApiSdk.Users.Item.Settings.Windows.Item.WindowsSettingItemRequestBuilder(PathParameters); + executables.Add(builder.BuildDeleteCommand()); + executables.Add(builder.BuildGetCommand()); + commands.Add(builder.BuildInstancesNavCommand()); + executables.Add(builder.BuildPatchCommand()); + return new(executables, commands); + } + /// + /// The Count property + /// + /// A + public Command BuildCountNavCommand() + { + var command = new Command("count"); + command.Description = "The Count property"; + var builder = new global::ApiSdk.Users.Item.Settings.Windows.Count.CountRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Create new navigation property to windows for users + /// + /// A + public Command BuildCreateCommand() + { + var command = new Command("create"); + command.Description = "Create new navigation property to windows for users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var bodyOption = new Option("--body", description: "The request body") { + }; + bodyOption.IsRequired = true; + command.AddOption(bodyOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var body = invocationContext.ParseResult.GetValueForOption(bodyOption) ?? string.Empty; + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.WindowsSetting.CreateFromDiscriminatorValue); + if (model is null) { + Console.Error.WriteLine("No model data to send."); + return; + } + var requestInfo = ToPostRequestInformation(model, q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + requestInfo.SetContentFromParsable(reqAdapter, "application/json", model); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Get windows from users + /// + /// A + public Command BuildListCommand() + { + var command = new Command("list"); + command.Description = "Get windows from users"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var topOption = new Option("--top", description: "Show only the first n items") { + }; + topOption.IsRequired = false; + command.AddOption(topOption); + var skipOption = new Option("--skip", description: "Skip the first n items") { + }; + skipOption.IsRequired = false; + command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + var countOption = new Option("--count", description: "Include count of items") { + }; + countOption.IsRequired = false; + command.AddOption(countOption); + var orderbyOption = new Option("--orderby", description: "Order items by property values") { + Arity = ArgumentArity.ZeroOrMore + }; + orderbyOption.IsRequired = false; + command.AddOption(orderbyOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + var allOption = new Option("--all"); + command.AddOption(allOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var top = invocationContext.ParseResult.GetValueForOption(topOption); + var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + var count = invocationContext.ParseResult.GetValueForOption(countOption); + var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + var all = invocationContext.ParseResult.GetValueForOption(allOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + IPagingService pagingService = invocationContext.BindingContext.GetService(typeof(IPagingService)) as IPagingService ?? throw new ArgumentNullException("pagingService"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Top = top; + q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + q.QueryParameters.Count = count; + q.QueryParameters.Orderby = orderby; + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); + var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); + var response = pageResponse?.Response; +#nullable enable + IOutputFormatter? formatter = null; +#nullable restore + if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { + formatter = outputFormatterFactory.GetFormatter(output); + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + } else { + formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + } + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public WindowsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/settings/windows{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public WindowsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/settings/windows{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { + } + /// + /// Get windows from users + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Create new navigation property to windows for users + /// + /// A + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.WindowsSetting body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.WindowsSetting body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get windows from users + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class WindowsRequestBuilderGetQueryParameters + { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Sponsors/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Sponsors/Count/CountRequestBuilder.cs new file mode 100644 index 00000000..1fbeb72d --- /dev/null +++ b/src/sample/generated/Users/Item/Sponsors/Count/CountRequestBuilder.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Sponsors.Count +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\sponsors\$count + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { + /// + /// Get the number of the resource + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "Get the number of the resource"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + var formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/sponsors/$count{?%24filter,%24search}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/sponsors/$count{?%24filter,%24search}", rawUrl) + { + } + /// + /// Get the number of the resource + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "text/plain"); + return requestInfo; + } + /// + /// Get the number of the resource + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilder.cs b/src/sample/generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilder.cs new file mode 100644 index 00000000..825e22fc --- /dev/null +++ b/src/sample/generated/Users/Item/Sponsors/Item/DirectoryObjectItemRequestBuilder.cs @@ -0,0 +1,147 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Sponsors.Item +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\sponsors\{directoryObject-id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder + { + /// + /// The users and groups responsible for this guest's privileges in the tenant and keeping the guest's information and access updated. (HTTP Methods: GET, POST, DELETE.). Supports $expand. + /// + /// A + public Command BuildGetCommand() + { + var command = new Command("get"); + command.Description = "The users and groups responsible for this guest's privileges in the tenant and keeping the guest's information and access updated. (HTTP Methods: GET, POST, DELETE.). Supports $expand."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var directoryObjectIdOption = new Option("--directory-object-id", description: "The unique identifier of directoryObject") { + }; + directoryObjectIdOption.IsRequired = true; + command.AddOption(directoryObjectIdOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var directoryObjectId = invocationContext.ParseResult.GetValueForOption(directoryObjectIdOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (directoryObjectId is not null) requestInfo.PathParameters.Add("directoryObject%2Did", directoryObjectId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + var formatter = outputFormatterFactory.GetFormatter(output); + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/sponsors/{directoryObject%2Did}{?%24expand,%24select}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/sponsors/{directoryObject%2Did}{?%24expand,%24select}", rawUrl) + { + } + /// + /// The users and groups responsible for this guest's privileges in the tenant and keeping the guest's information and access updated. (HTTP Methods: GET, POST, DELETE.). Supports $expand. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// The users and groups responsible for this guest's privileges in the tenant and keeping the guest's information and access updated. (HTTP Methods: GET, POST, DELETE.). Supports $expand. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Sponsors/SponsorsRequestBuilder.cs b/src/sample/generated/Users/Item/Sponsors/SponsorsRequestBuilder.cs new file mode 100644 index 00000000..a9fa5afb --- /dev/null +++ b/src/sample/generated/Users/Item/Sponsors/SponsorsRequestBuilder.cs @@ -0,0 +1,261 @@ +// +#pragma warning disable CS0618 +using ApiSdk.Models.ODataErrors; +using ApiSdk.Models; +using ApiSdk.Users.Item.Sponsors.Count; +using ApiSdk.Users.Item.Sponsors.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using Microsoft.Kiota.Cli.Commons.Extensions; +using Microsoft.Kiota.Cli.Commons.IO; +using Microsoft.Kiota.Cli.Commons; +using System.Collections.Generic; +using System.CommandLine; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace ApiSdk.Users.Item.Sponsors +{ + /// + /// Builds and executes requests for operations under \users\{user-id}\sponsors + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SponsorsRequestBuilder : BaseCliRequestBuilder + { + /// + /// Gets an item from the ApiSdk.users.item.sponsors.item collection + /// + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { + var executables = new List(); + var builder = new global::ApiSdk.Users.Item.Sponsors.Item.DirectoryObjectItemRequestBuilder(PathParameters); + executables.Add(builder.BuildGetCommand()); + return new(executables, new(0)); + } + /// + /// The Count property + /// + /// A + public Command BuildCountNavCommand() + { + var command = new Command("count"); + command.Description = "The Count property"; + var builder = new global::ApiSdk.Users.Item.Sponsors.Count.CountRequestBuilder(PathParameters); + var execCommands = new List(); + execCommands.Add(builder.BuildGetCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// + /// Get a user's sponsors. Sponsors are users and groups that are responsible for this guest's privileges in the tenant and for keeping the guest's information and access up to date. + /// Find more info here + /// + /// A + public Command BuildListCommand() + { + var command = new Command("list"); + command.Description = "Get a user's sponsors. Sponsors are users and groups that are responsible for this guest's privileges in the tenant and for keeping the guest's information and access up to date.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-sponsors?view=graph-rest-1.0"; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var topOption = new Option("--top", description: "Show only the first n items") { + }; + topOption.IsRequired = false; + command.AddOption(topOption); + var skipOption = new Option("--skip", description: "Skip the first n items") { + }; + skipOption.IsRequired = false; + command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); + var filterOption = new Option("--filter", description: "Filter items by property values") { + }; + filterOption.IsRequired = false; + command.AddOption(filterOption); + var countOption = new Option("--count", description: "Include count of items") { + }; + countOption.IsRequired = false; + command.AddOption(countOption); + var orderbyOption = new Option("--orderby", description: "Order items by property values") { + Arity = ArgumentArity.ZeroOrMore + }; + orderbyOption.IsRequired = false; + command.AddOption(orderbyOption); + var selectOption = new Option("--select", description: "Select properties to be returned") { + Arity = ArgumentArity.ZeroOrMore + }; + selectOption.IsRequired = false; + command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); + var outputOption = new Option("--output", () => FormatterType.JSON); + command.AddOption(outputOption); + var queryOption = new Option("--query"); + command.AddOption(queryOption); + var allOption = new Option("--all"); + command.AddOption(allOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var top = invocationContext.ParseResult.GetValueForOption(topOption); + var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); + var filter = invocationContext.ParseResult.GetValueForOption(filterOption); + var count = invocationContext.ParseResult.GetValueForOption(countOption); + var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); + var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); + var output = invocationContext.ParseResult.GetValueForOption(outputOption); + var query = invocationContext.ParseResult.GetValueForOption(queryOption); + var all = invocationContext.ParseResult.GetValueForOption(allOption); + IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); + IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); + IPagingService pagingService = invocationContext.BindingContext.GetService(typeof(IPagingService)) as IPagingService ?? throw new ArgumentNullException("pagingService"); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToGetRequestInformation(q => { + q.QueryParameters.Top = top; + q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; + if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; + q.QueryParameters.Count = count; + q.QueryParameters.Orderby = orderby; + q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); + var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); + var response = pageResponse?.Response; +#nullable enable + IOutputFormatter? formatter = null; +#nullable restore + if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { + formatter = outputFormatterFactory.GetFormatter(output); + response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; + } else { + formatter = outputFormatterFactory.GetFormatter(FormatterType.TEXT); + } + await formatter.WriteOutputAsync(response, cancellationToken); + }); + return command; + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + public SponsorsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/sponsors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + public SponsorsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/sponsors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { + } + /// + /// Get a user's sponsors. Sponsors are users and groups that are responsible for this guest's privileges in the tenant and for keeping the guest's information and access up to date. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get a user's sponsors. Sponsors are users and groups that are responsible for this guest's privileges in the tenant and for keeping the guest's information and access up to date. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class SponsorsRequestBuilderGetQueryParameters + { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Count/CountRequestBuilder.cs index 000c8704..521f5e4a 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Count { +namespace ApiSdk.Users.Item.Todo.Lists.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -59,47 +66,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -123,3 +127,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/Count/CountRequestBuilder.cs index e9c1512e..b4c1bdde 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Extensions.Count { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Extensions.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\extensions\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -65,47 +72,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -129,3 +133,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/ExtensionsRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/ExtensionsRequestBuilder.cs index 4a32929f..9093dd00 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/ExtensionsRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Extensions.Count; using ApiSdk.Users.Item.Todo.Lists.Item.Extensions.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,17 +18,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Extensions { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Extensions +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\extensions /// - public class ExtensionsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.todo.lists.item.extensions.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); - var builder = new ExtensionItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Extensions.Item.ExtensionItemRequestBuilder(PathParameters); executables.Add(builder.BuildDeleteCommand()); executables.Add(builder.BuildGetCommand()); executables.Add(builder.BuildPatchCommand()); @@ -35,10 +42,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Extensions.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -50,7 +59,9 @@ public Command BuildCountNavCommand() { /// /// Create new navigation property to extensions for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); command.Description = "Create new navigation property to extensions for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -80,8 +91,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(Extension.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -105,7 +116,9 @@ public Command BuildCreateCommand() { /// /// The collection of open extensions defined for the task list. Nullable. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); command.Description = "The collection of open extensions defined for the task list. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -195,7 +208,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -207,75 +222,65 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new ExtensionsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ExtensionsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public ExtensionsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new ExtensionsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ExtensionsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public ExtensionsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// The collection of open extensions defined for the task list. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Create new navigation property to extensions for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Extension body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.Extension body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(Extension body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.Extension body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The collection of open extensions defined for the task list. Nullable. /// - public class ExtensionsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -338,3 +343,4 @@ public class ExtensionsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 1a93f706..e6de7d5f 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Extensions.Item { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Extensions.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\extensions\{extension-id} /// - public class ExtensionItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionItemRequestBuilder : BaseCliRequestBuilder + { /// /// Delete navigation property extensions for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); command.Description = "Delete navigation property extensions for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -79,7 +86,9 @@ public Command BuildDeleteCommand() { /// /// The collection of open extensions defined for the task list. Nullable. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "The collection of open extensions defined for the task list. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -141,7 +150,9 @@ public Command BuildGetCommand() { /// /// Update the navigation property extensions in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); command.Description = "Update the navigation property extensions in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -176,8 +187,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(Extension.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -200,100 +211,84 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new ExtensionItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ExtensionItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions/{extension%2Did}{?%24select,%24expand}", pathParameters) { + public ExtensionItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions/{extension%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new ExtensionItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ExtensionItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions/{extension%2Did}{?%24select,%24expand}", rawUrl) { + public ExtensionItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/extensions/{extension%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// Delete navigation property extensions for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The collection of open extensions defined for the task list. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Update the navigation property extensions in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(Extension body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Extension body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(Extension body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Extension body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The collection of open extensions defined for the task list. Nullable. /// - public class ExtensionItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -317,3 +312,4 @@ public class ExtensionItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Count/CountRequestBuilder.cs index ea9b2e4a..ef577c05 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Count { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -65,47 +72,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -129,3 +133,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/AttachmentSessionsRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/AttachmentSessionsRequestBuilder.cs index 93d83779..f97b10de 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/AttachmentSessionsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/AttachmentSessionsRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Count; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,18 +18,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\attachmentSessions /// - public class AttachmentSessionsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachmentSessionsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.todo.lists.item.tasks.item.attachmentSessions.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new AttachmentSessionItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Item.AttachmentSessionItemRequestBuilder(PathParameters); commands.Add(builder.BuildContentNavCommand()); executables.Add(builder.BuildDeleteCommand()); executables.Add(builder.BuildGetCommand()); @@ -37,10 +44,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -52,7 +61,9 @@ public Command BuildCountNavCommand() { /// /// Get attachmentSessions from users /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); command.Description = "Get attachmentSessions from users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -75,6 +86,10 @@ public Command BuildListCommand() { }; skipOption.IsRequired = false; command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); var filterOption = new Option("--filter", description: "Filter items by property values") { }; filterOption.IsRequired = false; @@ -93,6 +108,11 @@ public Command BuildListCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -105,10 +125,12 @@ public Command BuildListCommand() { var todoTaskId = invocationContext.ParseResult.GetValueForOption(todoTaskIdOption); var top = invocationContext.ParseResult.GetValueForOption(topOption); var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); var filter = invocationContext.ParseResult.GetValueForOption(filterOption); var count = invocationContext.ParseResult.GetValueForOption(countOption); var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); var all = invocationContext.ParseResult.GetValueForOption(allOption); @@ -120,10 +142,12 @@ public Command BuildListCommand() { var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Top = top; q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; q.QueryParameters.Count = count; q.QueryParameters.Orderby = orderby; q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); if (todoTaskListId is not null) requestInfo.PathParameters.Add("todoTaskList%2Did", todoTaskListId); @@ -135,7 +159,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -147,50 +173,57 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new AttachmentSessionsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public AttachmentSessionsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}", pathParameters) { + public AttachmentSessionsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new AttachmentSessionsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public AttachmentSessionsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}", rawUrl) { + public AttachmentSessionsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get attachmentSessions from users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get attachmentSessions from users /// - public class AttachmentSessionsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachmentSessionsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -210,6 +243,16 @@ public class AttachmentSessionsRequestBuilderGetQueryParameters { #else [QueryParameter("%24orderby")] public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } #endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -230,3 +273,4 @@ public class AttachmentSessionsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Count/CountRequestBuilder.cs index 8bfde110..3a1dd172 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Count { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\attachmentSessions\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -36,6 +43,10 @@ public Command BuildGetCommand() { }; todoTaskIdOption.IsRequired = true; command.AddOption(todoTaskIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); var filterOption = new Option("--filter", description: "Filter items by property values") { }; filterOption.IsRequired = false; @@ -44,11 +55,13 @@ public Command BuildGetCommand() { var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); var todoTaskListId = invocationContext.ParseResult.GetValueForOption(todoTaskListIdOption); var todoTaskId = invocationContext.ParseResult.GetValueForOption(todoTaskIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); var filter = invocationContext.ParseResult.GetValueForOption(filterOption); IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); @@ -65,47 +78,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/$count{?%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/$count{?%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -115,7 +125,18 @@ public class CountRequestBuilderGetQueryParameters { #else [QueryParameter("%24filter")] public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } #endif } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/AttachmentSessionItemRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/AttachmentSessionItemRequestBuilder.cs index ca16e9a6..41c1107a 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/AttachmentSessionItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/AttachmentSessionItemRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Item.Content; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,19 +17,25 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Item { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\attachmentSessions\{attachmentSession-id} /// - public class AttachmentSessionItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachmentSessionItemRequestBuilder : BaseCliRequestBuilder + { /// /// The content property /// - public Command BuildContentNavCommand() { + /// A + public Command BuildContentNavCommand() + { var command = new Command("content"); command.Description = "The content property"; - var builder = new ContentRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Item.Content.ContentRequestBuilder(PathParameters); var execCommands = new List(); + execCommands.Add(builder.BuildDeleteCommand()); execCommands.Add(builder.BuildGetCommand()); execCommands.Add(builder.BuildPutCommand()); foreach (var cmd in execCommands) @@ -39,7 +47,9 @@ public Command BuildContentNavCommand() { /// /// Delete navigation property attachmentSessions for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); command.Description = "Delete navigation property attachmentSessions for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -102,7 +112,9 @@ public Command BuildDeleteCommand() { /// /// Get attachmentSessions from users /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get attachmentSessions from users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -126,6 +138,11 @@ public Command BuildGetCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -136,6 +153,7 @@ public Command BuildGetCommand() { var todoTaskId = invocationContext.ParseResult.GetValueForOption(todoTaskIdOption); var attachmentSessionId = invocationContext.ParseResult.GetValueForOption(attachmentSessionIdOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); @@ -144,6 +162,7 @@ public Command BuildGetCommand() { var reqAdapter = invocationContext.GetRequestAdapter(); var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); if (todoTaskListId is not null) requestInfo.PathParameters.Add("todoTaskList%2Did", todoTaskListId); @@ -163,7 +182,9 @@ public Command BuildGetCommand() { /// /// Update the navigation property attachmentSessions in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); command.Description = "Update the navigation property attachmentSessions in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -203,8 +224,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(AttachmentSession.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.AttachmentSession.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -228,100 +249,94 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new AttachmentSessionItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public AttachmentSessionItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}{?%24select}", pathParameters) { + public AttachmentSessionItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new AttachmentSessionItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public AttachmentSessionItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}{?%24select}", rawUrl) { + public AttachmentSessionItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// Delete navigation property attachmentSessions for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get attachmentSessions from users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Update the navigation property attachmentSessions in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(AttachmentSession body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.AttachmentSession body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(AttachmentSession body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.AttachmentSession body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get attachmentSessions from users /// - public class AttachmentSessionItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachmentSessionItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -335,3 +350,4 @@ public class AttachmentSessionItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/Content/ContentRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/Content/ContentRequestBuilder.cs index 3b69d87a..10b5f286 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/Content/ContentRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/Content/ContentRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,85 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Item.Content { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.Item.Content +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\attachmentSessions\{attachmentSession-id}\content /// - public class ContentRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContentRequestBuilder : BaseCliRequestBuilder + { /// /// The content streams that are uploaded. /// - public Command BuildGetCommand() { + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "The content streams that are uploaded."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var todoTaskListIdOption = new Option("--todo-task-list-id", description: "The unique identifier of todoTaskList") { + }; + todoTaskListIdOption.IsRequired = true; + command.AddOption(todoTaskListIdOption); + var todoTaskIdOption = new Option("--todo-task-id", description: "The unique identifier of todoTask") { + }; + todoTaskIdOption.IsRequired = true; + command.AddOption(todoTaskIdOption); + var attachmentSessionIdOption = new Option("--attachment-session-id", description: "The unique identifier of attachmentSession") { + }; + attachmentSessionIdOption.IsRequired = true; + command.AddOption(attachmentSessionIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var todoTaskListId = invocationContext.ParseResult.GetValueForOption(todoTaskListIdOption); + var todoTaskId = invocationContext.ParseResult.GetValueForOption(todoTaskIdOption); + var attachmentSessionId = invocationContext.ParseResult.GetValueForOption(attachmentSessionIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (todoTaskListId is not null) requestInfo.PathParameters.Add("todoTaskList%2Did", todoTaskListId); + if (todoTaskId is not null) requestInfo.PathParameters.Add("todoTask%2Did", todoTaskId); + if (attachmentSessionId is not null) requestInfo.PathParameters.Add("attachmentSession%2Did", attachmentSessionId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// The content streams that are uploaded. + /// + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "The content streams that are uploaded."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -78,7 +150,9 @@ public Command BuildGetCommand() { /// /// The content streams that are uploaded. /// - public Command BuildPutCommand() { + /// A + public Command BuildPutCommand() + { var command = new Command("put"); command.Description = "The content streams that are uploaded."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -140,70 +214,79 @@ public Command BuildPutCommand() { return command; } /// - /// Instantiates a new ContentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ContentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}/content", pathParameters) { + public ContentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}/content", pathParameters) + { } /// - /// Instantiates a new ContentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ContentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}/content", rawUrl) { + public ContentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachmentSessions/{attachmentSession%2Did}/content", rawUrl) + { } /// /// The content streams that are uploaded. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The content streams that are uploaded. /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); + return requestInfo; + } + /// + /// The content streams that are uploaded. + /// + /// A /// Binary request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPutRequestInformation(Stream body, Action>? requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(Stream body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PUT, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); - requestInfo.SetStreamContent(body); + requestInfo.SetStreamContent(body, "application/octet-stream"); return requestInfo; } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs index 4cd812fc..edac79b9 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Count; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,18 +18,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\attachments /// - public class AttachmentsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachmentsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.todo.lists.item.tasks.item.attachments.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new AttachmentBaseItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Item.AttachmentBaseItemRequestBuilder(PathParameters); commands.Add(builder.BuildContentNavCommand()); executables.Add(builder.BuildDeleteCommand()); executables.Add(builder.BuildGetCommand()); @@ -36,10 +43,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -49,12 +58,13 @@ public Command BuildCountNavCommand() { return command; } /// - /// Add a new taskFileAttachment object to a todoTask. This operation limits the size of the attachment you can add to under 3 MB. If the size of the file attachments is more than 3 MB, create an upload session to upload the attachments. This API is supported in the following national cloud deployments. - /// Find more info here + /// Create new navigation property to attachments for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); - command.Description = "Add a new taskFileAttachment object to a todoTask. This operation limits the size of the attachment you can add to under 3 MB. If the size of the file attachments is more than 3 MB, create an upload session to upload the attachments. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-post-attachments?view=graph-rest-1.0"; + command.Description = "Create new navigation property to attachments for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -87,8 +97,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(AttachmentBase.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.AttachmentBase.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -111,12 +121,13 @@ public Command BuildCreateCommand() { return command; } /// - /// Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. This API is supported in the following national cloud deployments. - /// Find more info here + /// A collection of file attachments for the task. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-list-attachments?view=graph-rest-1.0"; + command.Description = "A collection of file attachments for the task."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -137,6 +148,10 @@ public Command BuildListCommand() { }; skipOption.IsRequired = false; command.AddOption(skipOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); var filterOption = new Option("--filter", description: "Filter items by property values") { }; filterOption.IsRequired = false; @@ -155,6 +170,11 @@ public Command BuildListCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -167,10 +187,12 @@ public Command BuildListCommand() { var todoTaskId = invocationContext.ParseResult.GetValueForOption(todoTaskIdOption); var top = invocationContext.ParseResult.GetValueForOption(topOption); var skip = invocationContext.ParseResult.GetValueForOption(skipOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); var filter = invocationContext.ParseResult.GetValueForOption(filterOption); var count = invocationContext.ParseResult.GetValueForOption(countOption); var orderby = invocationContext.ParseResult.GetValueForOption(orderbyOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); var all = invocationContext.ParseResult.GetValueForOption(allOption); @@ -182,10 +204,12 @@ public Command BuildListCommand() { var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Top = top; q.QueryParameters.Skip = skip; + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; q.QueryParameters.Count = count; q.QueryParameters.Orderby = orderby; q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); if (todoTaskListId is not null) requestInfo.PathParameters.Add("todoTaskList%2Did", todoTaskListId); @@ -197,7 +221,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -209,78 +235,78 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new AttachmentsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public AttachmentsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}", pathParameters) { + public AttachmentsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new AttachmentsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public AttachmentsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments{?%24top,%24skip,%24filter,%24count,%24orderby,%24select}", rawUrl) { + public AttachmentsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. This API is supported in the following national cloud deployments. + /// A collection of file attachments for the task. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Add a new taskFileAttachment object to a todoTask. This operation limits the size of the attachment you can add to under 3 MB. If the size of the file attachments is more than 3 MB, create an upload session to upload the attachments. This API is supported in the following national cloud deployments. + /// Create new navigation property to attachments for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(AttachmentBase body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.AttachmentBase body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(AttachmentBase body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.AttachmentBase body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get a list of the taskFileAttachment objects and their properties. The contentBytes property will not be returned in the response. Use the Get attachment API to view the contentBytes. This API is supported in the following national cloud deployments. + /// A collection of file attachments for the task. /// - public class AttachmentsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachmentsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -300,6 +326,16 @@ public class AttachmentsRequestBuilderGetQueryParameters { #else [QueryParameter("%24orderby")] public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } #endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -320,3 +356,4 @@ public class AttachmentsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Count/CountRequestBuilder.cs index 8c063bc6..da7eda1e 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Count { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\attachments\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -36,6 +43,10 @@ public Command BuildGetCommand() { }; todoTaskIdOption.IsRequired = true; command.AddOption(todoTaskIdOption); + var searchOption = new Option("--search", description: "Search items by search phrases") { + }; + searchOption.IsRequired = false; + command.AddOption(searchOption); var filterOption = new Option("--filter", description: "Filter items by property values") { }; filterOption.IsRequired = false; @@ -44,11 +55,13 @@ public Command BuildGetCommand() { var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); var todoTaskListId = invocationContext.ParseResult.GetValueForOption(todoTaskListIdOption); var todoTaskId = invocationContext.ParseResult.GetValueForOption(todoTaskIdOption); + var search = invocationContext.ParseResult.GetValueForOption(searchOption); var filter = invocationContext.ParseResult.GetValueForOption(filterOption); IOutputFormatterFactory outputFormatterFactory = invocationContext.BindingContext.GetService(typeof(IOutputFormatterFactory)) as IOutputFormatterFactory ?? throw new ArgumentNullException("outputFormatterFactory"); var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); var requestInfo = ToGetRequestInformation(q => { + if (!string.IsNullOrEmpty(search)) q.QueryParameters.Search = search; if (!string.IsNullOrEmpty(filter)) q.QueryParameters.Filter = filter; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); @@ -65,47 +78,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/$count{?%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/$count{?%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -115,7 +125,18 @@ public class CountRequestBuilderGetQueryParameters { #else [QueryParameter("%24filter")] public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } #endif } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Item/AttachmentBaseItemRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Item/AttachmentBaseItemRequestBuilder.cs index eee538c1..45535620 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Item/AttachmentBaseItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Item/AttachmentBaseItemRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Item.Value; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,19 +17,25 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Item { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\attachments\{attachmentBase-id} /// - public class AttachmentBaseItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachmentBaseItemRequestBuilder : BaseCliRequestBuilder + { /// /// The Content property /// - public Command BuildContentNavCommand() { + /// A + public Command BuildContentNavCommand() + { var command = new Command("content"); command.Description = "The Content property"; - var builder = new ContentRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Item.Value.ContentRequestBuilder(PathParameters); var execCommands = new List(); + execCommands.Add(builder.BuildDeleteCommand()); execCommands.Add(builder.BuildGetCommand()); execCommands.Add(builder.BuildPutCommand()); foreach (var cmd in execCommands) @@ -37,12 +45,13 @@ public Command BuildContentNavCommand() { return command; } /// - /// Delete a taskFileAttachment object from a todoTask resource. This API is supported in the following national cloud deployments. - /// Find more info here + /// Delete navigation property attachments for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); - command.Description = "Delete a taskFileAttachment object from a todoTask resource. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/taskfileattachment-delete?view=graph-rest-1.0"; + command.Description = "Delete navigation property attachments for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -101,12 +110,13 @@ public Command BuildDeleteCommand() { return command; } /// - /// Read the properties and relationships of a taskFileAttachment object. This API is supported in the following national cloud deployments. - /// Find more info here + /// A collection of file attachments for the task. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Read the properties and relationships of a taskFileAttachment object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/taskfileattachment-get?view=graph-rest-1.0"; + command.Description = "A collection of file attachments for the task."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -128,6 +138,11 @@ public Command BuildGetCommand() { }; selectOption.IsRequired = false; command.AddOption(selectOption); + var expandOption = new Option("--expand", description: "Expand related entities") { + Arity = ArgumentArity.ZeroOrMore + }; + expandOption.IsRequired = false; + command.AddOption(expandOption); var outputOption = new Option("--output", () => FormatterType.JSON); command.AddOption(outputOption); var queryOption = new Option("--query"); @@ -138,6 +153,7 @@ public Command BuildGetCommand() { var todoTaskId = invocationContext.ParseResult.GetValueForOption(todoTaskIdOption); var attachmentBaseId = invocationContext.ParseResult.GetValueForOption(attachmentBaseIdOption); var select = invocationContext.ParseResult.GetValueForOption(selectOption); + var expand = invocationContext.ParseResult.GetValueForOption(expandOption); var output = invocationContext.ParseResult.GetValueForOption(outputOption); var query = invocationContext.ParseResult.GetValueForOption(queryOption); IOutputFilter outputFilter = invocationContext.BindingContext.GetService(typeof(IOutputFilter)) as IOutputFilter ?? throw new ArgumentNullException("outputFilter"); @@ -146,6 +162,7 @@ public Command BuildGetCommand() { var reqAdapter = invocationContext.GetRequestAdapter(); var requestInfo = ToGetRequestInformation(q => { q.QueryParameters.Select = select; + q.QueryParameters.Expand = expand; }); if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); if (todoTaskListId is not null) requestInfo.PathParameters.Add("todoTaskList%2Did", todoTaskListId); @@ -163,72 +180,73 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new AttachmentBaseItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public AttachmentBaseItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}{?%24select}", pathParameters) { + public AttachmentBaseItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new AttachmentBaseItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public AttachmentBaseItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}{?%24select}", rawUrl) { + public AttachmentBaseItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Delete a taskFileAttachment object from a todoTask resource. This API is supported in the following national cloud deployments. + /// Delete navigation property attachments for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a taskFileAttachment object. This API is supported in the following national cloud deployments. + /// A collection of file attachments for the task. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a taskFileAttachment object. This API is supported in the following national cloud deployments. + /// A collection of file attachments for the task. /// - public class AttachmentBaseItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class AttachmentBaseItemRequestBuilderGetQueryParameters + { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif /// Select properties to be returned #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -242,3 +260,4 @@ public class AttachmentBaseItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Item/Value/ContentRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Item/Value/ContentRequestBuilder.cs index ea597510..e817a65b 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Item/Value/ContentRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Attachments/Item/Value/ContentRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,18 +15,87 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Item.Value { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.Item.Value +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\attachments\{attachmentBase-id}\$value /// - public class ContentRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ContentRequestBuilder : BaseCliRequestBuilder + { /// - /// Get media content for the navigation property attachments from users - /// Find more info here + /// The unique identifier for an entity. Read-only. /// - public Command BuildGetCommand() { + /// A + public Command BuildDeleteCommand() + { + var command = new Command("delete"); + command.Description = "The unique identifier for an entity. Read-only."; + var userIdOption = new Option("--user-id", description: "The unique identifier of user") { + }; + userIdOption.IsRequired = true; + command.AddOption(userIdOption); + var todoTaskListIdOption = new Option("--todo-task-list-id", description: "The unique identifier of todoTaskList") { + }; + todoTaskListIdOption.IsRequired = true; + command.AddOption(todoTaskListIdOption); + var todoTaskIdOption = new Option("--todo-task-id", description: "The unique identifier of todoTask") { + }; + todoTaskIdOption.IsRequired = true; + command.AddOption(todoTaskIdOption); + var attachmentBaseIdOption = new Option("--attachment-base-id", description: "The unique identifier of attachmentBase") { + }; + attachmentBaseIdOption.IsRequired = true; + command.AddOption(attachmentBaseIdOption); + var ifMatchOption = new Option("--if-match", description: "ETag") { + Arity = ArgumentArity.ZeroOrMore + }; + ifMatchOption.IsRequired = false; + command.AddOption(ifMatchOption); + var outputFileOption = new Option("--output-file"); + command.AddOption(outputFileOption); + command.SetHandler(async (invocationContext) => { + var userId = invocationContext.ParseResult.GetValueForOption(userIdOption); + var todoTaskListId = invocationContext.ParseResult.GetValueForOption(todoTaskListIdOption); + var todoTaskId = invocationContext.ParseResult.GetValueForOption(todoTaskIdOption); + var attachmentBaseId = invocationContext.ParseResult.GetValueForOption(attachmentBaseIdOption); + var ifMatch = invocationContext.ParseResult.GetValueForOption(ifMatchOption); + var outputFile = invocationContext.ParseResult.GetValueForOption(outputFileOption); + var cancellationToken = invocationContext.GetCancellationToken(); + var reqAdapter = invocationContext.GetRequestAdapter(); + var requestInfo = ToDeleteRequestInformation(q => { + }); + if (userId is not null) requestInfo.PathParameters.Add("user%2Did", userId); + if (todoTaskListId is not null) requestInfo.PathParameters.Add("todoTaskList%2Did", todoTaskListId); + if (todoTaskId is not null) requestInfo.PathParameters.Add("todoTask%2Did", todoTaskId); + if (attachmentBaseId is not null) requestInfo.PathParameters.Add("attachmentBase%2Did", attachmentBaseId); + if (ifMatch is not null) requestInfo.Headers.Add("If-Match", ifMatch); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var response = await reqAdapter.SendPrimitiveAsync(requestInfo, errorMapping: errorMapping, cancellationToken: cancellationToken) ?? Stream.Null; + if (outputFile == null) { + using var reader = new StreamReader(response); + var strContent = reader.ReadToEnd(); + Console.Write(strContent); + } + else { + using var writeStream = outputFile.OpenWrite(); + await response.CopyToAsync(writeStream); + Console.WriteLine($"Content written to {outputFile.FullName}."); + } + }); + return command; + } + /// + /// The unique identifier for an entity. Read-only. + /// + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Get media content for the navigation property attachments from users\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-list-attachments?view=graph-rest-1.0"; + command.Description = "The unique identifier for an entity. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -76,11 +147,13 @@ public Command BuildGetCommand() { return command; } /// - /// Update media content for the navigation property attachments in users + /// The unique identifier for an entity. Read-only. /// - public Command BuildPutCommand() { + /// A + public Command BuildPutCommand() + { var command = new Command("put"); - command.Description = "Update media content for the navigation property attachments in users"; + command.Description = "The unique identifier for an entity. Read-only."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -142,69 +215,79 @@ public Command BuildPutCommand() { return command; } /// - /// Instantiates a new ContentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ContentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}/$value", pathParameters) { + public ContentRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}/$value", pathParameters) + { } /// - /// Instantiates a new ContentRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ContentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}/$value", rawUrl) { + public ContentRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/attachments/{attachmentBase%2Did}/$value", rawUrl) + { } /// - /// Get media content for the navigation property attachments from users + /// The unique identifier for an entity. Read-only. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// The unique identifier for an entity. Read-only. + /// + /// A + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); return requestInfo; } /// - /// Update media content for the navigation property attachments in users + /// The unique identifier for an entity. Read-only. /// + /// A /// Binary request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPutRequestInformation(Stream body, Action>? requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(Stream body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { + public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PUT, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } - requestInfo.SetStreamContent(body); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetStreamContent(body, "application/octet-stream"); return requestInfo; } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/ChecklistItemsRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/ChecklistItemsRequestBuilder.cs index e6449f2d..d85ba128 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/ChecklistItemsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/ChecklistItemsRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems.Count; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,17 +18,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\checklistItems /// - public class ChecklistItemsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ChecklistItemsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.todo.lists.item.tasks.item.checklistItems.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); - var builder = new ChecklistItemItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems.Item.ChecklistItemItemRequestBuilder(PathParameters); executables.Add(builder.BuildDeleteCommand()); executables.Add(builder.BuildGetCommand()); executables.Add(builder.BuildPatchCommand()); @@ -35,10 +42,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -48,12 +57,13 @@ public Command BuildCountNavCommand() { return command; } /// - /// Create a new checklistItem object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Create new navigation property to checklistItems for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); - command.Description = "Create a new checklistItem object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-post-checklistitems?view=graph-rest-1.0"; + command.Description = "Create new navigation property to checklistItems for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -86,8 +96,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ChecklistItem.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.ChecklistItem.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -110,12 +120,13 @@ public Command BuildCreateCommand() { return command; } /// - /// Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. This API is supported in the following national cloud deployments. - /// Find more info here + /// A collection of checklistItems linked to a task. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-list-checklistitems?view=graph-rest-1.0"; + command.Description = "A collection of checklistItems linked to a task."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -209,7 +220,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -221,75 +234,65 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new ChecklistItemsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ChecklistItemsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public ChecklistItemsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new ChecklistItemsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ChecklistItemsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public ChecklistItemsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. This API is supported in the following national cloud deployments. + /// A collection of checklistItems linked to a task. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Create a new checklistItem object. This API is supported in the following national cloud deployments. + /// Create new navigation property to checklistItems for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(ChecklistItem body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.ChecklistItem body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(ChecklistItem body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.ChecklistItem body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get the checklistItem resources associated to a todoTask from the checklistItems navigation property. This API is supported in the following national cloud deployments. + /// A collection of checklistItems linked to a task. /// - public class ChecklistItemsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ChecklistItemsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -352,3 +355,4 @@ public class ChecklistItemsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/Count/CountRequestBuilder.cs index 5ae8ce15..8c54bdc9 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems.Count { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\checklistItems\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -71,47 +78,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -135,3 +139,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/Item/ChecklistItemItemRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/Item/ChecklistItemItemRequestBuilder.cs index dacdafff..290cdd68 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/Item/ChecklistItemItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/ChecklistItems/Item/ChecklistItemItemRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,18 +16,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems.Item { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\checklistItems\{checklistItem-id} /// - public class ChecklistItemItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ChecklistItemItemRequestBuilder : BaseCliRequestBuilder + { /// - /// Delete a checklistItem object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Delete navigation property checklistItems for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); - command.Description = "Delete a checklistItem object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/checklistitem-delete?view=graph-rest-1.0"; + command.Description = "Delete navigation property checklistItems for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -84,12 +90,13 @@ public Command BuildDeleteCommand() { return command; } /// - /// Read the properties and relationships of a checklistItem object. This API is supported in the following national cloud deployments. - /// Find more info here + /// A collection of checklistItems linked to a task. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Read the properties and relationships of a checklistItem object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/checklistitem-get?view=graph-rest-1.0"; + command.Description = "A collection of checklistItems linked to a task."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -153,12 +160,13 @@ public Command BuildGetCommand() { return command; } /// - /// Update the properties of a checklistItem object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Update the navigation property checklistItems in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); - command.Description = "Update the properties of a checklistItem object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/checklistitem-update?view=graph-rest-1.0"; + command.Description = "Update the navigation property checklistItems in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -196,8 +204,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ChecklistItem.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.ChecklistItem.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -221,100 +229,84 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new ChecklistItemItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ChecklistItemItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/{checklistItem%2Did}{?%24select,%24expand}", pathParameters) { + public ChecklistItemItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/{checklistItem%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new ChecklistItemItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ChecklistItemItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/{checklistItem%2Did}{?%24select,%24expand}", rawUrl) { + public ChecklistItemItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/checklistItems/{checklistItem%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Delete a checklistItem object. This API is supported in the following national cloud deployments. + /// Delete navigation property checklistItems for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a checklistItem object. This API is supported in the following national cloud deployments. + /// A collection of checklistItems linked to a task. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update the properties of a checklistItem object. This API is supported in the following national cloud deployments. + /// Update the navigation property checklistItems in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(ChecklistItem body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ChecklistItem body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(ChecklistItem body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.ChecklistItem body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a checklistItem object. This API is supported in the following national cloud deployments. + /// A collection of checklistItems linked to a task. /// - public class ChecklistItemItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ChecklistItemItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -338,3 +330,4 @@ public class ChecklistItemItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/Count/CountRequestBuilder.cs index 30a08e2b..564ef86c 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions.Count { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\extensions\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -71,47 +78,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -135,3 +139,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/ExtensionsRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/ExtensionsRequestBuilder.cs index 843ded28..ff312705 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/ExtensionsRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions.Count; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,17 +18,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\extensions /// - public class ExtensionsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.todo.lists.item.tasks.item.extensions.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); - var builder = new ExtensionItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions.Item.ExtensionItemRequestBuilder(PathParameters); executables.Add(builder.BuildDeleteCommand()); executables.Add(builder.BuildGetCommand()); executables.Add(builder.BuildPatchCommand()); @@ -35,10 +42,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -50,7 +59,9 @@ public Command BuildCountNavCommand() { /// /// Create new navigation property to extensions for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); command.Description = "Create new navigation property to extensions for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -85,8 +96,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(Extension.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -111,7 +122,9 @@ public Command BuildCreateCommand() { /// /// The collection of open extensions defined for the task. Nullable. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); command.Description = "The collection of open extensions defined for the task. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -207,7 +220,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -219,75 +234,65 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new ExtensionsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ExtensionsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public ExtensionsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new ExtensionsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ExtensionsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public ExtensionsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// The collection of open extensions defined for the task. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Create new navigation property to extensions for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(Extension body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.Extension body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(Extension body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.Extension body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The collection of open extensions defined for the task. Nullable. /// - public class ExtensionsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -350,3 +355,4 @@ public class ExtensionsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 16946332..66723ea3 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions.Item { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\extensions\{extension-id} /// - public class ExtensionItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionItemRequestBuilder : BaseCliRequestBuilder + { /// /// Delete navigation property extensions for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); command.Description = "Delete navigation property extensions for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -85,7 +92,9 @@ public Command BuildDeleteCommand() { /// /// The collection of open extensions defined for the task. Nullable. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "The collection of open extensions defined for the task. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -153,7 +162,9 @@ public Command BuildGetCommand() { /// /// Update the navigation property extensions in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); command.Description = "Update the navigation property extensions in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -193,8 +204,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(Extension.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.Extension.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -218,100 +229,84 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new ExtensionItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ExtensionItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/{extension%2Did}{?%24select,%24expand}", pathParameters) { + public ExtensionItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/{extension%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new ExtensionItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ExtensionItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/{extension%2Did}{?%24select,%24expand}", rawUrl) { + public ExtensionItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/extensions/{extension%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// Delete navigation property extensions for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The collection of open extensions defined for the task. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Update the navigation property extensions in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(Extension body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Extension body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(Extension body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Extension body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The collection of open extensions defined for the task. Nullable. /// - public class ExtensionItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ExtensionItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -335,3 +330,4 @@ public class ExtensionItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/Count/CountRequestBuilder.cs index 0cc8d18d..856620ae 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources.Count { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\linkedResources\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -71,47 +78,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -135,3 +139,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/Item/LinkedResourceItemRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/Item/LinkedResourceItemRequestBuilder.cs index 12a14179..62504957 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/Item/LinkedResourceItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/Item/LinkedResourceItemRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,18 +16,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources.Item { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\linkedResources\{linkedResource-id} /// - public class LinkedResourceItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LinkedResourceItemRequestBuilder : BaseCliRequestBuilder + { /// - /// Deletes a linkedResource object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Delete navigation property linkedResources for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); - command.Description = "Deletes a linkedResource object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/linkedresource-delete?view=graph-rest-1.0"; + command.Description = "Delete navigation property linkedResources for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -84,12 +90,13 @@ public Command BuildDeleteCommand() { return command; } /// - /// Read the properties and relationships of a linkedResource object. This API is supported in the following national cloud deployments. - /// Find more info here + /// A collection of resources linked to the task. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Read the properties and relationships of a linkedResource object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/linkedresource-get?view=graph-rest-1.0"; + command.Description = "A collection of resources linked to the task."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -153,12 +160,13 @@ public Command BuildGetCommand() { return command; } /// - /// Update the properties of a linkedResource object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Update the navigation property linkedResources in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); - command.Description = "Update the properties of a linkedResource object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/linkedresource-update?view=graph-rest-1.0"; + command.Description = "Update the navigation property linkedResources in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -196,8 +204,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(LinkedResource.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.LinkedResource.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -221,100 +229,84 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new LinkedResourceItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public LinkedResourceItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/{linkedResource%2Did}{?%24select,%24expand}", pathParameters) { + public LinkedResourceItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/{linkedResource%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new LinkedResourceItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public LinkedResourceItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/{linkedResource%2Did}{?%24select,%24expand}", rawUrl) { + public LinkedResourceItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources/{linkedResource%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Deletes a linkedResource object. This API is supported in the following national cloud deployments. + /// Delete navigation property linkedResources for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a linkedResource object. This API is supported in the following national cloud deployments. + /// A collection of resources linked to the task. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update the properties of a linkedResource object. This API is supported in the following national cloud deployments. + /// Update the navigation property linkedResources in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(LinkedResource body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.LinkedResource body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(LinkedResource body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.LinkedResource body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a linkedResource object. This API is supported in the following national cloud deployments. + /// A collection of resources linked to the task. /// - public class LinkedResourceItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LinkedResourceItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -338,3 +330,4 @@ public class LinkedResourceItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/LinkedResourcesRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/LinkedResourcesRequestBuilder.cs index 6a3e2de8..ce223b53 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/LinkedResourcesRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/LinkedResources/LinkedResourcesRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources.Count; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,17 +18,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id}\linkedResources /// - public class LinkedResourcesRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LinkedResourcesRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.todo.lists.item.tasks.item.linkedResources.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); - var builder = new LinkedResourceItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources.Item.LinkedResourceItemRequestBuilder(PathParameters); executables.Add(builder.BuildDeleteCommand()); executables.Add(builder.BuildGetCommand()); executables.Add(builder.BuildPatchCommand()); @@ -35,10 +42,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -48,12 +57,13 @@ public Command BuildCountNavCommand() { return command; } /// - /// Create a linkedResource object to associate a specified task with an item in a partner application. For example, you can associate a task with an email item in Outlook that spurred the task, and you can create a linkedResource object to track its association. You can also create a linkedResource object while creating a task. This API is supported in the following national cloud deployments. - /// Find more info here + /// Create new navigation property to linkedResources for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); - command.Description = "Create a linkedResource object to associate a specified task with an item in a partner application. For example, you can associate a task with an email item in Outlook that spurred the task, and you can create a linkedResource object to track its association. You can also create a linkedResource object while creating a task. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-post-linkedresources?view=graph-rest-1.0"; + command.Description = "Create new navigation property to linkedResources for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -86,8 +96,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(LinkedResource.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.LinkedResource.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -110,12 +120,13 @@ public Command BuildCreateCommand() { return command; } /// - /// Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. This API is supported in the following national cloud deployments. - /// Find more info here + /// A collection of resources linked to the task. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-list-linkedresources?view=graph-rest-1.0"; + command.Description = "A collection of resources linked to the task."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -209,7 +220,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -221,75 +234,65 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new LinkedResourcesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public LinkedResourcesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public LinkedResourcesRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new LinkedResourcesRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public LinkedResourcesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public LinkedResourcesRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}/linkedResources{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. This API is supported in the following national cloud deployments. + /// A collection of resources linked to the task. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Create a linkedResource object to associate a specified task with an item in a partner application. For example, you can associate a task with an email item in Outlook that spurred the task, and you can create a linkedResource object to track its association. You can also create a linkedResource object while creating a task. This API is supported in the following national cloud deployments. + /// Create new navigation property to linkedResources for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(LinkedResource body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.LinkedResource body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(LinkedResource body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.LinkedResource body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get information of one or more items in a partner application, based on which a specified task was created. The information is represented in a linkedResource object for each item. It includes an external ID for the item in the partner application, and if applicable, a deep link to that item in the application. This API is supported in the following national cloud deployments. + /// A collection of resources linked to the task. /// - public class LinkedResourcesRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class LinkedResourcesRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -352,3 +355,4 @@ public class LinkedResourcesRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/TodoTaskItemRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/TodoTaskItemRequestBuilder.cs index eb77a9d4..b4ab3762 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/TodoTaskItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/Item/TodoTaskItemRequestBuilder.cs @@ -1,4 +1,5 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions; @@ -6,6 +7,7 @@ using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -19,18 +21,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks\{todoTask-id} /// - public class TodoTaskItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TodoTaskItemRequestBuilder : BaseCliRequestBuilder + { /// /// The attachmentSessions property /// - public Command BuildAttachmentSessionsNavCommand() { + /// A + public Command BuildAttachmentSessionsNavCommand() + { var command = new Command("attachment-sessions"); command.Description = "The attachmentSessions property"; - var builder = new AttachmentSessionsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.AttachmentSessions.AttachmentSessionsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -51,10 +58,12 @@ public Command BuildAttachmentSessionsNavCommand() { /// /// The attachments property /// - public Command BuildAttachmentsNavCommand() { + /// A + public Command BuildAttachmentsNavCommand() + { var command = new Command("attachments"); command.Description = "The attachments property"; - var builder = new AttachmentsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Attachments.AttachmentsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -76,10 +85,12 @@ public Command BuildAttachmentsNavCommand() { /// /// The checklistItems property /// - public Command BuildChecklistItemsNavCommand() { + /// A + public Command BuildChecklistItemsNavCommand() + { var command = new Command("checklist-items"); command.Description = "The checklistItems property"; - var builder = new ChecklistItemsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.ChecklistItems.ChecklistItemsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -99,12 +110,13 @@ public Command BuildChecklistItemsNavCommand() { return command; } /// - /// Deletes a todoTask object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Delete navigation property tasks for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); - command.Description = "Deletes a todoTask object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-delete?view=graph-rest-1.0"; + command.Description = "Delete navigation property tasks for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -159,10 +171,12 @@ public Command BuildDeleteCommand() { /// /// The extensions property /// - public Command BuildExtensionsNavCommand() { + /// A + public Command BuildExtensionsNavCommand() + { var command = new Command("extensions"); command.Description = "The extensions property"; - var builder = new ExtensionsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.Extensions.ExtensionsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -182,12 +196,13 @@ public Command BuildExtensionsNavCommand() { return command; } /// - /// Read the properties and relationships of a todoTask object. This API is supported in the following national cloud deployments. - /// Find more info here + /// The tasks in this task list. Read-only. Nullable. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Read the properties and relationships of a todoTask object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-get?view=graph-rest-1.0"; + command.Description = "The tasks in this task list. Read-only. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -247,10 +262,12 @@ public Command BuildGetCommand() { /// /// The linkedResources property /// - public Command BuildLinkedResourcesNavCommand() { + /// A + public Command BuildLinkedResourcesNavCommand() + { var command = new Command("linked-resources"); command.Description = "The linkedResources property"; - var builder = new LinkedResourcesRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.LinkedResources.LinkedResourcesRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -270,12 +287,13 @@ public Command BuildLinkedResourcesNavCommand() { return command; } /// - /// Update the properties of a todoTask object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Update the navigation property tasks in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); - command.Description = "Update the properties of a todoTask object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotask-update?view=graph-rest-1.0"; + command.Description = "Update the navigation property tasks in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -308,8 +326,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(TodoTask.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.TodoTask.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -332,100 +350,84 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new TodoTaskItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public TodoTaskItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}{?%24select,%24expand}", pathParameters) { + public TodoTaskItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new TodoTaskItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public TodoTaskItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}{?%24select,%24expand}", rawUrl) { + public TodoTaskItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks/{todoTask%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Deletes a todoTask object. This API is supported in the following national cloud deployments. + /// Delete navigation property tasks for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a todoTask object. This API is supported in the following national cloud deployments. + /// The tasks in this task list. Read-only. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update the properties of a todoTask object. This API is supported in the following national cloud deployments. + /// Update the navigation property tasks in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(TodoTask body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.TodoTask body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(TodoTask body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.TodoTask body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a todoTask object. This API is supported in the following national cloud deployments. + /// The tasks in this task list. Read-only. Nullable. /// - public class TodoTaskItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TodoTaskItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -449,3 +451,4 @@ public class TodoTaskItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/TasksRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/TasksRequestBuilder.cs index 78d82412..00fcd009 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/TasksRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/Tasks/TasksRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Count; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,18 +18,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks { +namespace ApiSdk.Users.Item.Todo.Lists.Item.Tasks +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id}\tasks /// - public class TasksRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TasksRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.todo.lists.item.tasks.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new TodoTaskItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Item.TodoTaskItemRequestBuilder(PathParameters); commands.Add(builder.BuildAttachmentSessionsNavCommand()); commands.Add(builder.BuildAttachmentsNavCommand()); commands.Add(builder.BuildChecklistItemsNavCommand()); @@ -41,10 +48,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -54,12 +63,13 @@ public Command BuildCountNavCommand() { return command; } /// - /// Create a new task object in a specified todoTaskList. This API is supported in the following national cloud deployments. - /// Find more info here + /// Create new navigation property to tasks for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); - command.Description = "Create a new task object in a specified todoTaskList. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotasklist-post-tasks?view=graph-rest-1.0"; + command.Description = "Create new navigation property to tasks for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -87,8 +97,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(TodoTask.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.TodoTask.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -110,12 +120,13 @@ public Command BuildCreateCommand() { return command; } /// - /// Get the todoTask resources from the tasks navigation property of a specified todoTaskList. This API is supported in the following national cloud deployments. - /// Find more info here + /// The tasks in this task list. Read-only. Nullable. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Get the todoTask resources from the tasks navigation property of a specified todoTaskList. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotasklist-list-tasks?view=graph-rest-1.0"; + command.Description = "The tasks in this task list. Read-only. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -203,7 +214,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -215,75 +228,65 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new TasksRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public TasksRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public TasksRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new TasksRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public TasksRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public TasksRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}/tasks{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Get the todoTask resources from the tasks navigation property of a specified todoTaskList. This API is supported in the following national cloud deployments. + /// The tasks in this task list. Read-only. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Create a new task object in a specified todoTaskList. This API is supported in the following national cloud deployments. + /// Create new navigation property to tasks for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(TodoTask body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.TodoTask body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(TodoTask body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.TodoTask body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get the todoTask resources from the tasks navigation property of a specified todoTaskList. This API is supported in the following national cloud deployments. + /// The tasks in this task list. Read-only. Nullable. /// - public class TasksRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TasksRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -346,3 +349,4 @@ public class TasksRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/Item/TodoTaskListItemRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/Item/TodoTaskListItemRequestBuilder.cs index 150678a7..1d941a34 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/Item/TodoTaskListItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/Item/TodoTaskListItemRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Item.Extensions; using ApiSdk.Users.Item.Todo.Lists.Item.Tasks; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,18 +18,22 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists.Item { +namespace ApiSdk.Users.Item.Todo.Lists.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists\{todoTaskList-id} /// - public class TodoTaskListItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TodoTaskListItemRequestBuilder : BaseCliRequestBuilder + { /// - /// Deletes a todoTaskList object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Delete navigation property lists for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); - command.Description = "Deletes a todoTaskList object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotasklist-delete?view=graph-rest-1.0"; + command.Description = "Delete navigation property lists for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -76,10 +82,12 @@ public Command BuildDeleteCommand() { /// /// The extensions property /// - public Command BuildExtensionsNavCommand() { + /// A + public Command BuildExtensionsNavCommand() + { var command = new Command("extensions"); command.Description = "The extensions property"; - var builder = new ExtensionsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Extensions.ExtensionsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -99,12 +107,13 @@ public Command BuildExtensionsNavCommand() { return command; } /// - /// Read the properties and relationships of a todoTaskList object. This API is supported in the following national cloud deployments. - /// Find more info here + /// The task lists in the users mailbox. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); - command.Description = "Read the properties and relationships of a todoTaskList object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotasklist-get?view=graph-rest-1.0"; + command.Description = "The task lists in the users mailbox."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -156,12 +165,13 @@ public Command BuildGetCommand() { return command; } /// - /// Update the properties of a todoTaskList object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Update the navigation property lists in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); - command.Description = "Update the properties of a todoTaskList object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todotasklist-update?view=graph-rest-1.0"; + command.Description = "Update the navigation property lists in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -189,8 +199,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(TodoTaskList.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.TodoTaskList.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -214,10 +224,12 @@ public Command BuildPatchCommand() { /// /// The tasks property /// - public Command BuildTasksNavCommand() { + /// A + public Command BuildTasksNavCommand() + { var command = new Command("tasks"); command.Description = "The tasks property"; - var builder = new TasksRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.Tasks.TasksRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -237,100 +249,84 @@ public Command BuildTasksNavCommand() { return command; } /// - /// Instantiates a new TodoTaskListItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public TodoTaskListItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}{?%24select,%24expand}", pathParameters) { + public TodoTaskListItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new TodoTaskListItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public TodoTaskListItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}{?%24select,%24expand}", rawUrl) { + public TodoTaskListItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists/{todoTaskList%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Deletes a todoTaskList object. This API is supported in the following national cloud deployments. + /// Delete navigation property lists for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a todoTaskList object. This API is supported in the following national cloud deployments. + /// The task lists in the users mailbox. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update the properties of a todoTaskList object. This API is supported in the following national cloud deployments. + /// Update the navigation property lists in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(TodoTaskList body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.TodoTaskList body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(TodoTaskList body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.TodoTaskList body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Read the properties and relationships of a todoTaskList object. This API is supported in the following national cloud deployments. + /// The task lists in the users mailbox. /// - public class TodoTaskListItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TodoTaskListItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -354,3 +350,4 @@ public class TodoTaskListItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/Lists/ListsRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/Lists/ListsRequestBuilder.cs index 1671d212..2321257f 100644 --- a/src/sample/generated/Users/Item/Todo/Lists/ListsRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/Lists/ListsRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists.Count; using ApiSdk.Users.Item.Todo.Lists.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,18 +18,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo.Lists { +namespace ApiSdk.Users.Item.Todo.Lists +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo\lists /// - public class ListsRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ListsRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.todo.lists.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new TodoTaskListItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Item.TodoTaskListItemRequestBuilder(PathParameters); executables.Add(builder.BuildDeleteCommand()); commands.Add(builder.BuildExtensionsNavCommand()); executables.Add(builder.BuildGetCommand()); @@ -38,10 +45,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -51,12 +60,13 @@ public Command BuildCountNavCommand() { return command; } /// - /// Create a new lists object. This API is supported in the following national cloud deployments. - /// Find more info here + /// Create new navigation property to lists for users /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); - command.Description = "Create a new lists object. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todo-post-lists?view=graph-rest-1.0"; + command.Description = "Create new navigation property to lists for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -79,8 +89,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(TodoTaskList.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.TodoTaskList.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -101,12 +111,13 @@ public Command BuildCreateCommand() { return command; } /// - /// Get a list of the todoTaskList objects and their properties. This API is supported in the following national cloud deployments. - /// Find more info here + /// The task lists in the users mailbox. /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "Get a list of the todoTaskList objects and their properties. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/todo-list-lists?view=graph-rest-1.0"; + command.Description = "The task lists in the users mailbox."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -188,7 +199,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -200,75 +213,65 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new ListsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public ListsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public ListsRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo/lists{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new ListsRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public ListsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public ListsRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo/lists{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// Get a list of the todoTaskList objects and their properties. This API is supported in the following national cloud deployments. + /// The task lists in the users mailbox. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Create a new lists object. This API is supported in the following national cloud deployments. + /// Create new navigation property to lists for users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(TodoTaskList body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.TodoTaskList body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(TodoTaskList body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.TodoTaskList body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Get a list of the todoTaskList objects and their properties. This API is supported in the following national cloud deployments. + /// The task lists in the users mailbox. /// - public class ListsRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class ListsRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -331,3 +334,4 @@ public class ListsRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/Todo/TodoRequestBuilder.cs b/src/sample/generated/Users/Item/Todo/TodoRequestBuilder.cs index dad435dc..cfc5eb27 100644 --- a/src/sample/generated/Users/Item/Todo/TodoRequestBuilder.cs +++ b/src/sample/generated/Users/Item/Todo/TodoRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.Todo.Lists; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,15 +17,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.Todo { +namespace ApiSdk.Users.Item.Todo +{ /// /// Builds and executes requests for operations under \users\{user-id}\todo /// - public class TodoRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TodoRequestBuilder : BaseCliRequestBuilder + { /// /// Delete navigation property todo for users /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); command.Description = "Delete navigation property todo for users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -68,7 +75,9 @@ public Command BuildDeleteCommand() { /// /// Represents the To Do services available to a user. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Represents the To Do services available to a user."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -118,10 +127,12 @@ public Command BuildGetCommand() { /// /// The lists property /// - public Command BuildListsNavCommand() { + /// A + public Command BuildListsNavCommand() + { var command = new Command("lists"); command.Description = "The lists property"; - var builder = new ListsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.Lists.ListsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -143,7 +154,9 @@ public Command BuildListsNavCommand() { /// /// Update the navigation property todo in users /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); command.Description = "Update the navigation property todo in users"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -168,8 +181,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(ApiSdk.Models.Todo.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.Todo.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -190,100 +203,84 @@ public Command BuildPatchCommand() { return command; } /// - /// Instantiates a new TodoRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public TodoRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo{?%24select,%24expand}", pathParameters) { + public TodoRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/todo{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new TodoRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public TodoRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo{?%24select,%24expand}", rawUrl) { + public TodoRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/todo{?%24expand,%24select}", rawUrl) + { } /// /// Delete navigation property todo for users /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Represents the To Do services available to a user. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Update the navigation property todo in users /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(ApiSdk.Models.Todo body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Todo body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(ApiSdk.Models.Todo body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.Todo body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Represents the To Do services available to a user. /// - public class TodoRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TodoRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -307,3 +304,4 @@ public class TodoRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/Count/CountRequestBuilder.cs index 24dff68e..e34b5bf2 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.Count { +namespace ApiSdk.Users.Item.TransitiveMemberOf.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs index e642de21..b22931d3 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/Item/DirectoryObjectItemRequestBuilder.cs @@ -1,9 +1,11 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphAdministrativeUnit; using ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphDirectoryRole; using ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphGroup; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -17,15 +19,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.Item { +namespace ApiSdk.Users.Item.TransitiveMemberOf.Item +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\{directoryObject-id} /// - public class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilder : BaseCliRequestBuilder + { /// /// The groups, including nested groups, and directory roles that a user is a member of. Nullable. /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "The groups, including nested groups, and directory roles that a user is a member of. Nullable."; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -88,10 +95,12 @@ public Command BuildGetCommand() { /// /// The microsoftGraphAdministrativeUnit property /// - public Command BuildMicrosoftGraphAdministrativeUnitByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphAdministrativeUnitByIdNavCommand() + { var command = new Command("microsoft-graph-administrative-unit-by-id"); command.Description = "The microsoftGraphAdministrativeUnit property"; - var builder = new MicrosoftGraphAdministrativeUnitRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphAdministrativeUnit.MicrosoftGraphAdministrativeUnitRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -103,10 +112,12 @@ public Command BuildMicrosoftGraphAdministrativeUnitByIdNavCommand() { /// /// The microsoftGraphDirectoryRole property /// - public Command BuildMicrosoftGraphDirectoryRoleByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphDirectoryRoleByIdNavCommand() + { var command = new Command("microsoft-graph-directory-role-by-id"); command.Description = "The microsoftGraphDirectoryRole property"; - var builder = new MicrosoftGraphDirectoryRoleRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphDirectoryRole.MicrosoftGraphDirectoryRoleRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -118,10 +129,12 @@ public Command BuildMicrosoftGraphDirectoryRoleByIdNavCommand() { /// /// The microsoftGraphGroup property /// - public Command BuildMicrosoftGraphGroupByIdNavCommand() { + /// A + public Command BuildMicrosoftGraphGroupByIdNavCommand() + { var command = new Command("microsoft-graph-group-by-id"); command.Description = "The microsoftGraphGroup property"; - var builder = new MicrosoftGraphGroupRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphGroup.MicrosoftGraphGroupRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -131,47 +144,44 @@ public Command BuildMicrosoftGraphGroupByIdNavCommand() { return command; } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}{?%24select,%24expand}", pathParameters) { + public DirectoryObjectItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new DirectoryObjectItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}{?%24select,%24expand}", rawUrl) { + public DirectoryObjectItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}{?%24expand,%24select}", rawUrl) + { } /// /// The groups, including nested groups, and directory roles that a user is a member of. Nullable. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// The groups, including nested groups, and directory roles that a user is a member of. Nullable. /// - public class DirectoryObjectItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class DirectoryObjectItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -195,3 +205,4 @@ public class DirectoryObjectItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs index 2a515820..7d319b07 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphAdministrativeUnit { +namespace ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphAdministrativeUnit +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\{directoryObject-id}\microsoft.graph.administrativeUnit /// - public class MicrosoftGraphAdministrativeUnitRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAdministrativeUnitRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphAdministrativeUnitRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphAdministrativeUnitRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.administrativeUnit{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphAdministrativeUnitRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.administrativeUnit{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphAdministrativeUnitRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphAdministrativeUnitRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.administrativeUnit{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphAdministrativeUnitRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.administrativeUnit{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.administrativeUnit /// - public class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs index 87ace712..5b7aac3a 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphDirectoryRole { +namespace ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphDirectoryRole +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\{directoryObject-id}\microsoft.graph.directoryRole /// - public class MicrosoftGraphDirectoryRoleRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDirectoryRoleRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphDirectoryRoleRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphDirectoryRoleRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.directoryRole{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphDirectoryRoleRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.directoryRole{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphDirectoryRoleRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphDirectoryRoleRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.directoryRole{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphDirectoryRoleRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.directoryRole{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.directoryRole /// - public class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs index e1c79a14..5a2a9ee8 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/Item/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs @@ -1,6 +1,8 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -14,15 +16,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphGroup { +namespace ApiSdk.Users.Item.TransitiveMemberOf.Item.MicrosoftGraphGroup +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\{directoryObject-id}\microsoft.graph.group /// - public class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder + { /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.group /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the item of type microsoft.graph.directoryObject as microsoft.graph.group"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -83,47 +90,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.group{?%24select,%24expand}", pathParameters) { + public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.group{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.group{?%24select,%24expand}", rawUrl) { + public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/{directoryObject%2Did}/microsoft.graph.group{?%24expand,%24select}", rawUrl) + { } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.group /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the item of type microsoft.graph.directoryObject as microsoft.graph.group /// - public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -147,3 +151,4 @@ public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphAdministrativeUnit/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphAdministrativeUnit/Count/CountRequestBuilder.cs index 001a7210..3234e93d 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphAdministrativeUnit/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphAdministrativeUnit/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphAdministrativeUnit.Count { +namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphAdministrativeUnit.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\microsoft.graph.administrativeUnit\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.administrativeUnit/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.administrativeUnit/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.administrativeUnit/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.administrativeUnit/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs index b4d38548..ffb6eb24 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphAdministrativeUnit/MicrosoftGraphAdministrativeUnitRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphAdministrativeUnit.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphAdministrativeUnit { +namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphAdministrativeUnit +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\microsoft.graph.administrativeUnit /// - public class MicrosoftGraphAdministrativeUnitRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAdministrativeUnitRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphAdministrativeUnit.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphAdministrativeUnitRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphAdministrativeUnitRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphAdministrativeUnitRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.administrativeUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphAdministrativeUnitRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphAdministrativeUnitRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.administrativeUnit{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphAdministrativeUnitRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.administrativeUnit{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.administrativeUnit in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphAdministrativeUnitRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphDirectoryRole/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphDirectoryRole/Count/CountRequestBuilder.cs index cf87f2f0..ac9f8ecc 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphDirectoryRole/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphDirectoryRole/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphDirectoryRole.Count { +namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphDirectoryRole.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\microsoft.graph.directoryRole\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.directoryRole/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.directoryRole/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.directoryRole/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.directoryRole/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs index dcb868aa..83e84414 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphDirectoryRole/MicrosoftGraphDirectoryRoleRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphDirectoryRole.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphDirectoryRole { +namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphDirectoryRole +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\microsoft.graph.directoryRole /// - public class MicrosoftGraphDirectoryRoleRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDirectoryRoleRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphDirectoryRole.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphDirectoryRoleRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphDirectoryRoleRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.directoryRole{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphDirectoryRoleRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.directoryRole{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphDirectoryRoleRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphDirectoryRoleRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.directoryRole{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphDirectoryRoleRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.directoryRole{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.directoryRole in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphDirectoryRoleRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphGroup/Count/CountRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphGroup/Count/CountRequestBuilder.cs index 4baaff2c..ea8cfdf2 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphGroup/Count/CountRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphGroup/Count/CountRequestBuilder.cs @@ -1,5 +1,7 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -13,15 +15,20 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphGroup.Count { +namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphGroup.Count +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\microsoft.graph.group\$count /// - public class CountRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilder : BaseCliRequestBuilder + { /// /// Get the number of the resource /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the number of the resource"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -66,47 +73,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.group/$count{?%24search,%24filter}", pathParameters) { + public CountRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.group/$count{?%24filter,%24search}", pathParameters) + { } /// - /// Instantiates a new CountRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.group/$count{?%24search,%24filter}", rawUrl) { + public CountRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.group/$count{?%24filter,%24search}", rawUrl) + { } /// /// Get the number of the resource /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "text/plain"); return requestInfo; } /// /// Get the number of the resource /// - public class CountRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class CountRequestBuilderGetQueryParameters + { /// Filter items by property values #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -130,3 +134,4 @@ public class CountRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs index 71978233..5d4ba96c 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/MicrosoftGraphGroup/MicrosoftGraphGroupRequestBuilder.cs @@ -1,7 +1,9 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphGroup.Count; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -15,18 +17,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphGroup { +namespace ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphGroup +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf\microsoft.graph.group /// - public class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilder : BaseCliRequestBuilder + { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphGroup.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -38,7 +45,9 @@ public Command BuildCountNavCommand() { /// /// Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -129,7 +138,9 @@ public Command BuildGetCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -141,47 +152,44 @@ public Command BuildGetCommand() { return command; } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public MicrosoftGraphGroupRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new MicrosoftGraphGroupRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.group{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public MicrosoftGraphGroupRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf/microsoft.graph.group{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// /// Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Get the items of type microsoft.graph.group in the microsoft.graph.directoryObject collection /// - public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class MicrosoftGraphGroupRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -244,3 +252,4 @@ public class MicrosoftGraphGroupRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs b/src/sample/generated/Users/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs index 888db9c5..c03d5236 100644 --- a/src/sample/generated/Users/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs +++ b/src/sample/generated/Users/Item/TransitiveMemberOf/TransitiveMemberOfRequestBuilder.cs @@ -1,4 +1,5 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.TransitiveMemberOf.Count; @@ -6,6 +7,7 @@ using ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphAdministrativeUnit; using ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphDirectoryRole; using ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphGroup; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -19,18 +21,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item.TransitiveMemberOf { +namespace ApiSdk.Users.Item.TransitiveMemberOf +{ /// /// Builds and executes requests for operations under \users\{user-id}\transitiveMemberOf /// - public class TransitiveMemberOfRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TransitiveMemberOfRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item.transitiveMemberOf.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new DirectoryObjectItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.Item.DirectoryObjectItemRequestBuilder(PathParameters); executables.Add(builder.BuildGetCommand()); commands.Add(builder.BuildMicrosoftGraphAdministrativeUnitByIdNavCommand()); commands.Add(builder.BuildMicrosoftGraphDirectoryRoleByIdNavCommand()); @@ -40,10 +47,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -53,12 +62,14 @@ public Command BuildCountNavCommand() { return command; } /// - /// The groups, including nested groups, and directory roles that a user is a member of. Nullable. + /// Get groups, directory roles, and administrative units that the user is a member of through either direct or transitive membership. /// Find more info here /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "The groups, including nested groups, and directory roles that a user is a member of. Nullable.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-transitivememberof?view=graph-rest-1.0"; + command.Description = "Get groups, directory roles, and administrative units that the user is a member of through either direct or transitive membership.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-list-transitivememberof?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -147,7 +158,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -161,10 +174,12 @@ public Command BuildListCommand() { /// /// The microsoftGraphAdministrativeUnit property /// - public Command BuildMicrosoftGraphAdministrativeUnitNavCommand() { + /// A + public Command BuildMicrosoftGraphAdministrativeUnitNavCommand() + { var command = new Command("microsoft-graph-administrative-unit"); command.Description = "The microsoftGraphAdministrativeUnit property"; - var builder = new MicrosoftGraphAdministrativeUnitRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphAdministrativeUnit.MicrosoftGraphAdministrativeUnitRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -182,10 +197,12 @@ public Command BuildMicrosoftGraphAdministrativeUnitNavCommand() { /// /// The microsoftGraphDirectoryRole property /// - public Command BuildMicrosoftGraphDirectoryRoleNavCommand() { + /// A + public Command BuildMicrosoftGraphDirectoryRoleNavCommand() + { var command = new Command("microsoft-graph-directory-role"); command.Description = "The microsoftGraphDirectoryRole property"; - var builder = new MicrosoftGraphDirectoryRoleRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphDirectoryRole.MicrosoftGraphDirectoryRoleRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -203,10 +220,12 @@ public Command BuildMicrosoftGraphDirectoryRoleNavCommand() { /// /// The microsoftGraphGroup property /// - public Command BuildMicrosoftGraphGroupNavCommand() { + /// A + public Command BuildMicrosoftGraphGroupNavCommand() + { var command = new Command("microsoft-graph-group"); command.Description = "The microsoftGraphGroup property"; - var builder = new MicrosoftGraphGroupRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.MicrosoftGraphGroup.MicrosoftGraphGroupRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -222,47 +241,44 @@ public Command BuildMicrosoftGraphGroupNavCommand() { return command; } /// - /// Instantiates a new TransitiveMemberOfRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public TransitiveMemberOfRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public TransitiveMemberOfRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters) + { } /// - /// Instantiates a new TransitiveMemberOfRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public TransitiveMemberOfRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public TransitiveMemberOfRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}/transitiveMemberOf{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl) + { } /// - /// The groups, including nested groups, and directory roles that a user is a member of. Nullable. + /// Get groups, directory roles, and administrative units that the user is a member of through either direct or transitive membership. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// The groups, including nested groups, and directory roles that a user is a member of. Nullable. + /// Get groups, directory roles, and administrative units that the user is a member of through either direct or transitive membership. /// - public class TransitiveMemberOfRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class TransitiveMemberOfRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -325,3 +341,4 @@ public class TransitiveMemberOfRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/Item/UserItemRequestBuilder.cs b/src/sample/generated/Users/Item/UserItemRequestBuilder.cs index 1f2615d5..6be58507 100644 --- a/src/sample/generated/Users/Item/UserItemRequestBuilder.cs +++ b/src/sample/generated/Users/Item/UserItemRequestBuilder.cs @@ -1,9 +1,11 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Item.CreatedObjects; using ApiSdk.Users.Item.DirectReports; using ApiSdk.Users.Item.Extensions; +using ApiSdk.Users.Item.Insights; using ApiSdk.Users.Item.LicenseDetails; using ApiSdk.Users.Item.MailboxSettings; using ApiSdk.Users.Item.Manager; @@ -16,8 +18,10 @@ using ApiSdk.Users.Item.Photos; using ApiSdk.Users.Item.RegisteredDevices; using ApiSdk.Users.Item.Settings; +using ApiSdk.Users.Item.Sponsors; using ApiSdk.Users.Item.Todo; using ApiSdk.Users.Item.TransitiveMemberOf; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -31,18 +35,23 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users.Item { +namespace ApiSdk.Users.Item +{ /// /// Builds and executes requests for operations under \users\{user-id} /// - public class UserItemRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserItemRequestBuilder : BaseCliRequestBuilder + { /// /// The createdObjects property /// - public Command BuildCreatedObjectsNavCommand() { + /// A + public Command BuildCreatedObjectsNavCommand() + { var command = new Command("created-objects"); command.Description = "The createdObjects property"; - var builder = new CreatedObjectsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.CreatedObjects.CreatedObjectsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -62,12 +71,14 @@ public Command BuildCreatedObjectsNavCommand() { return command; } /// - /// Delete user. When deleted, user resources are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. To learn more, see deletedItems. This API is supported in the following national cloud deployments. + /// Delete a user object. When deleted, user resources, including their mailbox and license assignments, are moved to a temporary container and if the user is restored within 30 days, these objects are restored to them. The user is also restored to any groups they were a member of. After 30 days and if not restored, the user object is permanently deleted and their assigned resources freed. To manage the deleted user object, see deletedItems. /// Find more info here /// - public Command BuildDeleteCommand() { + /// A + public Command BuildDeleteCommand() + { var command = new Command("delete"); - command.Description = "Delete user. When deleted, user resources are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. To learn more, see deletedItems. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-delete?view=graph-rest-1.0"; + command.Description = "Delete a user object. When deleted, user resources, including their mailbox and license assignments, are moved to a temporary container and if the user is restored within 30 days, these objects are restored to them. The user is also restored to any groups they were a member of. After 30 days and if not restored, the user object is permanently deleted and their assigned resources freed. To manage the deleted user object, see deletedItems.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-delete?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -110,10 +121,12 @@ public Command BuildDeleteCommand() { /// /// The directReports property /// - public Command BuildDirectReportsNavCommand() { + /// A + public Command BuildDirectReportsNavCommand() + { var command = new Command("direct-reports"); command.Description = "The directReports property"; - var builder = new DirectReportsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.DirectReports.DirectReportsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -136,10 +149,12 @@ public Command BuildDirectReportsNavCommand() { /// /// The extensions property /// - public Command BuildExtensionsNavCommand() { + /// A + public Command BuildExtensionsNavCommand() + { var command = new Command("extensions"); command.Description = "The extensions property"; - var builder = new ExtensionsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Extensions.ExtensionsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -162,7 +177,9 @@ public Command BuildExtensionsNavCommand() { /// Read properties and relationships of the user object. /// Find more info here /// - public Command BuildGetCommand() { + /// A + public Command BuildGetCommand() + { var command = new Command("get"); command.Description = "Read properties and relationships of the user object.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/intune-onboarding-user-get?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { @@ -210,12 +227,41 @@ public Command BuildGetCommand() { return command; } /// + /// The insights property + /// + /// A + public Command BuildInsightsNavCommand() + { + var command = new Command("insights"); + command.Description = "The insights property"; + var builder = new global::ApiSdk.Users.Item.Insights.InsightsRequestBuilder(PathParameters); + var execCommands = new List(); + var nonExecCommands = new List(); + execCommands.Add(builder.BuildDeleteCommand()); + execCommands.Add(builder.BuildGetCommand()); + execCommands.Add(builder.BuildPatchCommand()); + nonExecCommands.Add(builder.BuildSharedNavCommand()); + nonExecCommands.Add(builder.BuildTrendingNavCommand()); + nonExecCommands.Add(builder.BuildUsedNavCommand()); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + foreach (var cmd in nonExecCommands) + { + command.AddCommand(cmd); + } + return command; + } + /// /// The licenseDetails property /// - public Command BuildLicenseDetailsNavCommand() { + /// A + public Command BuildLicenseDetailsNavCommand() + { var command = new Command("license-details"); command.Description = "The licenseDetails property"; - var builder = new LicenseDetailsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.LicenseDetails.LicenseDetailsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -237,10 +283,12 @@ public Command BuildLicenseDetailsNavCommand() { /// /// The mailboxSettings property /// - public Command BuildMailboxSettingsNavCommand() { + /// A + public Command BuildMailboxSettingsNavCommand() + { var command = new Command("mailbox-settings"); command.Description = "The mailboxSettings property"; - var builder = new MailboxSettingsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MailboxSettings.MailboxSettingsRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); execCommands.Add(builder.BuildPatchCommand()); @@ -253,13 +301,14 @@ public Command BuildMailboxSettingsNavCommand() { /// /// The manager property /// - public Command BuildManagerNavCommand() { + /// A + public Command BuildManagerNavCommand() + { var command = new Command("manager"); command.Description = "The manager property"; - var builder = new ManagerRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Manager.ManagerRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); - execCommands.Add(builder.BuildDeleteCommand()); execCommands.Add(builder.BuildGetCommand()); nonExecCommands.Add(builder.BuildRefNavCommand()); foreach (var cmd in execCommands) @@ -275,10 +324,12 @@ public Command BuildManagerNavCommand() { /// /// The memberOf property /// - public Command BuildMemberOfNavCommand() { + /// A + public Command BuildMemberOfNavCommand() + { var command = new Command("member-of"); command.Description = "The memberOf property"; - var builder = new MemberOfRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.MemberOf.MemberOfRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -302,10 +353,12 @@ public Command BuildMemberOfNavCommand() { /// /// The oauth2PermissionGrants property /// - public Command BuildOauth2PermissionGrantsNavCommand() { + /// A + public Command BuildOauth2PermissionGrantsNavCommand() + { var command = new Command("oauth2-permission-grants"); command.Description = "The oauth2PermissionGrants property"; - var builder = new Oauth2PermissionGrantsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Oauth2PermissionGrants.Oauth2PermissionGrantsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -326,10 +379,12 @@ public Command BuildOauth2PermissionGrantsNavCommand() { /// /// The outlook property /// - public Command BuildOutlookNavCommand() { + /// A + public Command BuildOutlookNavCommand() + { var command = new Command("outlook"); command.Description = "The outlook property"; - var builder = new OutlookRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Outlook.OutlookRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); execCommands.Add(builder.BuildGetCommand()); @@ -347,10 +402,12 @@ public Command BuildOutlookNavCommand() { /// /// The ownedDevices property /// - public Command BuildOwnedDevicesNavCommand() { + /// A + public Command BuildOwnedDevicesNavCommand() + { var command = new Command("owned-devices"); command.Description = "The ownedDevices property"; - var builder = new OwnedDevicesRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedDevices.OwnedDevicesRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -374,10 +431,12 @@ public Command BuildOwnedDevicesNavCommand() { /// /// The ownedObjects property /// - public Command BuildOwnedObjectsNavCommand() { + /// A + public Command BuildOwnedObjectsNavCommand() + { var command = new Command("owned-objects"); command.Description = "The ownedObjects property"; - var builder = new OwnedObjectsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.OwnedObjects.OwnedObjectsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -399,12 +458,14 @@ public Command BuildOwnedObjectsNavCommand() { return command; } /// - /// Update the properties of a user object. Not all properties can be updated by Member or Guest users with their default permissions without Administrator roles. Compare member and guest default permissions to see properties they can manage. This API is supported in the following national cloud deployments. - /// Find more info here + /// Update the properties of a user object. + /// Find more info here /// - public Command BuildPatchCommand() { + /// A + public Command BuildPatchCommand() + { var command = new Command("patch"); - command.Description = "Update the properties of a user object. Not all properties can be updated by Member or Guest users with their default permissions without Administrator roles. Compare member and guest default permissions to see properties they can manage. This API is supported in the following national cloud deployments.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-update?view=graph-rest-1.0"; + command.Description = "Update the properties of a user object.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/intune-onboarding-user-update?view=graph-rest-1.0"; var userIdOption = new Option("--user-id", description: "The unique identifier of user") { }; userIdOption.IsRequired = true; @@ -427,8 +488,8 @@ public Command BuildPatchCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(User.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.User.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -451,10 +512,12 @@ public Command BuildPatchCommand() { /// /// The photo property /// - public Command BuildPhotoNavCommand() { + /// A + public Command BuildPhotoNavCommand() + { var command = new Command("photo"); command.Description = "The photo property"; - var builder = new PhotoRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Photo.PhotoRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildContentNavCommand()); @@ -474,13 +537,14 @@ public Command BuildPhotoNavCommand() { /// /// The photos property /// - public Command BuildPhotosNavCommand() { + /// A + public Command BuildPhotosNavCommand() + { var command = new Command("photos"); command.Description = "The photos property"; - var builder = new PhotosRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Photos.PhotosRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); - nonExecCommands.Add(builder.BuildCountNavCommand()); execCommands.Add(builder.BuildListCommand()); var cmds = builder.BuildCommand(); execCommands.AddRange(cmds.Item1); @@ -498,10 +562,12 @@ public Command BuildPhotosNavCommand() { /// /// The registeredDevices property /// - public Command BuildRegisteredDevicesNavCommand() { + /// A + public Command BuildRegisteredDevicesNavCommand() + { var command = new Command("registered-devices"); command.Description = "The registeredDevices property"; - var builder = new RegisteredDevicesRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.RegisteredDevices.RegisteredDevicesRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -525,16 +591,21 @@ public Command BuildRegisteredDevicesNavCommand() { /// /// The settings property /// - public Command BuildSettingsNavCommand() { + /// A + public Command BuildSettingsNavCommand() + { var command = new Command("settings"); command.Description = "The settings property"; - var builder = new SettingsRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Settings.SettingsRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); execCommands.Add(builder.BuildDeleteCommand()); execCommands.Add(builder.BuildGetCommand()); + nonExecCommands.Add(builder.BuildItemInsightsNavCommand()); execCommands.Add(builder.BuildPatchCommand()); nonExecCommands.Add(builder.BuildShiftPreferencesNavCommand()); + nonExecCommands.Add(builder.BuildStorageNavCommand()); + nonExecCommands.Add(builder.BuildWindowsNavCommand()); foreach (var cmd in execCommands) { command.AddCommand(cmd); @@ -546,12 +617,40 @@ public Command BuildSettingsNavCommand() { return command; } /// + /// The sponsors property + /// + /// A + public Command BuildSponsorsNavCommand() + { + var command = new Command("sponsors"); + command.Description = "The sponsors property"; + var builder = new global::ApiSdk.Users.Item.Sponsors.SponsorsRequestBuilder(PathParameters); + var execCommands = new List(); + var nonExecCommands = new List(); + nonExecCommands.Add(builder.BuildCountNavCommand()); + execCommands.Add(builder.BuildListCommand()); + var cmds = builder.BuildCommand(); + execCommands.AddRange(cmds.Item1); + nonExecCommands.AddRange(cmds.Item2); + foreach (var cmd in execCommands) + { + command.AddCommand(cmd); + } + foreach (var cmd in nonExecCommands.OrderBy(static c => c.Name, StringComparer.Ordinal)) + { + command.AddCommand(cmd); + } + return command; + } + /// /// The todo property /// - public Command BuildTodoNavCommand() { + /// A + public Command BuildTodoNavCommand() + { var command = new Command("todo"); command.Description = "The todo property"; - var builder = new TodoRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.Todo.TodoRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); execCommands.Add(builder.BuildDeleteCommand()); @@ -571,10 +670,12 @@ public Command BuildTodoNavCommand() { /// /// The transitiveMemberOf property /// - public Command BuildTransitiveMemberOfNavCommand() { + /// A + public Command BuildTransitiveMemberOfNavCommand() + { var command = new Command("transitive-member-of"); command.Description = "The transitiveMemberOf property"; - var builder = new TransitiveMemberOfRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.TransitiveMemberOf.TransitiveMemberOfRequestBuilder(PathParameters); var execCommands = new List(); var nonExecCommands = new List(); nonExecCommands.Add(builder.BuildCountNavCommand()); @@ -596,100 +697,84 @@ public Command BuildTransitiveMemberOfNavCommand() { return command; } /// - /// Instantiates a new UserItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public UserItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}{?%24select,%24expand}", pathParameters) { + public UserItemRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users/{user%2Did}{?%24expand,%24select}", pathParameters) + { } /// - /// Instantiates a new UserItemRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public UserItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}{?%24select,%24expand}", rawUrl) { + public UserItemRequestBuilder(string rawUrl) : base("{+baseurl}/users/{user%2Did}{?%24expand,%24select}", rawUrl) + { } /// - /// Delete user. When deleted, user resources are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. To learn more, see deletedItems. This API is supported in the following national cloud deployments. + /// Delete a user object. When deleted, user resources, including their mailbox and license assignments, are moved to a temporary container and if the user is restored within 30 days, these objects are restored to them. The user is also restored to any groups they were a member of. After 30 days and if not restored, the user object is permanently deleted and their assigned resources freed. To manage the deleted user object, see deletedItems. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.DELETE, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Read properties and relationships of the user object. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Update the properties of a user object. Not all properties can be updated by Member or Guest users with their default permissions without Administrator roles. Compare member and guest default permissions to see properties they can manage. This API is supported in the following national cloud deployments. + /// Update the properties of a user object. /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPatchRequestInformation(User body, Action>? requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.User body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPatchRequestInformation(User body, Action> requestConfiguration = default) { + public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.User body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.PATCH, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// Read properties and relationships of the user object. /// - public class UserItemRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UserItemRequestBuilderGetQueryParameters + { /// Expand related entities #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -713,3 +798,4 @@ public class UserItemRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/Users/UsersRequestBuilder.cs b/src/sample/generated/Users/UsersRequestBuilder.cs index 09740dcd..77537077 100644 --- a/src/sample/generated/Users/UsersRequestBuilder.cs +++ b/src/sample/generated/Users/UsersRequestBuilder.cs @@ -1,8 +1,10 @@ // +#pragma warning disable CS0618 using ApiSdk.Models.ODataErrors; using ApiSdk.Models; using ApiSdk.Users.Count; using ApiSdk.Users.Item; +using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using Microsoft.Kiota.Abstractions; using Microsoft.Kiota.Cli.Commons.Extensions; @@ -16,23 +18,29 @@ using System.Threading.Tasks; using System.Threading; using System; -namespace ApiSdk.Users { +namespace ApiSdk.Users +{ /// /// Builds and executes requests for operations under \users /// - public class UsersRequestBuilder : BaseCliRequestBuilder { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilder : BaseCliRequestBuilder + { /// /// Gets an item from the ApiSdk.users.item collection /// - public Tuple, List> BuildCommand() { + /// A Tuple<List<Command>, List<Command>> + public Tuple, List> BuildCommand() + { var executables = new List(); var commands = new List(); - var builder = new UserItemRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Item.UserItemRequestBuilder(PathParameters); commands.Add(builder.BuildCreatedObjectsNavCommand()); executables.Add(builder.BuildDeleteCommand()); commands.Add(builder.BuildDirectReportsNavCommand()); commands.Add(builder.BuildExtensionsNavCommand()); executables.Add(builder.BuildGetCommand()); + commands.Add(builder.BuildInsightsNavCommand()); commands.Add(builder.BuildLicenseDetailsNavCommand()); commands.Add(builder.BuildMailboxSettingsNavCommand()); commands.Add(builder.BuildManagerNavCommand()); @@ -46,6 +54,7 @@ public Tuple, List> BuildCommand() { commands.Add(builder.BuildPhotosNavCommand()); commands.Add(builder.BuildRegisteredDevicesNavCommand()); commands.Add(builder.BuildSettingsNavCommand()); + commands.Add(builder.BuildSponsorsNavCommand()); commands.Add(builder.BuildTodoNavCommand()); commands.Add(builder.BuildTransitiveMemberOfNavCommand()); return new(executables, commands); @@ -53,10 +62,12 @@ public Tuple, List> BuildCommand() { /// /// The Count property /// - public Command BuildCountNavCommand() { + /// A + public Command BuildCountNavCommand() + { var command = new Command("count"); command.Description = "The Count property"; - var builder = new CountRequestBuilder(PathParameters); + var builder = new global::ApiSdk.Users.Count.CountRequestBuilder(PathParameters); var execCommands = new List(); execCommands.Add(builder.BuildGetCommand()); foreach (var cmd in execCommands) @@ -66,12 +77,14 @@ public Command BuildCountNavCommand() { return command; } /// - /// Create a new user object. - /// Find more info here + /// Create a new user.The request body contains the user to create. At a minimum, you must specify the required properties for the user. You can optionally specify any other writable properties. + /// Find more info here /// - public Command BuildCreateCommand() { + /// A + public Command BuildCreateCommand() + { var command = new Command("create"); - command.Description = "Create a new user object.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/intune-onboarding-user-create?view=graph-rest-1.0"; + command.Description = "Create a new user.The request body contains the user to create. At a minimum, you must specify the required properties for the user. You can optionally specify any other writable properties.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/user-post-users?view=graph-rest-1.0"; var bodyOption = new Option("--body", description: "The request body") { }; bodyOption.IsRequired = true; @@ -89,8 +102,8 @@ public Command BuildCreateCommand() { var cancellationToken = invocationContext.GetCancellationToken(); var reqAdapter = invocationContext.GetRequestAdapter(); using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body)); - var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream); - var model = parseNode.GetObjectValue(User.CreateFromDiscriminatorValue); + var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken); + var model = parseNode.GetObjectValue(global::ApiSdk.Models.User.CreateFromDiscriminatorValue); if (model is null) { Console.Error.WriteLine("No model data to send."); return; @@ -111,11 +124,13 @@ public Command BuildCreateCommand() { } /// /// List properties and relationships of the user objects. - /// Find more info here + /// Find more info here /// - public Command BuildListCommand() { + /// A + public Command BuildListCommand() + { var command = new Command("list"); - command.Description = "List properties and relationships of the user objects.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/intune-onboarding-user-list?view=graph-rest-1.0"; + command.Description = "List properties and relationships of the user objects.\n\nFind more info here:\n https://learn.microsoft.com/graph/api/intune-mam-user-list?view=graph-rest-1.0"; var consistencyLevelOption = new Option("--consistency-level", description: "Indicates the requested consistency level. Documentation URL: https://docs.microsoft.com/graph/aad-advanced-queries") { Arity = ArgumentArity.ZeroOrMore }; @@ -192,7 +207,9 @@ public Command BuildListCommand() { var pagingData = new PageLinkData(requestInfo, null, itemName: "value", nextLinkName: "@odata.nextLink"); var pageResponse = await pagingService.GetPagedDataAsync((info, token) => reqAdapter.SendNoContentAsync(info, cancellationToken: token), pagingData, all, cancellationToken); var response = pageResponse?.Response; +#nullable enable IOutputFormatter? formatter = null; +#nullable restore if (pageResponse?.StatusCode >= 200 && pageResponse?.StatusCode < 300) { formatter = outputFormatterFactory.GetFormatter(output); response = (response != Stream.Null) ? await outputFilter.FilterOutputAsync(response, query, cancellationToken) : response; @@ -204,75 +221,65 @@ public Command BuildListCommand() { return command; } /// - /// Instantiates a new UsersRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request - public UsersRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users{?%24top,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + public UsersRequestBuilder(Dictionary pathParameters) : base("{+baseurl}/users{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24top}", pathParameters) + { } /// - /// Instantiates a new UsersRequestBuilder and sets the default values. + /// Instantiates a new and sets the default values. /// /// The raw URL to use for the request builder. - public UsersRequestBuilder(string rawUrl) : base("{+baseurl}/users{?%24top,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + public UsersRequestBuilder(string rawUrl) : base("{+baseurl}/users{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24top}", rawUrl) + { } /// /// List properties and relationships of the user objects. /// + /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) { + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { #endif - var requestInfo = new RequestInformation { - HttpMethod = Method.GET, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// - /// Create a new user object. + /// Create a new user.The request body contains the user to create. At a minimum, you must specify the required properties for the user. You can optionally specify any other writable properties. /// + /// A /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(User body, Action>? requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.User body, Action>? requestConfiguration = default) + { #nullable restore #else - public RequestInformation ToPostRequestInformation(User body, Action> requestConfiguration = default) { + public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.User body, Action> requestConfiguration = default) + { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); - var requestInfo = new RequestInformation { - HttpMethod = Method.POST, - UrlTemplate = UrlTemplate, - PathParameters = PathParameters, - }; - if (requestConfiguration != null) { - var requestConfig = new RequestConfiguration(); - requestConfiguration.Invoke(requestConfig); - requestInfo.AddQueryParameters(requestConfig.QueryParameters); - requestInfo.AddRequestOptions(requestConfig.Options); - requestInfo.AddHeaders(requestConfig.Headers); - } + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); return requestInfo; } /// /// List properties and relationships of the user objects. /// - public class UsersRequestBuilderGetQueryParameters { + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + public partial class UsersRequestBuilderGetQueryParameters + { /// Include count of items [QueryParameter("%24count")] public bool? Count { get; set; } @@ -332,3 +339,4 @@ public class UsersRequestBuilderGetQueryParameters { } } } +#pragma warning restore CS0618 diff --git a/src/sample/generated/kiota-lock.json b/src/sample/generated/kiota-lock.json index 0e9171b1..efb9c337 100644 --- a/src/sample/generated/kiota-lock.json +++ b/src/sample/generated/kiota-lock.json @@ -1,14 +1,16 @@ { - "descriptionHash": "0989D0A814509175714EED8CE345A81ED8E7ACD300D218D4ED1B28CB2625D85C8C510242A85D5A0FADAD6A0116E607A9B0F5F4A224497387E8099F3ED66F4ED3", + "descriptionHash": "F22BA3D52DF9E9A1172D8FCD0B50CAB1D96004454DBA17EAE348F40433959AB37322EF4E1274EF0A4D77F4F0DBDA012228BAFBFA41445555E7B0D5427F9BD713", "descriptionLocation": "https://github.com/microsoftgraph/msgraph-sdk-powershell/raw/dev/openApiDocs/v1.0/Users.yml", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.8.0", + "kiotaVersion": "1.21.0", "clientClassName": "ApiClient", + "typeAccessModifier": "Public", "clientNamespaceName": "ApiSdk", "language": "CLI", "usesBackingStore": false, "excludeBackwardCompatible": false, "includeAdditionalData": true, + "disableSSLValidation": false, "serializers": [ "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", From 6f6129c93b1c266de2c1bd368b5b678a4839777a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 13 Nov 2024 06:46:16 -0500 Subject: [PATCH 2/4] chore: fixes ambiguous call to constructor Signed-off-by: Vincent Biret --- src/sample/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sample/Program.cs b/src/sample/Program.cs index a6373991..94849a82 100644 --- a/src/sample/Program.cs +++ b/src/sample/Program.cs @@ -146,7 +146,7 @@ static CommandLineBuilder BuildCommandLine() rootCommand.Add(new LoginCommand(builder)); rootCommand.AddGlobalOption(debugOption); - if (rootCommand.Subcommands.FirstOrDefault(static c => c.Name == "users") is {} usersCmd) + if (rootCommand.Subcommands.FirstOrDefault(static c => c.Name == "users") is { } usersCmd) { usersCmd.AddAlias("me"); } @@ -188,7 +188,7 @@ static IHostBuilder CreateHostBuilder(string[] args) => AuthenticationStrategy authStrategy = authSettings?.Strategy ?? AuthenticationStrategy.DeviceCode; var credential = serviceFactory.GetTokenCredentialAsync(authStrategy, authSettings?.TenantId, authSettings?.ClientId, authSettings?.ClientCertificateName, authSettings?.ClientCertificateThumbPrint, authSettings?.Environment ?? CloudEnvironment.Global); credential.Wait(); - return new AzureIdentityAuthenticationProvider(credential.Result); + return new AzureIdentityAuthenticationProvider(credential.Result, isCaeEnabled: true); // disambiguates the call to the constructor }); services.AddSingleton(p => { From 42ea045528c76f64dea8aed5bc1d819c51aedbc0 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 13 Nov 2024 06:49:41 -0500 Subject: [PATCH 3/4] chore: suppresses unit test warning Signed-off-by: Vincent Biret --- .../IO/GraphODataPagingServiceTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Microsoft.Graph.Cli.Core.Tests/IO/GraphODataPagingServiceTests.cs b/src/Microsoft.Graph.Cli.Core.Tests/IO/GraphODataPagingServiceTests.cs index 034fba36..c0ad852f 100644 --- a/src/Microsoft.Graph.Cli.Core.Tests/IO/GraphODataPagingServiceTests.cs +++ b/src/Microsoft.Graph.Cli.Core.Tests/IO/GraphODataPagingServiceTests.cs @@ -21,7 +21,9 @@ public void Sets_Top_If_Value_Is_Not_Set() [Theory] [InlineData(0)] +#pragma warning disable xUnit1012 [InlineData(null)] +#pragma warning restore xUnit1012 [InlineData("test")] public void Sets_Top_If_Value_Is_Invalid(object topValue) { From c79eb9561fdec0ee7f27c63b1a0227c52a23293d Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 13 Nov 2024 06:49:54 -0500 Subject: [PATCH 4/4] fix: removes reference to obsolete handler Signed-off-by: Vincent Biret --- .../IO/GraphCliClientFactory.cs | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs b/src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs index f080f3ae..24dd38bc 100644 --- a/src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs +++ b/src/Microsoft.Graph.Cli.Core/IO/GraphCliClientFactory.cs @@ -9,7 +9,7 @@ namespace Microsoft.Graph.Cli.Core.IO; /// /// HTTP client factory for the graph CLI. /// -public class GraphCliClientFactory +public static class GraphCliClientFactory { /// /// Gets default middlewares. @@ -49,24 +49,6 @@ public static HttpClient GetDefaultClient(GraphClientOptions? options = null, st m.Add(lh); } - // Set compression handler to be last (Allows logging handler to log request body) - m.Sort((a, b) => - { - var aMatch = a is Kiota.Http.HttpClientLibrary.Middleware.CompressionHandler; - var bMatch = b is Kiota.Http.HttpClientLibrary.Middleware.CompressionHandler; - if (aMatch && !bMatch) - { - return 1; - } - - if (bMatch && !aMatch) - { - return -1; - } - - return 0; - }); - return GraphClientFactory.Create(version: version, nationalCloud: environment.GraphClientCloud(), finalHandler: finalHandler, handlers: m); } }