From d42ef4c8d0416adf984908f5c1b186d12c76e1c3 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 11 Jul 2025 02:16:01 +0000 Subject: [PATCH 1/2] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.580.2 --- .speakeasy/gen.lock | 12 +- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 6 +- README.md | 63 ++-- RELEASES.md | 12 +- build.gradle | 2 +- gradle.properties | 2 +- .../api_client/glean_api_client/Activity.java | 9 +- .../api_client/glean_api_client/Agents.java | 24 +- .../glean_api_client/Announcements.java | 18 +- .../api_client/glean_api_client/Answers.java | 30 +- .../api_client/glean_api_client/Chat.java | 36 +- .../ClientAuthentication.java | 3 +- .../glean_api_client/ClientDocuments.java | 24 +- .../glean_api_client/ClientShortcuts.java | 30 +- .../glean_api_client/Collections.java | 48 +-- .../glean_api_client/Datasource.java | 6 +- .../glean_api_client/Datasources.java | 12 +- .../api_client/glean_api_client/Entities.java | 12 +- .../api_client/glean_api_client/Glean.java | 18 +- .../IndexingAuthentication.java | 3 +- .../glean_api_client/IndexingDocuments.java | 54 +-- .../glean_api_client/IndexingShortcuts.java | 12 +- .../api_client/glean_api_client/Insights.java | 6 +- .../api_client/glean_api_client/Messages.java | 6 +- .../api_client/glean_api_client/People.java | 48 +-- .../glean_api_client/Permissions.java | 72 ++-- .../api_client/glean_api_client/Pins.java | 30 +- .../api_client/glean_api_client/Policies.java | 21 +- .../api_client/glean_api_client/Reports.java | 18 +- .../glean_api_client/SDKConfiguration.java | 4 +- .../api_client/glean_api_client/Search.java | 30 +- .../api_client/glean_api_client/Tools.java | 12 +- .../glean_api_client/Verification.java | 18 +- .../glean_api_client/Visibilityoverrides.java | 12 +- .../models/components/Activity.java | 19 +- .../models/components/ActivityEvent.java | 52 +-- .../components/ActivityEventParams.java | 81 +++-- .../components/AddCollectionItemsError.java | 20 +- .../components/AddCollectionItemsRequest.java | 30 +- .../AddCollectionItemsResponse.java | 31 +- .../components/AdditionalFieldDefinition.java | 30 +- .../models/components/Agent.java | 51 +-- .../models/components/AgentCapabilities.java | 37 +- .../models/components/AgentConfig.java | 30 +- .../models/components/AgentMetadata.java | 18 +- .../models/components/AgentRun.java | 52 +-- .../models/components/AgentRunCreate.java | 42 ++- .../components/AgentRunWaitResponse.java | 30 +- .../models/components/AgentSchemas.java | 33 +- .../models/components/AiAppActionCounts.java | 65 ++-- .../components/AiAppsInsightsResponse.java | 55 +-- .../models/components/AiInsightsResponse.java | 103 +++--- .../models/components/AllowlistOptions.java | 20 +- .../models/components/Announcement.java | 194 ++++++----- .../components/AnnouncementViewerInfo.java | 31 +- .../models/components/AnonymousEvent.java | 29 +- .../models/components/Answer.java | 196 ++++++----- .../models/components/AnswerBoard.java | 109 +++--- .../models/components/AnswerCreationData.java | 104 +++--- .../models/components/AnswerLike.java | 30 +- .../models/components/AnswerLikes.java | 33 +- .../models/components/AnswerResult.java | 29 +- .../models/components/AppResult.java | 43 ++- .../models/components/AuthConfig.java | 85 +++-- .../models/components/AuthToken.java | 60 ++-- .../components/AutocompleteRequest.java | 75 ++-- .../components/AutocompleteResponse.java | 68 ++-- .../models/components/AutocompleteResult.java | 98 +++--- .../components/AutocompleteResultGroup.java | 36 +- .../models/components/Badge.java | 43 ++- .../components/BulkIndexDocumentsRequest.java | 61 ++-- .../components/BulkIndexEmployeesRequest.java | 57 +-- .../components/BulkIndexGroupsRequest.java | 61 ++-- .../BulkIndexMembershipsRequest.java | 61 ++-- .../components/BulkIndexShortcutsRequest.java | 51 +-- .../components/BulkIndexTeamsRequest.java | 51 +-- .../components/BulkIndexUsersRequest.java | 61 ++-- .../components/BulkUploadHistoryEvent.java | 53 +-- .../models/components/CalendarAttendee.java | 55 +-- .../models/components/CalendarAttendees.java | 65 ++-- .../models/components/CalendarEvent.java | 107 +++--- .../components/CanonicalizingRegexType.java | 30 +- .../components/CategoryToResultSize.java | 20 +- .../models/components/ChannelInviteInfo.java | 53 +-- .../models/components/Chat.java | 81 +++-- .../models/components/ChatFile.java | 43 ++- .../models/components/ChatFileMetadata.java | 53 +-- .../models/components/ChatMessage.java | 86 +++-- .../components/ChatMessageCitation.java | 55 +-- .../components/ChatMessageFragment.java | 62 ++-- .../models/components/ChatMetadata.java | 75 ++-- .../models/components/ChatMetadataResult.java | 31 +- .../models/components/ChatRequest.java | 98 +++--- .../models/components/ChatResponse.java | 52 +-- .../components/ChatRestrictionFilters.java | 39 ++- .../models/components/ChatResult.java | 31 +- .../ChatZeroStateSuggestionOptions.java | 21 +- .../CheckDocumentAccessRequest.java | 36 +- .../CheckDocumentAccessResponse.java | 20 +- .../models/components/ClusterGroup.java | 36 +- .../models/components/Code.java | 56 +-- .../models/components/CodeLine.java | 37 +- .../models/components/Collection.java | 184 ++++++---- .../models/components/CollectionError1.java | 19 +- .../models/components/CollectionError2.java | 19 +- .../models/components/CollectionError3.java | 19 +- .../models/components/CollectionItem.java | 110 +++--- .../components/CollectionItemDescriptor.java | 66 ++-- .../components/CollectionPinMetadata.java | 30 +- .../components/CollectionPinTarget.java | 36 +- .../components/CollectionPinnedMetadata.java | 31 +- .../models/components/CommentDefinition.java | 58 +-- .../models/components/Company.java | 106 +++--- .../models/components/ConferenceData.java | 35 +- .../models/components/ContentDefinition.java | 34 +- .../components/ContentInsightsResponse.java | 54 +-- .../models/components/CountInfo.java | 37 +- .../components/CreateAnnouncementRequest.java | 117 ++++--- .../components/CreateAnswerRequest.java | 19 +- .../components/CreateAuthTokenResponse.java | 29 +- .../components/CreateCollectionRequest.java | 96 ++--- .../components/CreateCollectionResponse.java | 207 ++++++----- .../components/CreateDlpReportRequest.java | 44 ++- .../components/CreateDlpReportResponse.java | 21 +- .../components/CreateShortcutRequest.java | 19 +- .../components/CreateShortcutResponse.java | 31 +- .../models/components/CustomDataValue.java | 56 +-- .../components/CustomDatasourceConfig.java | 206 ++++++----- .../models/components/CustomEntity.java | 65 ++-- .../components/CustomEntityMetadata.java | 21 +- .../models/components/CustomFieldData.java | 36 +- .../components/CustomFieldValueHyperlink.java | 31 +- .../components/CustomFieldValuePerson.java | 20 +- .../components/CustomFieldValueStr.java | 21 +- .../models/components/CustomProperty.java | 29 +- .../models/components/Customer.java | 86 +++-- .../models/components/CustomerMetadata.java | 31 +- .../DatasourceBulkMembershipDefinition.java | 30 +- .../components/DatasourceGroupDefinition.java | 19 +- .../DatasourceMembershipDefinition.java | 35 +- ...atasourceObjectTypeDocumentCountEntry.java | 31 +- .../models/components/DatasourceProfile.java | 52 +-- .../components/DatasourceUserDefinition.java | 41 ++- ...sourceStatusIdentityResponseComponent.java | 32 +- ...StatusIdentityResponseComponentCounts.java | 21 +- .../DebugDatasourceStatusResponse.java | 36 +- .../DebugDatasourceStatusResponseCounts.java | 31 +- .../components/DebugDocumentRequest.java | 28 +- .../components/DebugDocumentResponse.java | 30 +- .../components/DebugDocumentsRequest.java | 19 +- .../components/DebugDocumentsResponse.java | 20 +- .../DebugDocumentsResponseItem.java | 36 +- .../models/components/DebugUserRequest.java | 19 +- .../models/components/DebugUserResponse.java | 30 +- .../components/DeleteAnnouncementRequest.java | 20 +- .../components/DeleteAnswerRequest.java | 30 +- .../components/DeleteChatFilesRequest.java | 20 +- .../models/components/DeleteChatsRequest.java | 20 +- .../DeleteCollectionItemRequest.java | 35 +- .../DeleteCollectionItemResponse.java | 20 +- .../components/DeleteCollectionRequest.java | 30 +- .../components/DeleteDocumentRequest.java | 40 ++- .../components/DeleteEmployeeRequest.java | 29 +- .../models/components/DeleteGroupRequest.java | 34 +- .../components/DeleteMembershipRequest.java | 34 +- .../components/DeleteShortcutRequest.java | 20 +- .../models/components/DeleteTeamRequest.java | 19 +- .../models/components/DeleteUserRequest.java | 34 +- .../models/components/Disambiguation.java | 36 +- .../DisplayableListItemUIConfig.java | 20 +- .../models/components/DlpConfig.java | 107 +++--- .../models/components/DlpPerson.java | 35 +- .../models/components/DlpPersonMetadata.java | 31 +- .../models/components/DlpReport.java | 102 +++--- .../models/components/Document.java | 100 +++--- .../models/components/DocumentContent.java | 21 +- .../models/components/DocumentDefinition.java | 180 ++++++---- .../models/components/DocumentInsight.java | 37 +- .../components/DocumentInteractions.java | 62 ++-- .../DocumentInteractionsDefinition.java | 37 +- .../models/components/DocumentMetadata.java | 310 ++++++++++------- .../models/components/DocumentOrError.java | 21 +- .../DocumentPermissionsDefinition.java | 53 +-- .../models/components/DocumentSection.java | 31 +- .../models/components/DocumentSpec1.java | 21 +- .../models/components/DocumentSpec2.java | 21 +- .../models/components/DocumentSpec3.java | 37 +- .../components/DocumentStatusResponse.java | 53 +-- .../DocumentVisibilityOverride.java | 30 +- .../DocumentVisibilityUpdateResult.java | 36 +- .../models/components/Documents.java | 38 +- .../models/components/EditAnswerRequest.java | 126 ++++--- .../components/EditCollectionItemRequest.java | 52 +-- .../EditCollectionItemResponse.java | 20 +- .../components/EditCollectionRequest.java | 95 ++--- .../components/EditCollectionResponse.java | 207 ++++++----- .../models/components/EditPinRequest.java | 37 +- .../components/EmployeeInfoDefinition.java | 204 ++++++----- .../models/components/EmployeeTeamInfo.java | 36 +- .../models/components/EntityRelationship.java | 28 +- .../models/components/Error.java | 20 +- .../models/components/ErrorMessage.java | 32 +- .../components/EventClassification.java | 31 +- .../components/ExternalSharingOptions.java | 81 +++-- .../models/components/ExternalShortcut.java | 92 ++--- .../models/components/ExtractedQnA.java | 38 +- .../models/components/FacetBucket.java | 45 ++- .../models/components/FacetBucketFilter.java | 31 +- .../models/components/FacetFilter.java | 36 +- .../models/components/FacetFilterSet.java | 19 +- .../models/components/FacetFilterValue.java | 37 +- .../models/components/FacetResult.java | 54 +-- .../models/components/FacetValue.java | 45 ++- .../models/components/FavoriteInfo.java | 43 ++- .../models/components/FeedEntry.java | 171 +++++---- .../models/components/FeedRequest.java | 46 ++- .../models/components/FeedRequestOptions.java | 54 +-- .../models/components/FeedResponse.java | 60 ++-- .../models/components/FeedResult.java | 43 ++- .../models/components/Feedback.java | 163 +++++---- .../components/FeedbackChatExchange.java | 61 ++-- .../models/components/File.java | 29 +- .../models/components/FollowupAction.java | 59 ++-- .../components/GeneratedAttachment.java | 63 ++-- .../GeneratedAttachmentContent.java | 30 +- .../models/components/GeneratedQna.java | 75 ++-- .../models/components/GetAnswerError.java | 31 +- .../models/components/GetAnswerRequest.java | 31 +- .../models/components/GetAnswerResponse.java | 31 +- .../components/GetChatApplicationRequest.java | 20 +- .../GetChatApplicationResponse.java | 20 +- .../components/GetChatFilesRequest.java | 20 +- .../components/GetChatFilesResponse.java | 21 +- .../models/components/GetChatRequest.java | 20 +- .../models/components/GetChatResponse.java | 20 +- .../components/GetCollectionRequest.java | 43 ++- .../components/GetCollectionResponse.java | 45 ++- .../GetDatasourceConfigRequest.java | 19 +- .../components/GetDlpReportResponse.java | 21 +- .../components/GetDocPermissionsRequest.java | 21 +- .../components/GetDocPermissionsResponse.java | 21 +- .../components/GetDocumentCountRequest.java | 19 +- .../components/GetDocumentCountResponse.java | 20 +- .../components/GetDocumentStatusRequest.java | 33 +- .../components/GetDocumentStatusResponse.java | 43 ++- ...etDocumentVisibilityOverridesResponse.java | 20 +- .../GetDocumentsByFacetsRequest.java | 36 +- .../GetDocumentsByFacetsResponse.java | 37 +- .../components/GetDocumentsRequest.java | 30 +- .../components/GetDocumentsResponse.java | 21 +- .../models/components/GetPinRequest.java | 21 +- .../models/components/GetPinResponse.java | 20 +- .../models/components/GetShortcutRequest.java | 20 +- .../components/GetShortcutResponse.java | 31 +- .../components/GetUserCountRequest.java | 19 +- .../components/GetUserCountResponse.java | 20 +- .../GleanAssistInsightsResponse.java | 54 +-- .../models/components/GleanDataError.java | 45 ++- .../models/components/GrantPermission.java | 20 +- .../components/GreenlistUsersRequest.java | 28 +- .../models/components/Group.java | 35 +- .../models/components/Hotword.java | 31 +- .../models/components/HotwordProximity.java | 31 +- .../models/components/IconConfig.java | 77 ++-- .../models/components/Identity.java | 47 ++- .../components/IndexDocumentRequest.java | 29 +- .../components/IndexDocumentsRequest.java | 34 +- .../components/IndexEmployeeRequest.java | 29 +- .../models/components/IndexGroupRequest.java | 34 +- .../components/IndexMembershipRequest.java | 34 +- .../models/components/IndexStatus.java | 31 +- .../models/components/IndexTeamRequest.java | 29 +- .../models/components/IndexUserRequest.java | 34 +- .../models/components/IndexingShortcut.java | 78 +++-- .../models/components/InputOptions.java | 60 ++-- .../models/components/InputSchema.java | 18 +- .../InsightsAgentsRequestOptions.java | 21 +- .../InsightsAiAppRequestOptions.java | 21 +- .../models/components/InsightsRequest.java | 67 ++-- .../models/components/InsightsResponse.java | 118 ++++--- .../components/InvalidOperatorValueError.java | 31 +- .../models/components/InviteInfo.java | 54 +-- .../models/components/LabeledCountInfo.java | 30 +- .../models/components/ListAnswersRequest.java | 21 +- .../components/ListAnswersResponse.java | 20 +- .../models/components/ListChatsResponse.java | 20 +- .../components/ListCollectionsRequest.java | 37 +- .../components/ListCollectionsResponse.java | 20 +- .../components/ListDlpReportsResponse.java | 20 +- .../components/ListEntitiesRequest.java | 86 +++-- .../components/ListEntitiesResponse.java | 83 +++-- .../models/components/ListPinsResponse.java | 20 +- .../ListShortcutsPaginatedRequest.java | 61 ++-- .../ListShortcutsPaginatedResponse.java | 37 +- .../models/components/ManualFeedbackInfo.java | 138 ++++---- .../models/components/Meeting.java | 70 ++-- .../models/components/Message.java | 31 +- .../models/components/MessageTextBlock.java | 29 +- .../models/components/MessagesRequest.java | 73 ++-- .../models/components/MessagesResponse.java | 38 +- .../models/components/ObjectDefinition.java | 60 ++-- .../models/components/ObjectPermissions.java | 21 +- .../models/components/OperatorMetadata.java | 66 ++-- .../models/components/OperatorScope.java | 31 +- .../models/components/OutputSchema.java | 18 +- .../models/components/PeopleRequest.java | 60 ++-- .../models/components/PeopleResponse.java | 37 +- .../models/components/Period.java | 46 ++- .../models/components/Permissions.java | 74 ++-- ...ermissionsGroupIntersectionDefinition.java | 19 +- .../models/components/Person.java | 43 ++- .../models/components/PersonDistance.java | 34 +- .../models/components/PersonMetadata.java | 329 ++++++++++-------- .../models/components/PersonObject.java | 29 +- .../models/components/PersonTeam.java | 53 +-- .../components/PersonToTeamRelationship.java | 41 ++- .../models/components/PinDocument.java | 78 +++-- .../models/components/PinRequest.java | 37 +- .../models/components/PossibleValue.java | 30 +- .../ProcessAllDocumentsRequest.java | 20 +- .../ProcessAllMembershipsRequest.java | 20 +- .../components/ProcessingHistoryEvent.java | 30 +- .../models/components/PromptTemplate.java | 110 +++--- .../components/PromptTemplateResult.java | 45 ++- .../models/components/PropertyDefinition.java | 82 +++-- .../models/components/PropertyGroup.java | 30 +- .../models/components/QueryInsight.java | 63 ++-- .../components/QueryInsightsResponse.java | 54 +-- .../models/components/QuerySuggestion.java | 77 ++-- .../components/QuerySuggestionList.java | 31 +- .../models/components/Quicklink.java | 59 ++-- .../models/components/Reaction.java | 44 ++- .../models/components/ReadPermission.java | 20 +- .../components/RecommendationsRequest.java | 79 +++-- .../RecommendationsRequestOptions.java | 55 +-- .../models/components/ReferenceRange.java | 31 +- .../models/components/RelatedDocuments.java | 55 +-- .../models/components/RelatedObject.java | 30 +- .../models/components/RelatedObjectEdge.java | 20 +- .../components/RelatedObjectMetadata.java | 20 +- .../models/components/RelatedQuestion.java | 37 +- .../models/components/Reminder.java | 52 +-- .../models/components/ReminderRequest.java | 43 ++- .../components/ReportStatusResponse.java | 30 +- .../models/components/RestrictionFilters.java | 21 +- .../models/components/ResultDocument.java | 31 +- .../models/components/ResultTab.java | 44 ++- .../models/components/ResultsDescription.java | 31 +- .../models/components/ResultsResponse.java | 80 +++-- .../components/RotateTokenResponse.java | 36 +- .../components/SearchAgentsRequest.java | 21 +- .../components/SearchAgentsResponse.java | 20 +- .../models/components/SearchProviderInfo.java | 37 +- .../models/components/SearchRequest.java | 120 ++++--- .../components/SearchRequestInputDetails.java | 21 +- .../components/SearchRequestOptions.java | 140 ++++---- .../models/components/SearchResponse.java | 146 ++++---- .../components/SearchResponseMetadata.java | 105 +++--- .../models/components/SearchResult.java | 169 +++++---- .../components/SearchResultSnippet.java | 59 ++-- .../models/components/SearchWarning.java | 43 ++- .../models/components/Security.java | 19 +- .../models/components/SeenFeedbackInfo.java | 21 +- .../components/SensitiveContentOptions.java | 36 +- .../components/SensitiveExpression.java | 31 +- .../models/components/SensitiveInfoType.java | 31 +- .../models/components/SessionInfo.java | 44 ++- .../models/components/Share.java | 37 +- .../models/components/SharingOptions.java | 74 ++-- .../models/components/Shortcut.java | 173 +++++---- .../models/components/ShortcutError.java | 20 +- .../models/components/ShortcutInsight.java | 37 +- .../components/ShortcutInsightsResponse.java | 44 ++- .../components/ShortcutMutableProperties.java | 75 ++-- .../ShortcutsPaginationMetadata.java | 39 ++- .../models/components/SocialNetwork.java | 35 +- .../components/SocialNetworkDefinition.java | 36 +- .../models/components/SortOptions.java | 31 +- .../models/components/StructuredLink.java | 36 +- .../models/components/StructuredLocation.java | 80 +++-- .../models/components/StructuredResult.java | 177 ++++++---- .../models/components/StructuredText.java | 29 +- .../models/components/StructuredTextItem.java | 45 ++- .../StructuredTextMutableProperties.java | 19 +- .../models/components/SummarizeRequest.java | 52 +-- .../models/components/SummarizeResponse.java | 37 +- .../models/components/Summary.java | 30 +- .../models/components/Team.java | 164 +++++---- .../models/components/TeamEmail.java | 29 +- .../models/components/TeamInfoDefinition.java | 92 ++--- .../models/components/TeamMember.java | 35 +- .../models/components/TextRange.java | 54 +-- .../models/components/Thumbnail.java | 31 +- .../models/components/TimeInterval.java | 29 +- .../models/components/TimePoint.java | 31 +- .../models/components/TimeRange.java | 37 +- .../models/components/Tool.java | 54 +-- .../models/components/ToolInfo.java | 31 +- .../models/components/ToolMetadata.java | 142 ++++---- .../models/components/ToolParameter.java | 66 ++-- .../models/components/ToolsCallParameter.java | 42 ++- .../models/components/ToolsCallRequest.java | 30 +- .../models/components/ToolsCallResponse.java | 31 +- .../models/components/ToolsListResponse.java | 20 +- .../models/components/UiConfig.java | 31 +- .../models/components/Unpin.java | 21 +- .../components/UpdateAnnouncementRequest.java | 122 ++++--- .../components/UpdateDlpConfigRequest.java | 31 +- .../components/UpdateDlpConfigResponse.java | 30 +- .../components/UpdateDlpReportRequest.java | 54 +-- .../components/UpdateDlpReportResponse.java | 20 +- ...ateDocumentVisibilityOverridesRequest.java | 20 +- ...teDocumentVisibilityOverridesResponse.java | 21 +- .../components/UpdatePermissionsRequest.java | 50 +-- .../components/UpdateShortcutRequest.java | 80 +++-- .../components/UpdateShortcutResponse.java | 31 +- .../components/UploadChatFilesRequest.java | 20 +- .../components/UploadChatFilesResponse.java | 21 +- .../components/UploadShortcutsRequest.java | 51 +-- .../models/components/User.java | 31 +- .../models/components/UserActivity.java | 44 ++- .../components/UserActivityInsight.java | 53 +-- .../components/UserGeneratedContentId.java | 21 +- .../components/UserInsightsResponse.java | 60 ++-- .../components/UserReferenceDefinition.java | 36 +- .../components/UserRoleSpecification.java | 44 ++- .../models/components/UserStatusResponse.java | 36 +- .../models/components/UserViewInfo.java | 37 +- .../models/components/Value.java | 18 +- .../models/components/Verification.java | 31 +- .../models/components/VerificationFeed.java | 21 +- .../components/VerificationMetadata.java | 76 ++-- .../models/components/VerifyRequest.java | 30 +- .../models/components/ViewerInfo.java | 32 +- .../models/components/Workflow.java | 68 ++-- .../components/WorkflowFeedbackInfo.java | 21 +- .../models/components/WorkflowResult.java | 19 +- .../components/WriteActionParameter.java | 60 ++-- .../models/components/WritePermission.java | 43 ++- .../models/errors/CollectionError.java | 19 +- .../models/errors/GleanDataError.java | 45 ++- .../operations/ActivityRequestBuilder.java | 2 +- .../models/operations/ActivityResponse.java | 34 +- .../AddcollectionitemsRequestBuilder.java | 2 +- .../AddcollectionitemsResponse.java | 41 ++- ...AddverificationreminderRequestBuilder.java | 2 +- .../AddverificationreminderResponse.java | 41 ++- .../operations/AdminsearchRequestBuilder.java | 2 +- .../operations/AdminsearchResponse.java | 41 ++- .../AutocompleteRequestBuilder.java | 2 +- .../operations/AutocompleteResponse.java | 41 ++- .../models/operations/ChatRequest.java | 30 +- .../models/operations/ChatRequestBuilder.java | 2 +- .../models/operations/ChatResponse.java | 41 ++- .../models/operations/ChatStreamRequest.java | 30 +- .../operations/ChatStreamRequestBuilder.java | 2 +- .../models/operations/ChatStreamResponse.java | 41 ++- .../CreateAndStreamRunRequestBuilder.java | 2 +- .../CreateAndStreamRunResponse.java | 41 ++- .../CreateAndWaitRunRequestBuilder.java | 2 +- .../operations/CreateAndWaitRunResponse.java | 41 ++- .../CreateannouncementRequestBuilder.java | 2 +- .../CreateannouncementResponse.java | 41 ++- .../CreateanswerRequestBuilder.java | 2 +- .../operations/CreateanswerResponse.java | 41 ++- .../CreateauthtokenRequestBuilder.java | 2 +- .../operations/CreateauthtokenResponse.java | 41 ++- .../CreatecollectionRequestBuilder.java | 2 +- .../operations/CreatecollectionResponse.java | 41 ++- .../CreatepolicyRequestBuilder.java | 2 +- .../operations/CreatepolicyResponse.java | 41 ++- .../CreatereportRequestBuilder.java | 2 +- .../operations/CreatereportResponse.java | 41 ++- .../CreateshortcutRequestBuilder.java | 2 +- .../operations/CreateshortcutResponse.java | 41 ++- .../operations/DeleteallchatsRequest.java | 21 +- .../DeleteallchatsRequestBuilder.java | 2 +- .../operations/DeleteallchatsResponse.java | 34 +- .../DeleteannouncementRequestBuilder.java | 2 +- .../DeleteannouncementResponse.java | 34 +- .../DeleteanswerRequestBuilder.java | 2 +- .../operations/DeleteanswerResponse.java | 34 +- .../operations/DeletechatfilesRequest.java | 31 +- .../DeletechatfilesRequestBuilder.java | 2 +- .../operations/DeletechatfilesResponse.java | 34 +- .../models/operations/DeletechatsRequest.java | 31 +- .../operations/DeletechatsRequestBuilder.java | 2 +- .../operations/DeletechatsResponse.java | 34 +- .../DeletecollectionRequestBuilder.java | 2 +- .../operations/DeletecollectionResponse.java | 34 +- .../DeletecollectionitemRequestBuilder.java | 2 +- .../DeletecollectionitemResponse.java | 41 ++- .../DeleteshortcutRequestBuilder.java | 2 +- .../operations/DeleteshortcutResponse.java | 34 +- .../operations/DownloadpolicycsvRequest.java | 20 +- .../DownloadpolicycsvRequestBuilder.java | 2 +- .../operations/DownloadpolicycsvResponse.java | 41 ++- .../operations/DownloadreportcsvRequest.java | 20 +- .../DownloadreportcsvRequestBuilder.java | 2 +- .../operations/DownloadreportcsvResponse.java | 41 ++- .../operations/EditanswerRequestBuilder.java | 2 +- .../models/operations/EditanswerResponse.java | 41 ++- .../EditcollectionRequestBuilder.java | 2 +- .../operations/EditcollectionResponse.java | 41 ++- .../EditcollectionitemRequestBuilder.java | 2 +- .../EditcollectionitemResponse.java | 41 ++- .../operations/EditpinRequestBuilder.java | 2 +- .../models/operations/EditpinResponse.java | 41 ++- .../models/operations/FeedRequestBuilder.java | 2 +- .../models/operations/FeedResponse.java | 41 ++- .../models/operations/FeedbackRequest.java | 32 +- .../operations/FeedbackRequestBuilder.java | 2 +- .../models/operations/FeedbackResponse.java | 34 +- .../models/operations/GetAgentRequest.java | 30 +- .../operations/GetAgentRequestBuilder.java | 2 +- .../models/operations/GetAgentResponse.java | 41 ++- .../operations/GetAgentSchemasRequest.java | 30 +- .../GetAgentSchemasRequestBuilder.java | 2 +- .../operations/GetAgentSchemasResponse.java | 41 ++- .../GetRestApiV1ToolsListRequest.java | 21 +- .../GetRestApiV1ToolsListRequestBuilder.java | 2 +- .../GetRestApiV1ToolsListResponse.java | 41 ++- .../operations/GetanswerRequestBuilder.java | 2 +- .../models/operations/GetanswerResponse.java | 41 ++- .../models/operations/GetchatRequest.java | 31 +- .../operations/GetchatRequestBuilder.java | 2 +- .../models/operations/GetchatResponse.java | 41 ++- .../operations/GetchatapplicationRequest.java | 31 +- .../GetchatapplicationRequestBuilder.java | 2 +- .../GetchatapplicationResponse.java | 41 ++- .../operations/GetchatfilesRequest.java | 31 +- .../GetchatfilesRequestBuilder.java | 2 +- .../operations/GetchatfilesResponse.java | 41 ++- .../GetcollectionRequestBuilder.java | 2 +- .../operations/GetcollectionResponse.java | 41 ++- .../GetdocpermissionsRequestBuilder.java | 2 +- .../operations/GetdocpermissionsResponse.java | 41 ++- .../GetdocumentsRequestBuilder.java | 2 +- .../operations/GetdocumentsResponse.java | 41 ++- .../GetdocumentsbyfacetsRequestBuilder.java | 2 +- .../GetdocumentsbyfacetsResponse.java | 41 ++- .../operations/GetdocvisibilityRequest.java | 21 +- .../GetdocvisibilityRequestBuilder.java | 2 +- .../operations/GetdocvisibilityResponse.java | 41 ++- .../operations/GetpinRequestBuilder.java | 2 +- .../models/operations/GetpinResponse.java | 41 ++- .../models/operations/GetpolicyRequest.java | 30 +- .../operations/GetpolicyRequestBuilder.java | 2 +- .../models/operations/GetpolicyResponse.java | 41 ++- .../operations/GetreportstatusRequest.java | 20 +- .../GetreportstatusRequestBuilder.java | 2 +- .../operations/GetreportstatusResponse.java | 41 ++- .../operations/GetshortcutRequestBuilder.java | 2 +- .../operations/GetshortcutResponse.java | 41 ++- .../operations/InsightsRequestBuilder.java | 2 +- .../models/operations/InsightsResponse.java | 41 ++- .../operations/ListanswersRequestBuilder.java | 2 +- .../operations/ListanswersResponse.java | 41 ++- .../models/operations/ListchatsRequest.java | 21 +- .../operations/ListchatsRequestBuilder.java | 2 +- .../models/operations/ListchatsResponse.java | 41 ++- .../ListcollectionsRequestBuilder.java | 2 +- .../operations/ListcollectionsResponse.java | 41 ++- .../ListentitiesRequestBuilder.java | 2 +- .../operations/ListentitiesResponse.java | 41 ++- .../models/operations/ListpinsRequest.java | 18 +- .../operations/ListpinsRequestBuilder.java | 2 +- .../models/operations/ListpinsResponse.java | 41 ++- .../operations/ListpoliciesRequest.java | 31 +- .../ListpoliciesRequestBuilder.java | 2 +- .../operations/ListpoliciesResponse.java | 41 ++- .../ListshortcutsRequestBuilder.java | 2 +- .../operations/ListshortcutsResponse.java | 41 ++- .../operations/ListverificationsRequest.java | 21 +- .../ListverificationsRequestBuilder.java | 2 +- .../operations/ListverificationsResponse.java | 41 ++- .../operations/MessagesRequestBuilder.java | 2 +- .../models/operations/MessagesResponse.java | 41 ++- .../operations/PeopleRequestBuilder.java | 2 +- .../models/operations/PeopleResponse.java | 41 ++- .../models/operations/PinRequestBuilder.java | 2 +- .../models/operations/PinResponse.java | 41 ++- ...ApiIndexV1AdddatasourceRequestBuilder.java | 2 +- .../PostApiIndexV1AdddatasourceResponse.java | 34 +- ...PostApiIndexV1BetausersRequestBuilder.java | 2 +- .../PostApiIndexV1BetausersResponse.java | 34 +- ...dexV1BulkindexdocumentsRequestBuilder.java | 2 +- ...tApiIndexV1BulkindexdocumentsResponse.java | 34 +- ...dexV1BulkindexemployeesRequestBuilder.java | 2 +- ...tApiIndexV1BulkindexemployeesResponse.java | 34 +- ...iIndexV1BulkindexgroupsRequestBuilder.java | 2 +- ...PostApiIndexV1BulkindexgroupsResponse.java | 34 +- ...xV1BulkindexmembershipsRequestBuilder.java | 2 +- ...piIndexV1BulkindexmembershipsResponse.java | 34 +- ...dexV1BulkindexshortcutsRequestBuilder.java | 2 +- ...tApiIndexV1BulkindexshortcutsResponse.java | 34 +- ...piIndexV1BulkindexteamsRequestBuilder.java | 2 +- .../PostApiIndexV1BulkindexteamsResponse.java | 34 +- ...piIndexV1BulkindexusersRequestBuilder.java | 2 +- .../PostApiIndexV1BulkindexusersResponse.java | 34 +- ...exV1CheckdocumentaccessRequestBuilder.java | 2 +- ...ApiIndexV1CheckdocumentaccessResponse.java | 41 ++- ...IndexV1DebugDatasourceDocumentRequest.java | 30 +- ...DebugDatasourceDocumentRequestBuilder.java | 2 +- ...ndexV1DebugDatasourceDocumentResponse.java | 41 ++- ...ndexV1DebugDatasourceDocumentsRequest.java | 30 +- ...ebugDatasourceDocumentsRequestBuilder.java | 2 +- ...dexV1DebugDatasourceDocumentsResponse.java | 41 ++- ...piIndexV1DebugDatasourceStatusRequest.java | 20 +- ...V1DebugDatasourceStatusRequestBuilder.java | 2 +- ...iIndexV1DebugDatasourceStatusResponse.java | 41 ++- ...tApiIndexV1DebugDatasourceUserRequest.java | 30 +- ...exV1DebugDatasourceUserRequestBuilder.java | 2 +- ...ApiIndexV1DebugDatasourceUserResponse.java | 41 ++- ...piIndexV1DeletedocumentRequestBuilder.java | 2 +- .../PostApiIndexV1DeletedocumentResponse.java | 34 +- ...piIndexV1DeleteemployeeRequestBuilder.java | 2 +- .../PostApiIndexV1DeleteemployeeResponse.java | 34 +- ...stApiIndexV1DeletegroupRequestBuilder.java | 2 +- .../PostApiIndexV1DeletegroupResponse.java | 34 +- ...IndexV1DeletemembershipRequestBuilder.java | 2 +- ...ostApiIndexV1DeletemembershipResponse.java | 34 +- ...ostApiIndexV1DeleteteamRequestBuilder.java | 2 +- .../PostApiIndexV1DeleteteamResponse.java | 34 +- ...ostApiIndexV1DeleteuserRequestBuilder.java | 2 +- .../PostApiIndexV1DeleteuserResponse.java | 34 +- ...exV1GetdatasourceconfigRequestBuilder.java | 2 +- ...ApiIndexV1GetdatasourceconfigResponse.java | 41 ++- ...IndexV1GetdocumentcountRequestBuilder.java | 2 +- ...ostApiIndexV1GetdocumentcountResponse.java | 41 ++- ...ndexV1GetdocumentstatusRequestBuilder.java | 2 +- ...stApiIndexV1GetdocumentstatusResponse.java | 41 ++- ...tApiIndexV1GetusercountRequestBuilder.java | 2 +- .../PostApiIndexV1GetusercountResponse.java | 41 ++- ...ApiIndexV1IndexdocumentRequestBuilder.java | 2 +- .../PostApiIndexV1IndexdocumentResponse.java | 34 +- ...piIndexV1IndexdocumentsRequestBuilder.java | 2 +- .../PostApiIndexV1IndexdocumentsResponse.java | 34 +- ...ApiIndexV1IndexemployeeRequestBuilder.java | 2 +- .../PostApiIndexV1IndexemployeeResponse.java | 34 +- ...ostApiIndexV1IndexgroupRequestBuilder.java | 2 +- .../PostApiIndexV1IndexgroupResponse.java | 34 +- ...iIndexV1IndexmembershipRequestBuilder.java | 2 +- ...PostApiIndexV1IndexmembershipResponse.java | 34 +- ...PostApiIndexV1IndexteamRequestBuilder.java | 2 +- .../PostApiIndexV1IndexteamResponse.java | 34 +- ...PostApiIndexV1IndexuserRequestBuilder.java | 2 +- .../PostApiIndexV1IndexuserResponse.java | 34 +- ...exV1ProcessalldocumentsRequestBuilder.java | 2 +- ...ApiIndexV1ProcessalldocumentsResponse.java | 34 +- ...essallemployeesandteamsRequestBuilder.java | 2 +- ...V1ProcessallemployeesandteamsResponse.java | 34 +- ...V1ProcessallmembershipsRequestBuilder.java | 2 +- ...iIndexV1ProcessallmembershipsResponse.java | 34 +- ...stApiIndexV1RotatetokenRequestBuilder.java | 2 +- .../PostApiIndexV1RotatetokenResponse.java | 41 ++- ...ndexV1UpdatepermissionsRequestBuilder.java | 2 +- ...stApiIndexV1UpdatepermissionsResponse.java | 34 +- ...iIndexV1UploadshortcutsRequestBuilder.java | 2 +- ...PostApiIndexV1UploadshortcutsResponse.java | 34 +- .../PostRestApiV1ToolsCallRequestBuilder.java | 2 +- .../PostRestApiV1ToolsCallResponse.java | 41 ++- .../RecommendationsRequestBuilder.java | 2 +- .../operations/RecommendationsResponse.java | 41 ++- .../SearchAgentsRequestBuilder.java | 2 +- .../operations/SearchAgentsResponse.java | 41 ++- .../operations/SearchRequestBuilder.java | 2 +- .../models/operations/SearchResponse.java | 41 ++- .../SetdocvisibilityRequestBuilder.java | 2 +- .../operations/SetdocvisibilityResponse.java | 41 ++- .../operations/SummarizeRequestBuilder.java | 2 +- .../models/operations/SummarizeResponse.java | 41 ++- .../operations/UnpinRequestBuilder.java | 2 +- .../models/operations/UnpinResponse.java | 34 +- .../UpdateannouncementRequestBuilder.java | 2 +- .../UpdateannouncementResponse.java | 41 ++- .../operations/UpdatepolicyRequest.java | 30 +- .../UpdatepolicyRequestBuilder.java | 2 +- .../operations/UpdatepolicyResponse.java | 41 ++- .../UpdateshortcutRequestBuilder.java | 2 +- .../operations/UpdateshortcutResponse.java | 41 ++- .../operations/UploadchatfilesRequest.java | 31 +- .../UploadchatfilesRequestBuilder.java | 2 +- .../operations/UploadchatfilesResponse.java | 41 ++- .../operations/VerifyRequestBuilder.java | 2 +- .../models/operations/VerifyResponse.java | 41 ++- .../glean_api_client/utils/Utils.java | 29 +- .../pathpostrestapiv1addcollectionitems.go | 8 + .../handler/pathpostrestapiv1createanswer.go | 8 + .../pathpostrestapiv1createcollection.go | 8 + .../pathpostrestapiv1deletecollectionitem.go | 8 + .../handler/pathpostrestapiv1editanswer.go | 8 + .../pathpostrestapiv1editcollection.go | 8 + .../pathpostrestapiv1editcollectionitem.go | 8 + .../handler/pathpostrestapiv1editpin.go | 8 + .../handler/pathpostrestapiv1getanswer.go | 8 + .../handler/pathpostrestapiv1getchat.go | 14 +- .../handler/pathpostrestapiv1getcollection.go | 8 + .../handler/pathpostrestapiv1getpin.go | 8 + .../handler/pathpostrestapiv1insights.go | 8 + .../handler/pathpostrestapiv1listanswers.go | 8 + .../handler/pathpostrestapiv1listchats.go | 8 + .../pathpostrestapiv1listcollections.go | 8 + .../handler/pathpostrestapiv1listentities.go | 8 + .../handler/pathpostrestapiv1listpins.go | 8 + .../handler/pathpostrestapiv1listshortcuts.go | 15 +- .../internal/handler/pathpostrestapiv1pin.go | 8 + 708 files changed, 14978 insertions(+), 11169 deletions(-) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4e0f7f37..2aed8a27 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -3,10 +3,10 @@ id: 0359d4fe-2923-46fc-aaca-cf70b48dcfa1 management: docChecksum: bb65a174a6b697994f7bde3845843d9d docVersion: 0.9.0 - speakeasyVersion: 1.576.1 - generationVersion: 2.651.2 - releaseVersion: 0.6.0 - configChecksum: 36947d923e8382f9287cbfeee1bf3f84 + speakeasyVersion: 1.580.2 + generationVersion: 2.656.5 + releaseVersion: 0.7.0 + configChecksum: 5763d80380dc0fbbb84875250841f11a repoURL: https://github.com/gleanwork/api-client-java.git published: true features: @@ -14,9 +14,9 @@ features: additionalDependencies: 0.1.0 additionalProperties: 0.0.1 constsAndDefaults: 0.1.1 - core: 3.42.3 + core: 3.44.0 deprecations: 2.81.1 - examples: 2.81.5 + examples: 2.81.6 flattening: 2.81.1 globalSecurity: 2.83.0 globalSecurityCallbacks: 0.1.0 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index f3125228..97870990 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -21,7 +21,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 0.6.0 + version: 0.7.0 additionalDependencies: [] additionalPlugins: [] artifactID: glean-api-client @@ -51,6 +51,7 @@ java: shortName: MIT url: https://mit-license.org/ maxMethodParams: 4 + nullFriendlyParameters: false outputModelSuffix: output projectName: glean-api-client templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index c2b04e02..031541ed 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.576.1 +speakeasyVersion: 1.580.2 sources: Glean API: sourceNamespace: glean-api-specs @@ -6,7 +6,7 @@ sources: sourceBlobDigest: sha256:01cf4577ff2f15ba160b16bba410571a8ba0c5fefa7e6dd7101edef7ef7c68dc tags: - latest - - speakeasy-sdk-regen-1750453706 + - speakeasy-sdk-regen-1751974088 Glean-OAS: sourceNamespace: glean-oas sourceRevisionDigest: sha256:8841834dd58ddd4e2dcf98fc90fbd06fbf3626a29df941503cce55b9548a5317 @@ -21,7 +21,7 @@ targets: sourceRevisionDigest: sha256:57fc6af98e6e9e98c92547985293be8fafd52d2a1d1ef88d4b24636743b9f119 sourceBlobDigest: sha256:01cf4577ff2f15ba160b16bba410571a8ba0c5fefa7e6dd7101edef7ef7c68dc codeSamplesNamespace: glean-api-specs-java-code-samples - codeSamplesRevisionDigest: sha256:0b38a88f263a55a5ce1d7a0938446b8192c36e32ab974acc6c9dff2a62fc28d1 + codeSamplesRevisionDigest: sha256:696df3780275658d9e4fab559fceb2dc36adeff8f6055db8303641ed1f4e7d6c workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index b2f63454..3eae6223 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ Remember that each namespace requires its own authentication token type as descr * [Available Resources and Operations](#available-resources-and-operations) * [Error Handling](#error-handling) * [Server Selection](#server-selection) + * [Debugging](#debugging) * [Development](#development) * [Maturity](#maturity) * [Contributions](#contributions) @@ -62,7 +63,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.glean.api-client:glean-api-client:0.6.0' +implementation 'com.glean.api-client:glean-api-client:0.7.0' ``` Maven: @@ -70,7 +71,7 @@ Maven: com.glean.api-client glean-api-client - 0.6.0 + 0.7.0 ``` @@ -87,33 +88,6 @@ On Windows: ```bash gradlew.bat publishToMavenLocal -Pskip.signing ``` - -### Logging -A logging framework/facade has not yet been adopted but is under consideration. - -For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so: -```java -SDK.builder() - .enableHTTPDebugLogging(true) - .build(); -``` -Example output: -``` -Sending request: http://localhost:35123/bearer#global GET -Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]} -Received response: (GET http://localhost:35123/bearer#global) 200 -Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]} -Response body: -{ - "authenticated": true, - "token": "global" -} -``` -__WARNING__: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. Authorization headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`. - -__NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging()`. The `SpeakeasyHTTPClient` honors this setting. If you are using a custom HTTP client, it is up to the custom client to honor this setting. - -Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies. @@ -1269,6 +1243,37 @@ public class Application { ``` + +## Debugging + +### Debug +You can setup your SDK to emit debug logs for SDK requests and responses. + +For request and response logging (especially json bodies), call `enableHTTPDebugLogging(boolean)` on the SDK builder like so: +```java +SDK.builder() + .enableHTTPDebugLogging(true) + .build(); +``` +Example output: +``` +Sending request: http://localhost:35123/bearer#global GET +Request headers: {Accept=[application/json], Authorization=[******], Client-Level-Header=[added by client], Idempotency-Key=[some-key], x-speakeasy-user-agent=[speakeasy-sdk/java 0.0.1 internal 0.1.0 org.openapis.openapi]} +Received response: (GET http://localhost:35123/bearer#global) 200 +Response headers: {access-control-allow-credentials=[true], access-control-allow-origin=[*], connection=[keep-alive], content-length=[50], content-type=[application/json], date=[Wed, 09 Apr 2025 01:43:29 GMT], server=[gunicorn/19.9.0]} +Response body: +{ + "authenticated": true, + "token": "global" +} +``` +__WARNING__: This should only used for temporary debugging purposes. Leaving this option on in a production system could expose credentials/secrets in logs. Authorization headers are redacted by default and there is the ability to specify redacted header names via `SpeakeasyHTTPClient.setRedactedHeaders`. + +__NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging()`. The `SpeakeasyHTTPClient` honors this setting. If you are using a custom HTTP client, it is up to the custom client to honor this setting. + +Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this second option does not log bodies. + + # Development diff --git a/RELEASES.md b/RELEASES.md index e72a2ba6..5c84faf6 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -168,4 +168,14 @@ Based on: ### Generated - [java v0.6.0] . ### Releases -- [Maven Central v0.6.0] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.6.0 - . \ No newline at end of file +- [Maven Central v0.6.0] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.6.0 - . + +## 2025-07-11 02:10:35 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.580.2 (2.656.5) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.7.0] . +### Releases +- [Maven Central v0.7.0] https://central.sonatype.com/artifact/com.glean.api-client/glean-api-client/0.7.0 - . \ No newline at end of file diff --git a/build.gradle b/build.gradle index 89f1cab4..9241f163 100644 --- a/build.gradle +++ b/build.gradle @@ -106,7 +106,7 @@ publishing { // https://github.com/gradle/gradle/issues/18619 groupId = "com.glean.api-client" artifactId = "glean-api-client" - version = "0.6.0" + version = "0.7.0" from components.java diff --git a/gradle.properties b/gradle.properties index a67e3568..8230588b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ groupId=com.glean.api-client artifactId=glean-api-client -version=0.6.0 \ No newline at end of file +version=0.7.0 \ No newline at end of file diff --git a/src/main/java/com/glean/api_client/glean_api_client/Activity.java b/src/main/java/com/glean/api_client/glean_api_client/Activity.java index 94f40386..0020d1ad 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Activity.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Activity.java @@ -25,7 +25,6 @@ public class Activity { Activity(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Report document activity * @@ -46,14 +45,12 @@ public ActivityRequestBuilder report() { * @return The response from the API call * @throws Exception if the API call fails */ - public ActivityResponse report( - com.glean.api_client.glean_api_client.models.components.Activity request) throws Exception { + public ActivityResponse report(com.glean.api_client.glean_api_client.models.components.Activity request) throws Exception { RequestOperation operation - = new ActivityOperation( sdkConfiguration); + = new ActivityOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Report client activity * @@ -97,7 +94,7 @@ public FeedbackResponse feedback( .feedback1(feedback1) .build(); RequestOperation operation - = new FeedbackOperation( sdkConfiguration); + = new FeedbackOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Agents.java b/src/main/java/com/glean/api_client/glean_api_client/Agents.java index c000c033..628f8333 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Agents.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Agents.java @@ -37,7 +37,6 @@ public class Agents { Agents(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Retrieve an agent * @@ -82,11 +81,10 @@ public GetAgentResponse retrieve( .agentId(agentId) .build(); RequestOperation operation - = new GetAgentOperation( sdkConfiguration); + = new GetAgentOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * List an agent's schemas * @@ -131,11 +129,10 @@ public GetAgentSchemasResponse retrieveSchemas( .agentId(agentId) .build(); RequestOperation operation - = new GetAgentSchemasOperation( sdkConfiguration); + = new GetAgentSchemasOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Search agents * @@ -156,14 +153,12 @@ public SearchAgentsRequestBuilder list() { * @return The response from the API call * @throws Exception if the API call fails */ - public SearchAgentsResponse list( - SearchAgentsRequest request) throws Exception { + public SearchAgentsResponse list(SearchAgentsRequest request) throws Exception { RequestOperation operation - = new SearchAgentsOperation( sdkConfiguration); + = new SearchAgentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Create an agent run and stream the response * @@ -184,14 +179,12 @@ public CreateAndStreamRunRequestBuilder runStream() { * @return The response from the API call * @throws Exception if the API call fails */ - public CreateAndStreamRunResponse runStream( - AgentRunCreate request) throws Exception { + public CreateAndStreamRunResponse runStream(AgentRunCreate request) throws Exception { RequestOperation operation - = new CreateAndStreamRunOperation( sdkConfiguration); + = new CreateAndStreamRunOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Create an agent run and wait for the response * @@ -212,10 +205,9 @@ public CreateAndWaitRunRequestBuilder run() { * @return The response from the API call * @throws Exception if the API call fails */ - public CreateAndWaitRunResponse run( - AgentRunCreate request) throws Exception { + public CreateAndWaitRunResponse run(AgentRunCreate request) throws Exception { RequestOperation operation - = new CreateAndWaitRunOperation( sdkConfiguration); + = new CreateAndWaitRunOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Announcements.java b/src/main/java/com/glean/api_client/glean_api_client/Announcements.java index 09431dfb..bba6358e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Announcements.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Announcements.java @@ -28,7 +28,6 @@ public class Announcements { Announcements(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Create Announcement * @@ -49,14 +48,12 @@ public CreateannouncementRequestBuilder create() { * @return The response from the API call * @throws Exception if the API call fails */ - public CreateannouncementResponse create( - CreateAnnouncementRequest request) throws Exception { + public CreateannouncementResponse create(CreateAnnouncementRequest request) throws Exception { RequestOperation operation - = new CreateannouncementOperation( sdkConfiguration); + = new CreateannouncementOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete Announcement * @@ -77,14 +74,12 @@ public DeleteannouncementRequestBuilder delete() { * @return The response from the API call * @throws Exception if the API call fails */ - public DeleteannouncementResponse delete( - DeleteAnnouncementRequest request) throws Exception { + public DeleteannouncementResponse delete(DeleteAnnouncementRequest request) throws Exception { RequestOperation operation - = new DeleteannouncementOperation( sdkConfiguration); + = new DeleteannouncementOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Update Announcement * @@ -105,10 +100,9 @@ public UpdateannouncementRequestBuilder update() { * @return The response from the API call * @throws Exception if the API call fails */ - public UpdateannouncementResponse update( - UpdateAnnouncementRequest request) throws Exception { + public UpdateannouncementResponse update(UpdateAnnouncementRequest request) throws Exception { RequestOperation operation - = new UpdateannouncementOperation( sdkConfiguration); + = new UpdateannouncementOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Answers.java b/src/main/java/com/glean/api_client/glean_api_client/Answers.java index e74b777f..cf1f6d15 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Answers.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Answers.java @@ -36,7 +36,6 @@ public class Answers { Answers(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Create Answer * @@ -57,14 +56,12 @@ public CreateanswerRequestBuilder create() { * @return The response from the API call * @throws Exception if the API call fails */ - public CreateanswerResponse create( - CreateAnswerRequest request) throws Exception { + public CreateanswerResponse create(CreateAnswerRequest request) throws Exception { RequestOperation operation - = new CreateanswerOperation( sdkConfiguration); + = new CreateanswerOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete Answer * @@ -85,14 +82,12 @@ public DeleteanswerRequestBuilder delete() { * @return The response from the API call * @throws Exception if the API call fails */ - public DeleteanswerResponse delete( - DeleteAnswerRequest request) throws Exception { + public DeleteanswerResponse delete(DeleteAnswerRequest request) throws Exception { RequestOperation operation - = new DeleteanswerOperation( sdkConfiguration); + = new DeleteanswerOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Update Answer * @@ -113,14 +108,12 @@ public EditanswerRequestBuilder update() { * @return The response from the API call * @throws Exception if the API call fails */ - public EditanswerResponse update( - EditAnswerRequest request) throws Exception { + public EditanswerResponse update(EditAnswerRequest request) throws Exception { RequestOperation operation - = new EditanswerOperation( sdkConfiguration); + = new EditanswerOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Read Answer * @@ -141,14 +134,12 @@ public GetanswerRequestBuilder retrieve() { * @return The response from the API call * @throws Exception if the API call fails */ - public GetanswerResponse retrieve( - GetAnswerRequest request) throws Exception { + public GetanswerResponse retrieve(GetAnswerRequest request) throws Exception { RequestOperation operation - = new GetanswerOperation( sdkConfiguration); + = new GetanswerOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * List Answers * @@ -169,10 +160,9 @@ public ListanswersRequestBuilder list() { * @return The response from the API call * @throws Exception if the API call fails */ - public ListanswersResponse list( - ListAnswersRequest request) throws Exception { + public ListanswersResponse list(ListAnswersRequest request) throws Exception { RequestOperation operation - = new ListanswersOperation( sdkConfiguration); + = new ListanswersOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Chat.java b/src/main/java/com/glean/api_client/glean_api_client/Chat.java index e6262e5c..8ba84e0e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Chat.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Chat.java @@ -63,7 +63,6 @@ public class Chat { Chat(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Chat * @@ -108,11 +107,10 @@ public ChatResponse create( .chatRequest(chatRequest) .build(); RequestOperation operation - = new ChatOperation( sdkConfiguration); + = new ChatOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Deletes all saved Chats owned by a user * @@ -145,19 +143,17 @@ public DeleteallchatsResponse deleteAllDirect() throws Exception { * @return The response from the API call * @throws Exception if the API call fails */ - public DeleteallchatsResponse deleteAll( - Optional timezoneOffset) throws Exception { + public DeleteallchatsResponse deleteAll(Optional timezoneOffset) throws Exception { DeleteallchatsRequest request = DeleteallchatsRequest .builder() .timezoneOffset(timezoneOffset) .build(); RequestOperation operation - = new DeleteallchatsOperation( sdkConfiguration); + = new DeleteallchatsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Deletes saved Chats * @@ -202,11 +198,10 @@ public DeletechatsResponse delete( .deleteChatsRequest(deleteChatsRequest) .build(); RequestOperation operation - = new DeletechatsOperation( sdkConfiguration); + = new DeletechatsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Retrieves a Chat * @@ -251,11 +246,10 @@ public GetchatResponse retrieve( .getChatRequest(getChatRequest) .build(); RequestOperation operation - = new GetchatOperation( sdkConfiguration); + = new GetchatOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Retrieves all saved Chats * @@ -288,19 +282,17 @@ public ListchatsResponse listDirect() throws Exception { * @return The response from the API call * @throws Exception if the API call fails */ - public ListchatsResponse list( - Optional timezoneOffset) throws Exception { + public ListchatsResponse list(Optional timezoneOffset) throws Exception { ListchatsRequest request = ListchatsRequest .builder() .timezoneOffset(timezoneOffset) .build(); RequestOperation operation - = new ListchatsOperation( sdkConfiguration); + = new ListchatsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Gets the metadata for a custom Chat application * @@ -345,11 +337,10 @@ public GetchatapplicationResponse retrieveApplication( .getChatApplicationRequest(getChatApplicationRequest) .build(); RequestOperation operation - = new GetchatapplicationOperation( sdkConfiguration); + = new GetchatapplicationOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Upload files for Chat. * @@ -394,11 +385,10 @@ public UploadchatfilesResponse uploadFiles( .uploadChatFilesRequest(uploadChatFilesRequest) .build(); RequestOperation operation - = new UploadchatfilesOperation( sdkConfiguration); + = new UploadchatfilesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Get files uploaded by a user for Chat. * @@ -443,11 +433,10 @@ public GetchatfilesResponse retrieveFiles( .getChatFilesRequest(getChatFilesRequest) .build(); RequestOperation operation - = new GetchatfilesOperation( sdkConfiguration); + = new GetchatfilesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete files uploaded by a user for chat. * @@ -492,11 +481,10 @@ public DeletechatfilesResponse deleteFiles( .deleteChatFilesRequest(deleteChatFilesRequest) .build(); RequestOperation operation - = new DeletechatfilesOperation( sdkConfiguration); + = new DeletechatfilesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Chat * @@ -541,7 +529,7 @@ public ChatStreamResponse createStream( .chatRequest(chatRequest) .build(); RequestOperation operation - = new ChatStreamOperation( sdkConfiguration); + = new ChatStreamOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/ClientAuthentication.java b/src/main/java/com/glean/api_client/glean_api_client/ClientAuthentication.java index ee7d79fe..e0460d6e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/ClientAuthentication.java +++ b/src/main/java/com/glean/api_client/glean_api_client/ClientAuthentication.java @@ -19,7 +19,6 @@ public class ClientAuthentication { ClientAuthentication(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Create authentication token * @@ -49,7 +48,7 @@ public CreateauthtokenRequestBuilder createToken() { */ public CreateauthtokenResponse createTokenDirect() throws Exception { RequestlessOperation operation - = new CreateauthtokenOperation( sdkConfiguration); + = new CreateauthtokenOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest()); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/ClientDocuments.java b/src/main/java/com/glean/api_client/glean_api_client/ClientDocuments.java index 79dde632..6027eeab 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/ClientDocuments.java +++ b/src/main/java/com/glean/api_client/glean_api_client/ClientDocuments.java @@ -32,7 +32,6 @@ public class ClientDocuments { ClientDocuments(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Read document permissions * @@ -53,14 +52,12 @@ public GetdocpermissionsRequestBuilder retrievePermissions() { * @return The response from the API call * @throws Exception if the API call fails */ - public GetdocpermissionsResponse retrievePermissions( - GetDocPermissionsRequest request) throws Exception { + public GetdocpermissionsResponse retrievePermissions(GetDocPermissionsRequest request) throws Exception { RequestOperation operation - = new GetdocpermissionsOperation( sdkConfiguration); + = new GetdocpermissionsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Read documents * @@ -93,14 +90,12 @@ public GetdocumentsResponse retrieveDirect() throws Exception { * @return The response from the API call * @throws Exception if the API call fails */ - public GetdocumentsResponse retrieve( - Optional request) throws Exception { + public GetdocumentsResponse retrieve(Optional request) throws Exception { RequestOperation, GetdocumentsResponse> operation - = new GetdocumentsOperation( sdkConfiguration); + = new GetdocumentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Read documents by facets * @@ -133,14 +128,12 @@ public GetdocumentsbyfacetsResponse retrieveByFacetsDirect() throws Exception { * @return The response from the API call * @throws Exception if the API call fails */ - public GetdocumentsbyfacetsResponse retrieveByFacets( - Optional request) throws Exception { + public GetdocumentsbyfacetsResponse retrieveByFacets(Optional request) throws Exception { RequestOperation, GetdocumentsbyfacetsResponse> operation - = new GetdocumentsbyfacetsOperation( sdkConfiguration); + = new GetdocumentsbyfacetsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Summarize documents * @@ -161,10 +154,9 @@ public SummarizeRequestBuilder summarize() { * @return The response from the API call * @throws Exception if the API call fails */ - public SummarizeResponse summarize( - SummarizeRequest request) throws Exception { + public SummarizeResponse summarize(SummarizeRequest request) throws Exception { RequestOperation operation - = new SummarizeOperation( sdkConfiguration); + = new SummarizeOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/ClientShortcuts.java b/src/main/java/com/glean/api_client/glean_api_client/ClientShortcuts.java index 8f329af2..9ad51239 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/ClientShortcuts.java +++ b/src/main/java/com/glean/api_client/glean_api_client/ClientShortcuts.java @@ -36,7 +36,6 @@ public class ClientShortcuts { ClientShortcuts(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Create shortcut * @@ -57,14 +56,12 @@ public CreateshortcutRequestBuilder create() { * @return The response from the API call * @throws Exception if the API call fails */ - public CreateshortcutResponse create( - CreateShortcutRequest request) throws Exception { + public CreateshortcutResponse create(CreateShortcutRequest request) throws Exception { RequestOperation operation - = new CreateshortcutOperation( sdkConfiguration); + = new CreateshortcutOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete shortcut * @@ -85,14 +82,12 @@ public DeleteshortcutRequestBuilder delete() { * @return The response from the API call * @throws Exception if the API call fails */ - public DeleteshortcutResponse delete( - DeleteShortcutRequest request) throws Exception { + public DeleteshortcutResponse delete(DeleteShortcutRequest request) throws Exception { RequestOperation operation - = new DeleteshortcutOperation( sdkConfiguration); + = new DeleteshortcutOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Read shortcut * @@ -113,14 +108,12 @@ public GetshortcutRequestBuilder retrieve() { * @return The response from the API call * @throws Exception if the API call fails */ - public GetshortcutResponse retrieve( - GetShortcutRequestUnion request) throws Exception { + public GetshortcutResponse retrieve(GetShortcutRequestUnion request) throws Exception { RequestOperation operation - = new GetshortcutOperation( sdkConfiguration); + = new GetshortcutOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * List shortcuts * @@ -141,14 +134,12 @@ public ListshortcutsRequestBuilder list() { * @return The response from the API call * @throws Exception if the API call fails */ - public ListshortcutsResponse list( - ListShortcutsPaginatedRequest request) throws Exception { + public ListshortcutsResponse list(ListShortcutsPaginatedRequest request) throws Exception { RequestOperation operation - = new ListshortcutsOperation( sdkConfiguration); + = new ListshortcutsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Update shortcut * @@ -169,10 +160,9 @@ public UpdateshortcutRequestBuilder update() { * @return The response from the API call * @throws Exception if the API call fails */ - public UpdateshortcutResponse update( - UpdateShortcutRequest request) throws Exception { + public UpdateshortcutResponse update(UpdateShortcutRequest request) throws Exception { RequestOperation operation - = new UpdateshortcutOperation( sdkConfiguration); + = new UpdateshortcutOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Collections.java b/src/main/java/com/glean/api_client/glean_api_client/Collections.java index bac53f5e..4de07a8b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Collections.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Collections.java @@ -48,7 +48,6 @@ public class Collections { Collections(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Add Collection item * @@ -69,14 +68,12 @@ public AddcollectionitemsRequestBuilder addItems() { * @return The response from the API call * @throws Exception if the API call fails */ - public AddcollectionitemsResponse addItems( - AddCollectionItemsRequest request) throws Exception { + public AddcollectionitemsResponse addItems(AddCollectionItemsRequest request) throws Exception { RequestOperation operation - = new AddcollectionitemsOperation( sdkConfiguration); + = new AddcollectionitemsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Create Collection * @@ -97,14 +94,12 @@ public CreatecollectionRequestBuilder create() { * @return The response from the API call * @throws Exception if the API call fails */ - public CreatecollectionResponse create( - CreateCollectionRequest request) throws Exception { + public CreatecollectionResponse create(CreateCollectionRequest request) throws Exception { RequestOperation operation - = new CreatecollectionOperation( sdkConfiguration); + = new CreatecollectionOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete Collection * @@ -125,14 +120,12 @@ public DeletecollectionRequestBuilder delete() { * @return The response from the API call * @throws Exception if the API call fails */ - public DeletecollectionResponse delete( - DeleteCollectionRequest request) throws Exception { + public DeletecollectionResponse delete(DeleteCollectionRequest request) throws Exception { RequestOperation operation - = new DeletecollectionOperation( sdkConfiguration); + = new DeletecollectionOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete Collection item * @@ -153,14 +146,12 @@ public DeletecollectionitemRequestBuilder deleteItem() { * @return The response from the API call * @throws Exception if the API call fails */ - public DeletecollectionitemResponse deleteItem( - DeleteCollectionItemRequest request) throws Exception { + public DeletecollectionitemResponse deleteItem(DeleteCollectionItemRequest request) throws Exception { RequestOperation operation - = new DeletecollectionitemOperation( sdkConfiguration); + = new DeletecollectionitemOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Update Collection * @@ -181,14 +172,12 @@ public EditcollectionRequestBuilder update() { * @return The response from the API call * @throws Exception if the API call fails */ - public EditcollectionResponse update( - EditCollectionRequest request) throws Exception { + public EditcollectionResponse update(EditCollectionRequest request) throws Exception { RequestOperation operation - = new EditcollectionOperation( sdkConfiguration); + = new EditcollectionOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Update Collection item * @@ -209,14 +198,12 @@ public EditcollectionitemRequestBuilder updateItem() { * @return The response from the API call * @throws Exception if the API call fails */ - public EditcollectionitemResponse updateItem( - EditCollectionItemRequest request) throws Exception { + public EditcollectionitemResponse updateItem(EditCollectionItemRequest request) throws Exception { RequestOperation operation - = new EditcollectionitemOperation( sdkConfiguration); + = new EditcollectionitemOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Read Collection * @@ -237,14 +224,12 @@ public GetcollectionRequestBuilder retrieve() { * @return The response from the API call * @throws Exception if the API call fails */ - public GetcollectionResponse retrieve( - GetCollectionRequest request) throws Exception { + public GetcollectionResponse retrieve(GetCollectionRequest request) throws Exception { RequestOperation operation - = new GetcollectionOperation( sdkConfiguration); + = new GetcollectionOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * List Collections * @@ -265,10 +250,9 @@ public ListcollectionsRequestBuilder list() { * @return The response from the API call * @throws Exception if the API call fails */ - public ListcollectionsResponse list( - ListCollectionsRequest request) throws Exception { + public ListcollectionsResponse list(ListCollectionsRequest request) throws Exception { RequestOperation operation - = new ListcollectionsOperation( sdkConfiguration); + = new ListcollectionsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Datasource.java b/src/main/java/com/glean/api_client/glean_api_client/Datasource.java index 0acef9e3..613ede2e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Datasource.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Datasource.java @@ -21,7 +21,6 @@ public class Datasource { Datasource(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Beta: Get datasource status * @@ -46,15 +45,14 @@ public PostApiIndexV1DebugDatasourceStatusRequestBuilder status() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1DebugDatasourceStatusResponse status( - String datasource) throws Exception { + public PostApiIndexV1DebugDatasourceStatusResponse status(String datasource) throws Exception { PostApiIndexV1DebugDatasourceStatusRequest request = PostApiIndexV1DebugDatasourceStatusRequest .builder() .datasource(datasource) .build(); RequestOperation operation - = new PostApiIndexV1DebugDatasourceStatusOperation( sdkConfiguration); + = new PostApiIndexV1DebugDatasourceStatusOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Datasources.java b/src/main/java/com/glean/api_client/glean_api_client/Datasources.java index 7e438565..da93fc3f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Datasources.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Datasources.java @@ -24,7 +24,6 @@ public class Datasources { Datasources(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Add or update datasource * @@ -45,14 +44,12 @@ public PostApiIndexV1AdddatasourceRequestBuilder add() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1AdddatasourceResponse add( - CustomDatasourceConfig request) throws Exception { + public PostApiIndexV1AdddatasourceResponse add(CustomDatasourceConfig request) throws Exception { RequestOperation operation - = new PostApiIndexV1AdddatasourceOperation( sdkConfiguration); + = new PostApiIndexV1AdddatasourceOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Get datasource config * @@ -73,10 +70,9 @@ public PostApiIndexV1GetdatasourceconfigRequestBuilder retrieveConfig() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1GetdatasourceconfigResponse retrieveConfig( - GetDatasourceConfigRequest request) throws Exception { + public PostApiIndexV1GetdatasourceconfigResponse retrieveConfig(GetDatasourceConfigRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1GetdatasourceconfigOperation( sdkConfiguration); + = new PostApiIndexV1GetdatasourceconfigOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Entities.java b/src/main/java/com/glean/api_client/glean_api_client/Entities.java index ea54fc45..4f1ff3ad 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Entities.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Entities.java @@ -24,7 +24,6 @@ public class Entities { Entities(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * List entities * @@ -45,14 +44,12 @@ public ListentitiesRequestBuilder list() { * @return The response from the API call * @throws Exception if the API call fails */ - public ListentitiesResponse list( - ListEntitiesRequest request) throws Exception { + public ListentitiesResponse list(ListEntitiesRequest request) throws Exception { RequestOperation operation - = new ListentitiesOperation( sdkConfiguration); + = new ListentitiesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Read people * @@ -73,10 +70,9 @@ public PeopleRequestBuilder readPeople() { * @return The response from the API call * @throws Exception if the API call fails */ - public PeopleResponse readPeople( - PeopleRequest request) throws Exception { + public PeopleResponse readPeople(PeopleRequest request) throws Exception { RequestOperation operation - = new PeopleOperation( sdkConfiguration); + = new PeopleOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Glean.java b/src/main/java/com/glean/api_client/glean_api_client/Glean.java index 5522cbcc..34e38899 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Glean.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Glean.java @@ -38,23 +38,27 @@ public class Glean { * SERVERS contains the list of server urls available to the SDK. */ public static final String[] SERVERS = { + "https://{instance}-be.glean.com", }; - private final Client client; + private final Indexing indexing; + public Client client() { return client; } + public Indexing indexing() { return indexing; } - private SDKConfiguration sdkConfiguration; + + private final SDKConfiguration sdkConfiguration; /** * The Builder class allows the configuration of a new instance of the SDK. @@ -152,11 +156,13 @@ public Builder retryConfig(RetryConfig retryConfig) { /** * Enables debug logging for HTTP requests and responses, including JSON body content. - * + *

* Convenience method that calls {@link HTTPClient#enableDebugLogging(boolean)}. * {@link SpeakeasyHTTPClient} honors this setting. If you are using a custom HTTP client, * it is up to the custom client to honor this setting. + *

* + * @param enabled Whether to enable debug logging. * @return The builder instance. */ public Builder enableHTTPDebugLogging(boolean enabled) { @@ -222,8 +228,10 @@ private Glean(SDKConfiguration sdkConfiguration) { this.sdkConfiguration.initialize(); this.client = new Client(sdkConfiguration); this.indexing = new Indexing(sdkConfiguration); - - SdkInitData data = this.sdkConfiguration.hooks().sdkInit(new SdkInitData(this.sdkConfiguration.resolvedServerUrl(), this.sdkConfiguration.client())); + SdkInitData data = this.sdkConfiguration.hooks().sdkInit( + new SdkInitData( + this.sdkConfiguration.resolvedServerUrl(), + this.sdkConfiguration.client())); this.sdkConfiguration.setServerUrl(data.baseUrl()); this.sdkConfiguration.setClient(data.client()); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/IndexingAuthentication.java b/src/main/java/com/glean/api_client/glean_api_client/IndexingAuthentication.java index 813234ef..f25333bb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/IndexingAuthentication.java +++ b/src/main/java/com/glean/api_client/glean_api_client/IndexingAuthentication.java @@ -19,7 +19,6 @@ public class IndexingAuthentication { IndexingAuthentication(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Rotate token * @@ -41,7 +40,7 @@ public PostApiIndexV1RotatetokenRequestBuilder rotateToken() { */ public PostApiIndexV1RotatetokenResponse rotateTokenDirect() throws Exception { RequestlessOperation operation - = new PostApiIndexV1RotatetokenOperation( sdkConfiguration); + = new PostApiIndexV1RotatetokenOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest()); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/IndexingDocuments.java b/src/main/java/com/glean/api_client/glean_api_client/IndexingDocuments.java index 988ae428..de20aed6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/IndexingDocuments.java +++ b/src/main/java/com/glean/api_client/glean_api_client/IndexingDocuments.java @@ -60,7 +60,6 @@ public class IndexingDocuments { IndexingDocuments(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Index document * @@ -81,14 +80,12 @@ public PostApiIndexV1IndexdocumentRequestBuilder addOrUpdate() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1IndexdocumentResponse addOrUpdate( - IndexDocumentRequest request) throws Exception { + public PostApiIndexV1IndexdocumentResponse addOrUpdate(IndexDocumentRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1IndexdocumentOperation( sdkConfiguration); + = new PostApiIndexV1IndexdocumentOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Index documents * @@ -109,14 +106,12 @@ public PostApiIndexV1IndexdocumentsRequestBuilder index() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1IndexdocumentsResponse index( - IndexDocumentsRequest request) throws Exception { + public PostApiIndexV1IndexdocumentsResponse index(IndexDocumentsRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1IndexdocumentsOperation( sdkConfiguration); + = new PostApiIndexV1IndexdocumentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Bulk index documents * @@ -137,14 +132,12 @@ public PostApiIndexV1BulkindexdocumentsRequestBuilder bulkIndex() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1BulkindexdocumentsResponse bulkIndex( - BulkIndexDocumentsRequest request) throws Exception { + public PostApiIndexV1BulkindexdocumentsResponse bulkIndex(BulkIndexDocumentsRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexdocumentsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexdocumentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Schedules the processing of uploaded documents * @@ -207,14 +200,12 @@ public PostApiIndexV1ProcessalldocumentsResponse processAllDirect() throws Excep * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1ProcessalldocumentsResponse processAll( - Optional request) throws Exception { + public PostApiIndexV1ProcessalldocumentsResponse processAll(Optional request) throws Exception { RequestOperation, PostApiIndexV1ProcessalldocumentsResponse> operation - = new PostApiIndexV1ProcessalldocumentsOperation( sdkConfiguration); + = new PostApiIndexV1ProcessalldocumentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete document * @@ -235,14 +226,12 @@ public PostApiIndexV1DeletedocumentRequestBuilder delete() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1DeletedocumentResponse delete( - DeleteDocumentRequest request) throws Exception { + public PostApiIndexV1DeletedocumentResponse delete(DeleteDocumentRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1DeletedocumentOperation( sdkConfiguration); + = new PostApiIndexV1DeletedocumentOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Beta: Get document information * @@ -278,11 +267,10 @@ public PostApiIndexV1DebugDatasourceDocumentResponse debug( .debugDocumentRequest(debugDocumentRequest) .build(); RequestOperation operation - = new PostApiIndexV1DebugDatasourceDocumentOperation( sdkConfiguration); + = new PostApiIndexV1DebugDatasourceDocumentOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Beta: Get information of a batch of documents * @@ -318,11 +306,10 @@ public PostApiIndexV1DebugDatasourceDocumentsResponse debugMany( .debugDocumentsRequest(debugDocumentsRequest) .build(); RequestOperation operation - = new PostApiIndexV1DebugDatasourceDocumentsOperation( sdkConfiguration); + = new PostApiIndexV1DebugDatasourceDocumentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Check document access * @@ -347,14 +334,12 @@ public PostApiIndexV1CheckdocumentaccessRequestBuilder checkAccess() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1CheckdocumentaccessResponse checkAccess( - CheckDocumentAccessRequest request) throws Exception { + public PostApiIndexV1CheckdocumentaccessResponse checkAccess(CheckDocumentAccessRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1CheckdocumentaccessOperation( sdkConfiguration); + = new PostApiIndexV1CheckdocumentaccessOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Get document upload and indexing status * @@ -383,14 +368,12 @@ public PostApiIndexV1GetdocumentstatusRequestBuilder status() { * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated - public PostApiIndexV1GetdocumentstatusResponse status( - GetDocumentStatusRequest request) throws Exception { + public PostApiIndexV1GetdocumentstatusResponse status(GetDocumentStatusRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1GetdocumentstatusOperation( sdkConfiguration); + = new PostApiIndexV1GetdocumentstatusOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Get document count * @@ -419,10 +402,9 @@ public PostApiIndexV1GetdocumentcountRequestBuilder count() { * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated - public PostApiIndexV1GetdocumentcountResponse count( - GetDocumentCountRequest request) throws Exception { + public PostApiIndexV1GetdocumentcountResponse count(GetDocumentCountRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1GetdocumentcountOperation( sdkConfiguration); + = new PostApiIndexV1GetdocumentcountOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/IndexingShortcuts.java b/src/main/java/com/glean/api_client/glean_api_client/IndexingShortcuts.java index 13ada1bd..25f88664 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/IndexingShortcuts.java +++ b/src/main/java/com/glean/api_client/glean_api_client/IndexingShortcuts.java @@ -24,7 +24,6 @@ public class IndexingShortcuts { IndexingShortcuts(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Bulk index external shortcuts * @@ -45,14 +44,12 @@ public PostApiIndexV1BulkindexshortcutsRequestBuilder bulkIndex() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1BulkindexshortcutsResponse bulkIndex( - BulkIndexShortcutsRequest request) throws Exception { + public PostApiIndexV1BulkindexshortcutsResponse bulkIndex(BulkIndexShortcutsRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexshortcutsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexshortcutsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Upload shortcuts * @@ -73,10 +70,9 @@ public PostApiIndexV1UploadshortcutsRequestBuilder upload() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1UploadshortcutsResponse upload( - UploadShortcutsRequest request) throws Exception { + public PostApiIndexV1UploadshortcutsResponse upload(UploadShortcutsRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1UploadshortcutsOperation( sdkConfiguration); + = new PostApiIndexV1UploadshortcutsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Insights.java b/src/main/java/com/glean/api_client/glean_api_client/Insights.java index 20a6a796..cf6b0a0e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Insights.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Insights.java @@ -20,7 +20,6 @@ public class Insights { Insights(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Read insights * @@ -41,10 +40,9 @@ public InsightsRequestBuilder retrieve() { * @return The response from the API call * @throws Exception if the API call fails */ - public InsightsResponse retrieve( - InsightsRequest request) throws Exception { + public InsightsResponse retrieve(InsightsRequest request) throws Exception { RequestOperation operation - = new InsightsOperation( sdkConfiguration); + = new InsightsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Messages.java b/src/main/java/com/glean/api_client/glean_api_client/Messages.java index 395200a5..fea3f5f0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Messages.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Messages.java @@ -20,7 +20,6 @@ public class Messages { Messages(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Read messages * @@ -41,10 +40,9 @@ public MessagesRequestBuilder retrieve() { * @return The response from the API call * @throws Exception if the API call fails */ - public MessagesResponse retrieve( - MessagesRequest request) throws Exception { + public MessagesResponse retrieve(MessagesRequest request) throws Exception { RequestOperation operation - = new MessagesOperation( sdkConfiguration); + = new MessagesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/People.java b/src/main/java/com/glean/api_client/glean_api_client/People.java index 3b368b8e..2262f6f1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/People.java +++ b/src/main/java/com/glean/api_client/glean_api_client/People.java @@ -55,7 +55,6 @@ public class People { People(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Beta: Get user information * @@ -91,11 +90,10 @@ public PostApiIndexV1DebugDatasourceUserResponse debug( .debugUserRequest(debugUserRequest) .build(); RequestOperation operation - = new PostApiIndexV1DebugDatasourceUserOperation( sdkConfiguration); + = new PostApiIndexV1DebugDatasourceUserOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Get user count * @@ -124,14 +122,12 @@ public PostApiIndexV1GetusercountRequestBuilder count() { * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ @Deprecated - public PostApiIndexV1GetusercountResponse count( - GetUserCountRequest request) throws Exception { + public PostApiIndexV1GetusercountResponse count(GetUserCountRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1GetusercountOperation( sdkConfiguration); + = new PostApiIndexV1GetusercountOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Index employee * @@ -152,14 +148,12 @@ public PostApiIndexV1IndexemployeeRequestBuilder index() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1IndexemployeeResponse index( - IndexEmployeeRequest request) throws Exception { + public PostApiIndexV1IndexemployeeResponse index(IndexEmployeeRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1IndexemployeeOperation( sdkConfiguration); + = new PostApiIndexV1IndexemployeeOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Bulk index employees * @@ -180,14 +174,12 @@ public PostApiIndexV1BulkindexemployeesRequestBuilder bulkIndex() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1BulkindexemployeesResponse bulkIndex( - BulkIndexEmployeesRequest request) throws Exception { + public PostApiIndexV1BulkindexemployeesResponse bulkIndex(BulkIndexEmployeesRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexemployeesOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexemployeesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Schedules the processing of uploaded employees and teams * @@ -209,11 +201,10 @@ public PostApiIndexV1ProcessallemployeesandteamsRequestBuilder processAllEmploye */ public PostApiIndexV1ProcessallemployeesandteamsResponse processAllEmployeesAndTeamsDirect() throws Exception { RequestlessOperation operation - = new PostApiIndexV1ProcessallemployeesandteamsOperation( sdkConfiguration); + = new PostApiIndexV1ProcessallemployeesandteamsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest()); } - /** * Delete employee * @@ -234,14 +225,12 @@ public PostApiIndexV1DeleteemployeeRequestBuilder delete() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1DeleteemployeeResponse delete( - DeleteEmployeeRequest request) throws Exception { + public PostApiIndexV1DeleteemployeeResponse delete(DeleteEmployeeRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1DeleteemployeeOperation( sdkConfiguration); + = new PostApiIndexV1DeleteemployeeOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Index team * @@ -262,14 +251,12 @@ public PostApiIndexV1IndexteamRequestBuilder indexTeam() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1IndexteamResponse indexTeam( - IndexTeamRequest request) throws Exception { + public PostApiIndexV1IndexteamResponse indexTeam(IndexTeamRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1IndexteamOperation( sdkConfiguration); + = new PostApiIndexV1IndexteamOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete team * @@ -290,14 +277,12 @@ public PostApiIndexV1DeleteteamRequestBuilder deleteTeam() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1DeleteteamResponse deleteTeam( - DeleteTeamRequest request) throws Exception { + public PostApiIndexV1DeleteteamResponse deleteTeam(DeleteTeamRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1DeleteteamOperation( sdkConfiguration); + = new PostApiIndexV1DeleteteamOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Bulk index teams * @@ -318,10 +303,9 @@ public PostApiIndexV1BulkindexteamsRequestBuilder bulkIndexTeams() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1BulkindexteamsResponse bulkIndexTeams( - BulkIndexTeamsRequest request) throws Exception { + public PostApiIndexV1BulkindexteamsResponse bulkIndexTeams(BulkIndexTeamsRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexteamsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexteamsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Permissions.java b/src/main/java/com/glean/api_client/glean_api_client/Permissions.java index 6cb38702..e993a39c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Permissions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Permissions.java @@ -64,7 +64,6 @@ public class Permissions { Permissions(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Update document permissions * @@ -85,14 +84,12 @@ public PostApiIndexV1UpdatepermissionsRequestBuilder updatePermissions() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1UpdatepermissionsResponse updatePermissions( - UpdatePermissionsRequest request) throws Exception { + public PostApiIndexV1UpdatepermissionsResponse updatePermissions(UpdatePermissionsRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1UpdatepermissionsOperation( sdkConfiguration); + = new PostApiIndexV1UpdatepermissionsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Index user * @@ -113,14 +110,12 @@ public PostApiIndexV1IndexuserRequestBuilder indexUser() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1IndexuserResponse indexUser( - IndexUserRequest request) throws Exception { + public PostApiIndexV1IndexuserResponse indexUser(IndexUserRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1IndexuserOperation( sdkConfiguration); + = new PostApiIndexV1IndexuserOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Bulk index users * @@ -141,14 +136,12 @@ public PostApiIndexV1BulkindexusersRequestBuilder bulkIndexUsers() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1BulkindexusersResponse bulkIndexUsers( - BulkIndexUsersRequest request) throws Exception { + public PostApiIndexV1BulkindexusersResponse bulkIndexUsers(BulkIndexUsersRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexusersOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexusersOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Index group * @@ -169,14 +162,12 @@ public PostApiIndexV1IndexgroupRequestBuilder indexGroup() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1IndexgroupResponse indexGroup( - IndexGroupRequest request) throws Exception { + public PostApiIndexV1IndexgroupResponse indexGroup(IndexGroupRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1IndexgroupOperation( sdkConfiguration); + = new PostApiIndexV1IndexgroupOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Bulk index groups * @@ -197,14 +188,12 @@ public PostApiIndexV1BulkindexgroupsRequestBuilder bulkIndexGroups() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1BulkindexgroupsResponse bulkIndexGroups( - BulkIndexGroupsRequest request) throws Exception { + public PostApiIndexV1BulkindexgroupsResponse bulkIndexGroups(BulkIndexGroupsRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexgroupsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexgroupsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Index membership * @@ -225,14 +214,12 @@ public PostApiIndexV1IndexmembershipRequestBuilder indexMembership() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1IndexmembershipResponse indexMembership( - IndexMembershipRequest request) throws Exception { + public PostApiIndexV1IndexmembershipResponse indexMembership(IndexMembershipRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1IndexmembershipOperation( sdkConfiguration); + = new PostApiIndexV1IndexmembershipOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Bulk index memberships for a group * @@ -253,14 +240,12 @@ public PostApiIndexV1BulkindexmembershipsRequestBuilder bulkIndexMemberships() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1BulkindexmembershipsResponse bulkIndexMemberships( - BulkIndexMembershipsRequest request) throws Exception { + public PostApiIndexV1BulkindexmembershipsResponse bulkIndexMemberships(BulkIndexMembershipsRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexmembershipsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexmembershipsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Schedules the processing of group memberships * @@ -293,14 +278,12 @@ public PostApiIndexV1ProcessallmembershipsResponse processMembershipsDirect() th * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1ProcessallmembershipsResponse processMemberships( - Optional request) throws Exception { + public PostApiIndexV1ProcessallmembershipsResponse processMemberships(Optional request) throws Exception { RequestOperation, PostApiIndexV1ProcessallmembershipsResponse> operation - = new PostApiIndexV1ProcessallmembershipsOperation( sdkConfiguration); + = new PostApiIndexV1ProcessallmembershipsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete user * @@ -321,14 +304,12 @@ public PostApiIndexV1DeleteuserRequestBuilder deleteUser() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1DeleteuserResponse deleteUser( - DeleteUserRequest request) throws Exception { + public PostApiIndexV1DeleteuserResponse deleteUser(DeleteUserRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1DeleteuserOperation( sdkConfiguration); + = new PostApiIndexV1DeleteuserOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete group * @@ -349,14 +330,12 @@ public PostApiIndexV1DeletegroupRequestBuilder deleteGroup() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1DeletegroupResponse deleteGroup( - DeleteGroupRequest request) throws Exception { + public PostApiIndexV1DeletegroupResponse deleteGroup(DeleteGroupRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1DeletegroupOperation( sdkConfiguration); + = new PostApiIndexV1DeletegroupOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete membership * @@ -377,14 +356,12 @@ public PostApiIndexV1DeletemembershipRequestBuilder deleteMembership() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1DeletemembershipResponse deleteMembership( - DeleteMembershipRequest request) throws Exception { + public PostApiIndexV1DeletemembershipResponse deleteMembership(DeleteMembershipRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1DeletemembershipOperation( sdkConfiguration); + = new PostApiIndexV1DeletemembershipOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Beta users * @@ -405,10 +382,9 @@ public PostApiIndexV1BetausersRequestBuilder authorizeBetaUsers() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostApiIndexV1BetausersResponse authorizeBetaUsers( - GreenlistUsersRequest request) throws Exception { + public PostApiIndexV1BetausersResponse authorizeBetaUsers(GreenlistUsersRequest request) throws Exception { RequestOperation operation - = new PostApiIndexV1BetausersOperation( sdkConfiguration); + = new PostApiIndexV1BetausersOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Pins.java b/src/main/java/com/glean/api_client/glean_api_client/Pins.java index b2dd4011..8dba93f3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Pins.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Pins.java @@ -36,7 +36,6 @@ public class Pins { Pins(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Update pin * @@ -57,14 +56,12 @@ public EditpinRequestBuilder update() { * @return The response from the API call * @throws Exception if the API call fails */ - public EditpinResponse update( - EditPinRequest request) throws Exception { + public EditpinResponse update(EditPinRequest request) throws Exception { RequestOperation operation - = new EditpinOperation( sdkConfiguration); + = new EditpinOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Read pin * @@ -85,14 +82,12 @@ public GetpinRequestBuilder retrieve() { * @return The response from the API call * @throws Exception if the API call fails */ - public GetpinResponse retrieve( - GetPinRequest request) throws Exception { + public GetpinResponse retrieve(GetPinRequest request) throws Exception { RequestOperation operation - = new GetpinOperation( sdkConfiguration); + = new GetpinOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * List pins * @@ -113,14 +108,12 @@ public ListpinsRequestBuilder list() { * @return The response from the API call * @throws Exception if the API call fails */ - public ListpinsResponse list( - ListpinsRequest request) throws Exception { + public ListpinsResponse list(ListpinsRequest request) throws Exception { RequestOperation operation - = new ListpinsOperation( sdkConfiguration); + = new ListpinsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Create pin * @@ -141,14 +134,12 @@ public PinRequestBuilder create() { * @return The response from the API call * @throws Exception if the API call fails */ - public PinResponse create( - PinRequest request) throws Exception { + public PinResponse create(PinRequest request) throws Exception { RequestOperation operation - = new PinOperation( sdkConfiguration); + = new PinOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Delete pin * @@ -169,10 +160,9 @@ public UnpinRequestBuilder remove() { * @return The response from the API call * @throws Exception if the API call fails */ - public UnpinResponse remove( - Unpin request) throws Exception { + public UnpinResponse remove(Unpin request) throws Exception { RequestOperation operation - = new UnpinOperation( sdkConfiguration); + = new UnpinOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Policies.java b/src/main/java/com/glean/api_client/glean_api_client/Policies.java index f3df6563..96dd70e7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Policies.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Policies.java @@ -40,7 +40,6 @@ public class Policies { Policies(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Gets specified policy * @@ -85,11 +84,10 @@ public GetpolicyResponse retrieve( .version(version) .build(); RequestOperation operation - = new GetpolicyOperation( sdkConfiguration); + = new GetpolicyOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Updates an existing policy * @@ -121,11 +119,10 @@ public UpdatepolicyResponse update( .updateDlpReportRequest(updateDlpReportRequest) .build(); RequestOperation operation - = new UpdatepolicyOperation( sdkConfiguration); + = new UpdatepolicyOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Lists policies * @@ -169,11 +166,10 @@ public ListpoliciesResponse list( .frequency(frequency) .build(); RequestOperation operation - = new ListpoliciesOperation( sdkConfiguration); + = new ListpoliciesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Creates new policy * @@ -194,14 +190,12 @@ public CreatepolicyRequestBuilder create() { * @return The response from the API call * @throws Exception if the API call fails */ - public CreatepolicyResponse create( - CreateDlpReportRequest request) throws Exception { + public CreatepolicyResponse create(CreateDlpReportRequest request) throws Exception { RequestOperation operation - = new CreatepolicyOperation( sdkConfiguration); + = new CreatepolicyOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Downloads violations CSV for policy * @@ -222,15 +216,14 @@ public DownloadpolicycsvRequestBuilder download() { * @return The response from the API call * @throws Exception if the API call fails */ - public DownloadpolicycsvResponse download( - String id) throws Exception { + public DownloadpolicycsvResponse download(String id) throws Exception { DownloadpolicycsvRequest request = DownloadpolicycsvRequest .builder() .id(id) .build(); RequestOperation operation - = new DownloadpolicycsvOperation( sdkConfiguration); + = new DownloadpolicycsvOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Reports.java b/src/main/java/com/glean/api_client/glean_api_client/Reports.java index 24767f79..a42335fd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Reports.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Reports.java @@ -29,7 +29,6 @@ public class Reports { Reports(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Creates new one-time report * @@ -50,14 +49,12 @@ public CreatereportRequestBuilder create() { * @return The response from the API call * @throws Exception if the API call fails */ - public CreatereportResponse create( - UpdateDlpConfigRequest request) throws Exception { + public CreatereportResponse create(UpdateDlpConfigRequest request) throws Exception { RequestOperation operation - = new CreatereportOperation( sdkConfiguration); + = new CreatereportOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Downloads violations CSV for report * @@ -78,19 +75,17 @@ public DownloadreportcsvRequestBuilder download() { * @return The response from the API call * @throws Exception if the API call fails */ - public DownloadreportcsvResponse download( - String id) throws Exception { + public DownloadreportcsvResponse download(String id) throws Exception { DownloadreportcsvRequest request = DownloadreportcsvRequest .builder() .id(id) .build(); RequestOperation operation - = new DownloadreportcsvOperation( sdkConfiguration); + = new DownloadreportcsvOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Fetches report run status * @@ -111,15 +106,14 @@ public GetreportstatusRequestBuilder status() { * @return The response from the API call * @throws Exception if the API call fails */ - public GetreportstatusResponse status( - String id) throws Exception { + public GetreportstatusResponse status(String id) throws Exception { GetreportstatusRequest request = GetreportstatusRequest .builder() .id(id) .build(); RequestOperation operation - = new GetreportstatusOperation( sdkConfiguration); + = new GetreportstatusOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java index df0a4c60..811bf09f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java +++ b/src/main/java/com/glean/api_client/glean_api_client/SDKConfiguration.java @@ -21,8 +21,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "0.9.0"; - public static final String SDK_VERSION = "0.6.0"; - public static final String GEN_VERSION = "2.651.2"; + public static final String SDK_VERSION = "0.7.0"; + public static final String GEN_VERSION = "2.656.5"; private static final String BASE_PACKAGE = "com.glean.api_client.glean_api_client"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/glean/api_client/glean_api_client/Search.java b/src/main/java/com/glean/api_client/glean_api_client/Search.java index ce1e53a2..eab09550 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Search.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Search.java @@ -35,7 +35,6 @@ public class Search { Search(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Search the index (admin) * @@ -56,14 +55,12 @@ public AdminsearchRequestBuilder queryAsAdmin() { * @return The response from the API call * @throws Exception if the API call fails */ - public AdminsearchResponse queryAsAdmin( - SearchRequest request) throws Exception { + public AdminsearchResponse queryAsAdmin(SearchRequest request) throws Exception { RequestOperation operation - = new AdminsearchOperation( sdkConfiguration); + = new AdminsearchOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Autocomplete * @@ -84,14 +81,12 @@ public AutocompleteRequestBuilder autocomplete() { * @return The response from the API call * @throws Exception if the API call fails */ - public AutocompleteResponse autocomplete( - AutocompleteRequest request) throws Exception { + public AutocompleteResponse autocomplete(AutocompleteRequest request) throws Exception { RequestOperation operation - = new AutocompleteOperation( sdkConfiguration); + = new AutocompleteOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Feed of documents and events * @@ -112,14 +107,12 @@ public FeedRequestBuilder retrieveFeed() { * @return The response from the API call * @throws Exception if the API call fails */ - public FeedResponse retrieveFeed( - FeedRequest request) throws Exception { + public FeedResponse retrieveFeed(FeedRequest request) throws Exception { RequestOperation operation - = new FeedOperation( sdkConfiguration); + = new FeedOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Recommend documents * @@ -140,14 +133,12 @@ public RecommendationsRequestBuilder recommendations() { * @return The response from the API call * @throws Exception if the API call fails */ - public RecommendationsResponse recommendations( - RecommendationsRequest request) throws Exception { + public RecommendationsResponse recommendations(RecommendationsRequest request) throws Exception { RequestOperation operation - = new RecommendationsOperation( sdkConfiguration); + = new RecommendationsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Search * @@ -168,10 +159,9 @@ public SearchRequestBuilder query() { * @return The response from the API call * @throws Exception if the API call fails */ - public SearchResponse query( - SearchRequest request) throws Exception { + public SearchResponse query(SearchRequest request) throws Exception { RequestOperation operation - = new SearchOperation( sdkConfiguration); + = new SearchOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Tools.java b/src/main/java/com/glean/api_client/glean_api_client/Tools.java index d43b63cc..f366953a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Tools.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Tools.java @@ -25,7 +25,6 @@ public class Tools { Tools(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * List available tools * @@ -58,19 +57,17 @@ public GetRestApiV1ToolsListResponse listDirect() throws Exception { * @return The response from the API call * @throws Exception if the API call fails */ - public GetRestApiV1ToolsListResponse list( - Optional> toolNames) throws Exception { + public GetRestApiV1ToolsListResponse list(Optional> toolNames) throws Exception { GetRestApiV1ToolsListRequest request = GetRestApiV1ToolsListRequest .builder() .toolNames(toolNames) .build(); RequestOperation operation - = new GetRestApiV1ToolsListOperation( sdkConfiguration); + = new GetRestApiV1ToolsListOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Execute the specified tool * @@ -91,10 +88,9 @@ public PostRestApiV1ToolsCallRequestBuilder run() { * @return The response from the API call * @throws Exception if the API call fails */ - public PostRestApiV1ToolsCallResponse run( - ToolsCallRequest request) throws Exception { + public PostRestApiV1ToolsCallResponse run(ToolsCallRequest request) throws Exception { RequestOperation operation - = new PostRestApiV1ToolsCallOperation( sdkConfiguration); + = new PostRestApiV1ToolsCallOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Verification.java b/src/main/java/com/glean/api_client/glean_api_client/Verification.java index 117c7f8b..22d5f08a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Verification.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Verification.java @@ -29,7 +29,6 @@ public class Verification { Verification(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Create verification * @@ -50,14 +49,12 @@ public AddverificationreminderRequestBuilder addReminder() { * @return The response from the API call * @throws Exception if the API call fails */ - public AddverificationreminderResponse addReminder( - ReminderRequest request) throws Exception { + public AddverificationreminderResponse addReminder(ReminderRequest request) throws Exception { RequestOperation operation - = new AddverificationreminderOperation( sdkConfiguration); + = new AddverificationreminderOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * List verifications * @@ -90,19 +87,17 @@ public ListverificationsResponse listDirect() throws Exception { * @return The response from the API call * @throws Exception if the API call fails */ - public ListverificationsResponse list( - Optional count) throws Exception { + public ListverificationsResponse list(Optional count) throws Exception { ListverificationsRequest request = ListverificationsRequest .builder() .count(count) .build(); RequestOperation operation - = new ListverificationsOperation( sdkConfiguration); + = new ListverificationsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Update verification * @@ -123,10 +118,9 @@ public VerifyRequestBuilder verify() { * @return The response from the API call * @throws Exception if the API call fails */ - public VerifyResponse verify( - VerifyRequest request) throws Exception { + public VerifyResponse verify(VerifyRequest request) throws Exception { RequestOperation operation - = new VerifyOperation( sdkConfiguration); + = new VerifyOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/Visibilityoverrides.java b/src/main/java/com/glean/api_client/glean_api_client/Visibilityoverrides.java index a11cbb96..bf7fa5ab 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/Visibilityoverrides.java +++ b/src/main/java/com/glean/api_client/glean_api_client/Visibilityoverrides.java @@ -25,7 +25,6 @@ public class Visibilityoverrides { Visibilityoverrides(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; } - /** * Fetches documents visibility * @@ -58,19 +57,17 @@ public GetdocvisibilityResponse listDirect() throws Exception { * @return The response from the API call * @throws Exception if the API call fails */ - public GetdocvisibilityResponse list( - Optional> docIds) throws Exception { + public GetdocvisibilityResponse list(Optional> docIds) throws Exception { GetdocvisibilityRequest request = GetdocvisibilityRequest .builder() .docIds(docIds) .build(); RequestOperation operation - = new GetdocvisibilityOperation( sdkConfiguration); + = new GetdocvisibilityOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } - /** * Hide or unhide docs * @@ -91,10 +88,9 @@ public SetdocvisibilityRequestBuilder create() { * @return The response from the API call * @throws Exception if the API call fails */ - public SetdocvisibilityResponse create( - UpdateDocumentVisibilityOverridesRequest request) throws Exception { + public SetdocvisibilityResponse create(UpdateDocumentVisibilityOverridesRequest request) throws Exception { RequestOperation operation - = new SetdocvisibilityOperation( sdkConfiguration); + = new SetdocvisibilityOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Activity.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Activity.java index 02fea71e..f458438f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Activity.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Activity.java @@ -11,6 +11,7 @@ import java.lang.String; import java.util.List; + public class Activity { @JsonProperty("events") @@ -28,9 +29,10 @@ public List events() { return events; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public Activity withEvents(List events) { Utils.checkNotNull(events, "events"); @@ -38,7 +40,6 @@ public Activity withEvents(List events) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,24 +64,28 @@ public String toString() { return Utils.toString(Activity.class, "events", events); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List events; - + private Builder() { // force use of static builder() method } + public Builder events(List events) { Utils.checkNotNull(events, "events"); this.events = events; return this; } - + public Activity build() { + return new Activity( events); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ActivityEvent.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ActivityEvent.java index 18d75f17..3e8aff4a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ActivityEvent.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ActivityEvent.java @@ -15,8 +15,8 @@ import java.time.OffsetDateTime; import java.util.Optional; -public class ActivityEvent { +public class ActivityEvent { /** * Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. */ @@ -30,6 +30,7 @@ public class ActivityEvent { @JsonProperty("action") private ActivityEventAction action; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("params") private Optional params; @@ -69,7 +70,8 @@ public ActivityEvent( ActivityEventAction action, OffsetDateTime timestamp, String url) { - this(Optional.empty(), action, Optional.empty(), timestamp, url); + this(Optional.empty(), action, Optional.empty(), + timestamp, url); } /** @@ -110,9 +112,10 @@ public String url() { return url; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. @@ -123,6 +126,7 @@ public ActivityEvent withId(String id) { return this; } + /** * Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. */ @@ -147,6 +151,7 @@ public ActivityEvent withParams(ActivityEventParams params) { return this; } + public ActivityEvent withParams(Optional params) { Utils.checkNotNull(params, "params"); this.params = params; @@ -171,7 +176,6 @@ public ActivityEvent withUrl(String url) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -192,11 +196,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - action, - params, - timestamp, - url); + id, action, params, + timestamp, url); } @Override @@ -208,23 +209,25 @@ public String toString() { "timestamp", timestamp, "url", url); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private ActivityEventAction action; - + private Optional params = Optional.empty(); - + private OffsetDateTime timestamp; - + private String url; - + private Builder() { // force use of static builder() method } + /** * Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. */ @@ -243,6 +246,7 @@ public Builder id(Optional id) { return this; } + /** * The type of activity this represents. */ @@ -252,6 +256,7 @@ public Builder action(ActivityEventAction action) { return this; } + public Builder params(ActivityEventParams params) { Utils.checkNotNull(params, "params"); this.params = Optional.ofNullable(params); @@ -264,6 +269,7 @@ public Builder params(Optional params) { return this; } + /** * The ISO 8601 timestamp when the activity began. */ @@ -273,6 +279,7 @@ public Builder timestamp(OffsetDateTime timestamp) { return this; } + /** * The URL of the activity. */ @@ -281,14 +288,13 @@ public Builder url(String url) { this.url = url; return this; } - + public ActivityEvent build() { + return new ActivityEvent( - id, - action, - params, - timestamp, - url); + id, action, params, + timestamp, url); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ActivityEventParams.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ActivityEventParams.java index f258534a..9ee966e8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ActivityEventParams.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ActivityEventParams.java @@ -15,8 +15,8 @@ import java.lang.String; import java.util.Optional; -public class ActivityEventParams { +public class ActivityEventParams { /** * The HTML content of the page body. */ @@ -112,7 +112,9 @@ public ActivityEventParams( } public ActivityEventParams() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -187,9 +189,10 @@ public Optional truncated() { return truncated; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The HTML content of the page body. @@ -200,6 +203,7 @@ public ActivityEventParams withBodyContent(String bodyContent) { return this; } + /** * The HTML content of the page body. */ @@ -218,6 +222,7 @@ public ActivityEventParams withDatasourceInstance(String datasourceInstance) { return this; } + /** * The full datasource instance name inferred from the URL of the event */ @@ -236,6 +241,7 @@ public ActivityEventParams withDatasource(String datasource) { return this; } + /** * The datasource without the instance inferred from the URL of the event */ @@ -254,6 +260,7 @@ public ActivityEventParams withInstanceOnlyName(String instanceOnlyName) { return this; } + /** * The instance only name of the datasource instance, e.g. 1 for jira_1, inferred from the URL of the event */ @@ -272,6 +279,7 @@ public ActivityEventParams withDuration(long duration) { return this; } + /** * Length in seconds of the activity. For VIEWS, this represents the amount the page was visible in the foreground. */ @@ -290,6 +298,7 @@ public ActivityEventParams withQuery(String query) { return this; } + /** * The user's search query associated with a SEARCH. */ @@ -308,6 +317,7 @@ public ActivityEventParams withReferrer(String referrer) { return this; } + /** * The referring URL of the VIEW or SEARCH. */ @@ -326,6 +336,7 @@ public ActivityEventParams withTitle(String title) { return this; } + /** * The page title associated with the URL of the event */ @@ -344,6 +355,7 @@ public ActivityEventParams withTruncated(boolean truncated) { return this; } + /** * Indicates that the parameters are incomplete and more parameters may be sent with the same action+timestamp+URL in the future. This is used for sending the duration when a `VIEW` is finished. */ @@ -353,7 +365,6 @@ public ActivityEventParams withTruncated(Optional truncated) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -378,15 +389,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - bodyContent, - datasourceInstance, - datasource, - instanceOnlyName, - duration, - query, - referrer, - title, - truncated); + bodyContent, datasourceInstance, datasource, + instanceOnlyName, duration, query, + referrer, title, truncated); } @Override @@ -402,31 +407,33 @@ public String toString() { "title", title, "truncated", truncated); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional bodyContent = Optional.empty(); - + private Optional datasourceInstance = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional instanceOnlyName = Optional.empty(); - + private Optional duration = Optional.empty(); - + private Optional query = Optional.empty(); - + private Optional referrer = Optional.empty(); - + private Optional title = Optional.empty(); - + private Optional truncated = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The HTML content of the page body. */ @@ -445,6 +452,7 @@ public Builder bodyContent(Optional bodyContent) { return this; } + /** * The full datasource instance name inferred from the URL of the event */ @@ -463,6 +471,7 @@ public Builder datasourceInstance(Optional datasourceInstance) { return this; } + /** * The datasource without the instance inferred from the URL of the event */ @@ -481,6 +490,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * The instance only name of the datasource instance, e.g. 1 for jira_1, inferred from the URL of the event */ @@ -499,6 +509,7 @@ public Builder instanceOnlyName(Optional instanceOnlyName) { return this; } + /** * Length in seconds of the activity. For VIEWS, this represents the amount the page was visible in the foreground. */ @@ -517,6 +528,7 @@ public Builder duration(Optional duration) { return this; } + /** * The user's search query associated with a SEARCH. */ @@ -535,6 +547,7 @@ public Builder query(Optional query) { return this; } + /** * The referring URL of the VIEW or SEARCH. */ @@ -553,6 +566,7 @@ public Builder referrer(Optional referrer) { return this; } + /** * The page title associated with the URL of the event */ @@ -571,6 +585,7 @@ public Builder title(Optional title) { return this; } + /** * Indicates that the parameters are incomplete and more parameters may be sent with the same action+timestamp+URL in the future. This is used for sending the duration when a `VIEW` is finished. */ @@ -588,18 +603,14 @@ public Builder truncated(Optional truncated) { this.truncated = truncated; return this; } - + public ActivityEventParams build() { + return new ActivityEventParams( - bodyContent, - datasourceInstance, - datasource, - instanceOnlyName, - duration, - query, - referrer, - title, - truncated); + bodyContent, datasourceInstance, datasource, + instanceOnlyName, duration, query, + referrer, title, truncated); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsError.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsError.java index 44c22071..c829038f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsError.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsError.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class AddCollectionItemsError { @JsonInclude(Include.NON_ABSENT) @@ -37,9 +38,10 @@ public Optional errorType() { return (Optional) errorType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AddCollectionItemsError withErrorType(AddCollectionItemsErrorErrorType errorType) { Utils.checkNotNull(errorType, "errorType"); @@ -47,13 +49,13 @@ public AddCollectionItemsError withErrorType(AddCollectionItemsErrorErrorType er return this; } + public AddCollectionItemsError withErrorType(Optional errorType) { Utils.checkNotNull(errorType, "errorType"); this.errorType = errorType; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -78,15 +80,17 @@ public String toString() { return Utils.toString(AddCollectionItemsError.class, "errorType", errorType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional errorType = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder errorType(AddCollectionItemsErrorErrorType errorType) { Utils.checkNotNull(errorType, "errorType"); this.errorType = Optional.ofNullable(errorType); @@ -98,10 +102,12 @@ public Builder errorType(Optional er this.errorType = errorType; return this; } - + public AddCollectionItemsError build() { + return new AddCollectionItemsError( errorType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsRequest.java index b2c6dc97..ed5cfbf7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AddCollectionItemsRequest.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class AddCollectionItemsRequest { +public class AddCollectionItemsRequest { /** * The ID of the Collection to add items to. */ @@ -63,9 +63,10 @@ public Optional> addedCollectionItemDescriptors() return (Optional>) addedCollectionItemDescriptors; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the Collection to add items to. @@ -85,6 +86,7 @@ public AddCollectionItemsRequest withAddedCollectionItemDescriptors(List> addedCollectionItemDescriptors = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ID of the Collection to add items to. */ @@ -142,6 +144,7 @@ public Builder collectionId(double collectionId) { return this; } + /** * The CollectionItemDescriptors of the items being added. */ @@ -159,11 +162,12 @@ public Builder addedCollectionItemDescriptors(Optional collection; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private Optional error; @@ -50,9 +52,10 @@ public Optional error() { return (Optional) error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AddCollectionItemsResponse withCollection(Collection collection) { Utils.checkNotNull(collection, "collection"); @@ -60,6 +63,7 @@ public AddCollectionItemsResponse withCollection(Collection collection) { return this; } + public AddCollectionItemsResponse withCollection(Optional collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; @@ -72,13 +76,13 @@ public AddCollectionItemsResponse withError(AddCollectionItemsError error) { return this; } + public AddCollectionItemsResponse withError(Optional error) { Utils.checkNotNull(error, "error"); this.error = error; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -96,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - collection, - error); + collection, error); } @Override @@ -106,17 +109,19 @@ public String toString() { "collection", collection, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional collection = Optional.empty(); - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder collection(Collection collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -129,6 +134,7 @@ public Builder collection(Optional collection) { return this; } + public Builder error(AddCollectionItemsError error) { Utils.checkNotNull(error, "error"); this.error = Optional.ofNullable(error); @@ -140,11 +146,12 @@ public Builder error(Optional error) { this.error = error; return this; } - + public AddCollectionItemsResponse build() { + return new AddCollectionItemsResponse( - collection, - error); + collection, error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AdditionalFieldDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AdditionalFieldDefinition.java index afcddf29..57882d76 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AdditionalFieldDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AdditionalFieldDefinition.java @@ -21,7 +21,6 @@ *

Additional information about the employee or team. */ public class AdditionalFieldDefinition { - /** * Key to reference this field, e.g. "languages". Note that the key should be all lowercase alphabetic characters with no numbers, spaces, hyphens or underscores. */ @@ -95,9 +94,10 @@ public Optional> value() { return (Optional>) value; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Key to reference this field, e.g. "languages". Note that the key should be all lowercase alphabetic characters with no numbers, spaces, hyphens or underscores. @@ -108,6 +108,7 @@ public AdditionalFieldDefinition withKey(String key) { return this; } + /** * Key to reference this field, e.g. "languages". Note that the key should be all lowercase alphabetic characters with no numbers, spaces, hyphens or underscores. */ @@ -140,6 +141,7 @@ public AdditionalFieldDefinition withValue(List value) { return this; } + /** * List of type string or HypertextField. * @@ -163,7 +165,6 @@ public AdditionalFieldDefinition withValue(Optional> value return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -181,8 +182,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - key, - value); + key, value); } @Override @@ -191,17 +191,19 @@ public String toString() { "key", key, "value", value); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional key = Optional.empty(); - + private Optional> value = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Key to reference this field, e.g. "languages". Note that the key should be all lowercase alphabetic characters with no numbers, spaces, hyphens or underscores. */ @@ -220,6 +222,7 @@ public Builder key(Optional key) { return this; } + /** * List of type string or HypertextField. * @@ -265,11 +268,12 @@ public Builder value(Optional> value) { this.value = value; return this; } - + public AdditionalFieldDefinition build() { + return new AdditionalFieldDefinition( - key, - value); + key, value); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Agent.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Agent.java index a5d518d7..9a0ee4c9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Agent.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Agent.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class Agent { +public class Agent { /** * The ID of the agent. */ @@ -74,7 +74,8 @@ public Agent( String agentId, String name, AgentCapabilities capabilities) { - this(agentId, name, Optional.empty(), Optional.empty(), capabilities); + this(agentId, name, Optional.empty(), + Optional.empty(), capabilities); } /** @@ -121,9 +122,10 @@ public AgentCapabilities capabilities() { return capabilities; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the agent. @@ -152,6 +154,7 @@ public Agent withDescription(String description) { return this; } + /** * The description of the agent. */ @@ -170,6 +173,7 @@ public Agent withMetadata(AgentMetadata metadata) { return this; } + /** * The agent metadata. Currently not implemented. */ @@ -191,7 +195,6 @@ public Agent withCapabilities(AgentCapabilities capabilities) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -212,11 +215,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - agentId, - name, - description, - metadata, - capabilities); + agentId, name, description, + metadata, capabilities); } @Override @@ -228,23 +228,25 @@ public String toString() { "metadata", metadata, "capabilities", capabilities); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String agentId; - + private String name; - + private Optional description = Optional.empty(); - + private Optional metadata = Optional.empty(); - + private AgentCapabilities capabilities; - + private Builder() { // force use of static builder() method } + /** * The ID of the agent. */ @@ -254,6 +256,7 @@ public Builder agentId(String agentId) { return this; } + /** * The name of the agent */ @@ -263,6 +266,7 @@ public Builder name(String name) { return this; } + /** * The description of the agent. */ @@ -281,6 +285,7 @@ public Builder description(Optional description) { return this; } + /** * The agent metadata. Currently not implemented. */ @@ -299,6 +304,7 @@ public Builder metadata(Optional metadata) { return this; } + /** * Describes features that the agent supports. example: { * "ap.io.messages": true, @@ -310,14 +316,13 @@ public Builder capabilities(AgentCapabilities capabilities) { this.capabilities = capabilities; return this; } - + public Agent build() { + return new Agent( - agentId, - name, - description, - metadata, - capabilities); + agentId, name, description, + metadata, capabilities); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentCapabilities.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentCapabilities.java index ae460ccc..2407d09d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentCapabilities.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentCapabilities.java @@ -28,7 +28,6 @@ * } */ public class AgentCapabilities { - /** * Whether the agent supports messages as an input. If true, you'll pass `messages` as an input when running the agent. */ @@ -43,6 +42,7 @@ public class AgentCapabilities { @JsonProperty("ap.io.streaming") private Optional apIoStreaming; + @JsonIgnore private Map additionalProperties; @@ -82,9 +82,10 @@ public Map additionalProperties() { return additionalProperties; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Whether the agent supports messages as an input. If true, you'll pass `messages` as an input when running the agent. @@ -95,6 +96,7 @@ public AgentCapabilities withApIoMessages(boolean apIoMessages) { return this; } + /** * Whether the agent supports messages as an input. If true, you'll pass `messages` as an input when running the agent. */ @@ -113,6 +115,7 @@ public AgentCapabilities withApIoStreaming(boolean apIoStreaming) { return this; } + /** * Whether the agent supports streaming output. If true, you you can stream agent ouput. All agents currently support streaming. */ @@ -128,15 +131,13 @@ public AgentCapabilities withAdditionalProperty(String key, Object value) { Utils.checkNotNull(key, "key"); additionalProperties.put(key, value); return this; - } - + } public AgentCapabilities withAdditionalProperties(Map additionalProperties) { Utils.checkNotNull(additionalProperties, "additionalProperties"); this.additionalProperties = additionalProperties; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -155,9 +156,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - apIoMessages, - apIoStreaming, - additionalProperties); + apIoMessages, apIoStreaming, additionalProperties); } @Override @@ -167,19 +166,21 @@ public String toString() { "apIoStreaming", apIoStreaming, "additionalProperties", additionalProperties); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional apIoMessages = Optional.empty(); - + private Optional apIoStreaming = Optional.empty(); - + private Map additionalProperties = new HashMap<>(); - + private Builder() { // force use of static builder() method } + /** * Whether the agent supports messages as an input. If true, you'll pass `messages` as an input when running the agent. */ @@ -198,6 +199,7 @@ public Builder apIoMessages(Optional apIoMessages) { return this; } + /** * Whether the agent supports streaming output. If true, you you can stream agent ouput. All agents currently support streaming. */ @@ -231,12 +233,13 @@ public Builder additionalProperties(Map additionalProperties) { this.additionalProperties = additionalProperties; return this; } - + public AgentCapabilities build() { + return new AgentCapabilities( - apIoMessages, - apIoStreaming) + apIoMessages, apIoStreaming) .withAdditionalProperties(additionalProperties); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentConfig.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentConfig.java index 60266380..014c6d8c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentConfig.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentConfig.java @@ -20,7 +20,6 @@ *

Describes the agent that executes the request. */ public class AgentConfig { - /** * Name of the agent. */ @@ -67,9 +66,10 @@ public Optional mode() { return (Optional) mode; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Name of the agent. @@ -80,6 +80,7 @@ public AgentConfig withAgent(AgentEnum agent) { return this; } + /** * Name of the agent. */ @@ -98,6 +99,7 @@ public AgentConfig withMode(Mode mode) { return this; } + /** * Top level modes to run GleanChat in. */ @@ -107,7 +109,6 @@ public AgentConfig withMode(Optional mode) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -125,8 +126,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - agent, - mode); + agent, mode); } @Override @@ -135,17 +135,19 @@ public String toString() { "agent", agent, "mode", mode); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional agent = Optional.empty(); - + private Optional mode = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Name of the agent. */ @@ -164,6 +166,7 @@ public Builder agent(Optional agent) { return this; } + /** * Top level modes to run GleanChat in. */ @@ -181,11 +184,12 @@ public Builder mode(Optional mode) { this.mode = mode; return this; } - + public AgentConfig build() { + return new AgentConfig( - agent, - mode); + agent, mode); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentMetadata.java index 8b56e85b..7aa84c02 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentMetadata.java @@ -14,18 +14,15 @@ *

The agent metadata. Currently not implemented. */ public class AgentMetadata { - @JsonCreator public AgentMetadata() { - - } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -47,16 +44,19 @@ public int hashCode() { public String toString() { return Utils.toString(AgentMetadata.class); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Builder() { // force use of static builder() method } - + public AgentMetadata build() { + return new AgentMetadata( ); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRun.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRun.java index 2792a2fd..408a1924 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRun.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRun.java @@ -23,7 +23,6 @@ *

Payload for creating a run. */ public class AgentRun { - /** * The ID of the agent to run. */ @@ -79,7 +78,8 @@ public AgentRun( public AgentRun( String agentId) { - this(agentId, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(agentId, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -126,9 +126,10 @@ public Optional status() { return (Optional) status; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the agent to run. @@ -148,6 +149,7 @@ public AgentRun withInput(Map input) { return this; } + /** * The input to the agent. */ @@ -166,6 +168,7 @@ public AgentRun withMessages(List messages) { return this; } + /** * The messages to pass an input to the agent. */ @@ -184,6 +187,7 @@ public AgentRun withMetadata(Map metadata) { return this; } + /** * The metadata to pass to the agent. */ @@ -202,6 +206,7 @@ public AgentRun withStatus(AgentExecutionStatus status) { return this; } + /** * The status of the run. One of 'error', 'success'. */ @@ -211,7 +216,6 @@ public AgentRun withStatus(Optional status) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -232,11 +236,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - agentId, - input, - messages, - metadata, - status); + agentId, input, messages, + metadata, status); } @Override @@ -248,23 +249,25 @@ public String toString() { "metadata", metadata, "status", status); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String agentId; - + private Optional> input = Optional.empty(); - + private Optional> messages = Optional.empty(); - + private Optional> metadata = Optional.empty(); - + private Optional status = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ID of the agent to run. */ @@ -274,6 +277,7 @@ public Builder agentId(String agentId) { return this; } + /** * The input to the agent. */ @@ -292,6 +296,7 @@ public Builder input(Optional> input) { return this; } + /** * The messages to pass an input to the agent. */ @@ -310,6 +315,7 @@ public Builder messages(Optional> messages) { return this; } + /** * The metadata to pass to the agent. */ @@ -328,6 +334,7 @@ public Builder metadata(Optional> metadata) { return this; } + /** * The status of the run. One of 'error', 'success'. */ @@ -345,14 +352,13 @@ public Builder status(Optional status) { this.status = status; return this; } - + public AgentRun build() { + return new AgentRun( - agentId, - input, - messages, - metadata, - status); + agentId, input, messages, + metadata, status); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRunCreate.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRunCreate.java index 8c95168f..71b12e98 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRunCreate.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRunCreate.java @@ -23,7 +23,6 @@ *

Payload for creating a run. */ public class AgentRunCreate { - /** * The ID of the agent to run. */ @@ -69,7 +68,8 @@ public AgentRunCreate( public AgentRunCreate( String agentId) { - this(agentId, Optional.empty(), Optional.empty(), Optional.empty()); + this(agentId, Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -107,9 +107,10 @@ public Optional> metadata() { return (Optional>) metadata; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the agent to run. @@ -129,6 +130,7 @@ public AgentRunCreate withInput(Map input) { return this; } + /** * The input to the agent. */ @@ -147,6 +149,7 @@ public AgentRunCreate withMessages(List messages) { return this; } + /** * The messages to pass an input to the agent. */ @@ -165,6 +168,7 @@ public AgentRunCreate withMetadata(Map metadata) { return this; } + /** * The metadata to pass to the agent. */ @@ -174,7 +178,6 @@ public AgentRunCreate withMetadata(Optional> metad return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -194,9 +197,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - agentId, - input, - messages, + agentId, input, messages, metadata); } @@ -208,21 +209,23 @@ public String toString() { "messages", messages, "metadata", metadata); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String agentId; - + private Optional> input = Optional.empty(); - + private Optional> messages = Optional.empty(); - + private Optional> metadata = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ID of the agent to run. */ @@ -232,6 +235,7 @@ public Builder agentId(String agentId) { return this; } + /** * The input to the agent. */ @@ -250,6 +254,7 @@ public Builder input(Optional> input) { return this; } + /** * The messages to pass an input to the agent. */ @@ -268,6 +273,7 @@ public Builder messages(Optional> messages) { return this; } + /** * The metadata to pass to the agent. */ @@ -285,13 +291,13 @@ public Builder metadata(Optional> metadata) { this.metadata = metadata; return this; } - + public AgentRunCreate build() { + return new AgentRunCreate( - agentId, - input, - messages, + agentId, input, messages, metadata); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRunWaitResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRunWaitResponse.java index af33c651..d66b0244 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRunWaitResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentRunWaitResponse.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class AgentRunWaitResponse { @JsonInclude(Include.NON_ABSENT) @@ -57,9 +58,10 @@ public Optional> messages() { return (Optional>) messages; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AgentRunWaitResponse withRun(AgentRun run) { Utils.checkNotNull(run, "run"); @@ -67,6 +69,7 @@ public AgentRunWaitResponse withRun(AgentRun run) { return this; } + public AgentRunWaitResponse withRun(Optional run) { Utils.checkNotNull(run, "run"); this.run = run; @@ -82,6 +85,7 @@ public AgentRunWaitResponse withMessages(List messages) { return this; } + /** * The messages returned by the run. */ @@ -91,7 +95,6 @@ public AgentRunWaitResponse withMessages(Optional> messa return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -109,8 +112,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - run, - messages); + run, messages); } @Override @@ -119,17 +121,19 @@ public String toString() { "run", run, "messages", messages); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional run = Optional.empty(); - + private Optional> messages = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder run(AgentRun run) { Utils.checkNotNull(run, "run"); this.run = Optional.ofNullable(run); @@ -142,6 +146,7 @@ public Builder run(Optional run) { return this; } + /** * The messages returned by the run. */ @@ -159,11 +164,12 @@ public Builder messages(Optional> messages) { this.messages = messages; return this; } - + public AgentRunWaitResponse build() { + return new AgentRunWaitResponse( - run, - messages); + run, messages); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentSchemas.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentSchemas.java index e6688e33..a30e4123 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentSchemas.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AgentSchemas.java @@ -16,7 +16,6 @@ *

Defines the structure and properties of an agent. */ public class AgentSchemas { - /** * The ID of the agent. */ @@ -72,9 +71,10 @@ public OutputSchema outputSchema() { return outputSchema; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the agent. @@ -103,7 +103,6 @@ public AgentSchemas withOutputSchema(OutputSchema outputSchema) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -122,9 +121,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - agentId, - inputSchema, - outputSchema); + agentId, inputSchema, outputSchema); } @Override @@ -134,19 +131,21 @@ public String toString() { "inputSchema", inputSchema, "outputSchema", outputSchema); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String agentId; - + private InputSchema inputSchema; - + private OutputSchema outputSchema; - + private Builder() { // force use of static builder() method } + /** * The ID of the agent. */ @@ -156,6 +155,7 @@ public Builder agentId(String agentId) { return this; } + /** * The schema for the agent input. In JSON Schema format. */ @@ -165,6 +165,7 @@ public Builder inputSchema(InputSchema inputSchema) { return this; } + /** * The schema for the agent output. In JSON Schema format. */ @@ -173,12 +174,12 @@ public Builder outputSchema(OutputSchema outputSchema) { this.outputSchema = outputSchema; return this; } - + public AgentSchemas build() { + return new AgentSchemas( - agentId, - inputSchema, - outputSchema); + agentId, inputSchema, outputSchema); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AiAppActionCounts.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AiAppActionCounts.java index 6ee5850d..9432b5d1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AiAppActionCounts.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AiAppActionCounts.java @@ -24,7 +24,6 @@ *

Map from action to frequency. */ public class AiAppActionCounts { - /** * Total number of Slackbot responses, both proactive and reactive. */ @@ -67,6 +66,7 @@ public class AiAppActionCounts { @JsonProperty("totalDownvotes") private Optional totalDownvotes; + @JsonIgnore private Map additionalProperties; @@ -94,7 +94,8 @@ public AiAppActionCounts( } public AiAppActionCounts() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -150,9 +151,10 @@ public Map additionalProperties() { return additionalProperties; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Total number of Slackbot responses, both proactive and reactive. @@ -163,6 +165,7 @@ public AiAppActionCounts withTotalSlackbotResponses(long totalSlackbotResponses) return this; } + /** * Total number of Slackbot responses, both proactive and reactive. */ @@ -181,6 +184,7 @@ public AiAppActionCounts withTotalSlackbotResponsesShared(long totalSlackbotResp return this; } + /** * Total number of Slackbot responses shared publicly (upvoted). */ @@ -199,6 +203,7 @@ public AiAppActionCounts withTotalSlackbotResponsesNotHelpful(long totalSlackbot return this; } + /** * Total number of Slackbot responses rejected as not helpful (downvoted). */ @@ -217,6 +222,7 @@ public AiAppActionCounts withTotalChatMessages(long totalChatMessages) { return this; } + /** * Total number of Chat messages sent in requested period. */ @@ -235,6 +241,7 @@ public AiAppActionCounts withTotalUpvotes(long totalUpvotes) { return this; } + /** * Total number of Chat messages which received upvotes by the user. */ @@ -253,6 +260,7 @@ public AiAppActionCounts withTotalDownvotes(long totalDownvotes) { return this; } + /** * Total number of Chat messages which received downvotes by the user. */ @@ -268,15 +276,13 @@ public AiAppActionCounts withAdditionalProperty(String key, long value) { Utils.checkNotNull(key, "key"); additionalProperties.put(key, value); return this; - } - + } public AiAppActionCounts withAdditionalProperties(Map additionalProperties) { Utils.checkNotNull(additionalProperties, "additionalProperties"); this.additionalProperties = additionalProperties; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -299,12 +305,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - totalSlackbotResponses, - totalSlackbotResponsesShared, - totalSlackbotResponsesNotHelpful, - totalChatMessages, - totalUpvotes, - totalDownvotes, + totalSlackbotResponses, totalSlackbotResponsesShared, totalSlackbotResponsesNotHelpful, + totalChatMessages, totalUpvotes, totalDownvotes, additionalProperties); } @@ -319,27 +321,29 @@ public String toString() { "totalDownvotes", totalDownvotes, "additionalProperties", additionalProperties); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional totalSlackbotResponses = Optional.empty(); - + private Optional totalSlackbotResponsesShared = Optional.empty(); - + private Optional totalSlackbotResponsesNotHelpful = Optional.empty(); - + private Optional totalChatMessages = Optional.empty(); - + private Optional totalUpvotes = Optional.empty(); - + private Optional totalDownvotes = Optional.empty(); - + private Map additionalProperties = new HashMap<>(); - + private Builder() { // force use of static builder() method } + /** * Total number of Slackbot responses, both proactive and reactive. */ @@ -358,6 +362,7 @@ public Builder totalSlackbotResponses(Optional totalSlackbotResponses) { return this; } + /** * Total number of Slackbot responses shared publicly (upvoted). */ @@ -376,6 +381,7 @@ public Builder totalSlackbotResponsesShared(Optional totalSlackbotResponse return this; } + /** * Total number of Slackbot responses rejected as not helpful (downvoted). */ @@ -394,6 +400,7 @@ public Builder totalSlackbotResponsesNotHelpful(Optional totalSlackbotResp return this; } + /** * Total number of Chat messages sent in requested period. */ @@ -412,6 +419,7 @@ public Builder totalChatMessages(Optional totalChatMessages) { return this; } + /** * Total number of Chat messages which received upvotes by the user. */ @@ -430,6 +438,7 @@ public Builder totalUpvotes(Optional totalUpvotes) { return this; } + /** * Total number of Chat messages which received downvotes by the user. */ @@ -463,16 +472,14 @@ public Builder additionalProperties(Map additionalProperties) { this.additionalProperties = additionalProperties; return this; } - + public AiAppActionCounts build() { + return new AiAppActionCounts( - totalSlackbotResponses, - totalSlackbotResponsesShared, - totalSlackbotResponsesNotHelpful, - totalChatMessages, - totalUpvotes, - totalDownvotes) + totalSlackbotResponses, totalSlackbotResponsesShared, totalSlackbotResponsesNotHelpful, + totalChatMessages, totalUpvotes, totalDownvotes) .withAdditionalProperties(additionalProperties); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AiAppsInsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AiAppsInsightsResponse.java index 1799441a..ffeb6b64 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AiAppsInsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AiAppsInsightsResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class AiAppsInsightsResponse { +public class AiAppsInsightsResponse { /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -25,6 +25,7 @@ public class AiAppsInsightsResponse { @JsonProperty("lastLogTimestamp") private Optional lastLogTimestamp; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("aiAppInsights") private Optional> aiAppInsights; @@ -70,7 +71,8 @@ public AiAppsInsightsResponse( } public AiAppsInsightsResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -113,9 +115,10 @@ public Optional> departments() { return (Optional>) departments; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). @@ -126,6 +129,7 @@ public AiAppsInsightsResponse withLastLogTimestamp(long lastLogTimestamp) { return this; } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -141,6 +145,7 @@ public AiAppsInsightsResponse withAiAppInsights(List aiAppI return this; } + public AiAppsInsightsResponse withAiAppInsights(Optional> aiAppInsights) { Utils.checkNotNull(aiAppInsights, "aiAppInsights"); this.aiAppInsights = aiAppInsights; @@ -156,6 +161,7 @@ public AiAppsInsightsResponse withTotalActiveUsers(long totalActiveUsers) { return this; } + /** * Total number of active users on the Ai App in the requested period. */ @@ -174,6 +180,7 @@ public AiAppsInsightsResponse withActionCounts(AiAppActionCounts actionCounts) { return this; } + /** * Map from action to frequency. */ @@ -192,6 +199,7 @@ public AiAppsInsightsResponse withDepartments(List departments) { return this; } + /** * list of departments applicable for users tab. */ @@ -201,7 +209,6 @@ public AiAppsInsightsResponse withDepartments(Optional> d return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -222,11 +229,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - lastLogTimestamp, - aiAppInsights, - totalActiveUsers, - actionCounts, - departments); + lastLogTimestamp, aiAppInsights, totalActiveUsers, + actionCounts, departments); } @Override @@ -238,23 +242,25 @@ public String toString() { "actionCounts", actionCounts, "departments", departments); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional lastLogTimestamp = Optional.empty(); - + private Optional> aiAppInsights = Optional.empty(); - + private Optional totalActiveUsers = Optional.empty(); - + private Optional actionCounts = Optional.empty(); - + private Optional> departments = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -273,6 +279,7 @@ public Builder lastLogTimestamp(Optional lastLogTimestamp) { return this; } + public Builder aiAppInsights(List aiAppInsights) { Utils.checkNotNull(aiAppInsights, "aiAppInsights"); this.aiAppInsights = Optional.ofNullable(aiAppInsights); @@ -285,6 +292,7 @@ public Builder aiAppInsights(Optional> aiApp return this; } + /** * Total number of active users on the Ai App in the requested period. */ @@ -303,6 +311,7 @@ public Builder totalActiveUsers(Optional totalActiveUsers) { return this; } + /** * Map from action to frequency. */ @@ -321,6 +330,7 @@ public Builder actionCounts(Optional actionCounts) return this; } + /** * list of departments applicable for users tab. */ @@ -338,14 +348,13 @@ public Builder departments(Optional> departments) { this.departments = departments; return this; } - + public AiAppsInsightsResponse build() { + return new AiAppsInsightsResponse( - lastLogTimestamp, - aiAppInsights, - totalActiveUsers, - actionCounts, - departments); + lastLogTimestamp, aiAppInsights, totalActiveUsers, + actionCounts, departments); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AiInsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AiInsightsResponse.java index d0e93d32..852431ae 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AiInsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AiInsightsResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class AiInsightsResponse { +public class AiInsightsResponse { /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -25,6 +25,7 @@ public class AiInsightsResponse { @JsonProperty("lastLogTimestamp") private Optional lastLogTimestamp; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("assistantInsights") private Optional> assistantInsights; @@ -140,7 +141,10 @@ public AiInsightsResponse( } public AiInsightsResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -238,9 +242,10 @@ public Optional> departments() { return (Optional>) departments; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). @@ -251,6 +256,7 @@ public AiInsightsResponse withLastLogTimestamp(long lastLogTimestamp) { return this; } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -266,6 +272,7 @@ public AiInsightsResponse withAssistantInsights(List assist return this; } + public AiInsightsResponse withAssistantInsights(Optional> assistantInsights) { Utils.checkNotNull(assistantInsights, "assistantInsights"); this.assistantInsights = assistantInsights; @@ -281,6 +288,7 @@ public AiInsightsResponse withTotalActiveAssistantUsers(long totalActiveAssistan return this; } + /** * Total number of Active Assistant users (chat, summary, AIA) in requested period. */ @@ -299,6 +307,7 @@ public AiInsightsResponse withTotalChatMessages(long totalChatMessages) { return this; } + /** * Total number of Chat messages sent in requested period. */ @@ -317,6 +326,7 @@ public AiInsightsResponse withTotalAiSummarizations(long totalAiSummarizations) return this; } + /** * Total number of AI Document Summarizations invoked in the requested period. */ @@ -335,6 +345,7 @@ public AiInsightsResponse withTotalAiAnswers(long totalAiAnswers) { return this; } + /** * Total number of AI Answers generated in the requested period. */ @@ -353,6 +364,7 @@ public AiInsightsResponse withTotalUpvotes(long totalUpvotes) { return this; } + /** * Total number of Chat messages which received upvotes by the user. */ @@ -371,6 +383,7 @@ public AiInsightsResponse withTotalDownvotes(long totalDownvotes) { return this; } + /** * Total number of Chat messages which received downvotes by the user. */ @@ -389,6 +402,7 @@ public AiInsightsResponse withTotalGleanbotResponses(long totalGleanbotResponses return this; } + /** * Total number of Gleanbot responses, both proactive and reactive. */ @@ -407,6 +421,7 @@ public AiInsightsResponse withTotalGleanbotResponsesShared(long totalGleanbotRes return this; } + /** * Total number of Gleanbot responses shared publicly (upvoted). */ @@ -425,6 +440,7 @@ public AiInsightsResponse withTotalGleanbotResponsesNotHelpful(long totalGleanbo return this; } + /** * Total number of Glean responses rejected as not helpful (downvoted). */ @@ -443,6 +459,7 @@ public AiInsightsResponse withDepartments(List departments) { return this; } + /** * list of departments applicable for users tab. */ @@ -452,7 +469,6 @@ public AiInsightsResponse withDepartments(Optional> depar return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -480,18 +496,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - lastLogTimestamp, - assistantInsights, - totalActiveAssistantUsers, - totalChatMessages, - totalAiSummarizations, - totalAiAnswers, - totalUpvotes, - totalDownvotes, - totalGleanbotResponses, - totalGleanbotResponsesShared, - totalGleanbotResponsesNotHelpful, - departments); + lastLogTimestamp, assistantInsights, totalActiveAssistantUsers, + totalChatMessages, totalAiSummarizations, totalAiAnswers, + totalUpvotes, totalDownvotes, totalGleanbotResponses, + totalGleanbotResponsesShared, totalGleanbotResponsesNotHelpful, departments); } @Override @@ -510,37 +518,39 @@ public String toString() { "totalGleanbotResponsesNotHelpful", totalGleanbotResponsesNotHelpful, "departments", departments); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional lastLogTimestamp = Optional.empty(); - + private Optional> assistantInsights = Optional.empty(); - + private Optional totalActiveAssistantUsers = Optional.empty(); - + private Optional totalChatMessages = Optional.empty(); - + private Optional totalAiSummarizations = Optional.empty(); - + private Optional totalAiAnswers = Optional.empty(); - + private Optional totalUpvotes = Optional.empty(); - + private Optional totalDownvotes = Optional.empty(); - + private Optional totalGleanbotResponses = Optional.empty(); - + private Optional totalGleanbotResponsesShared = Optional.empty(); - + private Optional totalGleanbotResponsesNotHelpful = Optional.empty(); - + private Optional> departments = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -559,6 +569,7 @@ public Builder lastLogTimestamp(Optional lastLogTimestamp) { return this; } + public Builder assistantInsights(List assistantInsights) { Utils.checkNotNull(assistantInsights, "assistantInsights"); this.assistantInsights = Optional.ofNullable(assistantInsights); @@ -571,6 +582,7 @@ public Builder assistantInsights(Optional> a return this; } + /** * Total number of Active Assistant users (chat, summary, AIA) in requested period. */ @@ -589,6 +601,7 @@ public Builder totalActiveAssistantUsers(Optional totalActiveAssistantUser return this; } + /** * Total number of Chat messages sent in requested period. */ @@ -607,6 +620,7 @@ public Builder totalChatMessages(Optional totalChatMessages) { return this; } + /** * Total number of AI Document Summarizations invoked in the requested period. */ @@ -625,6 +639,7 @@ public Builder totalAiSummarizations(Optional totalAiSummarizations) { return this; } + /** * Total number of AI Answers generated in the requested period. */ @@ -643,6 +658,7 @@ public Builder totalAiAnswers(Optional totalAiAnswers) { return this; } + /** * Total number of Chat messages which received upvotes by the user. */ @@ -661,6 +677,7 @@ public Builder totalUpvotes(Optional totalUpvotes) { return this; } + /** * Total number of Chat messages which received downvotes by the user. */ @@ -679,6 +696,7 @@ public Builder totalDownvotes(Optional totalDownvotes) { return this; } + /** * Total number of Gleanbot responses, both proactive and reactive. */ @@ -697,6 +715,7 @@ public Builder totalGleanbotResponses(Optional totalGleanbotResponses) { return this; } + /** * Total number of Gleanbot responses shared publicly (upvoted). */ @@ -715,6 +734,7 @@ public Builder totalGleanbotResponsesShared(Optional totalGleanbotResponse return this; } + /** * Total number of Glean responses rejected as not helpful (downvoted). */ @@ -733,6 +753,7 @@ public Builder totalGleanbotResponsesNotHelpful(Optional totalGleanbotResp return this; } + /** * list of departments applicable for users tab. */ @@ -750,21 +771,15 @@ public Builder departments(Optional> departments) { this.departments = departments; return this; } - + public AiInsightsResponse build() { + return new AiInsightsResponse( - lastLogTimestamp, - assistantInsights, - totalActiveAssistantUsers, - totalChatMessages, - totalAiSummarizations, - totalAiAnswers, - totalUpvotes, - totalDownvotes, - totalGleanbotResponses, - totalGleanbotResponsesShared, - totalGleanbotResponsesNotHelpful, - departments); + lastLogTimestamp, assistantInsights, totalActiveAssistantUsers, + totalChatMessages, totalAiSummarizations, totalAiAnswers, + totalUpvotes, totalDownvotes, totalGleanbotResponses, + totalGleanbotResponsesShared, totalGleanbotResponsesNotHelpful, departments); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AllowlistOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AllowlistOptions.java index 5b1840e5..3837295d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AllowlistOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AllowlistOptions.java @@ -21,7 +21,6 @@ *

Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. */ public class AllowlistOptions { - /** * list of words and phrases to consider as whitelisted content */ @@ -49,9 +48,10 @@ public Optional> terms() { return (Optional>) terms; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * list of words and phrases to consider as whitelisted content @@ -62,6 +62,7 @@ public AllowlistOptions withTerms(List terms) { return this; } + /** * list of words and phrases to consider as whitelisted content */ @@ -71,7 +72,6 @@ public AllowlistOptions withTerms(Optional> terms) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -96,15 +96,17 @@ public String toString() { return Utils.toString(AllowlistOptions.class, "terms", terms); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> terms = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * list of words and phrases to consider as whitelisted content */ @@ -122,10 +124,12 @@ public Builder terms(Optional> terms) { this.terms = terms; return this; } - + public AllowlistOptions build() { + return new AllowlistOptions( terms); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Announcement.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Announcement.java index 6d62d898..0aaa466f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Announcement.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Announcement.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Optional; -public class Announcement { +public class Announcement { /** * The date and time at which the announcement becomes active. */ @@ -41,6 +41,7 @@ public class Announcement { @JsonProperty("title") private Optional title; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("body") private Optional body; @@ -52,10 +53,12 @@ public class Announcement { @JsonProperty("emoji") private Optional emoji; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("banner") private Optional banner; @@ -116,6 +119,7 @@ public class Announcement { @JsonProperty("draftId") private Optional draftId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; @@ -127,6 +131,7 @@ public class Announcement { @JsonProperty("id") private Optional id; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("author") private Optional author; @@ -145,14 +150,17 @@ public class Announcement { @JsonProperty("lastUpdateTimestamp") private Optional lastUpdateTimestamp; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedBy") private Optional updatedBy; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("viewerInfo") private Optional viewerInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceDocument") private Optional sourceDocument; @@ -241,7 +249,14 @@ public Announcement( } public Announcement() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -423,9 +438,10 @@ public Optional isPublished() { return isPublished; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The date and time at which the announcement becomes active. @@ -436,6 +452,7 @@ public Announcement withStartTime(OffsetDateTime startTime) { return this; } + /** * The date and time at which the announcement becomes active. */ @@ -454,6 +471,7 @@ public Announcement withEndTime(OffsetDateTime endTime) { return this; } + /** * The date and time at which the announcement expires. */ @@ -472,6 +490,7 @@ public Announcement withTitle(String title) { return this; } + /** * The headline of the announcement. */ @@ -487,6 +506,7 @@ public Announcement withBody(StructuredText body) { return this; } + public Announcement withBody(Optional body) { Utils.checkNotNull(body, "body"); this.body = body; @@ -502,6 +522,7 @@ public Announcement withEmoji(String emoji) { return this; } + /** * An emoji used to indicate the nature of the announcement. */ @@ -517,6 +538,7 @@ public Announcement withThumbnail(Thumbnail thumbnail) { return this; } + public Announcement withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -529,6 +551,7 @@ public Announcement withBanner(Thumbnail banner) { return this; } + public Announcement withBanner(Optional banner) { Utils.checkNotNull(banner, "banner"); this.banner = banner; @@ -544,6 +567,7 @@ public Announcement withAudienceFilters(List audienceFilters) { return this; } + /** * Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. */ @@ -562,6 +586,7 @@ public Announcement withSourceDocumentId(String sourceDocumentId) { return this; } + /** * The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). */ @@ -580,6 +605,7 @@ public Announcement withHideAttribution(boolean hideAttribution) { return this; } + /** * Whether or not to hide an author attribution. */ @@ -598,6 +624,7 @@ public Announcement withChannel(AnnouncementChannel channel) { return this; } + /** * This determines whether this is a Social Feed post or a regular announcement. */ @@ -616,6 +643,7 @@ public Announcement withPostType(AnnouncementPostType postType) { return this; } + /** * This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site. */ @@ -634,6 +662,7 @@ public Announcement withIsPrioritized(boolean isPrioritized) { return this; } + /** * Used by the Social Feed to pin posts to the front of the feed. */ @@ -652,6 +681,7 @@ public Announcement withViewUrl(String viewUrl) { return this; } + /** * URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED". */ @@ -670,6 +700,7 @@ public Announcement withDraftId(long draftId) { return this; } + /** * The opaque id of the associated draft. */ @@ -685,6 +716,7 @@ public Announcement withPermissions(ObjectPermissions permissions) { return this; } + public Announcement withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -700,6 +732,7 @@ public Announcement withId(long id) { return this; } + /** * The opaque id of the announcement. */ @@ -715,6 +748,7 @@ public Announcement withAuthor(Person author) { return this; } + public Announcement withAuthor(Optional author) { Utils.checkNotNull(author, "author"); this.author = author; @@ -730,6 +764,7 @@ public Announcement withCreateTimestamp(long createTimestamp) { return this; } + /** * Server Unix timestamp of the creation time (in seconds since epoch UTC). */ @@ -748,6 +783,7 @@ public Announcement withLastUpdateTimestamp(long lastUpdateTimestamp) { return this; } + /** * Server Unix timestamp of the last update time (in seconds since epoch UTC). */ @@ -763,6 +799,7 @@ public Announcement withUpdatedBy(Person updatedBy) { return this; } + public Announcement withUpdatedBy(Optional updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = updatedBy; @@ -775,6 +812,7 @@ public Announcement withViewerInfo(AnnouncementViewerInfo viewerInfo) { return this; } + public Announcement withViewerInfo(Optional viewerInfo) { Utils.checkNotNull(viewerInfo, "viewerInfo"); this.viewerInfo = viewerInfo; @@ -787,6 +825,7 @@ public Announcement withSourceDocument(Document sourceDocument) { return this; } + public Announcement withSourceDocument(Optional sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = sourceDocument; @@ -802,6 +841,7 @@ public Announcement withIsPublished(boolean isPublished) { return this; } + /** * Whether or not the announcement is published. */ @@ -811,7 +851,6 @@ public Announcement withIsPublished(Optional isPublished) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -851,30 +890,14 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - startTime, - endTime, - title, - body, - emoji, - thumbnail, - banner, - audienceFilters, - sourceDocumentId, - hideAttribution, - channel, - postType, - isPrioritized, - viewUrl, - draftId, - permissions, - id, - author, - createTimestamp, - lastUpdateTimestamp, - updatedBy, - viewerInfo, - sourceDocument, - isPublished); + startTime, endTime, title, + body, emoji, thumbnail, + banner, audienceFilters, sourceDocumentId, + hideAttribution, channel, postType, + isPrioritized, viewUrl, draftId, + permissions, id, author, + createTimestamp, lastUpdateTimestamp, updatedBy, + viewerInfo, sourceDocument, isPublished); } @Override @@ -905,61 +928,63 @@ public String toString() { "sourceDocument", sourceDocument, "isPublished", isPublished); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional startTime = Optional.empty(); - + private Optional endTime = Optional.empty(); - + private Optional title = Optional.empty(); - + private Optional body = Optional.empty(); - + private Optional emoji = Optional.empty(); - + private Optional thumbnail = Optional.empty(); - + private Optional banner = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional sourceDocumentId = Optional.empty(); - + private Optional hideAttribution = Optional.empty(); - + private Optional channel = Optional.empty(); - + private Optional postType = Optional.empty(); - + private Optional isPrioritized = Optional.empty(); - + private Optional viewUrl = Optional.empty(); - + private Optional draftId = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Optional id = Optional.empty(); - + private Optional author = Optional.empty(); - + private Optional createTimestamp = Optional.empty(); - + private Optional lastUpdateTimestamp = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional viewerInfo = Optional.empty(); - + private Optional sourceDocument = Optional.empty(); - + private Optional isPublished = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The date and time at which the announcement becomes active. */ @@ -978,6 +1003,7 @@ public Builder startTime(Optional startTime) { return this; } + /** * The date and time at which the announcement expires. */ @@ -996,6 +1022,7 @@ public Builder endTime(Optional endTime) { return this; } + /** * The headline of the announcement. */ @@ -1014,6 +1041,7 @@ public Builder title(Optional title) { return this; } + public Builder body(StructuredText body) { Utils.checkNotNull(body, "body"); this.body = Optional.ofNullable(body); @@ -1026,6 +1054,7 @@ public Builder body(Optional body) { return this; } + /** * An emoji used to indicate the nature of the announcement. */ @@ -1044,6 +1073,7 @@ public Builder emoji(Optional emoji) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -1056,6 +1086,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + public Builder banner(Thumbnail banner) { Utils.checkNotNull(banner, "banner"); this.banner = Optional.ofNullable(banner); @@ -1068,6 +1099,7 @@ public Builder banner(Optional banner) { return this; } + /** * Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. */ @@ -1086,6 +1118,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). */ @@ -1104,6 +1137,7 @@ public Builder sourceDocumentId(Optional sourceDocumentId) { return this; } + /** * Whether or not to hide an author attribution. */ @@ -1122,6 +1156,7 @@ public Builder hideAttribution(Optional hideAttribution) { return this; } + /** * This determines whether this is a Social Feed post or a regular announcement. */ @@ -1140,6 +1175,7 @@ public Builder channel(Optional channel) { return this; } + /** * This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site. */ @@ -1158,6 +1194,7 @@ public Builder postType(Optional postType) { return this; } + /** * Used by the Social Feed to pin posts to the front of the feed. */ @@ -1176,6 +1213,7 @@ public Builder isPrioritized(Optional isPrioritized) { return this; } + /** * URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED". */ @@ -1194,6 +1232,7 @@ public Builder viewUrl(Optional viewUrl) { return this; } + /** * The opaque id of the associated draft. */ @@ -1212,6 +1251,7 @@ public Builder draftId(Optional draftId) { return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -1224,6 +1264,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * The opaque id of the announcement. */ @@ -1242,6 +1283,7 @@ public Builder id(Optional id) { return this; } + public Builder author(Person author) { Utils.checkNotNull(author, "author"); this.author = Optional.ofNullable(author); @@ -1254,6 +1296,7 @@ public Builder author(Optional author) { return this; } + /** * Server Unix timestamp of the creation time (in seconds since epoch UTC). */ @@ -1272,6 +1315,7 @@ public Builder createTimestamp(Optional createTimestamp) { return this; } + /** * Server Unix timestamp of the last update time (in seconds since epoch UTC). */ @@ -1290,6 +1334,7 @@ public Builder lastUpdateTimestamp(Optional lastUpdateTimestamp) { return this; } + public Builder updatedBy(Person updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = Optional.ofNullable(updatedBy); @@ -1302,6 +1347,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + public Builder viewerInfo(AnnouncementViewerInfo viewerInfo) { Utils.checkNotNull(viewerInfo, "viewerInfo"); this.viewerInfo = Optional.ofNullable(viewerInfo); @@ -1314,6 +1360,7 @@ public Builder viewerInfo(Optional viewerInfo) return this; } + public Builder sourceDocument(Document sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = Optional.ofNullable(sourceDocument); @@ -1326,6 +1373,7 @@ public Builder sourceDocument(Optional sourceDocument) { return this; } + /** * Whether or not the announcement is published. */ @@ -1343,33 +1391,19 @@ public Builder isPublished(Optional isPublished) { this.isPublished = isPublished; return this; } - + public Announcement build() { + return new Announcement( - startTime, - endTime, - title, - body, - emoji, - thumbnail, - banner, - audienceFilters, - sourceDocumentId, - hideAttribution, - channel, - postType, - isPrioritized, - viewUrl, - draftId, - permissions, - id, - author, - createTimestamp, - lastUpdateTimestamp, - updatedBy, - viewerInfo, - sourceDocument, - isPublished); + startTime, endTime, title, + body, emoji, thumbnail, + banner, audienceFilters, sourceDocumentId, + hideAttribution, channel, postType, + isPrioritized, viewUrl, draftId, + permissions, id, author, + createTimestamp, lastUpdateTimestamp, updatedBy, + viewerInfo, sourceDocument, isPublished); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnnouncementViewerInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnnouncementViewerInfo.java index b15ad555..9f6932d8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnnouncementViewerInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnnouncementViewerInfo.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class AnnouncementViewerInfo { +public class AnnouncementViewerInfo { /** * Whether the viewer has dismissed the announcement. */ @@ -60,9 +60,10 @@ public Optional isRead() { return isRead; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Whether the viewer has dismissed the announcement. @@ -73,6 +74,7 @@ public AnnouncementViewerInfo withIsDismissed(boolean isDismissed) { return this; } + /** * Whether the viewer has dismissed the announcement. */ @@ -91,6 +93,7 @@ public AnnouncementViewerInfo withIsRead(boolean isRead) { return this; } + /** * Whether the viewer has read the announcement. */ @@ -100,7 +103,6 @@ public AnnouncementViewerInfo withIsRead(Optional isRead) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,8 +120,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - isDismissed, - isRead); + isDismissed, isRead); } @Override @@ -128,17 +129,19 @@ public String toString() { "isDismissed", isDismissed, "isRead", isRead); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional isDismissed = Optional.empty(); - + private Optional isRead = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Whether the viewer has dismissed the announcement. */ @@ -157,6 +160,7 @@ public Builder isDismissed(Optional isDismissed) { return this; } + /** * Whether the viewer has read the announcement. */ @@ -174,11 +178,12 @@ public Builder isRead(Optional isRead) { this.isRead = isRead; return this; } - + public AnnouncementViewerInfo build() { + return new AnnouncementViewerInfo( - isDismissed, - isRead); + isDismissed, isRead); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnonymousEvent.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnonymousEvent.java index 90381dde..fe6eae5b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnonymousEvent.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnonymousEvent.java @@ -61,9 +61,10 @@ public Optional eventType() { return (Optional) eventType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AnonymousEvent withTime(TimeInterval time) { Utils.checkNotNull(time, "time"); @@ -71,6 +72,7 @@ public AnonymousEvent withTime(TimeInterval time) { return this; } + public AnonymousEvent withTime(Optional time) { Utils.checkNotNull(time, "time"); this.time = time; @@ -86,6 +88,7 @@ public AnonymousEvent withEventType(AnonymousEventEventType eventType) { return this; } + /** * The nature of the event, for example "out of office". */ @@ -95,7 +98,6 @@ public AnonymousEvent withEventType(Optional return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -113,8 +115,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - time, - eventType); + time, eventType); } @Override @@ -123,17 +124,19 @@ public String toString() { "time", time, "eventType", eventType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional time = Optional.empty(); - + private Optional eventType = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder time(TimeInterval time) { Utils.checkNotNull(time, "time"); this.time = Optional.ofNullable(time); @@ -146,6 +149,7 @@ public Builder time(Optional time) { return this; } + /** * The nature of the event, for example "out of office". */ @@ -163,11 +167,12 @@ public Builder eventType(Optional eventType) this.eventType = eventType; return this; } - + public AnonymousEvent build() { + return new AnonymousEvent( - time, - eventType); + time, eventType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Answer.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Answer.java index 2512431f..de784214 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Answer.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Answer.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Optional; -public class Answer { +public class Answer { /** * The opaque ID of the Answer. */ @@ -33,6 +33,7 @@ public class Answer { @JsonProperty("docId") private Optional docId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("question") private Optional question; @@ -89,26 +90,32 @@ public class Answer { @JsonProperty("roles") private Optional> roles; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceDocumentSpec") private Optional sourceDocumentSpec; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceType") private Optional sourceType; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("combinedAnswerText") private Optional combinedAnswerText; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("likes") private Optional likes; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("author") private Optional author; @@ -127,14 +134,17 @@ public class Answer { @JsonProperty("updateTime") private Optional updateTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedBy") private Optional updatedBy; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("verification") private Optional verification; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("board") private Optional board; @@ -153,6 +163,7 @@ public class Answer { @JsonProperty("documentCategory") private Optional documentCategory; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceDocument") private Optional sourceDocument; @@ -235,7 +246,14 @@ public Answer( public Answer( long id) { - this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -416,9 +434,10 @@ public Optional sourceDocument() { return (Optional) sourceDocument; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque ID of the Answer. @@ -438,6 +457,7 @@ public Answer withDocId(String docId) { return this; } + /** * Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. */ @@ -453,6 +473,7 @@ public Answer withQuestion(String question) { return this; } + public Answer withQuestion(Optional question) { Utils.checkNotNull(question, "question"); this.question = question; @@ -468,6 +489,7 @@ public Answer withQuestionVariations(List questionVariations) { return this; } + /** * Additional ways of phrasing this question. */ @@ -486,6 +508,7 @@ public Answer withBodyText(String bodyText) { return this; } + /** * The plain text answer to the question. */ @@ -507,6 +530,7 @@ public Answer withBoardId(long boardId) { return this; } + /** * The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted. * @@ -528,6 +552,7 @@ public Answer withAudienceFilters(List audienceFilters) { return this; } + /** * Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. */ @@ -546,6 +571,7 @@ public Answer withAddedRoles(List addedRoles) { return this; } + /** * A list of user roles for the answer added by the owner. */ @@ -564,6 +590,7 @@ public Answer withRemovedRoles(List removedRoles) { return this; } + /** * A list of user roles for the answer removed by the owner. */ @@ -582,6 +609,7 @@ public Answer withRoles(List roles) { return this; } + /** * A list of roles for this answer explicitly granted by an owner, editor, or admin. */ @@ -597,6 +625,7 @@ public Answer withSourceDocumentSpec(DocumentSpecUnion sourceDocumentSpec) { return this; } + public Answer withSourceDocumentSpec(Optional sourceDocumentSpec) { Utils.checkNotNull(sourceDocumentSpec, "sourceDocumentSpec"); this.sourceDocumentSpec = sourceDocumentSpec; @@ -609,6 +638,7 @@ public Answer withSourceType(AnswerSourceType sourceType) { return this; } + public Answer withSourceType(Optional sourceType) { Utils.checkNotNull(sourceType, "sourceType"); this.sourceType = sourceType; @@ -621,6 +651,7 @@ public Answer withPermissions(ObjectPermissions permissions) { return this; } + public Answer withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -633,6 +664,7 @@ public Answer withCombinedAnswerText(StructuredText combinedAnswerText) { return this; } + public Answer withCombinedAnswerText(Optional combinedAnswerText) { Utils.checkNotNull(combinedAnswerText, "combinedAnswerText"); this.combinedAnswerText = combinedAnswerText; @@ -645,6 +677,7 @@ public Answer withLikes(AnswerLikes likes) { return this; } + public Answer withLikes(Optional likes) { Utils.checkNotNull(likes, "likes"); this.likes = likes; @@ -657,6 +690,7 @@ public Answer withAuthor(Person author) { return this; } + public Answer withAuthor(Optional author) { Utils.checkNotNull(author, "author"); this.author = author; @@ -672,6 +706,7 @@ public Answer withCreateTime(OffsetDateTime createTime) { return this; } + /** * The time the answer was created in ISO format (ISO 8601). */ @@ -690,6 +725,7 @@ public Answer withUpdateTime(OffsetDateTime updateTime) { return this; } + /** * The time the answer was last updated in ISO format (ISO 8601). */ @@ -705,6 +741,7 @@ public Answer withUpdatedBy(Person updatedBy) { return this; } + public Answer withUpdatedBy(Optional updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = updatedBy; @@ -717,6 +754,7 @@ public Answer withVerification(Verification verification) { return this; } + public Answer withVerification(Optional verification) { Utils.checkNotNull(verification, "verification"); this.verification = verification; @@ -729,6 +767,7 @@ public Answer withBoard(AnswerBoard board) { return this; } + public Answer withBoard(Optional board) { Utils.checkNotNull(board, "board"); this.board = board; @@ -744,6 +783,7 @@ public Answer withCollections(List collections) { return this; } + /** * The collections to which the answer belongs. */ @@ -762,6 +802,7 @@ public Answer withDocumentCategory(String documentCategory) { return this; } + /** * The document's document_category(.proto). */ @@ -777,13 +818,13 @@ public Answer withSourceDocument(Document sourceDocument) { return this; } + public Answer withSourceDocument(Optional sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = sourceDocument; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -823,30 +864,14 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - docId, - question, - questionVariations, - bodyText, - boardId, - audienceFilters, - addedRoles, - removedRoles, - roles, - sourceDocumentSpec, - sourceType, - permissions, - combinedAnswerText, - likes, - author, - createTime, - updateTime, - updatedBy, - verification, - board, - collections, - documentCategory, - sourceDocument); + id, docId, question, + questionVariations, bodyText, boardId, + audienceFilters, addedRoles, removedRoles, + roles, sourceDocumentSpec, sourceType, + permissions, combinedAnswerText, likes, + author, createTime, updateTime, + updatedBy, verification, board, + collections, documentCategory, sourceDocument); } @Override @@ -877,62 +902,64 @@ public String toString() { "documentCategory", documentCategory, "sourceDocument", sourceDocument); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long id; - + private Optional docId = Optional.empty(); - + private Optional question = Optional.empty(); - + private Optional> questionVariations = Optional.empty(); - + private Optional bodyText = Optional.empty(); - + @Deprecated private Optional boardId = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private Optional sourceDocumentSpec = Optional.empty(); - + private Optional sourceType = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Optional combinedAnswerText = Optional.empty(); - + private Optional likes = Optional.empty(); - + private Optional author = Optional.empty(); - + private Optional createTime = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional verification = Optional.empty(); - + private Optional board = Optional.empty(); - + private Optional> collections = Optional.empty(); - + private Optional documentCategory = Optional.empty(); - + private Optional sourceDocument = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque ID of the Answer. */ @@ -942,6 +969,7 @@ public Builder id(long id) { return this; } + /** * Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. */ @@ -960,6 +988,7 @@ public Builder docId(Optional docId) { return this; } + public Builder question(String question) { Utils.checkNotNull(question, "question"); this.question = Optional.ofNullable(question); @@ -972,6 +1001,7 @@ public Builder question(Optional question) { return this; } + /** * Additional ways of phrasing this question. */ @@ -990,6 +1020,7 @@ public Builder questionVariations(Optional> questionVaria return this; } + /** * The plain text answer to the question. */ @@ -1008,6 +1039,7 @@ public Builder bodyText(Optional bodyText) { return this; } + /** * The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted. * @@ -1032,6 +1064,7 @@ public Builder boardId(Optional boardId) { return this; } + /** * Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. */ @@ -1050,6 +1083,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * A list of user roles for the answer added by the owner. */ @@ -1068,6 +1102,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of user roles for the answer removed by the owner. */ @@ -1086,6 +1121,7 @@ public Builder removedRoles(Optional> remo return this; } + /** * A list of roles for this answer explicitly granted by an owner, editor, or admin. */ @@ -1104,6 +1140,7 @@ public Builder roles(Optional> roles) { return this; } + public Builder sourceDocumentSpec(DocumentSpecUnion sourceDocumentSpec) { Utils.checkNotNull(sourceDocumentSpec, "sourceDocumentSpec"); this.sourceDocumentSpec = Optional.ofNullable(sourceDocumentSpec); @@ -1116,6 +1153,7 @@ public Builder sourceDocumentSpec(Optional sourceDo return this; } + public Builder sourceType(AnswerSourceType sourceType) { Utils.checkNotNull(sourceType, "sourceType"); this.sourceType = Optional.ofNullable(sourceType); @@ -1128,6 +1166,7 @@ public Builder sourceType(Optional sourceType) { return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -1140,6 +1179,7 @@ public Builder permissions(Optional permissions) { return this; } + public Builder combinedAnswerText(StructuredText combinedAnswerText) { Utils.checkNotNull(combinedAnswerText, "combinedAnswerText"); this.combinedAnswerText = Optional.ofNullable(combinedAnswerText); @@ -1152,6 +1192,7 @@ public Builder combinedAnswerText(Optional combinedAns return this; } + public Builder likes(AnswerLikes likes) { Utils.checkNotNull(likes, "likes"); this.likes = Optional.ofNullable(likes); @@ -1164,6 +1205,7 @@ public Builder likes(Optional likes) { return this; } + public Builder author(Person author) { Utils.checkNotNull(author, "author"); this.author = Optional.ofNullable(author); @@ -1176,6 +1218,7 @@ public Builder author(Optional author) { return this; } + /** * The time the answer was created in ISO format (ISO 8601). */ @@ -1194,6 +1237,7 @@ public Builder createTime(Optional createTime) { return this; } + /** * The time the answer was last updated in ISO format (ISO 8601). */ @@ -1212,6 +1256,7 @@ public Builder updateTime(Optional updateTime) { return this; } + public Builder updatedBy(Person updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = Optional.ofNullable(updatedBy); @@ -1224,6 +1269,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + public Builder verification(Verification verification) { Utils.checkNotNull(verification, "verification"); this.verification = Optional.ofNullable(verification); @@ -1236,6 +1282,7 @@ public Builder verification(Optional verification) { return this; } + public Builder board(AnswerBoard board) { Utils.checkNotNull(board, "board"); this.board = Optional.ofNullable(board); @@ -1248,6 +1295,7 @@ public Builder board(Optional board) { return this; } + /** * The collections to which the answer belongs. */ @@ -1266,6 +1314,7 @@ public Builder collections(Optional> collections) { return this; } + /** * The document's document_category(.proto). */ @@ -1284,6 +1333,7 @@ public Builder documentCategory(Optional documentCategory) { return this; } + public Builder sourceDocument(Document sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = Optional.ofNullable(sourceDocument); @@ -1295,33 +1345,19 @@ public Builder sourceDocument(Optional sourceDocument) { this.sourceDocument = sourceDocument; return this; } - + public Answer build() { + return new Answer( - id, - docId, - question, - questionVariations, - bodyText, - boardId, - audienceFilters, - addedRoles, - removedRoles, - roles, - sourceDocumentSpec, - sourceType, - permissions, - combinedAnswerText, - likes, - author, - createTime, - updateTime, - updatedBy, - verification, - board, - collections, - documentCategory, - sourceDocument); + id, docId, question, + questionVariations, bodyText, boardId, + audienceFilters, addedRoles, removedRoles, + roles, sourceDocumentSpec, sourceType, + permissions, combinedAnswerText, likes, + author, createTime, updateTime, + updatedBy, verification, board, + collections, documentCategory, sourceDocument); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerBoard.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerBoard.java index c40a1419..c25b11d7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerBoard.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerBoard.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class AnswerBoard { +public class AnswerBoard { /** * The unique name of the Collection. */ @@ -52,6 +52,7 @@ public class AnswerBoard { @JsonProperty("audienceFilters") private Optional> audienceFilters; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; @@ -62,18 +63,22 @@ public class AnswerBoard { @JsonProperty("id") private long id; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createTime") private Optional createTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updateTime") private Optional updateTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("creator") private Optional creator; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedBy") private Optional updatedBy; @@ -139,7 +144,11 @@ public AnswerBoard( String name, String description, long id) { - this(name, description, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(name, description, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -238,9 +247,10 @@ public Optional> roles() { return (Optional>) roles; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique name of the Collection. @@ -269,6 +279,7 @@ public AnswerBoard withAddedRoles(List addedRoles) { return this; } + /** * A list of added user roles for the Collection. */ @@ -287,6 +298,7 @@ public AnswerBoard withRemovedRoles(List removedRoles) { return this; } + /** * A list of removed user roles for the Collection. */ @@ -305,6 +317,7 @@ public AnswerBoard withAudienceFilters(List audienceFilters) { return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -320,6 +333,7 @@ public AnswerBoard withPermissions(ObjectPermissions permissions) { return this; } + public AnswerBoard withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -341,6 +355,7 @@ public AnswerBoard withCreateTime(OffsetDateTime createTime) { return this; } + public AnswerBoard withCreateTime(Optional createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = createTime; @@ -353,6 +368,7 @@ public AnswerBoard withUpdateTime(OffsetDateTime updateTime) { return this; } + public AnswerBoard withUpdateTime(Optional updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = updateTime; @@ -365,6 +381,7 @@ public AnswerBoard withCreator(Person creator) { return this; } + public AnswerBoard withCreator(Optional creator) { Utils.checkNotNull(creator, "creator"); this.creator = creator; @@ -377,6 +394,7 @@ public AnswerBoard withUpdatedBy(Person updatedBy) { return this; } + public AnswerBoard withUpdatedBy(Optional updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = updatedBy; @@ -392,6 +410,7 @@ public AnswerBoard withItemCount(long itemCount) { return this; } + /** * The number of items currently in the Answer Board. Separated from the actual items so we can grab the count without items. */ @@ -410,6 +429,7 @@ public AnswerBoard withRoles(List roles) { return this; } + /** * A list of user roles for the Answer Board. */ @@ -419,7 +439,6 @@ public AnswerBoard withRoles(Optional> rol return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -448,18 +467,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - permissions, - id, - createTime, - updateTime, - creator, - updatedBy, - itemCount, + name, description, addedRoles, + removedRoles, audienceFilters, permissions, + id, createTime, updateTime, + creator, updatedBy, itemCount, roles); } @@ -480,39 +491,41 @@ public String toString() { "itemCount", itemCount, "roles", roles); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private String description; - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Long id; - + private Optional createTime = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional creator = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional itemCount = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The unique name of the Collection. */ @@ -522,6 +535,7 @@ public Builder name(String name) { return this; } + /** * A brief summary of the Collection's contents. */ @@ -531,6 +545,7 @@ public Builder description(String description) { return this; } + /** * A list of added user roles for the Collection. */ @@ -549,6 +564,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of removed user roles for the Collection. */ @@ -567,6 +583,7 @@ public Builder removedRoles(Optional> remo return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -585,6 +602,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -597,6 +615,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * The unique ID of the Answer Board. */ @@ -606,6 +625,7 @@ public Builder id(long id) { return this; } + public Builder createTime(OffsetDateTime createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = Optional.ofNullable(createTime); @@ -618,6 +638,7 @@ public Builder createTime(Optional createTime) { return this; } + public Builder updateTime(OffsetDateTime updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = Optional.ofNullable(updateTime); @@ -630,6 +651,7 @@ public Builder updateTime(Optional updateTime) { return this; } + public Builder creator(Person creator) { Utils.checkNotNull(creator, "creator"); this.creator = Optional.ofNullable(creator); @@ -642,6 +664,7 @@ public Builder creator(Optional creator) { return this; } + public Builder updatedBy(Person updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = Optional.ofNullable(updatedBy); @@ -654,6 +677,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + /** * The number of items currently in the Answer Board. Separated from the actual items so we can grab the count without items. */ @@ -672,6 +696,7 @@ public Builder itemCount(Optional itemCount) { return this; } + /** * A list of user roles for the Answer Board. */ @@ -689,22 +714,16 @@ public Builder roles(Optional> roles) { this.roles = roles; return this; } - + public AnswerBoard build() { + return new AnswerBoard( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - permissions, - id, - createTime, - updateTime, - creator, - updatedBy, - itemCount, + name, description, addedRoles, + removedRoles, audienceFilters, permissions, + id, createTime, updateTime, + creator, updatedBy, itemCount, roles); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerCreationData.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerCreationData.java index fee1bfaa..9cb9cd06 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerCreationData.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerCreationData.java @@ -17,6 +17,7 @@ import java.util.List; import java.util.Optional; + public class AnswerCreationData { @JsonInclude(Include.NON_ABSENT) @@ -75,10 +76,12 @@ public class AnswerCreationData { @JsonProperty("roles") private Optional> roles; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceDocumentSpec") private Optional sourceDocumentSpec; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceType") private Optional sourceType; @@ -90,6 +93,7 @@ public class AnswerCreationData { @JsonProperty("addedCollections") private Optional> addedCollections; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("combinedAnswerText") private Optional combinedAnswerText; @@ -135,7 +139,10 @@ public AnswerCreationData( } public AnswerCreationData() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore @@ -234,9 +241,10 @@ public Optional combinedAnswerText() { return (Optional) combinedAnswerText; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AnswerCreationData withQuestion(String question) { Utils.checkNotNull(question, "question"); @@ -244,6 +252,7 @@ public AnswerCreationData withQuestion(String question) { return this; } + public AnswerCreationData withQuestion(Optional question) { Utils.checkNotNull(question, "question"); this.question = question; @@ -259,6 +268,7 @@ public AnswerCreationData withQuestionVariations(List questionVariations return this; } + /** * Additional ways of phrasing this question. */ @@ -277,6 +287,7 @@ public AnswerCreationData withBodyText(String bodyText) { return this; } + /** * The plain text answer to the question. */ @@ -298,6 +309,7 @@ public AnswerCreationData withBoardId(long boardId) { return this; } + /** * The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted. * @@ -319,6 +331,7 @@ public AnswerCreationData withAudienceFilters(List audienceFilters) return this; } + /** * Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. */ @@ -337,6 +350,7 @@ public AnswerCreationData withAddedRoles(List addedRoles) return this; } + /** * A list of user roles for the answer added by the owner. */ @@ -355,6 +369,7 @@ public AnswerCreationData withRemovedRoles(List removedRo return this; } + /** * A list of user roles for the answer removed by the owner. */ @@ -373,6 +388,7 @@ public AnswerCreationData withRoles(List roles) { return this; } + /** * A list of roles for this answer explicitly granted by an owner, editor, or admin. */ @@ -388,6 +404,7 @@ public AnswerCreationData withSourceDocumentSpec(DocumentSpecUnion sourceDocumen return this; } + public AnswerCreationData withSourceDocumentSpec(Optional sourceDocumentSpec) { Utils.checkNotNull(sourceDocumentSpec, "sourceDocumentSpec"); this.sourceDocumentSpec = sourceDocumentSpec; @@ -400,6 +417,7 @@ public AnswerCreationData withSourceType(AnswerCreationDataSourceType sourceType return this; } + public AnswerCreationData withSourceType(Optional sourceType) { Utils.checkNotNull(sourceType, "sourceType"); this.sourceType = sourceType; @@ -415,6 +433,7 @@ public AnswerCreationData withAddedCollections(List addedCollections) { return this; } + /** * IDs of Collections to which a document is added. */ @@ -430,13 +449,13 @@ public AnswerCreationData withCombinedAnswerText(StructuredTextMutableProperties return this; } + public AnswerCreationData withCombinedAnswerText(Optional combinedAnswerText) { Utils.checkNotNull(combinedAnswerText, "combinedAnswerText"); this.combinedAnswerText = combinedAnswerText; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -464,18 +483,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - question, - questionVariations, - bodyText, - boardId, - audienceFilters, - addedRoles, - removedRoles, - roles, - sourceDocumentSpec, - sourceType, - addedCollections, - combinedAnswerText); + question, questionVariations, bodyText, + boardId, audienceFilters, addedRoles, + removedRoles, roles, sourceDocumentSpec, + sourceType, addedCollections, combinedAnswerText); } @Override @@ -494,38 +505,40 @@ public String toString() { "addedCollections", addedCollections, "combinedAnswerText", combinedAnswerText); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional question = Optional.empty(); - + private Optional> questionVariations = Optional.empty(); - + private Optional bodyText = Optional.empty(); - + @Deprecated private Optional boardId = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private Optional sourceDocumentSpec = Optional.empty(); - + private Optional sourceType = Optional.empty(); - + private Optional> addedCollections = Optional.empty(); - + private Optional combinedAnswerText = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder question(String question) { Utils.checkNotNull(question, "question"); this.question = Optional.ofNullable(question); @@ -538,6 +551,7 @@ public Builder question(Optional question) { return this; } + /** * Additional ways of phrasing this question. */ @@ -556,6 +570,7 @@ public Builder questionVariations(Optional> questionVaria return this; } + /** * The plain text answer to the question. */ @@ -574,6 +589,7 @@ public Builder bodyText(Optional bodyText) { return this; } + /** * The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted. * @@ -598,6 +614,7 @@ public Builder boardId(Optional boardId) { return this; } + /** * Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. */ @@ -616,6 +633,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * A list of user roles for the answer added by the owner. */ @@ -634,6 +652,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of user roles for the answer removed by the owner. */ @@ -652,6 +671,7 @@ public Builder removedRoles(Optional> remo return this; } + /** * A list of roles for this answer explicitly granted by an owner, editor, or admin. */ @@ -670,6 +690,7 @@ public Builder roles(Optional> roles) { return this; } + public Builder sourceDocumentSpec(DocumentSpecUnion sourceDocumentSpec) { Utils.checkNotNull(sourceDocumentSpec, "sourceDocumentSpec"); this.sourceDocumentSpec = Optional.ofNullable(sourceDocumentSpec); @@ -682,6 +703,7 @@ public Builder sourceDocumentSpec(Optional sourceDo return this; } + public Builder sourceType(AnswerCreationDataSourceType sourceType) { Utils.checkNotNull(sourceType, "sourceType"); this.sourceType = Optional.ofNullable(sourceType); @@ -694,6 +716,7 @@ public Builder sourceType(Optional sourc return this; } + /** * IDs of Collections to which a document is added. */ @@ -712,6 +735,7 @@ public Builder addedCollections(Optional> addedCollections) return this; } + public Builder combinedAnswerText(StructuredTextMutableProperties combinedAnswerText) { Utils.checkNotNull(combinedAnswerText, "combinedAnswerText"); this.combinedAnswerText = Optional.ofNullable(combinedAnswerText); @@ -723,21 +747,15 @@ public Builder combinedAnswerText(Optional createTime() { return createTime; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AnswerLike withUser(Person user) { Utils.checkNotNull(user, "user"); @@ -66,6 +68,7 @@ public AnswerLike withUser(Person user) { return this; } + public AnswerLike withUser(Optional user) { Utils.checkNotNull(user, "user"); this.user = user; @@ -81,6 +84,7 @@ public AnswerLike withCreateTime(OffsetDateTime createTime) { return this; } + /** * The time the user liked the answer in ISO format (ISO 8601). */ @@ -90,7 +94,6 @@ public AnswerLike withCreateTime(Optional createTime) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -108,8 +111,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - user, - createTime); + user, createTime); } @Override @@ -118,17 +120,19 @@ public String toString() { "user", user, "createTime", createTime); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional user = Optional.empty(); - + private Optional createTime = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder user(Person user) { Utils.checkNotNull(user, "user"); this.user = Optional.ofNullable(user); @@ -141,6 +145,7 @@ public Builder user(Optional user) { return this; } + /** * The time the user liked the answer in ISO format (ISO 8601). */ @@ -158,11 +163,12 @@ public Builder createTime(Optional createTime) { this.createTime = createTime; return this; } - + public AnswerLike build() { + return new AnswerLike( - user, - createTime); + user, createTime); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerLikes.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerLikes.java index 5be62c14..118c8112 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerLikes.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerLikes.java @@ -13,6 +13,7 @@ import java.lang.String; import java.util.List; + public class AnswerLikes { @JsonProperty("likedBy") @@ -64,9 +65,10 @@ public long numLikes() { return numLikes; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AnswerLikes withLikedBy(List likedBy) { Utils.checkNotNull(likedBy, "likedBy"); @@ -92,7 +94,6 @@ public AnswerLikes withNumLikes(long numLikes) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -111,9 +112,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - likedBy, - likedByUser, - numLikes); + likedBy, likedByUser, numLikes); } @Override @@ -123,25 +122,28 @@ public String toString() { "likedByUser", likedByUser, "numLikes", numLikes); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List likedBy; - + private Boolean likedByUser; - + private Long numLikes; - + private Builder() { // force use of static builder() method } + public Builder likedBy(List likedBy) { Utils.checkNotNull(likedBy, "likedBy"); this.likedBy = likedBy; return this; } + /** * Whether the user in context liked the answer. */ @@ -151,6 +153,7 @@ public Builder likedByUser(boolean likedByUser) { return this; } + /** * The total number of likes for the answer. */ @@ -159,12 +162,12 @@ public Builder numLikes(long numLikes) { this.numLikes = numLikes; return this; } - + public AnswerLikes build() { + return new AnswerLikes( - likedBy, - likedByUser, - numLikes); + likedBy, likedByUser, numLikes); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerResult.java index e76a95a9..ad02740e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AnswerResult.java @@ -13,6 +13,7 @@ import java.lang.String; import java.util.Optional; + public class AnswerResult { @JsonProperty("answer") @@ -53,9 +54,10 @@ public Optional trackingToken() { return trackingToken; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AnswerResult withAnswer(Answer answer) { Utils.checkNotNull(answer, "answer"); @@ -72,6 +74,7 @@ public AnswerResult withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular Answer. To be used for `/feedback` reporting. */ @@ -81,7 +84,6 @@ public AnswerResult withTrackingToken(Optional trackingToken) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -99,8 +101,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - answer, - trackingToken); + answer, trackingToken); } @Override @@ -109,23 +110,26 @@ public String toString() { "answer", answer, "trackingToken", trackingToken); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Answer answer; - + private Optional trackingToken = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder answer(Answer answer) { Utils.checkNotNull(answer, "answer"); this.answer = answer; return this; } + /** * An opaque token that represents this particular Answer. To be used for `/feedback` reporting. */ @@ -143,11 +147,12 @@ public Builder trackingToken(Optional trackingToken) { this.trackingToken = trackingToken; return this; } - + public AnswerResult build() { + return new AnswerResult( - answer, - trackingToken); + answer, trackingToken); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AppResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AppResult.java index 9ae09c74..6bb50e4d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AppResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AppResult.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class AppResult { +public class AppResult { /** * The app or other repository type this represents */ @@ -60,7 +60,8 @@ public AppResult( public AppResult( String datasource) { - this(datasource, Optional.empty(), Optional.empty(), Optional.empty()); + this(datasource, Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -95,9 +96,10 @@ public Optional iconUrl() { return iconUrl; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The app or other repository type this represents @@ -117,6 +119,7 @@ public AppResult withDocType(String docType) { return this; } + /** * The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). */ @@ -135,6 +138,7 @@ public AppResult withMimeType(String mimeType) { return this; } + /** * Mimetype is used to differentiate between sub applications from a datasource (e.g. Sheets, Docs from Gdrive) */ @@ -153,6 +157,7 @@ public AppResult withIconUrl(String iconUrl) { return this; } + /** * If there is available icon URL. */ @@ -162,7 +167,6 @@ public AppResult withIconUrl(Optional iconUrl) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -182,9 +186,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasource, - docType, - mimeType, + datasource, docType, mimeType, iconUrl); } @@ -196,21 +198,23 @@ public String toString() { "mimeType", mimeType, "iconUrl", iconUrl); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private Optional docType = Optional.empty(); - + private Optional mimeType = Optional.empty(); - + private Optional iconUrl = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The app or other repository type this represents */ @@ -220,6 +224,7 @@ public Builder datasource(String datasource) { return this; } + /** * The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). */ @@ -238,6 +243,7 @@ public Builder docType(Optional docType) { return this; } + /** * Mimetype is used to differentiate between sub applications from a datasource (e.g. Sheets, Docs from Gdrive) */ @@ -256,6 +262,7 @@ public Builder mimeType(Optional mimeType) { return this; } + /** * If there is available icon URL. */ @@ -273,13 +280,13 @@ public Builder iconUrl(Optional iconUrl) { this.iconUrl = iconUrl; return this; } - + public AppResult build() { + return new AppResult( - datasource, - docType, - mimeType, + datasource, docType, mimeType, iconUrl); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AuthConfig.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AuthConfig.java index 21792b27..a3b2ce7b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AuthConfig.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AuthConfig.java @@ -23,7 +23,6 @@ *

Config for tool's authentication method. */ public class AuthConfig { - /** * Whether or not this tool is hosted on-premise. */ @@ -133,7 +132,10 @@ public AuthConfig( } public AuthConfig() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -225,9 +227,10 @@ public Optional lastAuthorizedAt() { return lastAuthorizedAt; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Whether or not this tool is hosted on-premise. @@ -238,6 +241,7 @@ public AuthConfig withIsOnPrem(boolean isOnPrem) { return this; } + /** * Whether or not this tool is hosted on-premise. */ @@ -256,6 +260,7 @@ public AuthConfig withUsesCentralAuth(boolean usesCentralAuth) { return this; } + /** * Whether or not this uses central auth. */ @@ -278,6 +283,7 @@ public AuthConfig withType(AuthConfigType type) { return this; } + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. @@ -300,6 +306,7 @@ public AuthConfig withGrantType(GrantType grantType) { return this; } + /** * The type of grant type being used. */ @@ -318,6 +325,7 @@ public AuthConfig withStatus(AuthConfigStatus status) { return this; } + /** * Auth status of the tool. */ @@ -336,6 +344,7 @@ public AuthConfig withClientUrl(String clientUrl) { return this; } + /** * The URL where users will be directed to start the OAuth flow. */ @@ -354,6 +363,7 @@ public AuthConfig withScopes(List scopes) { return this; } + /** * A list of strings denoting the different scopes or access levels required by the tool. */ @@ -372,6 +382,7 @@ public AuthConfig withAudiences(List audiences) { return this; } + /** * A list of strings denoting the different audience which can access the tool. */ @@ -390,6 +401,7 @@ public AuthConfig withAuthorizationUrl(String authorizationUrl) { return this; } + /** * The OAuth provider's endpoint, where access tokens are requested. */ @@ -408,6 +420,7 @@ public AuthConfig withLastAuthorizedAt(OffsetDateTime lastAuthorizedAt) { return this; } + /** * The time the tool was last authorized in ISO format (ISO 8601). */ @@ -417,7 +430,6 @@ public AuthConfig withLastAuthorizedAt(Optional lastAuthorizedAt return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -443,15 +455,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - isOnPrem, - usesCentralAuth, - type, - grantType, - status, - clientUrl, - scopes, - audiences, - authorizationUrl, + isOnPrem, usesCentralAuth, type, + grantType, status, clientUrl, + scopes, audiences, authorizationUrl, lastAuthorizedAt); } @@ -469,33 +475,35 @@ public String toString() { "authorizationUrl", authorizationUrl, "lastAuthorizedAt", lastAuthorizedAt); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional isOnPrem = Optional.empty(); - + private Optional usesCentralAuth = Optional.empty(); - + private Optional type = Optional.empty(); - + private Optional grantType = Optional.empty(); - + private Optional status = Optional.empty(); - + private Optional clientUrl = Optional.empty(); - + private Optional> scopes = Optional.empty(); - + private Optional> audiences = Optional.empty(); - + private Optional authorizationUrl = Optional.empty(); - + private Optional lastAuthorizedAt = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Whether or not this tool is hosted on-premise. */ @@ -514,6 +522,7 @@ public Builder isOnPrem(Optional isOnPrem) { return this; } + /** * Whether or not this uses central auth. */ @@ -532,6 +541,7 @@ public Builder usesCentralAuth(Optional usesCentralAuth) { return this; } + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. @@ -558,6 +568,7 @@ public Builder type(Optional type) { return this; } + /** * The type of grant type being used. */ @@ -576,6 +587,7 @@ public Builder grantType(Optional grantType) { return this; } + /** * Auth status of the tool. */ @@ -594,6 +606,7 @@ public Builder status(Optional status) { return this; } + /** * The URL where users will be directed to start the OAuth flow. */ @@ -612,6 +625,7 @@ public Builder clientUrl(Optional clientUrl) { return this; } + /** * A list of strings denoting the different scopes or access levels required by the tool. */ @@ -630,6 +644,7 @@ public Builder scopes(Optional> scopes) { return this; } + /** * A list of strings denoting the different audience which can access the tool. */ @@ -648,6 +663,7 @@ public Builder audiences(Optional> audiences) { return this; } + /** * The OAuth provider's endpoint, where access tokens are requested. */ @@ -666,6 +682,7 @@ public Builder authorizationUrl(Optional authorizationUrl) { return this; } + /** * The time the tool was last authorized in ISO format (ISO 8601). */ @@ -683,19 +700,15 @@ public Builder lastAuthorizedAt(Optional lastAuthorizedAt) { this.lastAuthorizedAt = lastAuthorizedAt; return this; } - + public AuthConfig build() { + return new AuthConfig( - isOnPrem, - usesCentralAuth, - type, - grantType, - status, - clientUrl, - scopes, - audiences, - authorizationUrl, + isOnPrem, usesCentralAuth, type, + grantType, status, clientUrl, + scopes, audiences, authorizationUrl, lastAuthorizedAt); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AuthToken.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AuthToken.java index 491be6c8..9f83dfa0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AuthToken.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AuthToken.java @@ -14,18 +14,22 @@ import java.lang.String; import java.util.Optional; + public class AuthToken { @JsonProperty("accessToken") private String accessToken; + @JsonProperty("datasource") private String datasource; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("scope") private Optional scope; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("tokenType") private Optional tokenType; @@ -69,7 +73,8 @@ public AuthToken( public AuthToken( String accessToken, String datasource) { - this(accessToken, datasource, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(accessToken, datasource, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore @@ -108,9 +113,10 @@ public Optional expiration() { return expiration; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AuthToken withAccessToken(String accessToken) { Utils.checkNotNull(accessToken, "accessToken"); @@ -130,6 +136,7 @@ public AuthToken withScope(String scope) { return this; } + public AuthToken withScope(Optional scope) { Utils.checkNotNull(scope, "scope"); this.scope = scope; @@ -142,6 +149,7 @@ public AuthToken withTokenType(String tokenType) { return this; } + public AuthToken withTokenType(Optional tokenType) { Utils.checkNotNull(tokenType, "tokenType"); this.tokenType = tokenType; @@ -157,6 +165,7 @@ public AuthToken withAuthUser(String authUser) { return this; } + /** * Used by Google to indicate the index of the logged in user. Useful for generating hyperlinks that support multilogin. */ @@ -175,6 +184,7 @@ public AuthToken withExpiration(long expiration) { return this; } + /** * Unix timestamp when this token expires (in seconds since epoch UTC). */ @@ -184,7 +194,6 @@ public AuthToken withExpiration(Optional expiration) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -206,12 +215,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - accessToken, - datasource, - scope, - tokenType, - authUser, - expiration); + accessToken, datasource, scope, + tokenType, authUser, expiration); } @Override @@ -224,37 +229,41 @@ public String toString() { "authUser", authUser, "expiration", expiration); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String accessToken; - + private String datasource; - + private Optional scope = Optional.empty(); - + private Optional tokenType = Optional.empty(); - + private Optional authUser = Optional.empty(); - + private Optional expiration = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder accessToken(String accessToken) { Utils.checkNotNull(accessToken, "accessToken"); this.accessToken = accessToken; return this; } + public Builder datasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = datasource; return this; } + public Builder scope(String scope) { Utils.checkNotNull(scope, "scope"); this.scope = Optional.ofNullable(scope); @@ -267,6 +276,7 @@ public Builder scope(Optional scope) { return this; } + public Builder tokenType(String tokenType) { Utils.checkNotNull(tokenType, "tokenType"); this.tokenType = Optional.ofNullable(tokenType); @@ -279,6 +289,7 @@ public Builder tokenType(Optional tokenType) { return this; } + /** * Used by Google to indicate the index of the logged in user. Useful for generating hyperlinks that support multilogin. */ @@ -297,6 +308,7 @@ public Builder authUser(Optional authUser) { return this; } + /** * Unix timestamp when this token expires (in seconds since epoch UTC). */ @@ -314,15 +326,13 @@ public Builder expiration(Optional expiration) { this.expiration = expiration; return this; } - + public AuthToken build() { + return new AuthToken( - accessToken, - datasource, - scope, - tokenType, - authUser, - expiration); + accessToken, datasource, scope, + tokenType, authUser, expiration); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteRequest.java index ab2605ad..083c3a72 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteRequest.java @@ -16,12 +16,14 @@ import java.util.List; import java.util.Optional; + public class AutocompleteRequest { @JsonInclude(Include.NON_ABSENT) @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sessionInfo") private Optional sessionInfo; @@ -97,7 +99,9 @@ public AutocompleteRequest( } public AutocompleteRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } @JsonIgnore @@ -162,9 +166,10 @@ public Optional> authTokens() { return (Optional>) authTokens; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AutocompleteRequest withTrackingToken(String trackingToken) { Utils.checkNotNull(trackingToken, "trackingToken"); @@ -172,6 +177,7 @@ public AutocompleteRequest withTrackingToken(String trackingToken) { return this; } + public AutocompleteRequest withTrackingToken(Optional trackingToken) { Utils.checkNotNull(trackingToken, "trackingToken"); this.trackingToken = trackingToken; @@ -184,6 +190,7 @@ public AutocompleteRequest withSessionInfo(SessionInfo sessionInfo) { return this; } + public AutocompleteRequest withSessionInfo(Optional sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = sessionInfo; @@ -199,6 +206,7 @@ public AutocompleteRequest withQuery(String query) { return this; } + /** * Partially typed query. */ @@ -217,6 +225,7 @@ public AutocompleteRequest withDatasourcesFilter(List datasourcesFilter) return this; } + /** * Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). Results are unfiltered if missing. */ @@ -235,6 +244,7 @@ public AutocompleteRequest withDatasource(String datasource) { return this; } + /** * Filter to only return results relevant to the given datasource. */ @@ -253,6 +263,7 @@ public AutocompleteRequest withResultTypes(List r return this; } + /** * Filter to only return results of the given type(s). All types may be returned if omitted. */ @@ -271,6 +282,7 @@ public AutocompleteRequest withResultSize(long resultSize) { return this; } + /** * Maximum number of results to be returned. If no value is provided, the backend will cap at 200. */ @@ -289,6 +301,7 @@ public AutocompleteRequest withAuthTokens(List authTokens) { return this; } + /** * Auth tokens which may be used for federated results. */ @@ -298,7 +311,6 @@ public AutocompleteRequest withAuthTokens(Optional> au return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -322,14 +334,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - trackingToken, - sessionInfo, - query, - datasourcesFilter, - datasource, - resultTypes, - resultSize, - authTokens); + trackingToken, sessionInfo, query, + datasourcesFilter, datasource, resultTypes, + resultSize, authTokens); } @Override @@ -344,29 +351,31 @@ public String toString() { "resultSize", resultSize, "authTokens", authTokens); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional trackingToken = Optional.empty(); - + private Optional sessionInfo = Optional.empty(); - + private Optional query = Optional.empty(); - + private Optional> datasourcesFilter = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional> resultTypes = Optional.empty(); - + private Optional resultSize = Optional.empty(); - + private Optional> authTokens = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder trackingToken(String trackingToken) { Utils.checkNotNull(trackingToken, "trackingToken"); this.trackingToken = Optional.ofNullable(trackingToken); @@ -379,6 +388,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder sessionInfo(SessionInfo sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = Optional.ofNullable(sessionInfo); @@ -391,6 +401,7 @@ public Builder sessionInfo(Optional sessionInfo) { return this; } + /** * Partially typed query. */ @@ -409,6 +420,7 @@ public Builder query(Optional query) { return this; } + /** * Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). Results are unfiltered if missing. */ @@ -427,6 +439,7 @@ public Builder datasourcesFilter(Optional> datasourcesFil return this; } + /** * Filter to only return results relevant to the given datasource. */ @@ -445,6 +458,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * Filter to only return results of the given type(s). All types may be returned if omitted. */ @@ -463,6 +477,7 @@ public Builder resultTypes(Optional resultSize) { return this; } + /** * Auth tokens which may be used for federated results. */ @@ -498,17 +514,14 @@ public Builder authTokens(Optional> authTokens) { this.authTokens = authTokens; return this; } - + public AutocompleteRequest build() { + return new AutocompleteRequest( - trackingToken, - sessionInfo, - query, - datasourcesFilter, - datasource, - resultTypes, - resultSize, - authTokens); + trackingToken, sessionInfo, query, + datasourcesFilter, datasource, resultTypes, + resultSize, authTokens); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResponse.java index e05d3b58..d6288b05 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class AutocompleteResponse { +public class AutocompleteResponse { /** * List of experiment ids for the corresponding request. */ @@ -32,10 +32,12 @@ public class AutocompleteResponse { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sessionInfo") private Optional sessionInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("results") private Optional> results; @@ -47,6 +49,7 @@ public class AutocompleteResponse { @JsonProperty("groups") private Optional> groups; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("errorInfo") private Optional gleanDataError; @@ -84,7 +87,9 @@ public AutocompleteResponse( } public AutocompleteResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -139,9 +144,10 @@ public Optional backendTimeMillis() { return backendTimeMillis; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of experiment ids for the corresponding request. @@ -152,6 +158,7 @@ public AutocompleteResponse withExperimentIds(List experimentIds) { return this; } + /** * List of experiment ids for the corresponding request. */ @@ -170,6 +177,7 @@ public AutocompleteResponse withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular set of autocomplete results. To be used for /feedback reporting. */ @@ -185,6 +193,7 @@ public AutocompleteResponse withSessionInfo(SessionInfo sessionInfo) { return this; } + public AutocompleteResponse withSessionInfo(Optional sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = sessionInfo; @@ -197,6 +206,7 @@ public AutocompleteResponse withResults(List results) { return this; } + public AutocompleteResponse withResults(Optional> results) { Utils.checkNotNull(results, "results"); this.results = results; @@ -212,6 +222,7 @@ public AutocompleteResponse withGroups(List groups) { return this; } + /** * Subsections of the results list from which distinct sections should be created. */ @@ -227,6 +238,7 @@ public AutocompleteResponse withGleanDataError(GleanDataError gleanDataError) { return this; } + public AutocompleteResponse withGleanDataError(Optional gleanDataError) { Utils.checkNotNull(gleanDataError, "gleanDataError"); this.gleanDataError = gleanDataError; @@ -242,6 +254,7 @@ public AutocompleteResponse withBackendTimeMillis(long backendTimeMillis) { return this; } + /** * Time in milliseconds the backend took to respond to the request. */ @@ -251,7 +264,6 @@ public AutocompleteResponse withBackendTimeMillis(Optional backendTimeMill return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -274,12 +286,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - experimentIds, - trackingToken, - sessionInfo, - results, - groups, - gleanDataError, + experimentIds, trackingToken, sessionInfo, + results, groups, gleanDataError, backendTimeMillis); } @@ -294,27 +302,29 @@ public String toString() { "gleanDataError", gleanDataError, "backendTimeMillis", backendTimeMillis); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> experimentIds = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional sessionInfo = Optional.empty(); - + private Optional> results = Optional.empty(); - + private Optional> groups = Optional.empty(); - + private Optional gleanDataError = Optional.empty(); - + private Optional backendTimeMillis = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * List of experiment ids for the corresponding request. */ @@ -333,6 +343,7 @@ public Builder experimentIds(Optional> experimentIds) { return this; } + /** * An opaque token that represents this particular set of autocomplete results. To be used for /feedback reporting. */ @@ -351,6 +362,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder sessionInfo(SessionInfo sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = Optional.ofNullable(sessionInfo); @@ -363,6 +375,7 @@ public Builder sessionInfo(Optional sessionInfo) { return this; } + public Builder results(List results) { Utils.checkNotNull(results, "results"); this.results = Optional.ofNullable(results); @@ -375,6 +388,7 @@ public Builder results(Optional> results) { return this; } + /** * Subsections of the results list from which distinct sections should be created. */ @@ -393,6 +407,7 @@ public Builder groups(Optional> groups) return this; } + public Builder gleanDataError(GleanDataError gleanDataError) { Utils.checkNotNull(gleanDataError, "gleanDataError"); this.gleanDataError = Optional.ofNullable(gleanDataError); @@ -405,6 +420,7 @@ public Builder gleanDataError(Optional gleanDataError) return this; } + /** * Time in milliseconds the backend took to respond to the request. */ @@ -422,16 +438,14 @@ public Builder backendTimeMillis(Optional backendTimeMillis) { this.backendTimeMillis = backendTimeMillis; return this; } - + public AutocompleteResponse build() { + return new AutocompleteResponse( - experimentIds, - trackingToken, - sessionInfo, - results, - groups, - gleanDataError, + experimentIds, trackingToken, sessionInfo, + results, groups, gleanDataError, backendTimeMillis); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResult.java index f48422aa..24dc3b91 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResult.java @@ -16,6 +16,7 @@ import java.util.List; import java.util.Optional; + public class AutocompleteResult { @JsonProperty("result") @@ -28,6 +29,7 @@ public class AutocompleteResult { @JsonProperty("keywords") private Optional> keywords; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("resultType") private Optional resultType; @@ -39,6 +41,7 @@ public class AutocompleteResult { @JsonProperty("score") private Optional score; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("operatorMetadata") private Optional operatorMetadata; @@ -50,10 +53,12 @@ public class AutocompleteResult { @JsonProperty("quicklink") private Optional quicklink; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("document") private Optional document; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("url") private Optional url; @@ -118,7 +123,10 @@ public AutocompleteResult( public AutocompleteResult( String result) { - this(result, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(result, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } @JsonIgnore @@ -201,9 +209,10 @@ public Optional> ranges() { return (Optional>) ranges; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public AutocompleteResult withResult(String result) { Utils.checkNotNull(result, "result"); @@ -220,6 +229,7 @@ public AutocompleteResult withKeywords(List keywords) { return this; } + /** * A list of all possible keywords for given result. */ @@ -235,6 +245,7 @@ public AutocompleteResult withResultType(AutocompleteResultResultType resultType return this; } + public AutocompleteResult withResultType(Optional resultType) { Utils.checkNotNull(resultType, "resultType"); this.resultType = resultType; @@ -250,6 +261,7 @@ public AutocompleteResult withScore(double score) { return this; } + /** * Higher indicates a more confident match. */ @@ -265,6 +277,7 @@ public AutocompleteResult withOperatorMetadata(OperatorMetadata operatorMetadata return this; } + public AutocompleteResult withOperatorMetadata(Optional operatorMetadata) { Utils.checkNotNull(operatorMetadata, "operatorMetadata"); this.operatorMetadata = operatorMetadata; @@ -280,6 +293,7 @@ public AutocompleteResult withQuicklink(Quicklink quicklink) { return this; } + /** * An action for a specific datasource that will show up in autocomplete and app card, e.g. "Create new issue" for jira. */ @@ -295,6 +309,7 @@ public AutocompleteResult withDocument(Document document) { return this; } + public AutocompleteResult withDocument(Optional document) { Utils.checkNotNull(document, "document"); this.document = document; @@ -307,6 +322,7 @@ public AutocompleteResult withUrl(String url) { return this; } + public AutocompleteResult withUrl(Optional url) { Utils.checkNotNull(url, "url"); this.url = url; @@ -322,6 +338,7 @@ public AutocompleteResult withStructuredResult(StructuredResult structuredResult return this; } + /** * A single object that can support any object in the work graph. Only a single object will be populated. */ @@ -340,6 +357,7 @@ public AutocompleteResult withTrackingToken(String trackingToken) { return this; } + /** * A token to be passed in /feedback events associated with this autocomplete result. */ @@ -358,6 +376,7 @@ public AutocompleteResult withRanges(List ranges) { return this; } + /** * Subsections of the result string to which some special formatting should be applied (eg. bold) */ @@ -367,7 +386,6 @@ public AutocompleteResult withRanges(Optional> ranges) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -394,17 +412,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - result, - keywords, - resultType, - score, - operatorMetadata, - quicklink, - document, - url, - structuredResult, - trackingToken, - ranges); + result, keywords, resultType, + score, operatorMetadata, quicklink, + document, url, structuredResult, + trackingToken, ranges); } @Override @@ -422,41 +433,44 @@ public String toString() { "trackingToken", trackingToken, "ranges", ranges); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String result; - + private Optional> keywords = Optional.empty(); - + private Optional resultType = Optional.empty(); - + private Optional score = Optional.empty(); - + private Optional operatorMetadata = Optional.empty(); - + private Optional quicklink = Optional.empty(); - + private Optional document = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional structuredResult = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional> ranges = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder result(String result) { Utils.checkNotNull(result, "result"); this.result = result; return this; } + /** * A list of all possible keywords for given result. */ @@ -475,6 +489,7 @@ public Builder keywords(Optional> keywords) { return this; } + public Builder resultType(AutocompleteResultResultType resultType) { Utils.checkNotNull(resultType, "resultType"); this.resultType = Optional.ofNullable(resultType); @@ -487,6 +502,7 @@ public Builder resultType(Optional resul return this; } + /** * Higher indicates a more confident match. */ @@ -505,6 +521,7 @@ public Builder score(Optional score) { return this; } + public Builder operatorMetadata(OperatorMetadata operatorMetadata) { Utils.checkNotNull(operatorMetadata, "operatorMetadata"); this.operatorMetadata = Optional.ofNullable(operatorMetadata); @@ -517,6 +534,7 @@ public Builder operatorMetadata(Optional operatorMet return this; } + /** * An action for a specific datasource that will show up in autocomplete and app card, e.g. "Create new issue" for jira. */ @@ -535,6 +553,7 @@ public Builder quicklink(Optional quicklink) { return this; } + public Builder document(Document document) { Utils.checkNotNull(document, "document"); this.document = Optional.ofNullable(document); @@ -547,6 +566,7 @@ public Builder document(Optional document) { return this; } + public Builder url(String url) { Utils.checkNotNull(url, "url"); this.url = Optional.ofNullable(url); @@ -559,6 +579,7 @@ public Builder url(Optional url) { return this; } + /** * A single object that can support any object in the work graph. Only a single object will be populated. */ @@ -577,6 +598,7 @@ public Builder structuredResult(Optional structuredR return this; } + /** * A token to be passed in /feedback events associated with this autocomplete result. */ @@ -595,6 +617,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + /** * Subsections of the result string to which some special formatting should be applied (eg. bold) */ @@ -612,20 +635,15 @@ public Builder ranges(Optional> ranges) { this.ranges = ranges; return this; } - + public AutocompleteResult build() { + return new AutocompleteResult( - result, - keywords, - resultType, - score, - operatorMetadata, - quicklink, - document, - url, - structuredResult, - trackingToken, - ranges); + result, keywords, resultType, + score, operatorMetadata, quicklink, + document, url, structuredResult, + trackingToken, ranges); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResultGroup.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResultGroup.java index e3460450..6d717580 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResultGroup.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/AutocompleteResultGroup.java @@ -20,7 +20,6 @@ *

A subsection of the results list from which distinct sections should be created. */ public class AutocompleteResultGroup { - /** * The inclusive start index of the range. */ @@ -83,9 +82,10 @@ public Optional title() { return title; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The inclusive start index of the range. @@ -96,6 +96,7 @@ public AutocompleteResultGroup withStartIndex(long startIndex) { return this; } + /** * The inclusive start index of the range. */ @@ -114,6 +115,7 @@ public AutocompleteResultGroup withEndIndex(long endIndex) { return this; } + /** * The exclusive end index of the range. */ @@ -132,6 +134,7 @@ public AutocompleteResultGroup withTitle(String title) { return this; } + /** * The title of the result group to be displayed. Empty means no title. */ @@ -141,7 +144,6 @@ public AutocompleteResultGroup withTitle(Optional title) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -160,9 +162,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - startIndex, - endIndex, - title); + startIndex, endIndex, title); } @Override @@ -172,19 +172,21 @@ public String toString() { "endIndex", endIndex, "title", title); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional startIndex = Optional.empty(); - + private Optional endIndex = Optional.empty(); - + private Optional title = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The inclusive start index of the range. */ @@ -203,6 +205,7 @@ public Builder startIndex(Optional startIndex) { return this; } + /** * The exclusive end index of the range. */ @@ -221,6 +224,7 @@ public Builder endIndex(Optional endIndex) { return this; } + /** * The title of the result group to be displayed. Empty means no title. */ @@ -238,12 +242,12 @@ public Builder title(Optional title) { this.title = title; return this; } - + public AutocompleteResultGroup build() { + return new AutocompleteResultGroup( - startIndex, - endIndex, - title); + startIndex, endIndex, title); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Badge.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Badge.java index 594982e5..033133ea 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Badge.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Badge.java @@ -21,7 +21,6 @@ *

Displays a user's accomplishment or milestone */ public class Badge { - /** * An auto generated unique identifier. */ @@ -67,7 +66,8 @@ public Badge( } public Badge() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -103,9 +103,10 @@ public Optional pinned() { return pinned; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * An auto generated unique identifier. @@ -116,6 +117,7 @@ public Badge withKey(String key) { return this; } + /** * An auto generated unique identifier. */ @@ -134,6 +136,7 @@ public Badge withDisplayName(String displayName) { return this; } + /** * The badge name displayed to users */ @@ -152,6 +155,7 @@ public Badge withIconConfig(IconConfig iconConfig) { return this; } + /** * Defines how to render an icon */ @@ -170,6 +174,7 @@ public Badge withPinned(boolean pinned) { return this; } + /** * The badge should be shown on the PersonAttribution */ @@ -179,7 +184,6 @@ public Badge withPinned(Optional pinned) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -199,9 +203,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - key, - displayName, - iconConfig, + key, displayName, iconConfig, pinned); } @@ -213,21 +215,23 @@ public String toString() { "iconConfig", iconConfig, "pinned", pinned); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional key = Optional.empty(); - + private Optional displayName = Optional.empty(); - + private Optional iconConfig = Optional.empty(); - + private Optional pinned = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * An auto generated unique identifier. */ @@ -246,6 +250,7 @@ public Builder key(Optional key) { return this; } + /** * The badge name displayed to users */ @@ -264,6 +269,7 @@ public Builder displayName(Optional displayName) { return this; } + /** * Defines how to render an icon */ @@ -282,6 +288,7 @@ public Builder iconConfig(Optional iconConfig) { return this; } + /** * The badge should be shown on the PersonAttribution */ @@ -299,13 +306,13 @@ public Builder pinned(Optional pinned) { this.pinned = pinned; return this; } - + public Badge build() { + return new Badge( - key, - displayName, - iconConfig, + key, displayName, iconConfig, pinned); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexDocumentsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexDocumentsRequest.java index 0031c16e..e8ca886d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexDocumentsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexDocumentsRequest.java @@ -21,7 +21,6 @@ *

Describes the request body of the /bulkindexdocuments API call */ public class BulkIndexDocumentsRequest { - /** * Unique id that must be used for this bulk upload instance */ @@ -97,7 +96,9 @@ public BulkIndexDocumentsRequest( String uploadId, String datasource, List documents) { - this(uploadId, Optional.empty(), Optional.empty(), Optional.empty(), datasource, documents, Optional.empty()); + this(uploadId, Optional.empty(), Optional.empty(), + Optional.empty(), datasource, documents, + Optional.empty()); } /** @@ -156,9 +157,10 @@ public Optional disableStaleDocumentDeletionCheck() { return disableStaleDocumentDeletionCheck; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique id that must be used for this bulk upload instance @@ -178,6 +180,7 @@ public BulkIndexDocumentsRequest withIsFirstPage(boolean isFirstPage) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -196,6 +199,7 @@ public BulkIndexDocumentsRequest withIsLastPage(boolean isLastPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -214,6 +218,7 @@ public BulkIndexDocumentsRequest withForceRestartUpload(boolean forceRestartUplo return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -250,6 +255,7 @@ public BulkIndexDocumentsRequest withDisableStaleDocumentDeletionCheck(boolean d return this; } + /** * True if older documents need to be force deleted after the upload completes. Defaults to older documents being deleted asynchronously. This must only be set when `isLastPage = true` */ @@ -259,7 +265,6 @@ public BulkIndexDocumentsRequest withDisableStaleDocumentDeletionCheck(Optional< return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -282,12 +287,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - datasource, - documents, + uploadId, isFirstPage, isLastPage, + forceRestartUpload, datasource, documents, disableStaleDocumentDeletionCheck); } @@ -302,27 +303,29 @@ public String toString() { "documents", documents, "disableStaleDocumentDeletionCheck", disableStaleDocumentDeletionCheck); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String uploadId; - + private Optional isFirstPage = Optional.empty(); - + private Optional isLastPage = Optional.empty(); - + private Optional forceRestartUpload = Optional.empty(); - + private String datasource; - + private List documents; - + private Optional disableStaleDocumentDeletionCheck = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique id that must be used for this bulk upload instance */ @@ -332,6 +335,7 @@ public Builder uploadId(String uploadId) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -350,6 +354,7 @@ public Builder isFirstPage(Optional isFirstPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -368,6 +373,7 @@ public Builder isLastPage(Optional isLastPage) { return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -386,6 +392,7 @@ public Builder forceRestartUpload(Optional forceRestartUpload) { return this; } + /** * Datasource of the documents */ @@ -395,6 +402,7 @@ public Builder datasource(String datasource) { return this; } + /** * Batch of documents for the datasource */ @@ -404,6 +412,7 @@ public Builder documents(List documents) { return this; } + /** * True if older documents need to be force deleted after the upload completes. Defaults to older documents being deleted asynchronously. This must only be set when `isLastPage = true` */ @@ -421,16 +430,14 @@ public Builder disableStaleDocumentDeletionCheck(Optional disableStaleD this.disableStaleDocumentDeletionCheck = disableStaleDocumentDeletionCheck; return this; } - + public BulkIndexDocumentsRequest build() { + return new BulkIndexDocumentsRequest( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - datasource, - documents, + uploadId, isFirstPage, isLastPage, + forceRestartUpload, datasource, documents, disableStaleDocumentDeletionCheck); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexEmployeesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexEmployeesRequest.java index 8d1969d4..137eb0d1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexEmployeesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexEmployeesRequest.java @@ -21,7 +21,6 @@ *

Describes the request body of the /bulkindexemployees API call */ public class BulkIndexEmployeesRequest { - /** * Unique id that must be used for this bulk upload instance */ @@ -87,7 +86,8 @@ public BulkIndexEmployeesRequest( public BulkIndexEmployeesRequest( String uploadId, List employees) { - this(uploadId, Optional.empty(), Optional.empty(), Optional.empty(), employees, Optional.empty()); + this(uploadId, Optional.empty(), Optional.empty(), + Optional.empty(), employees, Optional.empty()); } /** @@ -138,9 +138,10 @@ public Optional disableStaleDataDeletionCheck() { return disableStaleDataDeletionCheck; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique id that must be used for this bulk upload instance @@ -160,6 +161,7 @@ public BulkIndexEmployeesRequest withIsFirstPage(boolean isFirstPage) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -178,6 +180,7 @@ public BulkIndexEmployeesRequest withIsLastPage(boolean isLastPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -196,6 +199,7 @@ public BulkIndexEmployeesRequest withForceRestartUpload(boolean forceRestartUplo return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -223,6 +227,7 @@ public BulkIndexEmployeesRequest withDisableStaleDataDeletionCheck(boolean disab return this; } + /** * True if older employee data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than 20%. This must only be set when `isLastPage = true` */ @@ -232,7 +237,6 @@ public BulkIndexEmployeesRequest withDisableStaleDataDeletionCheck(Optional isFirstPage = Optional.empty(); - + private Optional isLastPage = Optional.empty(); - + private Optional forceRestartUpload = Optional.empty(); - + private List employees; - + private Optional disableStaleDataDeletionCheck = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique id that must be used for this bulk upload instance */ @@ -300,6 +302,7 @@ public Builder uploadId(String uploadId) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -318,6 +321,7 @@ public Builder isFirstPage(Optional isFirstPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -336,6 +340,7 @@ public Builder isLastPage(Optional isLastPage) { return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -354,6 +359,7 @@ public Builder forceRestartUpload(Optional forceRestartUpload) { return this; } + /** * Batch of employee information */ @@ -363,6 +369,7 @@ public Builder employees(List employees) { return this; } + /** * True if older employee data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than 20%. This must only be set when `isLastPage = true` */ @@ -380,15 +387,13 @@ public Builder disableStaleDataDeletionCheck(Optional disableStaleDataD this.disableStaleDataDeletionCheck = disableStaleDataDeletionCheck; return this; } - + public BulkIndexEmployeesRequest build() { + return new BulkIndexEmployeesRequest( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - employees, - disableStaleDataDeletionCheck); + uploadId, isFirstPage, isLastPage, + forceRestartUpload, employees, disableStaleDataDeletionCheck); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexGroupsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexGroupsRequest.java index 73c5f840..59ed52cc 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexGroupsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexGroupsRequest.java @@ -21,7 +21,6 @@ *

Describes the request body for the /bulkindexgroups API call */ public class BulkIndexGroupsRequest { - /** * Unique id that must be used for this instance of datasource groups upload */ @@ -97,7 +96,9 @@ public BulkIndexGroupsRequest( String uploadId, String datasource, List groups) { - this(uploadId, Optional.empty(), Optional.empty(), Optional.empty(), datasource, groups, Optional.empty()); + this(uploadId, Optional.empty(), Optional.empty(), + Optional.empty(), datasource, groups, + Optional.empty()); } /** @@ -156,9 +157,10 @@ public Optional disableStaleDataDeletionCheck() { return disableStaleDataDeletionCheck; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique id that must be used for this instance of datasource groups upload @@ -178,6 +180,7 @@ public BulkIndexGroupsRequest withIsFirstPage(boolean isFirstPage) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -196,6 +199,7 @@ public BulkIndexGroupsRequest withIsLastPage(boolean isLastPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -214,6 +218,7 @@ public BulkIndexGroupsRequest withForceRestartUpload(boolean forceRestartUpload) return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -250,6 +255,7 @@ public BulkIndexGroupsRequest withDisableStaleDataDeletionCheck(boolean disableS return this; } + /** * True if older group data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than a reasonable threshold. This must only be set when `isLastPage = true` */ @@ -259,7 +265,6 @@ public BulkIndexGroupsRequest withDisableStaleDataDeletionCheck(Optional isFirstPage = Optional.empty(); - + private Optional isLastPage = Optional.empty(); - + private Optional forceRestartUpload = Optional.empty(); - + private String datasource; - + private List groups; - + private Optional disableStaleDataDeletionCheck = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique id that must be used for this instance of datasource groups upload */ @@ -332,6 +335,7 @@ public Builder uploadId(String uploadId) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -350,6 +354,7 @@ public Builder isFirstPage(Optional isFirstPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -368,6 +373,7 @@ public Builder isLastPage(Optional isLastPage) { return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -386,6 +392,7 @@ public Builder forceRestartUpload(Optional forceRestartUpload) { return this; } + /** * datasource of the groups */ @@ -395,6 +402,7 @@ public Builder datasource(String datasource) { return this; } + /** * batch of groups for the datasource */ @@ -404,6 +412,7 @@ public Builder groups(List groups) { return this; } + /** * True if older group data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than a reasonable threshold. This must only be set when `isLastPage = true` */ @@ -421,16 +430,14 @@ public Builder disableStaleDataDeletionCheck(Optional disableStaleDataD this.disableStaleDataDeletionCheck = disableStaleDataDeletionCheck; return this; } - + public BulkIndexGroupsRequest build() { + return new BulkIndexGroupsRequest( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - datasource, - groups, + uploadId, isFirstPage, isLastPage, + forceRestartUpload, datasource, groups, disableStaleDataDeletionCheck); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexMembershipsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexMembershipsRequest.java index 171b0246..38eb8447 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexMembershipsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexMembershipsRequest.java @@ -21,7 +21,6 @@ *

Describes the request body for the /bulkindexmemberships API call */ public class BulkIndexMembershipsRequest { - /** * Unique id that must be used for this instance of datasource group memberships upload */ @@ -97,7 +96,9 @@ public BulkIndexMembershipsRequest( String uploadId, String datasource, List memberships) { - this(uploadId, Optional.empty(), Optional.empty(), Optional.empty(), datasource, Optional.empty(), memberships); + this(uploadId, Optional.empty(), Optional.empty(), + Optional.empty(), datasource, Optional.empty(), + memberships); } /** @@ -156,9 +157,10 @@ public List memberships() { return memberships; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique id that must be used for this instance of datasource group memberships upload @@ -178,6 +180,7 @@ public BulkIndexMembershipsRequest withIsFirstPage(boolean isFirstPage) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -196,6 +199,7 @@ public BulkIndexMembershipsRequest withIsLastPage(boolean isLastPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -214,6 +218,7 @@ public BulkIndexMembershipsRequest withForceRestartUpload(boolean forceRestartUp return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -241,6 +246,7 @@ public BulkIndexMembershipsRequest withGroup(String group) { return this; } + /** * group who's memberships are specified */ @@ -259,7 +265,6 @@ public BulkIndexMembershipsRequest withMemberships(List isFirstPage = Optional.empty(); - + private Optional isLastPage = Optional.empty(); - + private Optional forceRestartUpload = Optional.empty(); - + private String datasource; - + private Optional group = Optional.empty(); - + private List memberships; - + private Builder() { // force use of static builder() method } + /** * Unique id that must be used for this instance of datasource group memberships upload */ @@ -332,6 +335,7 @@ public Builder uploadId(String uploadId) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -350,6 +354,7 @@ public Builder isFirstPage(Optional isFirstPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -368,6 +373,7 @@ public Builder isLastPage(Optional isLastPage) { return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -386,6 +392,7 @@ public Builder forceRestartUpload(Optional forceRestartUpload) { return this; } + /** * datasource of the memberships */ @@ -395,6 +402,7 @@ public Builder datasource(String datasource) { return this; } + /** * group who's memberships are specified */ @@ -413,6 +421,7 @@ public Builder group(Optional group) { return this; } + /** * batch of memberships for the group */ @@ -421,16 +430,14 @@ public Builder memberships(List memberships) this.memberships = memberships; return this; } - + public BulkIndexMembershipsRequest build() { + return new BulkIndexMembershipsRequest( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - datasource, - group, + uploadId, isFirstPage, isLastPage, + forceRestartUpload, datasource, group, memberships); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexShortcutsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexShortcutsRequest.java index 55ba579a..7eb6ba3d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexShortcutsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexShortcutsRequest.java @@ -21,7 +21,6 @@ *

Describes the request body of the /bulkindexshortcuts API call */ public class BulkIndexShortcutsRequest { - /** * Unique id that must be used for this bulk upload instance */ @@ -77,7 +76,8 @@ public BulkIndexShortcutsRequest( public BulkIndexShortcutsRequest( String uploadId, List shortcuts) { - this(uploadId, Optional.empty(), Optional.empty(), Optional.empty(), shortcuts); + this(uploadId, Optional.empty(), Optional.empty(), + Optional.empty(), shortcuts); } /** @@ -120,9 +120,10 @@ public List shortcuts() { return shortcuts; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique id that must be used for this bulk upload instance @@ -142,6 +143,7 @@ public BulkIndexShortcutsRequest withIsFirstPage(boolean isFirstPage) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -160,6 +162,7 @@ public BulkIndexShortcutsRequest withIsLastPage(boolean isLastPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -178,6 +181,7 @@ public BulkIndexShortcutsRequest withForceRestartUpload(boolean forceRestartUplo return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -196,7 +200,6 @@ public BulkIndexShortcutsRequest withShortcuts(List shortcuts) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -217,11 +220,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - shortcuts); + uploadId, isFirstPage, isLastPage, + forceRestartUpload, shortcuts); } @Override @@ -233,23 +233,25 @@ public String toString() { "forceRestartUpload", forceRestartUpload, "shortcuts", shortcuts); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String uploadId; - + private Optional isFirstPage = Optional.empty(); - + private Optional isLastPage = Optional.empty(); - + private Optional forceRestartUpload = Optional.empty(); - + private List shortcuts; - + private Builder() { // force use of static builder() method } + /** * Unique id that must be used for this bulk upload instance */ @@ -259,6 +261,7 @@ public Builder uploadId(String uploadId) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -277,6 +280,7 @@ public Builder isFirstPage(Optional isFirstPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -295,6 +299,7 @@ public Builder isLastPage(Optional isLastPage) { return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -313,6 +318,7 @@ public Builder forceRestartUpload(Optional forceRestartUpload) { return this; } + /** * Batch of shortcuts information */ @@ -321,14 +327,13 @@ public Builder shortcuts(List shortcuts) { this.shortcuts = shortcuts; return this; } - + public BulkIndexShortcutsRequest build() { + return new BulkIndexShortcutsRequest( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - shortcuts); + uploadId, isFirstPage, isLastPage, + forceRestartUpload, shortcuts); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexTeamsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexTeamsRequest.java index da1ebaa9..77e2262b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexTeamsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexTeamsRequest.java @@ -21,7 +21,6 @@ *

Describes the request body of the /bulkindexteams API call */ public class BulkIndexTeamsRequest { - /** * Unique id that must be used for this bulk upload instance */ @@ -77,7 +76,8 @@ public BulkIndexTeamsRequest( public BulkIndexTeamsRequest( String uploadId, List teams) { - this(uploadId, Optional.empty(), Optional.empty(), Optional.empty(), teams); + this(uploadId, Optional.empty(), Optional.empty(), + Optional.empty(), teams); } /** @@ -120,9 +120,10 @@ public List teams() { return teams; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique id that must be used for this bulk upload instance @@ -142,6 +143,7 @@ public BulkIndexTeamsRequest withIsFirstPage(boolean isFirstPage) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -160,6 +162,7 @@ public BulkIndexTeamsRequest withIsLastPage(boolean isLastPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -178,6 +181,7 @@ public BulkIndexTeamsRequest withForceRestartUpload(boolean forceRestartUpload) return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -196,7 +200,6 @@ public BulkIndexTeamsRequest withTeams(List teams) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -217,11 +220,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - teams); + uploadId, isFirstPage, isLastPage, + forceRestartUpload, teams); } @Override @@ -233,23 +233,25 @@ public String toString() { "forceRestartUpload", forceRestartUpload, "teams", teams); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String uploadId; - + private Optional isFirstPage = Optional.empty(); - + private Optional isLastPage = Optional.empty(); - + private Optional forceRestartUpload = Optional.empty(); - + private List teams; - + private Builder() { // force use of static builder() method } + /** * Unique id that must be used for this bulk upload instance */ @@ -259,6 +261,7 @@ public Builder uploadId(String uploadId) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -277,6 +280,7 @@ public Builder isFirstPage(Optional isFirstPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -295,6 +299,7 @@ public Builder isLastPage(Optional isLastPage) { return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -313,6 +318,7 @@ public Builder forceRestartUpload(Optional forceRestartUpload) { return this; } + /** * Batch of team information */ @@ -321,14 +327,13 @@ public Builder teams(List teams) { this.teams = teams; return this; } - + public BulkIndexTeamsRequest build() { + return new BulkIndexTeamsRequest( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - teams); + uploadId, isFirstPage, isLastPage, + forceRestartUpload, teams); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexUsersRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexUsersRequest.java index 2b98651a..0faf4b55 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexUsersRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkIndexUsersRequest.java @@ -21,7 +21,6 @@ *

Describes the request body for the /bulkindexusers API call */ public class BulkIndexUsersRequest { - /** * Unique id that must be used for this instance of datasource users upload */ @@ -97,7 +96,9 @@ public BulkIndexUsersRequest( String uploadId, String datasource, List users) { - this(uploadId, Optional.empty(), Optional.empty(), Optional.empty(), datasource, users, Optional.empty()); + this(uploadId, Optional.empty(), Optional.empty(), + Optional.empty(), datasource, users, + Optional.empty()); } /** @@ -156,9 +157,10 @@ public Optional disableStaleDataDeletionCheck() { return disableStaleDataDeletionCheck; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique id that must be used for this instance of datasource users upload @@ -178,6 +180,7 @@ public BulkIndexUsersRequest withIsFirstPage(boolean isFirstPage) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -196,6 +199,7 @@ public BulkIndexUsersRequest withIsLastPage(boolean isLastPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -214,6 +218,7 @@ public BulkIndexUsersRequest withForceRestartUpload(boolean forceRestartUpload) return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -250,6 +255,7 @@ public BulkIndexUsersRequest withDisableStaleDataDeletionCheck(boolean disableSt return this; } + /** * True if older user data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than a reasonable threshold. This must only be set when `isLastPage = true` */ @@ -259,7 +265,6 @@ public BulkIndexUsersRequest withDisableStaleDataDeletionCheck(Optional return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -282,12 +287,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - datasource, - users, + uploadId, isFirstPage, isLastPage, + forceRestartUpload, datasource, users, disableStaleDataDeletionCheck); } @@ -302,27 +303,29 @@ public String toString() { "users", users, "disableStaleDataDeletionCheck", disableStaleDataDeletionCheck); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String uploadId; - + private Optional isFirstPage = Optional.empty(); - + private Optional isLastPage = Optional.empty(); - + private Optional forceRestartUpload = Optional.empty(); - + private String datasource; - + private List users; - + private Optional disableStaleDataDeletionCheck = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique id that must be used for this instance of datasource users upload */ @@ -332,6 +335,7 @@ public Builder uploadId(String uploadId) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -350,6 +354,7 @@ public Builder isFirstPage(Optional isFirstPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -368,6 +373,7 @@ public Builder isLastPage(Optional isLastPage) { return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -386,6 +392,7 @@ public Builder forceRestartUpload(Optional forceRestartUpload) { return this; } + /** * datasource of the users */ @@ -395,6 +402,7 @@ public Builder datasource(String datasource) { return this; } + /** * batch of users for the datasource */ @@ -404,6 +412,7 @@ public Builder users(List users) { return this; } + /** * True if older user data needs to be force deleted after the upload completes. Defaults to older data being deleted only if the percentage of data being deleted is less than a reasonable threshold. This must only be set when `isLastPage = true` */ @@ -421,16 +430,14 @@ public Builder disableStaleDataDeletionCheck(Optional disableStaleDataD this.disableStaleDataDeletionCheck = disableStaleDataDeletionCheck; return this; } - + public BulkIndexUsersRequest build() { + return new BulkIndexUsersRequest( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - datasource, - users, + uploadId, isFirstPage, isLastPage, + forceRestartUpload, datasource, users, disableStaleDataDeletionCheck); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkUploadHistoryEvent.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkUploadHistoryEvent.java index 0791a24d..05da0e04 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkUploadHistoryEvent.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/BulkUploadHistoryEvent.java @@ -20,7 +20,6 @@ *

Information about a successful bulk upload */ public class BulkUploadHistoryEvent { - /** * The unique ID of the upload */ @@ -76,7 +75,8 @@ public BulkUploadHistoryEvent( } public BulkUploadHistoryEvent() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -121,9 +121,10 @@ public Optional processingState() { return (Optional) processingState; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique ID of the upload @@ -134,6 +135,7 @@ public BulkUploadHistoryEvent withUploadId(String uploadId) { return this; } + /** * The unique ID of the upload */ @@ -152,6 +154,7 @@ public BulkUploadHistoryEvent withStartTime(String startTime) { return this; } + /** * The start time of the upload in ISO 8601 format */ @@ -170,6 +173,7 @@ public BulkUploadHistoryEvent withEndTime(String endTime) { return this; } + /** * The end time of the upload in ISO 8601 format, 'NA' if the upload is still active */ @@ -188,6 +192,7 @@ public BulkUploadHistoryEvent withStatus(BulkUploadHistoryEventStatus status) { return this; } + /** * The status of the upload, an enum of ACTIVE, SUCCESSFUL */ @@ -206,6 +211,7 @@ public BulkUploadHistoryEvent withProcessingState(ProcessingState processingStat return this; } + /** * The current state of the upload, an enum of UNAVAILABLE, UPLOAD STARTED, UPLOAD IN PROGRESS, UPLOAD COMPLETED, DELETION PAUSED, INDEXING COMPLETED */ @@ -215,7 +221,6 @@ public BulkUploadHistoryEvent withProcessingState(Optional uploadId = Optional.empty(); - + private Optional startTime = Optional.empty(); - + private Optional endTime = Optional.empty(); - + private Optional status = Optional.empty(); - + private Optional processingState = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The unique ID of the upload */ @@ -287,6 +291,7 @@ public Builder uploadId(Optional uploadId) { return this; } + /** * The start time of the upload in ISO 8601 format */ @@ -305,6 +310,7 @@ public Builder startTime(Optional startTime) { return this; } + /** * The end time of the upload in ISO 8601 format, 'NA' if the upload is still active */ @@ -323,6 +329,7 @@ public Builder endTime(Optional endTime) { return this; } + /** * The status of the upload, an enum of ACTIVE, SUCCESSFUL */ @@ -341,6 +348,7 @@ public Builder status(Optional status) { return this; } + /** * The current state of the upload, an enum of UNAVAILABLE, UPLOAD STARTED, UPLOAD IN PROGRESS, UPLOAD COMPLETED, DELETION PAUSED, INDEXING COMPLETED */ @@ -358,14 +366,13 @@ public Builder processingState(Optional processingSta this.processingState = processingState; return this; } - + public BulkUploadHistoryEvent build() { + return new BulkUploadHistoryEvent( - uploadId, - startTime, - endTime, - status, - processingState); + uploadId, startTime, endTime, + status, processingState); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarAttendee.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarAttendee.java index 29ce11ba..7d62ae9e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarAttendee.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarAttendee.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class CalendarAttendee { +public class CalendarAttendee { /** * Whether or not this attendee is an organizer. */ @@ -32,6 +32,7 @@ public class CalendarAttendee { @JsonProperty("isInGroup") private Optional isInGroup; + @JsonProperty("person") private Person person; @@ -42,6 +43,7 @@ public class CalendarAttendee { @JsonProperty("groupAttendees") private Optional> groupAttendees; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("responseStatus") private Optional responseStatus; @@ -67,7 +69,8 @@ public CalendarAttendee( public CalendarAttendee( Person person) { - this(Optional.empty(), Optional.empty(), person, Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), person, + Optional.empty(), Optional.empty()); } /** @@ -106,9 +109,10 @@ public Optional responseStatus() { return (Optional) responseStatus; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Whether or not this attendee is an organizer. @@ -119,6 +123,7 @@ public CalendarAttendee withIsOrganizer(boolean isOrganizer) { return this; } + /** * Whether or not this attendee is an organizer. */ @@ -137,6 +142,7 @@ public CalendarAttendee withIsInGroup(boolean isInGroup) { return this; } + /** * Whether or not this attendee is in a group. Needed temporarily at least to support both flat attendees and tree for compatibility. */ @@ -161,6 +167,7 @@ public CalendarAttendee withGroupAttendees(List groupAttendees return this; } + /** * If this attendee is a group, represents the list of individual attendees in the group. */ @@ -176,13 +183,13 @@ public CalendarAttendee withResponseStatus(ResponseStatus responseStatus) { return this; } + public CalendarAttendee withResponseStatus(Optional responseStatus) { Utils.checkNotNull(responseStatus, "responseStatus"); this.responseStatus = responseStatus; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -203,11 +210,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - isOrganizer, - isInGroup, - person, - groupAttendees, - responseStatus); + isOrganizer, isInGroup, person, + groupAttendees, responseStatus); } @Override @@ -219,23 +223,25 @@ public String toString() { "groupAttendees", groupAttendees, "responseStatus", responseStatus); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional isOrganizer = Optional.empty(); - + private Optional isInGroup = Optional.empty(); - + private Person person; - + private Optional> groupAttendees = Optional.empty(); - + private Optional responseStatus = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Whether or not this attendee is an organizer. */ @@ -254,6 +260,7 @@ public Builder isOrganizer(Optional isOrganizer) { return this; } + /** * Whether or not this attendee is in a group. Needed temporarily at least to support both flat attendees and tree for compatibility. */ @@ -272,12 +279,14 @@ public Builder isInGroup(Optional isInGroup) { return this; } + public Builder person(Person person) { Utils.checkNotNull(person, "person"); this.person = person; return this; } + /** * If this attendee is a group, represents the list of individual attendees in the group. */ @@ -296,6 +305,7 @@ public Builder groupAttendees(Optional> groupAt return this; } + public Builder responseStatus(ResponseStatus responseStatus) { Utils.checkNotNull(responseStatus, "responseStatus"); this.responseStatus = Optional.ofNullable(responseStatus); @@ -307,14 +317,13 @@ public Builder responseStatus(Optional responseStatus) this.responseStatus = responseStatus; return this; } - + public CalendarAttendee build() { + return new CalendarAttendee( - isOrganizer, - isInGroup, - person, - groupAttendees, - responseStatus); + isOrganizer, isInGroup, person, + groupAttendees, responseStatus); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarAttendees.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarAttendees.java index c724e0d2..a56d259f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarAttendees.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarAttendees.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class CalendarAttendees { +public class CalendarAttendees { /** * Full details of some of the attendees of this event */ @@ -94,7 +94,9 @@ public CalendarAttendees( } public CalendarAttendees() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -154,9 +156,10 @@ public Optional numTentative() { return numTentative; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Full details of some of the attendees of this event @@ -167,6 +170,7 @@ public CalendarAttendees withPeople(List people) { return this; } + /** * Full details of some of the attendees of this event */ @@ -185,6 +189,7 @@ public CalendarAttendees withIsLimit(boolean isLimit) { return this; } + /** * Whether the total count of the people returned is at the retrieval limit. */ @@ -203,6 +208,7 @@ public CalendarAttendees withTotal(long total) { return this; } + /** * Total number of attendees in this event. */ @@ -221,6 +227,7 @@ public CalendarAttendees withNumAccepted(long numAccepted) { return this; } + /** * Total number of attendees who have accepted this event. */ @@ -239,6 +246,7 @@ public CalendarAttendees withNumDeclined(long numDeclined) { return this; } + /** * Total number of attendees who have declined this event. */ @@ -257,6 +265,7 @@ public CalendarAttendees withNumNoResponse(long numNoResponse) { return this; } + /** * Total number of attendees who have not responded to this event. */ @@ -275,6 +284,7 @@ public CalendarAttendees withNumTentative(long numTentative) { return this; } + /** * Total number of attendees who have responded tentatively (i.e. responded maybe) to this event. */ @@ -284,7 +294,6 @@ public CalendarAttendees withNumTentative(Optional numTentative) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -307,12 +316,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - people, - isLimit, - total, - numAccepted, - numDeclined, - numNoResponse, + people, isLimit, total, + numAccepted, numDeclined, numNoResponse, numTentative); } @@ -327,27 +332,29 @@ public String toString() { "numNoResponse", numNoResponse, "numTentative", numTentative); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> people = Optional.empty(); - + private Optional isLimit = Optional.empty(); - + private Optional total = Optional.empty(); - + private Optional numAccepted = Optional.empty(); - + private Optional numDeclined = Optional.empty(); - + private Optional numNoResponse = Optional.empty(); - + private Optional numTentative = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Full details of some of the attendees of this event */ @@ -366,6 +373,7 @@ public Builder people(Optional> people) { return this; } + /** * Whether the total count of the people returned is at the retrieval limit. */ @@ -384,6 +392,7 @@ public Builder isLimit(Optional isLimit) { return this; } + /** * Total number of attendees in this event. */ @@ -402,6 +411,7 @@ public Builder total(Optional total) { return this; } + /** * Total number of attendees who have accepted this event. */ @@ -420,6 +430,7 @@ public Builder numAccepted(Optional numAccepted) { return this; } + /** * Total number of attendees who have declined this event. */ @@ -438,6 +449,7 @@ public Builder numDeclined(Optional numDeclined) { return this; } + /** * Total number of attendees who have not responded to this event. */ @@ -456,6 +468,7 @@ public Builder numNoResponse(Optional numNoResponse) { return this; } + /** * Total number of attendees who have responded tentatively (i.e. responded maybe) to this event. */ @@ -473,16 +486,14 @@ public Builder numTentative(Optional numTentative) { this.numTentative = numTentative; return this; } - + public CalendarAttendees build() { + return new CalendarAttendees( - people, - isLimit, - total, - numAccepted, - numDeclined, - numNoResponse, + people, isLimit, total, + numAccepted, numDeclined, numNoResponse, numTentative); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarEvent.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarEvent.java index 08815b49..07bd8cb1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarEvent.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CalendarEvent.java @@ -46,6 +46,7 @@ public class CalendarEvent { @JsonProperty("url") private String url; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("attendees") private Optional attendees; @@ -57,6 +58,7 @@ public class CalendarEvent { @JsonProperty("location") private Optional location; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("conferenceData") private Optional conferenceData; @@ -89,10 +91,12 @@ public class CalendarEvent { @JsonProperty("transcriptUrl") private Optional transcriptUrl; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("classifications") private Optional> classifications; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("generatedAttachments") private Optional> generatedAttachments; @@ -143,7 +147,11 @@ public CalendarEvent( public CalendarEvent( String id, String url) { - this(Optional.empty(), Optional.empty(), id, url, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), id, + url, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @SuppressWarnings("unchecked") @@ -241,9 +249,10 @@ public Optional> generatedAttachments() { return (Optional>) generatedAttachments; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CalendarEvent withTime(TimeInterval time) { Utils.checkNotNull(time, "time"); @@ -251,6 +260,7 @@ public CalendarEvent withTime(TimeInterval time) { return this; } + public CalendarEvent withTime(Optional time) { Utils.checkNotNull(time, "time"); this.time = time; @@ -266,6 +276,7 @@ public CalendarEvent withEventType(CalendarEventEventType eventType) { return this; } + /** * The nature of the event, for example "out of office". */ @@ -299,6 +310,7 @@ public CalendarEvent withAttendees(CalendarAttendees attendees) { return this; } + public CalendarEvent withAttendees(Optional attendees) { Utils.checkNotNull(attendees, "attendees"); this.attendees = attendees; @@ -314,6 +326,7 @@ public CalendarEvent withLocation(String location) { return this; } + /** * The location that this event is taking place at. */ @@ -329,6 +342,7 @@ public CalendarEvent withConferenceData(ConferenceData conferenceData) { return this; } + public CalendarEvent withConferenceData(Optional conferenceData) { Utils.checkNotNull(conferenceData, "conferenceData"); this.conferenceData = conferenceData; @@ -344,6 +358,7 @@ public CalendarEvent withDescription(String description) { return this; } + /** * The HTML description of the event. */ @@ -362,6 +377,7 @@ public CalendarEvent withDatasource(String datasource) { return this; } + /** * The app or other repository type from which the event was extracted */ @@ -380,6 +396,7 @@ public CalendarEvent withHasTranscript(boolean hasTranscript) { return this; } + /** * The event has a transcript associated with it enabling features like summarization */ @@ -398,6 +415,7 @@ public CalendarEvent withTranscriptUrl(String transcriptUrl) { return this; } + /** * A link to the transcript of the event */ @@ -413,6 +431,7 @@ public CalendarEvent withClassifications(List classificatio return this; } + public CalendarEvent withClassifications(Optional> classifications) { Utils.checkNotNull(classifications, "classifications"); this.classifications = classifications; @@ -425,13 +444,13 @@ public CalendarEvent withGeneratedAttachments(List generate return this; } + public CalendarEvent withGeneratedAttachments(Optional> generatedAttachments) { Utils.checkNotNull(generatedAttachments, "generatedAttachments"); this.generatedAttachments = generatedAttachments; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -460,18 +479,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - time, - eventType, - id, - url, - attendees, - location, - conferenceData, - description, - datasource, - hasTranscript, - transcriptUrl, - classifications, + time, eventType, id, + url, attendees, location, + conferenceData, description, datasource, + hasTranscript, transcriptUrl, classifications, generatedAttachments); } @@ -492,39 +503,41 @@ public String toString() { "classifications", classifications, "generatedAttachments", generatedAttachments); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional time = Optional.empty(); - + private Optional eventType = Optional.empty(); - + private String id; - + private String url; - + private Optional attendees = Optional.empty(); - + private Optional location = Optional.empty(); - + private Optional conferenceData = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional hasTranscript = Optional.empty(); - + private Optional transcriptUrl = Optional.empty(); - + private Optional> classifications = Optional.empty(); - + private Optional> generatedAttachments = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder time(TimeInterval time) { Utils.checkNotNull(time, "time"); this.time = Optional.ofNullable(time); @@ -537,6 +550,7 @@ public Builder time(Optional time) { return this; } + /** * The nature of the event, for example "out of office". */ @@ -555,6 +569,7 @@ public Builder eventType(Optional eventType) { return this; } + /** * The calendar event id */ @@ -564,6 +579,7 @@ public Builder id(String id) { return this; } + /** * A permalink for this calendar event */ @@ -573,6 +589,7 @@ public Builder url(String url) { return this; } + public Builder attendees(CalendarAttendees attendees) { Utils.checkNotNull(attendees, "attendees"); this.attendees = Optional.ofNullable(attendees); @@ -585,6 +602,7 @@ public Builder attendees(Optional attendees) { return this; } + /** * The location that this event is taking place at. */ @@ -603,6 +621,7 @@ public Builder location(Optional location) { return this; } + public Builder conferenceData(ConferenceData conferenceData) { Utils.checkNotNull(conferenceData, "conferenceData"); this.conferenceData = Optional.ofNullable(conferenceData); @@ -615,6 +634,7 @@ public Builder conferenceData(Optional conferenceData) return this; } + /** * The HTML description of the event. */ @@ -633,6 +653,7 @@ public Builder description(Optional description) { return this; } + /** * The app or other repository type from which the event was extracted */ @@ -651,6 +672,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * The event has a transcript associated with it enabling features like summarization */ @@ -669,6 +691,7 @@ public Builder hasTranscript(Optional hasTranscript) { return this; } + /** * A link to the transcript of the event */ @@ -687,6 +710,7 @@ public Builder transcriptUrl(Optional transcriptUrl) { return this; } + public Builder classifications(List classifications) { Utils.checkNotNull(classifications, "classifications"); this.classifications = Optional.ofNullable(classifications); @@ -699,6 +723,7 @@ public Builder classifications(Optional> cla return this; } + public Builder generatedAttachments(List generatedAttachments) { Utils.checkNotNull(generatedAttachments, "generatedAttachments"); this.generatedAttachments = Optional.ofNullable(generatedAttachments); @@ -710,22 +735,16 @@ public Builder generatedAttachments(Optional this.generatedAttachments = generatedAttachments; return this; } - + public CalendarEvent build() { + return new CalendarEvent( - time, - eventType, - id, - url, - attendees, - location, - conferenceData, - description, - datasource, - hasTranscript, - transcriptUrl, - classifications, + time, eventType, id, + url, attendees, location, + conferenceData, description, datasource, + hasTranscript, transcriptUrl, classifications, generatedAttachments); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CanonicalizingRegexType.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CanonicalizingRegexType.java index 0b9e1f4c..189b58e6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CanonicalizingRegexType.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CanonicalizingRegexType.java @@ -19,7 +19,6 @@ *

Regular expression to apply to an arbitrary string to transform it into a canonical string. */ public class CanonicalizingRegexType { - /** * Regular expression to match to an arbitrary string. */ @@ -64,9 +63,10 @@ public Optional rewriteRegex() { return rewriteRegex; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Regular expression to match to an arbitrary string. @@ -77,6 +77,7 @@ public CanonicalizingRegexType withMatchRegex(String matchRegex) { return this; } + /** * Regular expression to match to an arbitrary string. */ @@ -95,6 +96,7 @@ public CanonicalizingRegexType withRewriteRegex(String rewriteRegex) { return this; } + /** * Regular expression to transform into a canonical string. */ @@ -104,7 +106,6 @@ public CanonicalizingRegexType withRewriteRegex(Optional rewriteRegex) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -122,8 +123,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - matchRegex, - rewriteRegex); + matchRegex, rewriteRegex); } @Override @@ -132,17 +132,19 @@ public String toString() { "matchRegex", matchRegex, "rewriteRegex", rewriteRegex); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional matchRegex = Optional.empty(); - + private Optional rewriteRegex = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Regular expression to match to an arbitrary string. */ @@ -161,6 +163,7 @@ public Builder matchRegex(Optional matchRegex) { return this; } + /** * Regular expression to transform into a canonical string. */ @@ -178,11 +181,12 @@ public Builder rewriteRegex(Optional rewriteRegex) { this.rewriteRegex = rewriteRegex; return this; } - + public CanonicalizingRegexType build() { + return new CanonicalizingRegexType( - matchRegex, - rewriteRegex); + matchRegex, rewriteRegex); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CategoryToResultSize.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CategoryToResultSize.java index 590b1a9b..b78943c7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CategoryToResultSize.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CategoryToResultSize.java @@ -14,6 +14,7 @@ import java.lang.String; import java.util.Optional; + public class CategoryToResultSize { @JsonInclude(Include.NON_ABSENT) @@ -36,9 +37,10 @@ public Optional resultSize() { return resultSize; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CategoryToResultSize withResultSize(long resultSize) { Utils.checkNotNull(resultSize, "resultSize"); @@ -46,13 +48,13 @@ public CategoryToResultSize withResultSize(long resultSize) { return this; } + public CategoryToResultSize withResultSize(Optional resultSize) { Utils.checkNotNull(resultSize, "resultSize"); this.resultSize = resultSize; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -77,15 +79,17 @@ public String toString() { return Utils.toString(CategoryToResultSize.class, "resultSize", resultSize); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional resultSize = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder resultSize(long resultSize) { Utils.checkNotNull(resultSize, "resultSize"); this.resultSize = Optional.ofNullable(resultSize); @@ -97,10 +101,12 @@ public Builder resultSize(Optional resultSize) { this.resultSize = resultSize; return this; } - + public CategoryToResultSize build() { + return new CategoryToResultSize( resultSize); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChannelInviteInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChannelInviteInfo.java index 856afe2b..59e7c292 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChannelInviteInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChannelInviteInfo.java @@ -34,6 +34,7 @@ public class ChannelInviteInfo { @JsonProperty("isAutoInvite") private Optional isAutoInvite; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("inviter") private Optional inviter; @@ -72,7 +73,8 @@ public ChannelInviteInfo( } public ChannelInviteInfo() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") @@ -111,9 +113,10 @@ public Optional reminderTime() { return reminderTime; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ChannelInviteInfo withChannel(CommunicationChannel channel) { Utils.checkNotNull(channel, "channel"); @@ -121,6 +124,7 @@ public ChannelInviteInfo withChannel(CommunicationChannel channel) { return this; } + public ChannelInviteInfo withChannel(Optional channel) { Utils.checkNotNull(channel, "channel"); this.channel = channel; @@ -136,6 +140,7 @@ public ChannelInviteInfo withIsAutoInvite(boolean isAutoInvite) { return this; } + /** * Bit that tracks if this invite was automatically sent or user-sent */ @@ -151,6 +156,7 @@ public ChannelInviteInfo withInviter(Person inviter) { return this; } + public ChannelInviteInfo withInviter(Optional inviter) { Utils.checkNotNull(inviter, "inviter"); this.inviter = inviter; @@ -166,6 +172,7 @@ public ChannelInviteInfo withInviteTime(OffsetDateTime inviteTime) { return this; } + /** * The time this person was invited in ISO format (ISO 8601). */ @@ -184,6 +191,7 @@ public ChannelInviteInfo withReminderTime(OffsetDateTime reminderTime) { return this; } + /** * The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. */ @@ -193,7 +201,6 @@ public ChannelInviteInfo withReminderTime(Optional reminderTime) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -214,11 +221,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - channel, - isAutoInvite, - inviter, - inviteTime, - reminderTime); + channel, isAutoInvite, inviter, + inviteTime, reminderTime); } @Override @@ -230,23 +234,25 @@ public String toString() { "inviteTime", inviteTime, "reminderTime", reminderTime); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional channel = Optional.empty(); - + private Optional isAutoInvite = Optional.empty(); - + private Optional inviter = Optional.empty(); - + private Optional inviteTime = Optional.empty(); - + private Optional reminderTime = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder channel(CommunicationChannel channel) { Utils.checkNotNull(channel, "channel"); this.channel = Optional.ofNullable(channel); @@ -259,6 +265,7 @@ public Builder channel(Optional channel) { return this; } + /** * Bit that tracks if this invite was automatically sent or user-sent */ @@ -277,6 +284,7 @@ public Builder isAutoInvite(Optional isAutoInvite) { return this; } + public Builder inviter(Person inviter) { Utils.checkNotNull(inviter, "inviter"); this.inviter = Optional.ofNullable(inviter); @@ -289,6 +297,7 @@ public Builder inviter(Optional inviter) { return this; } + /** * The time this person was invited in ISO format (ISO 8601). */ @@ -307,6 +316,7 @@ public Builder inviteTime(Optional inviteTime) { return this; } + /** * The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. */ @@ -324,14 +334,13 @@ public Builder reminderTime(Optional reminderTime) { this.reminderTime = reminderTime; return this; } - + public ChannelInviteInfo build() { + return new ChannelInviteInfo( - channel, - isAutoInvite, - inviter, - inviteTime, - reminderTime); + channel, isAutoInvite, inviter, + inviteTime, reminderTime); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Chat.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Chat.java index fde2c1c3..3477ad5c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Chat.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Chat.java @@ -22,7 +22,6 @@ *

A historical representation of a series of chat messages a user had with Glean Assistant. */ public class Chat { - /** * The opaque id of the Chat. */ @@ -37,6 +36,7 @@ public class Chat { @JsonProperty("createTime") private Optional createTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createdBy") private Optional createdBy; @@ -115,7 +115,9 @@ public Chat( } public Chat() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -190,9 +192,10 @@ public Optional> messages() { return (Optional>) messages; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque id of the Chat. @@ -203,6 +206,7 @@ public Chat withId(String id) { return this; } + /** * The opaque id of the Chat. */ @@ -221,6 +225,7 @@ public Chat withCreateTime(long createTime) { return this; } + /** * Server Unix timestamp of the creation time (in seconds since epoch UTC). */ @@ -236,6 +241,7 @@ public Chat withCreatedBy(Person createdBy) { return this; } + public Chat withCreatedBy(Optional createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; @@ -251,6 +257,7 @@ public Chat withUpdateTime(long updateTime) { return this; } + /** * Server Unix timestamp of the update time (in seconds since epoch UTC). */ @@ -269,6 +276,7 @@ public Chat withName(String name) { return this; } + /** * The name of the Chat. */ @@ -287,6 +295,7 @@ public Chat withApplicationId(String applicationId) { return this; } + /** * The ID of the AI App that this Chat is associated to. */ @@ -305,6 +314,7 @@ public Chat withApplicationName(String applicationName) { return this; } + /** * The display name of the AI App that this Chat is associated to. */ @@ -323,6 +333,7 @@ public Chat withIcon(IconConfig icon) { return this; } + /** * Defines how to render an icon */ @@ -341,6 +352,7 @@ public Chat withMessages(List messages) { return this; } + /** * The chat messages within a Chat. */ @@ -350,7 +362,6 @@ public Chat withMessages(Optional> messages) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -375,15 +386,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - createTime, - createdBy, - updateTime, - name, - applicationId, - applicationName, - icon, - messages); + id, createTime, createdBy, + updateTime, name, applicationId, + applicationName, icon, messages); } @Override @@ -399,31 +404,33 @@ public String toString() { "icon", icon, "messages", messages); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional createTime = Optional.empty(); - + private Optional createdBy = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional name = Optional.empty(); - + private Optional applicationId = Optional.empty(); - + private Optional applicationName = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Optional> messages = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque id of the Chat. */ @@ -442,6 +449,7 @@ public Builder id(Optional id) { return this; } + /** * Server Unix timestamp of the creation time (in seconds since epoch UTC). */ @@ -460,6 +468,7 @@ public Builder createTime(Optional createTime) { return this; } + public Builder createdBy(Person createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = Optional.ofNullable(createdBy); @@ -472,6 +481,7 @@ public Builder createdBy(Optional createdBy) { return this; } + /** * Server Unix timestamp of the update time (in seconds since epoch UTC). */ @@ -490,6 +500,7 @@ public Builder updateTime(Optional updateTime) { return this; } + /** * The name of the Chat. */ @@ -508,6 +519,7 @@ public Builder name(Optional name) { return this; } + /** * The ID of the AI App that this Chat is associated to. */ @@ -526,6 +538,7 @@ public Builder applicationId(Optional applicationId) { return this; } + /** * The display name of the AI App that this Chat is associated to. */ @@ -544,6 +557,7 @@ public Builder applicationName(Optional applicationName) { return this; } + /** * Defines how to render an icon */ @@ -562,6 +576,7 @@ public Builder icon(Optional icon) { return this; } + /** * The chat messages within a Chat. */ @@ -579,18 +594,14 @@ public Builder messages(Optional> messages) { this.messages = messages; return this; } - + public Chat build() { + return new Chat( - id, - createTime, - createdBy, - updateTime, - name, - applicationId, - applicationName, - icon, - messages); + id, createTime, createdBy, + updateTime, name, applicationId, + applicationName, icon, messages); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatFile.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatFile.java index 257707de..9b27574a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatFile.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatFile.java @@ -20,7 +20,6 @@ *

Structure for file uploaded by a user for Chat. */ public class ChatFile { - /** * Unique identifier of the file. */ @@ -66,7 +65,8 @@ public ChatFile( } public ChatFile() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -102,9 +102,10 @@ public Optional metadata() { return (Optional) metadata; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique identifier of the file. @@ -115,6 +116,7 @@ public ChatFile withId(String id) { return this; } + /** * Unique identifier of the file. */ @@ -133,6 +135,7 @@ public ChatFile withUrl(String url) { return this; } + /** * Url of the file. */ @@ -151,6 +154,7 @@ public ChatFile withName(String name) { return this; } + /** * Name of the uploaded file. */ @@ -169,6 +173,7 @@ public ChatFile withMetadata(ChatFileMetadata metadata) { return this; } + /** * Metadata of a file uploaded by a user for Chat. */ @@ -178,7 +183,6 @@ public ChatFile withMetadata(Optional metadata) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -198,9 +202,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - url, - name, + id, url, name, metadata); } @@ -212,21 +214,23 @@ public String toString() { "name", name, "metadata", metadata); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional name = Optional.empty(); - + private Optional metadata = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique identifier of the file. */ @@ -245,6 +249,7 @@ public Builder id(Optional id) { return this; } + /** * Url of the file. */ @@ -263,6 +268,7 @@ public Builder url(Optional url) { return this; } + /** * Name of the uploaded file. */ @@ -281,6 +287,7 @@ public Builder name(Optional name) { return this; } + /** * Metadata of a file uploaded by a user for Chat. */ @@ -298,13 +305,13 @@ public Builder metadata(Optional metadata) { this.metadata = metadata; return this; } - + public ChatFile build() { + return new ChatFile( - id, - url, - name, + id, url, name, metadata); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatFileMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatFileMetadata.java index bf2cf870..55f7e25b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatFileMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatFileMetadata.java @@ -21,7 +21,6 @@ *

Metadata of a file uploaded by a user for Chat. */ public class ChatFileMetadata { - /** * Current status of the file. */ @@ -77,7 +76,8 @@ public ChatFileMetadata( } public ChatFileMetadata() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -122,9 +122,10 @@ public Optional mimeType() { return mimeType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Current status of the file. @@ -135,6 +136,7 @@ public ChatFileMetadata withStatus(ChatFileStatus status) { return this; } + /** * Current status of the file. */ @@ -153,6 +155,7 @@ public ChatFileMetadata withUploadTime(long uploadTime) { return this; } + /** * Upload time, in epoch seconds. */ @@ -171,6 +174,7 @@ public ChatFileMetadata withProcessedSize(long processedSize) { return this; } + /** * Size of the processed file in bytes. */ @@ -189,6 +193,7 @@ public ChatFileMetadata withFailureReason(ChatFileFailureReason failureReason) { return this; } + /** * Reason for failed status. */ @@ -207,6 +212,7 @@ public ChatFileMetadata withMimeType(String mimeType) { return this; } + /** * MIME type of the file. */ @@ -216,7 +222,6 @@ public ChatFileMetadata withMimeType(Optional mimeType) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -237,11 +242,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - status, - uploadTime, - processedSize, - failureReason, - mimeType); + status, uploadTime, processedSize, + failureReason, mimeType); } @Override @@ -253,23 +255,25 @@ public String toString() { "failureReason", failureReason, "mimeType", mimeType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional status = Optional.empty(); - + private Optional uploadTime = Optional.empty(); - + private Optional processedSize = Optional.empty(); - + private Optional failureReason = Optional.empty(); - + private Optional mimeType = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Current status of the file. */ @@ -288,6 +292,7 @@ public Builder status(Optional status) { return this; } + /** * Upload time, in epoch seconds. */ @@ -306,6 +311,7 @@ public Builder uploadTime(Optional uploadTime) { return this; } + /** * Size of the processed file in bytes. */ @@ -324,6 +330,7 @@ public Builder processedSize(Optional processedSize) { return this; } + /** * Reason for failed status. */ @@ -342,6 +349,7 @@ public Builder failureReason(Optional failureRe return this; } + /** * MIME type of the file. */ @@ -359,14 +367,13 @@ public Builder mimeType(Optional mimeType) { this.mimeType = mimeType; return this; } - + public ChatFileMetadata build() { + return new ChatFileMetadata( - status, - uploadTime, - processedSize, - failureReason, - mimeType); + status, uploadTime, processedSize, + failureReason, mimeType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessage.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessage.java index 9bf54494..ac407ddb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessage.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessage.java @@ -25,7 +25,6 @@ *

A message that is rendered as one coherent unit with one given sender. */ public class ChatMessage { - /** * Describes the agent that executes the request. */ @@ -33,6 +32,7 @@ public class ChatMessage { @JsonProperty("agentConfig") private Optional agentConfig; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("author") private Optional author; @@ -131,7 +131,10 @@ public ChatMessage( } public ChatMessage() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -220,9 +223,10 @@ public Optional hasMoreFragments() { return hasMoreFragments; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Describes the agent that executes the request. @@ -233,6 +237,7 @@ public ChatMessage withAgentConfig(AgentConfig agentConfig) { return this; } + /** * Describes the agent that executes the request. */ @@ -248,6 +253,7 @@ public ChatMessage withAuthor(Author author) { return this; } + public ChatMessage withAuthor(Optional author) { Utils.checkNotNull(author, "author"); this.author = author; @@ -263,6 +269,7 @@ public ChatMessage withCitations(List citations) { return this; } + /** * A list of Citations that were used to generate the response. */ @@ -281,6 +288,7 @@ public ChatMessage withUploadedFileIds(List uploadedFileIds) { return this; } + /** * IDs of files uploaded in the message that are referenced to generate the answer. */ @@ -299,6 +307,7 @@ public ChatMessage withFragments(List fragments) { return this; } + /** * A list of rich data used to represent the response or formulate a request. These are linearly stitched together to support richer data formats beyond simple text. */ @@ -317,6 +326,7 @@ public ChatMessage withTs(String ts) { return this; } + /** * Response timestamp of the message. */ @@ -335,6 +345,7 @@ public ChatMessage withMessageId(String messageId) { return this; } + /** * A unique server-side generated ID used to identify a message, automatically populated for any USER authored messages. */ @@ -353,6 +364,7 @@ public ChatMessage withMessageTrackingToken(String messageTrackingToken) { return this; } + /** * Opaque tracking token generated server-side. */ @@ -371,6 +383,7 @@ public ChatMessage withMessageType(MessageType messageType) { return this; } + /** * Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified. */ @@ -392,6 +405,7 @@ public ChatMessage withHasMoreFragments(boolean hasMoreFragments) { return this; } + /** * Signals there are additional response fragments incoming. * @@ -404,7 +418,6 @@ public ChatMessage withHasMoreFragments(Optional hasMoreFragments) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -430,15 +443,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - agentConfig, - author, - citations, - uploadedFileIds, - fragments, - ts, - messageId, - messageTrackingToken, - messageType, + agentConfig, author, citations, + uploadedFileIds, fragments, ts, + messageId, messageTrackingToken, messageType, hasMoreFragments); } @@ -456,34 +463,36 @@ public String toString() { "messageType", messageType, "hasMoreFragments", hasMoreFragments); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional agentConfig = Optional.empty(); - + private Optional author; - + private Optional> citations = Optional.empty(); - + private Optional> uploadedFileIds = Optional.empty(); - + private Optional> fragments = Optional.empty(); - + private Optional ts = Optional.empty(); - + private Optional messageId = Optional.empty(); - + private Optional messageTrackingToken = Optional.empty(); - + private Optional messageType; - + @Deprecated private Optional hasMoreFragments = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Describes the agent that executes the request. */ @@ -502,6 +511,7 @@ public Builder agentConfig(Optional agentConfig) { return this; } + public Builder author(Author author) { Utils.checkNotNull(author, "author"); this.author = Optional.ofNullable(author); @@ -514,6 +524,7 @@ public Builder author(Optional author) { return this; } + /** * A list of Citations that were used to generate the response. */ @@ -532,6 +543,7 @@ public Builder citations(Optional> citations return this; } + /** * IDs of files uploaded in the message that are referenced to generate the answer. */ @@ -550,6 +562,7 @@ public Builder uploadedFileIds(Optional> uploadedFileIds) return this; } + /** * A list of rich data used to represent the response or formulate a request. These are linearly stitched together to support richer data formats beyond simple text. */ @@ -568,6 +581,7 @@ public Builder fragments(Optional> fragments return this; } + /** * Response timestamp of the message. */ @@ -586,6 +600,7 @@ public Builder ts(Optional ts) { return this; } + /** * A unique server-side generated ID used to identify a message, automatically populated for any USER authored messages. */ @@ -604,6 +619,7 @@ public Builder messageId(Optional messageId) { return this; } + /** * Opaque tracking token generated server-side. */ @@ -622,6 +638,7 @@ public Builder messageTrackingToken(Optional messageTrackingToken) { return this; } + /** * Semantically groups content of a certain type. It can be used for purposes such as differential UI treatment. USER authored messages should be of type CONTENT and do not need `messageType` specified. */ @@ -640,6 +657,7 @@ public Builder messageType(Optional messageType) { return this; } + /** * Signals there are additional response fragments incoming. * @@ -663,7 +681,7 @@ public Builder hasMoreFragments(Optional hasMoreFragments) { this.hasMoreFragments = hasMoreFragments; return this; } - + public ChatMessage build() { if (author == null) { author = _SINGLETON_VALUE_Author.value(); @@ -671,19 +689,15 @@ public ChatMessage build() { if (messageType == null) { messageType = _SINGLETON_VALUE_MessageType.value(); } + return new ChatMessage( - agentConfig, - author, - citations, - uploadedFileIds, - fragments, - ts, - messageId, - messageTrackingToken, - messageType, + agentConfig, author, citations, + uploadedFileIds, fragments, ts, + messageId, messageTrackingToken, messageType, hasMoreFragments); } + private static final LazySingletonValue> _SINGLETON_VALUE_Author = new LazySingletonValue<>( "author", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageCitation.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageCitation.java index 17e2586d..51e727cc 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageCitation.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageCitation.java @@ -21,7 +21,6 @@ *

Information about the source for a ChatMessage. */ public class ChatMessageCitation { - /** * An opaque token that represents this particular result in this particular ChatMessage. To be used for /feedback reporting. */ @@ -29,6 +28,7 @@ public class ChatMessageCitation { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceDocument") private Optional sourceDocument; @@ -40,6 +40,7 @@ public class ChatMessageCitation { @JsonProperty("sourceFile") private Optional sourceFile; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourcePerson") private Optional sourcePerson; @@ -71,7 +72,8 @@ public ChatMessageCitation( } public ChatMessageCitation() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -112,9 +114,10 @@ public Optional> referenceRanges() { return (Optional>) referenceRanges; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * An opaque token that represents this particular result in this particular ChatMessage. To be used for /feedback reporting. @@ -125,6 +128,7 @@ public ChatMessageCitation withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular result in this particular ChatMessage. To be used for /feedback reporting. */ @@ -140,6 +144,7 @@ public ChatMessageCitation withSourceDocument(Document sourceDocument) { return this; } + public ChatMessageCitation withSourceDocument(Optional sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = sourceDocument; @@ -155,6 +160,7 @@ public ChatMessageCitation withSourceFile(ChatFile sourceFile) { return this; } + /** * Structure for file uploaded by a user for Chat. */ @@ -170,6 +176,7 @@ public ChatMessageCitation withSourcePerson(Person sourcePerson) { return this; } + public ChatMessageCitation withSourcePerson(Optional sourcePerson) { Utils.checkNotNull(sourcePerson, "sourcePerson"); this.sourcePerson = sourcePerson; @@ -185,6 +192,7 @@ public ChatMessageCitation withReferenceRanges(List referenceRan return this; } + /** * Each reference range and its corresponding snippets */ @@ -194,7 +202,6 @@ public ChatMessageCitation withReferenceRanges(Optional trackingToken = Optional.empty(); - + private Optional sourceDocument = Optional.empty(); - + private Optional sourceFile = Optional.empty(); - + private Optional sourcePerson = Optional.empty(); - + private Optional> referenceRanges = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * An opaque token that represents this particular result in this particular ChatMessage. To be used for /feedback reporting. */ @@ -266,6 +272,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder sourceDocument(Document sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = Optional.ofNullable(sourceDocument); @@ -278,6 +285,7 @@ public Builder sourceDocument(Optional sourceDocument) { return this; } + /** * Structure for file uploaded by a user for Chat. */ @@ -296,6 +304,7 @@ public Builder sourceFile(Optional sourceFile) { return this; } + public Builder sourcePerson(Person sourcePerson) { Utils.checkNotNull(sourcePerson, "sourcePerson"); this.sourcePerson = Optional.ofNullable(sourcePerson); @@ -308,6 +317,7 @@ public Builder sourcePerson(Optional sourcePerson) { return this; } + /** * Each reference range and its corresponding snippets */ @@ -325,14 +335,13 @@ public Builder referenceRanges(Optional> referenc this.referenceRanges = referenceRanges; return this; } - + public ChatMessageCitation build() { + return new ChatMessageCitation( - trackingToken, - sourceDocument, - sourceFile, - sourcePerson, - referenceRanges); + trackingToken, sourceDocument, sourceFile, + sourcePerson, referenceRanges); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageFragment.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageFragment.java index e8a295ee..f9f206af 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageFragment.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMessageFragment.java @@ -21,7 +21,6 @@ *

Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, or file. */ public class ChatMessageFragment { - /** * An array of entities in the work graph retrieved via a data request. */ @@ -36,10 +35,12 @@ public class ChatMessageFragment { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("text") private Optional text; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("querySuggestion") private Optional querySuggestion; @@ -51,6 +52,7 @@ public class ChatMessageFragment { @JsonProperty("file") private Optional file; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("action") private Optional action; @@ -78,7 +80,8 @@ public ChatMessageFragment( } public ChatMessageFragment() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -124,9 +127,10 @@ public Optional action() { return (Optional) action; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * An array of entities in the work graph retrieved via a data request. @@ -137,6 +141,7 @@ public ChatMessageFragment withStructuredResults(List structur return this; } + /** * An array of entities in the work graph retrieved via a data request. */ @@ -155,6 +160,7 @@ public ChatMessageFragment withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. */ @@ -170,6 +176,7 @@ public ChatMessageFragment withText(String text) { return this; } + public ChatMessageFragment withText(Optional text) { Utils.checkNotNull(text, "text"); this.text = text; @@ -182,6 +189,7 @@ public ChatMessageFragment withQuerySuggestion(QuerySuggestion querySuggestion) return this; } + public ChatMessageFragment withQuerySuggestion(Optional querySuggestion) { Utils.checkNotNull(querySuggestion, "querySuggestion"); this.querySuggestion = querySuggestion; @@ -197,6 +205,7 @@ public ChatMessageFragment withFile(ChatFile file) { return this; } + /** * Structure for file uploaded by a user for Chat. */ @@ -212,13 +221,13 @@ public ChatMessageFragment withAction(ToolInfo action) { return this; } + public ChatMessageFragment withAction(Optional action) { Utils.checkNotNull(action, "action"); this.action = action; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -240,12 +249,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - structuredResults, - trackingToken, - text, - querySuggestion, - file, - action); + structuredResults, trackingToken, text, + querySuggestion, file, action); } @Override @@ -258,25 +263,27 @@ public String toString() { "file", file, "action", action); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> structuredResults = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional text = Optional.empty(); - + private Optional querySuggestion = Optional.empty(); - + private Optional file = Optional.empty(); - + private Optional action = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * An array of entities in the work graph retrieved via a data request. */ @@ -295,6 +302,7 @@ public Builder structuredResults(Optional> stru return this; } + /** * An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. */ @@ -313,6 +321,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder text(String text) { Utils.checkNotNull(text, "text"); this.text = Optional.ofNullable(text); @@ -325,6 +334,7 @@ public Builder text(Optional text) { return this; } + public Builder querySuggestion(QuerySuggestion querySuggestion) { Utils.checkNotNull(querySuggestion, "querySuggestion"); this.querySuggestion = Optional.ofNullable(querySuggestion); @@ -337,6 +347,7 @@ public Builder querySuggestion(Optional querySuggesti return this; } + /** * Structure for file uploaded by a user for Chat. */ @@ -355,6 +366,7 @@ public Builder file(Optional file) { return this; } + public Builder action(ToolInfo action) { Utils.checkNotNull(action, "action"); this.action = Optional.ofNullable(action); @@ -366,15 +378,13 @@ public Builder action(Optional action) { this.action = action; return this; } - + public ChatMessageFragment build() { + return new ChatMessageFragment( - structuredResults, - trackingToken, - text, - querySuggestion, - file, - action); + structuredResults, trackingToken, text, + querySuggestion, file, action); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMetadata.java index 77d87f0e..836f8e22 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMetadata.java @@ -21,7 +21,6 @@ *

Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content. */ public class ChatMetadata { - /** * The opaque id of the Chat. */ @@ -36,6 +35,7 @@ public class ChatMetadata { @JsonProperty("createTime") private Optional createTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createdBy") private Optional createdBy; @@ -104,7 +104,9 @@ public ChatMetadata( } public ChatMetadata() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -170,9 +172,10 @@ public Optional icon() { return (Optional) icon; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque id of the Chat. @@ -183,6 +186,7 @@ public ChatMetadata withId(String id) { return this; } + /** * The opaque id of the Chat. */ @@ -201,6 +205,7 @@ public ChatMetadata withCreateTime(long createTime) { return this; } + /** * Server Unix timestamp of the creation time (in seconds since epoch UTC). */ @@ -216,6 +221,7 @@ public ChatMetadata withCreatedBy(Person createdBy) { return this; } + public ChatMetadata withCreatedBy(Optional createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; @@ -231,6 +237,7 @@ public ChatMetadata withUpdateTime(long updateTime) { return this; } + /** * Server Unix timestamp of the update time (in seconds since epoch UTC). */ @@ -249,6 +256,7 @@ public ChatMetadata withName(String name) { return this; } + /** * The name of the Chat. */ @@ -267,6 +275,7 @@ public ChatMetadata withApplicationId(String applicationId) { return this; } + /** * The ID of the AI App that this Chat is associated to. */ @@ -285,6 +294,7 @@ public ChatMetadata withApplicationName(String applicationName) { return this; } + /** * The display name of the AI App that this Chat is associated to. */ @@ -303,6 +313,7 @@ public ChatMetadata withIcon(IconConfig icon) { return this; } + /** * Defines how to render an icon */ @@ -312,7 +323,6 @@ public ChatMetadata withIcon(Optional icon) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -336,14 +346,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - createTime, - createdBy, - updateTime, - name, - applicationId, - applicationName, - icon); + id, createTime, createdBy, + updateTime, name, applicationId, + applicationName, icon); } @Override @@ -358,29 +363,31 @@ public String toString() { "applicationName", applicationName, "icon", icon); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional createTime = Optional.empty(); - + private Optional createdBy = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional name = Optional.empty(); - + private Optional applicationId = Optional.empty(); - + private Optional applicationName = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque id of the Chat. */ @@ -399,6 +406,7 @@ public Builder id(Optional id) { return this; } + /** * Server Unix timestamp of the creation time (in seconds since epoch UTC). */ @@ -417,6 +425,7 @@ public Builder createTime(Optional createTime) { return this; } + public Builder createdBy(Person createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = Optional.ofNullable(createdBy); @@ -429,6 +438,7 @@ public Builder createdBy(Optional createdBy) { return this; } + /** * Server Unix timestamp of the update time (in seconds since epoch UTC). */ @@ -447,6 +457,7 @@ public Builder updateTime(Optional updateTime) { return this; } + /** * The name of the Chat. */ @@ -465,6 +476,7 @@ public Builder name(Optional name) { return this; } + /** * The ID of the AI App that this Chat is associated to. */ @@ -483,6 +495,7 @@ public Builder applicationId(Optional applicationId) { return this; } + /** * The display name of the AI App that this Chat is associated to. */ @@ -501,6 +514,7 @@ public Builder applicationName(Optional applicationName) { return this; } + /** * Defines how to render an icon */ @@ -518,17 +532,14 @@ public Builder icon(Optional icon) { this.icon = icon; return this; } - + public ChatMetadata build() { + return new ChatMetadata( - id, - createTime, - createdBy, - updateTime, - name, - applicationId, - applicationName, - icon); + id, createTime, createdBy, + updateTime, name, applicationId, + applicationName, icon); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMetadataResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMetadataResult.java index 2dcef076..e08b2b3c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMetadataResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatMetadataResult.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class ChatMetadataResult { +public class ChatMetadataResult { /** * Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content. */ @@ -61,9 +61,10 @@ public Optional trackingToken() { return trackingToken; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content. @@ -74,6 +75,7 @@ public ChatMetadataResult withChat(ChatMetadata chat) { return this; } + /** * Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content. */ @@ -92,6 +94,7 @@ public ChatMetadataResult withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular Chat. To be used for `/feedback` reporting. */ @@ -101,7 +104,6 @@ public ChatMetadataResult withTrackingToken(Optional trackingToken) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -119,8 +121,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - chat, - trackingToken); + chat, trackingToken); } @Override @@ -129,17 +130,19 @@ public String toString() { "chat", chat, "trackingToken", trackingToken); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional chat = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Metadata of a Chat a user had with Glean Assistant. This contains no actual conversational content. */ @@ -158,6 +161,7 @@ public Builder chat(Optional chat) { return this; } + /** * An opaque token that represents this particular Chat. To be used for `/feedback` reporting. */ @@ -175,11 +179,12 @@ public Builder trackingToken(Optional trackingToken) { this.trackingToken = trackingToken; return this; } - + public ChatMetadataResult build() { + return new ChatMetadataResult( - chat, - trackingToken); + chat, trackingToken); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatRequest.java index c06e52ed..c43d5b08 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatRequest.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class ChatRequest { +public class ChatRequest { /** * Save the current interaction as a Chat for the user to access and potentially continue later. */ @@ -46,10 +46,12 @@ public class ChatRequest { @JsonProperty("agentConfig") private Optional agentConfig; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("inclusions") private Optional inclusions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("exclusions") private Optional exclusions; @@ -61,6 +63,7 @@ public class ChatRequest { @JsonProperty("timeoutMillis") private Optional timeoutMillis; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sessionInfo") private Optional sessionInfo; @@ -125,7 +128,10 @@ public ChatRequest( public ChatRequest( List messages) { - this(Optional.empty(), Optional.empty(), messages, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), messages, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -211,9 +217,10 @@ public Optional stream() { return stream; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Save the current interaction as a Chat for the user to access and potentially continue later. @@ -224,6 +231,7 @@ public ChatRequest withSaveChat(boolean saveChat) { return this; } + /** * Save the current interaction as a Chat for the user to access and potentially continue later. */ @@ -242,6 +250,7 @@ public ChatRequest withChatId(String chatId) { return this; } + /** * The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true. */ @@ -269,6 +278,7 @@ public ChatRequest withAgentConfig(AgentConfig agentConfig) { return this; } + /** * Describes the agent that executes the request. */ @@ -284,6 +294,7 @@ public ChatRequest withInclusions(ChatRestrictionFilters inclusions) { return this; } + public ChatRequest withInclusions(Optional inclusions) { Utils.checkNotNull(inclusions, "inclusions"); this.inclusions = inclusions; @@ -296,6 +307,7 @@ public ChatRequest withExclusions(ChatRestrictionFilters exclusions) { return this; } + public ChatRequest withExclusions(Optional exclusions) { Utils.checkNotNull(exclusions, "exclusions"); this.exclusions = exclusions; @@ -311,6 +323,7 @@ public ChatRequest withTimeoutMillis(long timeoutMillis) { return this; } + /** * Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. */ @@ -326,6 +339,7 @@ public ChatRequest withSessionInfo(SessionInfo sessionInfo) { return this; } + public ChatRequest withSessionInfo(Optional sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = sessionInfo; @@ -341,6 +355,7 @@ public ChatRequest withApplicationId(String applicationId) { return this; } + /** * The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used. */ @@ -359,6 +374,7 @@ public ChatRequest withAgentId(String agentId) { return this; } + /** * The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. */ @@ -377,6 +393,7 @@ public ChatRequest withStream(boolean stream) { return this; } + /** * If set, response lines will be streamed one-by-one as they become available. Each will be a ChatResponse, formatted as JSON, and separated by a new line. If false, the entire response will be returned at once. Note that if this is set and the model being used does not support streaming, the model's response will not be streamed, but other messages from the endpoint still will be. */ @@ -386,7 +403,6 @@ public ChatRequest withStream(Optional stream) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -413,17 +429,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - saveChat, - chatId, - messages, - agentConfig, - inclusions, - exclusions, - timeoutMillis, - sessionInfo, - applicationId, - agentId, - stream); + saveChat, chatId, messages, + agentConfig, inclusions, exclusions, + timeoutMillis, sessionInfo, applicationId, + agentId, stream); } @Override @@ -441,35 +450,37 @@ public String toString() { "agentId", agentId, "stream", stream); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional saveChat = Optional.empty(); - + private Optional chatId = Optional.empty(); - + private List messages; - + private Optional agentConfig = Optional.empty(); - + private Optional inclusions = Optional.empty(); - + private Optional exclusions = Optional.empty(); - + private Optional timeoutMillis = Optional.empty(); - + private Optional sessionInfo = Optional.empty(); - + private Optional applicationId = Optional.empty(); - + private Optional agentId = Optional.empty(); - + private Optional stream = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Save the current interaction as a Chat for the user to access and potentially continue later. */ @@ -488,6 +499,7 @@ public Builder saveChat(Optional saveChat) { return this; } + /** * The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true. */ @@ -506,6 +518,7 @@ public Builder chatId(Optional chatId) { return this; } + /** * A list of chat messages, from most recent to least recent. It can be assumed that the first chat message in the list is the user's most recent query. */ @@ -515,6 +528,7 @@ public Builder messages(List messages) { return this; } + /** * Describes the agent that executes the request. */ @@ -533,6 +547,7 @@ public Builder agentConfig(Optional agentConfig) { return this; } + public Builder inclusions(ChatRestrictionFilters inclusions) { Utils.checkNotNull(inclusions, "inclusions"); this.inclusions = Optional.ofNullable(inclusions); @@ -545,6 +560,7 @@ public Builder inclusions(Optional inclusions) return this; } + public Builder exclusions(ChatRestrictionFilters exclusions) { Utils.checkNotNull(exclusions, "exclusions"); this.exclusions = Optional.ofNullable(exclusions); @@ -557,6 +573,7 @@ public Builder exclusions(Optional exclusions) return this; } + /** * Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. */ @@ -575,6 +592,7 @@ public Builder timeoutMillis(Optional timeoutMillis) { return this; } + public Builder sessionInfo(SessionInfo sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = Optional.ofNullable(sessionInfo); @@ -587,6 +605,7 @@ public Builder sessionInfo(Optional sessionInfo) { return this; } + /** * The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used. */ @@ -605,6 +624,7 @@ public Builder applicationId(Optional applicationId) { return this; } + /** * The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. */ @@ -623,6 +643,7 @@ public Builder agentId(Optional agentId) { return this; } + /** * If set, response lines will be streamed one-by-one as they become available. Each will be a ChatResponse, formatted as JSON, and separated by a new line. If false, the entire response will be returned at once. Note that if this is set and the model being used does not support streaming, the model's response will not be streamed, but other messages from the endpoint still will be. */ @@ -640,20 +661,15 @@ public Builder stream(Optional stream) { this.stream = stream; return this; } - + public ChatRequest build() { + return new ChatRequest( - saveChat, - chatId, - messages, - agentConfig, - inclusions, - exclusions, - timeoutMillis, - sessionInfo, - applicationId, - agentId, - stream); + saveChat, chatId, messages, + agentConfig, inclusions, exclusions, + timeoutMillis, sessionInfo, applicationId, + agentId, stream); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatResponse.java index 6280f979..7e8259c4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatResponse.java @@ -75,7 +75,8 @@ public ChatResponse( } public ChatResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") @@ -117,9 +118,10 @@ public Optional chatSessionTrackingToken() { return chatSessionTrackingToken; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ChatResponse withMessages(List messages) { Utils.checkNotNull(messages, "messages"); @@ -127,6 +129,7 @@ public ChatResponse withMessages(List messages) { return this; } + public ChatResponse withMessages(Optional> messages) { Utils.checkNotNull(messages, "messages"); this.messages = messages; @@ -142,6 +145,7 @@ public ChatResponse withChatId(String chatId) { return this; } + /** * The id of the associated Chat the messages belong to, if one exists. */ @@ -160,6 +164,7 @@ public ChatResponse withFollowUpPrompts(List followUpPrompts) { return this; } + /** * Follow-up prompts for the user to potentially use */ @@ -178,6 +183,7 @@ public ChatResponse withBackendTimeMillis(long backendTimeMillis) { return this; } + /** * Time in milliseconds the backend took to respond to the request. */ @@ -196,6 +202,7 @@ public ChatResponse withChatSessionTrackingToken(String chatSessionTrackingToken return this; } + /** * A token that is used to track the session. */ @@ -205,7 +212,6 @@ public ChatResponse withChatSessionTrackingToken(Optional chatSessionTra return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -226,11 +232,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - messages, - chatId, - followUpPrompts, - backendTimeMillis, - chatSessionTrackingToken); + messages, chatId, followUpPrompts, + backendTimeMillis, chatSessionTrackingToken); } @Override @@ -242,23 +245,25 @@ public String toString() { "backendTimeMillis", backendTimeMillis, "chatSessionTrackingToken", chatSessionTrackingToken); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> messages = Optional.empty(); - + private Optional chatId = Optional.empty(); - + private Optional> followUpPrompts = Optional.empty(); - + private Optional backendTimeMillis = Optional.empty(); - + private Optional chatSessionTrackingToken = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder messages(List messages) { Utils.checkNotNull(messages, "messages"); this.messages = Optional.ofNullable(messages); @@ -271,6 +276,7 @@ public Builder messages(Optional> messages) { return this; } + /** * The id of the associated Chat the messages belong to, if one exists. */ @@ -289,6 +295,7 @@ public Builder chatId(Optional chatId) { return this; } + /** * Follow-up prompts for the user to potentially use */ @@ -307,6 +314,7 @@ public Builder followUpPrompts(Optional> followUpPrompts) return this; } + /** * Time in milliseconds the backend took to respond to the request. */ @@ -325,6 +333,7 @@ public Builder backendTimeMillis(Optional backendTimeMillis) { return this; } + /** * A token that is used to track the session. */ @@ -342,14 +351,13 @@ public Builder chatSessionTrackingToken(Optional chatSessionTrackingToke this.chatSessionTrackingToken = chatSessionTrackingToken; return this; } - + public ChatResponse build() { + return new ChatResponse( - messages, - chatId, - followUpPrompts, - backendTimeMillis, - chatSessionTrackingToken); + messages, chatId, followUpPrompts, + backendTimeMillis, chatSessionTrackingToken); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatRestrictionFilters.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatRestrictionFilters.java index cea22f23..84ad3f54 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatRestrictionFilters.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatRestrictionFilters.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class ChatRestrictionFilters { +public class ChatRestrictionFilters { /** * Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections. */ @@ -24,10 +24,12 @@ public class ChatRestrictionFilters { @JsonProperty("containerSpecs") private Optional> containerSpecs; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("documentSpecs") private Optional> documentSpecs; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("datasourceInstances") private Optional> datasourceInstances; @@ -70,9 +72,10 @@ public Optional> datasourceInstances() { return (Optional>) datasourceInstances; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections. @@ -83,6 +86,7 @@ public ChatRestrictionFilters withContainerSpecs(List contain return this; } + /** * Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections. */ @@ -98,6 +102,7 @@ public ChatRestrictionFilters withDocumentSpecs(List document return this; } + public ChatRestrictionFilters withDocumentSpecs(Optional> documentSpecs) { Utils.checkNotNull(documentSpecs, "documentSpecs"); this.documentSpecs = documentSpecs; @@ -110,13 +115,13 @@ public ChatRestrictionFilters withDatasourceInstances(List datasourceIns return this; } + public ChatRestrictionFilters withDatasourceInstances(Optional> datasourceInstances) { Utils.checkNotNull(datasourceInstances, "datasourceInstances"); this.datasourceInstances = datasourceInstances; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -135,9 +140,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - containerSpecs, - documentSpecs, - datasourceInstances); + containerSpecs, documentSpecs, datasourceInstances); } @Override @@ -147,19 +150,21 @@ public String toString() { "documentSpecs", documentSpecs, "datasourceInstances", datasourceInstances); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> containerSpecs = Optional.empty(); - + private Optional> documentSpecs = Optional.empty(); - + private Optional> datasourceInstances = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections. */ @@ -178,6 +183,7 @@ public Builder containerSpecs(Optional> contai return this; } + public Builder documentSpecs(List documentSpecs) { Utils.checkNotNull(documentSpecs, "documentSpecs"); this.documentSpecs = Optional.ofNullable(documentSpecs); @@ -190,6 +196,7 @@ public Builder documentSpecs(Optional> documen return this; } + public Builder datasourceInstances(List datasourceInstances) { Utils.checkNotNull(datasourceInstances, "datasourceInstances"); this.datasourceInstances = Optional.ofNullable(datasourceInstances); @@ -201,12 +208,12 @@ public Builder datasourceInstances(Optional> datasourceIn this.datasourceInstances = datasourceInstances; return this; } - + public ChatRestrictionFilters build() { + return new ChatRestrictionFilters( - containerSpecs, - documentSpecs, - datasourceInstances); + containerSpecs, documentSpecs, datasourceInstances); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatResult.java index 13cae606..393ad44d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatResult.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class ChatResult { +public class ChatResult { /** * A historical representation of a series of chat messages a user had with Glean Assistant. */ @@ -61,9 +61,10 @@ public Optional trackingToken() { return trackingToken; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A historical representation of a series of chat messages a user had with Glean Assistant. @@ -74,6 +75,7 @@ public ChatResult withChat(Chat chat) { return this; } + /** * A historical representation of a series of chat messages a user had with Glean Assistant. */ @@ -92,6 +94,7 @@ public ChatResult withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular Chat. To be used for `/feedback` reporting. */ @@ -101,7 +104,6 @@ public ChatResult withTrackingToken(Optional trackingToken) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -119,8 +121,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - chat, - trackingToken); + chat, trackingToken); } @Override @@ -129,17 +130,19 @@ public String toString() { "chat", chat, "trackingToken", trackingToken); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional chat = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A historical representation of a series of chat messages a user had with Glean Assistant. */ @@ -158,6 +161,7 @@ public Builder chat(Optional chat) { return this; } + /** * An opaque token that represents this particular Chat. To be used for `/feedback` reporting. */ @@ -175,11 +179,12 @@ public Builder trackingToken(Optional trackingToken) { this.trackingToken = trackingToken; return this; } - + public ChatResult build() { + return new ChatResult( - chat, - trackingToken); + chat, trackingToken); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatZeroStateSuggestionOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatZeroStateSuggestionOptions.java index 331404d5..1b4650be 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatZeroStateSuggestionOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ChatZeroStateSuggestionOptions.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class ChatZeroStateSuggestionOptions { +public class ChatZeroStateSuggestionOptions { /** * The Chat Application ID this feed request should be scoped to. Empty means there is no Chat Application ID.. */ @@ -41,9 +41,10 @@ public Optional applicationId() { return applicationId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The Chat Application ID this feed request should be scoped to. Empty means there is no Chat Application ID.. @@ -54,6 +55,7 @@ public ChatZeroStateSuggestionOptions withApplicationId(String applicationId) { return this; } + /** * The Chat Application ID this feed request should be scoped to. Empty means there is no Chat Application ID.. */ @@ -63,7 +65,6 @@ public ChatZeroStateSuggestionOptions withApplicationId(Optional applica return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(ChatZeroStateSuggestionOptions.class, "applicationId", applicationId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional applicationId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The Chat Application ID this feed request should be scoped to. Empty means there is no Chat Application ID.. */ @@ -114,10 +117,12 @@ public Builder applicationId(Optional applicationId) { this.applicationId = applicationId; return this; } - + public ChatZeroStateSuggestionOptions build() { + return new ChatZeroStateSuggestionOptions( applicationId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CheckDocumentAccessRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CheckDocumentAccessRequest.java index 3d1aec98..59907c47 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CheckDocumentAccessRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CheckDocumentAccessRequest.java @@ -16,7 +16,6 @@ *

Describes the request body of the /checkdocumentaccess API call */ public class CheckDocumentAccessRequest { - /** * Datasource of document to check access for. */ @@ -89,9 +88,10 @@ public String userEmail() { return userEmail; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Datasource of document to check access for. @@ -129,7 +129,6 @@ public CheckDocumentAccessRequest withUserEmail(String userEmail) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -149,9 +148,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasource, - objectType, - docId, + datasource, objectType, docId, userEmail); } @@ -163,21 +160,23 @@ public String toString() { "docId", docId, "userEmail", userEmail); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private String objectType; - + private String docId; - + private String userEmail; - + private Builder() { // force use of static builder() method } + /** * Datasource of document to check access for. */ @@ -187,6 +186,7 @@ public Builder datasource(String datasource) { return this; } + /** * Object type of document to check access for. */ @@ -196,6 +196,7 @@ public Builder objectType(String objectType) { return this; } + /** * Glean Document ID to check access for. */ @@ -205,6 +206,7 @@ public Builder docId(String docId) { return this; } + /** * Email of user to check access for. */ @@ -213,13 +215,13 @@ public Builder userEmail(String userEmail) { this.userEmail = userEmail; return this; } - + public CheckDocumentAccessRequest build() { + return new CheckDocumentAccessRequest( - datasource, - objectType, - docId, + datasource, objectType, docId, userEmail); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CheckDocumentAccessResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CheckDocumentAccessResponse.java index 7cc6b7fe..d38d18fe 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CheckDocumentAccessResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CheckDocumentAccessResponse.java @@ -20,7 +20,6 @@ *

Describes the response body of the /checkdocumentaccess API call */ public class CheckDocumentAccessResponse { - /** * If true, user has access to document for search */ @@ -47,9 +46,10 @@ public Optional hasAccess() { return hasAccess; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * If true, user has access to document for search @@ -60,6 +60,7 @@ public CheckDocumentAccessResponse withHasAccess(boolean hasAccess) { return this; } + /** * If true, user has access to document for search */ @@ -69,7 +70,6 @@ public CheckDocumentAccessResponse withHasAccess(Optional hasAccess) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -94,15 +94,17 @@ public String toString() { return Utils.toString(CheckDocumentAccessResponse.class, "hasAccess", hasAccess); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional hasAccess = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * If true, user has access to document for search */ @@ -120,10 +122,12 @@ public Builder hasAccess(Optional hasAccess) { this.hasAccess = hasAccess; return this; } - + public CheckDocumentAccessResponse build() { + return new CheckDocumentAccessResponse( hasAccess); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ClusterGroup.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ClusterGroup.java index defd4cb8..0d8fdddd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ClusterGroup.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ClusterGroup.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class ClusterGroup { +public class ClusterGroup { /** * A list of results that should be displayed as associated with this result. */ @@ -82,9 +82,10 @@ public long visibleCountHint() { return visibleCountHint; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A list of results that should be displayed as associated with this result. @@ -95,6 +96,7 @@ public ClusterGroup withClusteredResults(List clusteredResults) { return this; } + /** * A list of results that should be displayed as associated with this result. */ @@ -113,6 +115,7 @@ public ClusterGroup withClusterType(ClusterTypeEnum clusterType) { return this; } + /** * The reason for inclusion of clusteredResults. */ @@ -131,7 +134,6 @@ public ClusterGroup withVisibleCountHint(long visibleCountHint) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -150,9 +152,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - clusteredResults, - clusterType, - visibleCountHint); + clusteredResults, clusterType, visibleCountHint); } @Override @@ -162,19 +162,21 @@ public String toString() { "clusterType", clusterType, "visibleCountHint", visibleCountHint); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> clusteredResults = Optional.empty(); - + private Optional clusterType = Optional.empty(); - + private Long visibleCountHint; - + private Builder() { // force use of static builder() method } + /** * A list of results that should be displayed as associated with this result. */ @@ -193,6 +195,7 @@ public Builder clusteredResults(Optional> clustered return this; } + /** * The reason for inclusion of clusteredResults. */ @@ -211,6 +214,7 @@ public Builder clusterType(Optional clusterType) { return this; } + /** * The default number of results to display before truncating and showing a "see more" link */ @@ -219,12 +223,12 @@ public Builder visibleCountHint(long visibleCountHint) { this.visibleCountHint = visibleCountHint; return this; } - + public ClusterGroup build() { + return new ClusterGroup( - clusteredResults, - clusterType, - visibleCountHint); + clusteredResults, clusterType, visibleCountHint); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Code.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Code.java index da752b2f..ae1c4a60 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Code.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Code.java @@ -16,20 +16,24 @@ import java.util.List; import java.util.Optional; + public class Code { @JsonInclude(Include.NON_ABSENT) @JsonProperty("repoName") private Optional repoName; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("fileName") private Optional fileName; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("fileUrl") private Optional fileUrl; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("lines") private Optional> lines; @@ -61,7 +65,8 @@ public Code( } public Code() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } @JsonIgnore @@ -93,9 +98,10 @@ public Optional isLastMatch() { return isLastMatch; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public Code withRepoName(String repoName) { Utils.checkNotNull(repoName, "repoName"); @@ -103,6 +109,7 @@ public Code withRepoName(String repoName) { return this; } + public Code withRepoName(Optional repoName) { Utils.checkNotNull(repoName, "repoName"); this.repoName = repoName; @@ -115,6 +122,7 @@ public Code withFileName(String fileName) { return this; } + public Code withFileName(Optional fileName) { Utils.checkNotNull(fileName, "fileName"); this.fileName = fileName; @@ -127,6 +135,7 @@ public Code withFileUrl(String fileUrl) { return this; } + public Code withFileUrl(Optional fileUrl) { Utils.checkNotNull(fileUrl, "fileUrl"); this.fileUrl = fileUrl; @@ -139,6 +148,7 @@ public Code withLines(List lines) { return this; } + public Code withLines(Optional> lines) { Utils.checkNotNull(lines, "lines"); this.lines = lines; @@ -154,6 +164,7 @@ public Code withIsLastMatch(boolean isLastMatch) { return this; } + /** * Last file match for a repo */ @@ -163,7 +174,6 @@ public Code withIsLastMatch(Optional isLastMatch) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -184,11 +194,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - repoName, - fileName, - fileUrl, - lines, - isLastMatch); + repoName, fileName, fileUrl, + lines, isLastMatch); } @Override @@ -200,23 +207,25 @@ public String toString() { "lines", lines, "isLastMatch", isLastMatch); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional repoName = Optional.empty(); - + private Optional fileName = Optional.empty(); - + private Optional fileUrl = Optional.empty(); - + private Optional> lines = Optional.empty(); - + private Optional isLastMatch = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder repoName(String repoName) { Utils.checkNotNull(repoName, "repoName"); this.repoName = Optional.ofNullable(repoName); @@ -229,6 +238,7 @@ public Builder repoName(Optional repoName) { return this; } + public Builder fileName(String fileName) { Utils.checkNotNull(fileName, "fileName"); this.fileName = Optional.ofNullable(fileName); @@ -241,6 +251,7 @@ public Builder fileName(Optional fileName) { return this; } + public Builder fileUrl(String fileUrl) { Utils.checkNotNull(fileUrl, "fileUrl"); this.fileUrl = Optional.ofNullable(fileUrl); @@ -253,6 +264,7 @@ public Builder fileUrl(Optional fileUrl) { return this; } + public Builder lines(List lines) { Utils.checkNotNull(lines, "lines"); this.lines = Optional.ofNullable(lines); @@ -265,6 +277,7 @@ public Builder lines(Optional> lines) { return this; } + /** * Last file match for a repo */ @@ -282,14 +295,13 @@ public Builder isLastMatch(Optional isLastMatch) { this.isLastMatch = isLastMatch; return this; } - + public Code build() { + return new Code( - repoName, - fileName, - fileUrl, - lines, - isLastMatch); + repoName, fileName, fileUrl, + lines, isLastMatch); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CodeLine.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CodeLine.java index 8a998a69..57f5cba7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CodeLine.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CodeLine.java @@ -16,12 +16,14 @@ import java.util.List; import java.util.Optional; + public class CodeLine { @JsonInclude(Include.NON_ABSENT) @JsonProperty("lineNumber") private Optional lineNumber; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("content") private Optional content; @@ -69,9 +71,10 @@ public Optional> ranges() { return (Optional>) ranges; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CodeLine withLineNumber(long lineNumber) { Utils.checkNotNull(lineNumber, "lineNumber"); @@ -79,6 +82,7 @@ public CodeLine withLineNumber(long lineNumber) { return this; } + public CodeLine withLineNumber(Optional lineNumber) { Utils.checkNotNull(lineNumber, "lineNumber"); this.lineNumber = lineNumber; @@ -91,6 +95,7 @@ public CodeLine withContent(String content) { return this; } + public CodeLine withContent(Optional content) { Utils.checkNotNull(content, "content"); this.content = content; @@ -106,6 +111,7 @@ public CodeLine withRanges(List ranges) { return this; } + /** * Index ranges depicting matched sections of the line */ @@ -115,7 +121,6 @@ public CodeLine withRanges(Optional> ranges) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -134,9 +139,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - lineNumber, - content, - ranges); + lineNumber, content, ranges); } @Override @@ -146,19 +149,21 @@ public String toString() { "content", content, "ranges", ranges); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional lineNumber = Optional.empty(); - + private Optional content = Optional.empty(); - + private Optional> ranges = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder lineNumber(long lineNumber) { Utils.checkNotNull(lineNumber, "lineNumber"); this.lineNumber = Optional.ofNullable(lineNumber); @@ -171,6 +176,7 @@ public Builder lineNumber(Optional lineNumber) { return this; } + public Builder content(String content) { Utils.checkNotNull(content, "content"); this.content = Optional.ofNullable(content); @@ -183,6 +189,7 @@ public Builder content(Optional content) { return this; } + /** * Index ranges depicting matched sections of the line */ @@ -200,12 +207,12 @@ public Builder ranges(Optional> ranges) { this.ranges = ranges; return this; } - + public CodeLine build() { + return new CodeLine( - lineNumber, - content, - ranges); + lineNumber, content, ranges); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Collection.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Collection.java index 7aba03d4..e151c739 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Collection.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Collection.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Optional; -public class Collection { +public class Collection { /** * The unique name of the Collection. */ @@ -74,6 +74,7 @@ public class Collection { @JsonProperty("parentId") private Optional parentId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; @@ -85,6 +86,7 @@ public class Collection { @JsonProperty("allowedDatasource") private Optional allowedDatasource; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; @@ -95,18 +97,22 @@ public class Collection { @JsonProperty("id") private long id; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createTime") private Optional createTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updateTime") private Optional updateTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("creator") private Optional creator; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedBy") private Optional updatedBy; @@ -132,6 +138,7 @@ public class Collection { @JsonProperty("items") private Optional> items; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("pinMetadata") private Optional pinMetadata; @@ -234,7 +241,14 @@ public Collection( String name, String description, long id) { - this(name, description, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(name, description, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), id, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -412,9 +426,10 @@ public Optional> roles() { return (Optional>) roles; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique name of the Collection. @@ -443,6 +458,7 @@ public Collection withAddedRoles(List addedRoles) { return this; } + /** * A list of added user roles for the Collection. */ @@ -461,6 +477,7 @@ public Collection withRemovedRoles(List removedRoles) { return this; } + /** * A list of removed user roles for the Collection. */ @@ -479,6 +496,7 @@ public Collection withAudienceFilters(List audienceFilters) { return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -497,6 +515,7 @@ public Collection withIcon(String icon) { return this; } + /** * The emoji icon of this Collection. */ @@ -515,6 +534,7 @@ public Collection withAdminLocked(boolean adminLocked) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -533,6 +553,7 @@ public Collection withParentId(long parentId) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -548,6 +569,7 @@ public Collection withThumbnail(Thumbnail thumbnail) { return this; } + public Collection withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -563,6 +585,7 @@ public Collection withAllowedDatasource(String allowedDatasource) { return this; } + /** * The datasource type this Collection can hold. */ @@ -578,6 +601,7 @@ public Collection withPermissions(ObjectPermissions permissions) { return this; } + public Collection withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -599,6 +623,7 @@ public Collection withCreateTime(OffsetDateTime createTime) { return this; } + public Collection withCreateTime(Optional createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = createTime; @@ -611,6 +636,7 @@ public Collection withUpdateTime(OffsetDateTime updateTime) { return this; } + public Collection withUpdateTime(Optional updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = updateTime; @@ -623,6 +649,7 @@ public Collection withCreator(Person creator) { return this; } + public Collection withCreator(Optional creator) { Utils.checkNotNull(creator, "creator"); this.creator = creator; @@ -635,6 +662,7 @@ public Collection withUpdatedBy(Person updatedBy) { return this; } + public Collection withUpdatedBy(Optional updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = updatedBy; @@ -650,6 +678,7 @@ public Collection withItemCount(long itemCount) { return this; } + /** * The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. */ @@ -668,6 +697,7 @@ public Collection withChildCount(long childCount) { return this; } + /** * The number of children Collections. Separated from the actual children so we can grab the count without children. */ @@ -686,6 +716,7 @@ public Collection withItems(List items) { return this; } + /** * The items in this Collection. */ @@ -701,6 +732,7 @@ public Collection withPinMetadata(CollectionPinnedMetadata pinMetadata) { return this; } + public Collection withPinMetadata(Optional pinMetadata) { Utils.checkNotNull(pinMetadata, "pinMetadata"); this.pinMetadata = pinMetadata; @@ -716,6 +748,7 @@ public Collection withShortcuts(List shortcuts) { return this; } + /** * The names of the shortcuts (Go Links) that point to this Collection. */ @@ -734,6 +767,7 @@ public Collection withChildren(List children) { return this; } + /** * The children Collections of this Collection. */ @@ -752,6 +786,7 @@ public Collection withRoles(List roles) { return this; } + /** * A list of user roles for the Collection. */ @@ -761,7 +796,6 @@ public Collection withRoles(Optional> role return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -800,29 +834,14 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - permissions, - id, - createTime, - updateTime, - creator, - updatedBy, - itemCount, - childCount, - items, - pinMetadata, - shortcuts, - children, - roles); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, permissions, id, + createTime, updateTime, creator, + updatedBy, itemCount, childCount, + items, pinMetadata, shortcuts, + children, roles); } @Override @@ -852,59 +871,61 @@ public String toString() { "children", children, "roles", roles); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private String description; - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Optional adminLocked = Optional.empty(); - + private Optional parentId = Optional.empty(); - + private Optional thumbnail = Optional.empty(); - + private Optional allowedDatasource = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Long id; - + private Optional createTime = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional creator = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional itemCount = Optional.empty(); - + private Optional childCount = Optional.empty(); - + private Optional> items = Optional.empty(); - + private Optional pinMetadata = Optional.empty(); - + private Optional> shortcuts = Optional.empty(); - + private Optional> children = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The unique name of the Collection. */ @@ -914,6 +935,7 @@ public Builder name(String name) { return this; } + /** * A brief summary of the Collection's contents. */ @@ -923,6 +945,7 @@ public Builder description(String description) { return this; } + /** * A list of added user roles for the Collection. */ @@ -941,6 +964,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of removed user roles for the Collection. */ @@ -959,6 +983,7 @@ public Builder removedRoles(Optional> remo return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -977,6 +1002,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The emoji icon of this Collection. */ @@ -995,6 +1021,7 @@ public Builder icon(Optional icon) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -1013,6 +1040,7 @@ public Builder adminLocked(Optional adminLocked) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -1031,6 +1059,7 @@ public Builder parentId(Optional parentId) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -1043,6 +1072,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + /** * The datasource type this Collection can hold. */ @@ -1061,6 +1091,7 @@ public Builder allowedDatasource(Optional allowedDatasource) { return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -1073,6 +1104,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * The unique ID of the Collection. */ @@ -1082,6 +1114,7 @@ public Builder id(long id) { return this; } + public Builder createTime(OffsetDateTime createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = Optional.ofNullable(createTime); @@ -1094,6 +1127,7 @@ public Builder createTime(Optional createTime) { return this; } + public Builder updateTime(OffsetDateTime updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = Optional.ofNullable(updateTime); @@ -1106,6 +1140,7 @@ public Builder updateTime(Optional updateTime) { return this; } + public Builder creator(Person creator) { Utils.checkNotNull(creator, "creator"); this.creator = Optional.ofNullable(creator); @@ -1118,6 +1153,7 @@ public Builder creator(Optional creator) { return this; } + public Builder updatedBy(Person updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = Optional.ofNullable(updatedBy); @@ -1130,6 +1166,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + /** * The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. */ @@ -1148,6 +1185,7 @@ public Builder itemCount(Optional itemCount) { return this; } + /** * The number of children Collections. Separated from the actual children so we can grab the count without children. */ @@ -1166,6 +1204,7 @@ public Builder childCount(Optional childCount) { return this; } + /** * The items in this Collection. */ @@ -1184,6 +1223,7 @@ public Builder items(Optional> items) { return this; } + public Builder pinMetadata(CollectionPinnedMetadata pinMetadata) { Utils.checkNotNull(pinMetadata, "pinMetadata"); this.pinMetadata = Optional.ofNullable(pinMetadata); @@ -1196,6 +1236,7 @@ public Builder pinMetadata(Optional pinMetad return this; } + /** * The names of the shortcuts (Go Links) that point to this Collection. */ @@ -1214,6 +1255,7 @@ public Builder shortcuts(Optional> shortcuts) { return this; } + /** * The children Collections of this Collection. */ @@ -1232,6 +1274,7 @@ public Builder children(Optional> children) { return this; } + /** * A list of user roles for the Collection. */ @@ -1249,32 +1292,19 @@ public Builder roles(Optional> roles) { this.roles = roles; return this; } - + public Collection build() { + return new Collection( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - permissions, - id, - createTime, - updateTime, - creator, - updatedBy, - itemCount, - childCount, - items, - pinMetadata, - shortcuts, - children, - roles); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, permissions, id, + createTime, updateTime, creator, + updatedBy, itemCount, childCount, + items, pinMetadata, shortcuts, + children, roles); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError1.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError1.java index c97ee3a8..37c3ee85 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError1.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError1.java @@ -11,6 +11,7 @@ import java.lang.Override; import java.lang.String; + public class CollectionError1 { @JsonProperty("errorCode") @@ -28,9 +29,10 @@ public ErrorCode errorCode() { return errorCode; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CollectionError1 withErrorCode(ErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); @@ -38,7 +40,6 @@ public CollectionError1 withErrorCode(ErrorCode errorCode) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,24 +64,28 @@ public String toString() { return Utils.toString(CollectionError1.class, "errorCode", errorCode); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private ErrorCode errorCode; - + private Builder() { // force use of static builder() method } + public Builder errorCode(ErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); this.errorCode = errorCode; return this; } - + public CollectionError1 build() { + return new CollectionError1( errorCode); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError2.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError2.java index 2278abb0..710c9813 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError2.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError2.java @@ -11,6 +11,7 @@ import java.lang.Override; import java.lang.String; + public class CollectionError2 { @JsonProperty("errorCode") @@ -28,9 +29,10 @@ public ErrorCode errorCode() { return errorCode; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CollectionError2 withErrorCode(ErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); @@ -38,7 +40,6 @@ public CollectionError2 withErrorCode(ErrorCode errorCode) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,24 +64,28 @@ public String toString() { return Utils.toString(CollectionError2.class, "errorCode", errorCode); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private ErrorCode errorCode; - + private Builder() { // force use of static builder() method } + public Builder errorCode(ErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); this.errorCode = errorCode; return this; } - + public CollectionError2 build() { + return new CollectionError2( errorCode); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError3.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError3.java index 19f3cc0a..c93fd3ec 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError3.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionError3.java @@ -10,6 +10,7 @@ import java.lang.Override; import java.lang.String; + public class CollectionError3 { @JsonProperty("errorCode") @@ -27,9 +28,10 @@ public CollectionErrorErrorCode errorCode() { return errorCode; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CollectionError3 withErrorCode(CollectionErrorErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); @@ -37,7 +39,6 @@ public CollectionError3 withErrorCode(CollectionErrorErrorCode errorCode) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -62,24 +63,28 @@ public String toString() { return Utils.toString(CollectionError3.class, "errorCode", errorCode); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private CollectionErrorErrorCode errorCode; - + private Builder() { // force use of static builder() method } + public Builder errorCode(CollectionErrorErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); this.errorCode = errorCode; return this; } - + public CollectionError3 build() { + return new CollectionError3( errorCode); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionItem.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionItem.java index 675b19ab..63bc4466 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionItem.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionItem.java @@ -16,8 +16,8 @@ import java.time.OffsetDateTime; import java.util.Optional; -public class CollectionItem { +public class CollectionItem { /** * The optional name of the Collection item. */ @@ -66,6 +66,7 @@ public class CollectionItem { @JsonProperty("itemId") private Optional itemId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createdBy") private Optional createdBy; @@ -77,18 +78,22 @@ public class CollectionItem { @JsonProperty("createdAt") private Optional createdAt; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("document") private Optional document; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("shortcut") private Optional shortcut; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("collection") private Optional collection; + @JsonProperty("itemType") private CollectionItemItemType itemType; @@ -138,7 +143,11 @@ public CollectionItem( public CollectionItem( long collectionId, CollectionItemItemType itemType) { - this(Optional.empty(), Optional.empty(), Optional.empty(), collectionId, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), itemType); + this(Optional.empty(), Optional.empty(), Optional.empty(), + collectionId, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + itemType); } /** @@ -234,9 +243,10 @@ public CollectionItemItemType itemType() { return itemType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The optional name of the Collection item. @@ -247,6 +257,7 @@ public CollectionItem withName(String name) { return this; } + /** * The optional name of the Collection item. */ @@ -265,6 +276,7 @@ public CollectionItem withDescription(String description) { return this; } + /** * A helpful description of why this CollectionItem is in the Collection that it's in. */ @@ -283,6 +295,7 @@ public CollectionItem withIcon(String icon) { return this; } + /** * The emoji icon for this CollectionItem. Only used for Text type items. */ @@ -310,6 +323,7 @@ public CollectionItem withDocumentId(String documentId) { return this; } + /** * If this CollectionItem is indexed, the Glean Document ID of that document. */ @@ -328,6 +342,7 @@ public CollectionItem withUrl(String url) { return this; } + /** * The URL of this CollectionItem. */ @@ -346,6 +361,7 @@ public CollectionItem withItemId(String itemId) { return this; } + /** * Unique identifier for the item within the Collection it belongs to. */ @@ -361,6 +377,7 @@ public CollectionItem withCreatedBy(Person createdBy) { return this; } + public CollectionItem withCreatedBy(Optional createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; @@ -376,6 +393,7 @@ public CollectionItem withCreatedAt(OffsetDateTime createdAt) { return this; } + /** * Unix timestamp for when the item was first added (in seconds since epoch UTC). */ @@ -391,6 +409,7 @@ public CollectionItem withDocument(Document document) { return this; } + public CollectionItem withDocument(Optional document) { Utils.checkNotNull(document, "document"); this.document = document; @@ -403,6 +422,7 @@ public CollectionItem withShortcut(Shortcut shortcut) { return this; } + public CollectionItem withShortcut(Optional shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = shortcut; @@ -415,6 +435,7 @@ public CollectionItem withCollection(Collection collection) { return this; } + public CollectionItem withCollection(Optional collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; @@ -427,7 +448,6 @@ public CollectionItem withItemType(CollectionItemItemType itemType) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -456,18 +476,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - description, - icon, - collectionId, - documentId, - url, - itemId, - createdBy, - createdAt, - document, - shortcut, - collection, + name, description, icon, + collectionId, documentId, url, + itemId, createdBy, createdAt, + document, shortcut, collection, itemType); } @@ -488,39 +500,41 @@ public String toString() { "collection", collection, "itemType", itemType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Long collectionId; - + private Optional documentId = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional itemId = Optional.empty(); - + private Optional createdBy = Optional.empty(); - + private Optional createdAt = Optional.empty(); - + private Optional document = Optional.empty(); - + private Optional shortcut = Optional.empty(); - + private Optional collection = Optional.empty(); - + private CollectionItemItemType itemType; - + private Builder() { // force use of static builder() method } + /** * The optional name of the Collection item. */ @@ -539,6 +553,7 @@ public Builder name(Optional name) { return this; } + /** * A helpful description of why this CollectionItem is in the Collection that it's in. */ @@ -557,6 +572,7 @@ public Builder description(Optional description) { return this; } + /** * The emoji icon for this CollectionItem. Only used for Text type items. */ @@ -575,6 +591,7 @@ public Builder icon(Optional icon) { return this; } + /** * The Collection ID of the Collection that this CollectionItem belongs in. */ @@ -584,6 +601,7 @@ public Builder collectionId(long collectionId) { return this; } + /** * If this CollectionItem is indexed, the Glean Document ID of that document. */ @@ -602,6 +620,7 @@ public Builder documentId(Optional documentId) { return this; } + /** * The URL of this CollectionItem. */ @@ -620,6 +639,7 @@ public Builder url(Optional url) { return this; } + /** * Unique identifier for the item within the Collection it belongs to. */ @@ -638,6 +658,7 @@ public Builder itemId(Optional itemId) { return this; } + public Builder createdBy(Person createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = Optional.ofNullable(createdBy); @@ -650,6 +671,7 @@ public Builder createdBy(Optional createdBy) { return this; } + /** * Unix timestamp for when the item was first added (in seconds since epoch UTC). */ @@ -668,6 +690,7 @@ public Builder createdAt(Optional createdAt) { return this; } + public Builder document(Document document) { Utils.checkNotNull(document, "document"); this.document = Optional.ofNullable(document); @@ -680,6 +703,7 @@ public Builder document(Optional document) { return this; } + public Builder shortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = Optional.ofNullable(shortcut); @@ -692,6 +716,7 @@ public Builder shortcut(Optional shortcut) { return this; } + public Builder collection(Collection collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -704,27 +729,22 @@ public Builder collection(Optional collection) { return this; } + public Builder itemType(CollectionItemItemType itemType) { Utils.checkNotNull(itemType, "itemType"); this.itemType = itemType; return this; } - + public CollectionItem build() { + return new CollectionItem( - name, - description, - icon, - collectionId, - documentId, - url, - itemId, - createdBy, - createdAt, - document, - shortcut, - collection, + name, description, icon, + collectionId, documentId, url, + itemId, createdBy, createdAt, + document, shortcut, collection, itemType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionItemDescriptor.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionItemDescriptor.java index c8b3fae6..35477896 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionItemDescriptor.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionItemDescriptor.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class CollectionItemDescriptor { +public class CollectionItemDescriptor { /** * The optional name of the Collection item. */ @@ -58,6 +58,7 @@ public class CollectionItemDescriptor { @JsonProperty("newNextItemId") private Optional newNextItemId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("itemType") private Optional itemType; @@ -88,7 +89,9 @@ public CollectionItemDescriptor( } public CollectionItemDescriptor() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -145,9 +148,10 @@ public Optional itemType() { return (Optional) itemType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The optional name of the Collection item. @@ -158,6 +162,7 @@ public CollectionItemDescriptor withName(String name) { return this; } + /** * The optional name of the Collection item. */ @@ -176,6 +181,7 @@ public CollectionItemDescriptor withDescription(String description) { return this; } + /** * A helpful description of why this CollectionItem is in the Collection that it's in. */ @@ -194,6 +200,7 @@ public CollectionItemDescriptor withIcon(String icon) { return this; } + /** * The emoji icon for this CollectionItem. Only used for Text type items. */ @@ -212,6 +219,7 @@ public CollectionItemDescriptor withUrl(String url) { return this; } + /** * The URL of the item being added. */ @@ -230,6 +238,7 @@ public CollectionItemDescriptor withDocumentId(String documentId) { return this; } + /** * The Glean Document ID of the item being added if it's an indexed document. */ @@ -248,6 +257,7 @@ public CollectionItemDescriptor withNewNextItemId(String newNextItemId) { return this; } + /** * The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection */ @@ -263,13 +273,13 @@ public CollectionItemDescriptor withItemType(CollectionItemDescriptorItemType it return this; } + public CollectionItemDescriptor withItemType(Optional itemType) { Utils.checkNotNull(itemType, "itemType"); this.itemType = itemType; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -292,12 +302,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - description, - icon, - url, - documentId, - newNextItemId, + name, description, icon, + url, documentId, newNextItemId, itemType); } @@ -312,27 +318,29 @@ public String toString() { "newNextItemId", newNextItemId, "itemType", itemType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional documentId = Optional.empty(); - + private Optional newNextItemId = Optional.empty(); - + private Optional itemType = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The optional name of the Collection item. */ @@ -351,6 +359,7 @@ public Builder name(Optional name) { return this; } + /** * A helpful description of why this CollectionItem is in the Collection that it's in. */ @@ -369,6 +378,7 @@ public Builder description(Optional description) { return this; } + /** * The emoji icon for this CollectionItem. Only used for Text type items. */ @@ -387,6 +397,7 @@ public Builder icon(Optional icon) { return this; } + /** * The URL of the item being added. */ @@ -405,6 +416,7 @@ public Builder url(Optional url) { return this; } + /** * The Glean Document ID of the item being added if it's an indexed document. */ @@ -423,6 +435,7 @@ public Builder documentId(Optional documentId) { return this; } + /** * The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection */ @@ -441,6 +454,7 @@ public Builder newNextItemId(Optional newNextItemId) { return this; } + public Builder itemType(CollectionItemDescriptorItemType itemType) { Utils.checkNotNull(itemType, "itemType"); this.itemType = Optional.ofNullable(itemType); @@ -452,16 +466,14 @@ public Builder itemType(Optional ite this.itemType = itemType; return this; } - + public CollectionItemDescriptor build() { + return new CollectionItemDescriptor( - name, - description, - icon, - url, - documentId, - newNextItemId, + name, description, icon, + url, documentId, newNextItemId, itemType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinMetadata.java index 8e96cca9..b89ec663 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinMetadata.java @@ -11,14 +11,15 @@ import java.lang.Override; import java.lang.String; -public class CollectionPinMetadata { +public class CollectionPinMetadata { /** * The ID of the Collection. */ @JsonProperty("id") private long id; + @JsonProperty("target") private CollectionPinTarget target; @@ -45,9 +46,10 @@ public CollectionPinTarget target() { return target; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the Collection. @@ -64,7 +66,6 @@ public CollectionPinMetadata withTarget(CollectionPinTarget target) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -82,8 +83,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - target); + id, target); } @Override @@ -92,17 +92,19 @@ public String toString() { "id", id, "target", target); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long id; - + private CollectionPinTarget target; - + private Builder() { // force use of static builder() method } + /** * The ID of the Collection. */ @@ -112,16 +114,18 @@ public Builder id(long id) { return this; } + public Builder target(CollectionPinTarget target) { Utils.checkNotNull(target, "target"); this.target = target; return this; } - + public CollectionPinMetadata build() { + return new CollectionPinMetadata( - id, - target); + id, target); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinTarget.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinTarget.java index 08825913..d5c2ea5d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinTarget.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinTarget.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class CollectionPinTarget { +public class CollectionPinTarget { /** * Categories a Collection can be pinned to. */ @@ -79,9 +79,10 @@ public Optional target() { return (Optional) target; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Categories a Collection can be pinned to. @@ -101,6 +102,7 @@ public CollectionPinTarget withValue(String value) { return this; } + /** * Optional. If category supports values, then the additional value for the category e.g. department name for DEPARTMENT_RESOURCE, team name/id for TEAM_RESOURCE and so on. */ @@ -119,6 +121,7 @@ public CollectionPinTarget withTarget(CollectionPinnableTargets target) { return this; } + /** * What targets can a Collection be pinned to. */ @@ -128,7 +131,6 @@ public CollectionPinTarget withTarget(Optional value = Optional.empty(); - + private Optional target = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Categories a Collection can be pinned to. */ @@ -181,6 +183,7 @@ public Builder category(CollectionPinnableCategories category) { return this; } + /** * Optional. If category supports values, then the additional value for the category e.g. department name for DEPARTMENT_RESOURCE, team name/id for TEAM_RESOURCE and so on. */ @@ -199,6 +202,7 @@ public Builder value(Optional value) { return this; } + /** * What targets can a Collection be pinned to. */ @@ -216,12 +220,12 @@ public Builder target(Optional target) { this.target = target; return this; } - + public CollectionPinTarget build() { + return new CollectionPinTarget( - category, - value, - target); + category, value, target); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinnedMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinnedMetadata.java index 6bb27834..68dec25f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinnedMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CollectionPinnedMetadata.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class CollectionPinnedMetadata { +public class CollectionPinnedMetadata { /** * List of targets this Collection is pinned to. */ @@ -63,9 +63,10 @@ public Optional> eligiblePins() { return (Optional>) eligiblePins; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of targets this Collection is pinned to. @@ -76,6 +77,7 @@ public CollectionPinnedMetadata withExistingPins(List exist return this; } + /** * List of targets this Collection is pinned to. */ @@ -94,6 +96,7 @@ public CollectionPinnedMetadata withEligiblePins(List eli return this; } + /** * List of targets this Collection can be pinned to, excluding the targets this Collection is already pinned to. We also include Collection ID already is pinned to each eligible target, which will be 0 if the target has no pinned Collection. */ @@ -103,7 +106,6 @@ public CollectionPinnedMetadata withEligiblePins(Optional> existingPins = Optional.empty(); - + private Optional> eligiblePins = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * List of targets this Collection is pinned to. */ @@ -160,6 +163,7 @@ public Builder existingPins(Optional> existi return this; } + /** * List of targets this Collection can be pinned to, excluding the targets this Collection is already pinned to. We also include Collection ID already is pinned to each eligible target, which will be 0 if the target has no pinned Collection. */ @@ -177,11 +181,12 @@ public Builder eligiblePins(Optional> elig this.eligiblePins = eligiblePins; return this; } - + public CollectionPinnedMetadata build() { + return new CollectionPinnedMetadata( - existingPins, - eligiblePins); + existingPins, eligiblePins); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CommentDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CommentDefinition.java index 99b1cdc7..44430aa1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CommentDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CommentDefinition.java @@ -21,7 +21,6 @@ *

Describes a comment on a document */ public class CommentDefinition { - /** * The document specific id for the comment. This field is case insensitive and should not be more than 200 characters in length. */ @@ -87,7 +86,8 @@ public CommentDefinition( public CommentDefinition( String id) { - this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -141,9 +141,10 @@ public Optional updatedBy() { return (Optional) updatedBy; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The document specific id for the comment. This field is case insensitive and should not be more than 200 characters in length. @@ -163,6 +164,7 @@ public CommentDefinition withAuthor(UserReferenceDefinition author) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -181,6 +183,7 @@ public CommentDefinition withContent(ContentDefinition content) { return this; } + /** * Describes text content or base64 encoded binary content */ @@ -199,6 +202,7 @@ public CommentDefinition withCreatedAt(long createdAt) { return this; } + /** * The creation time, in epoch seconds. */ @@ -217,6 +221,7 @@ public CommentDefinition withUpdatedAt(long updatedAt) { return this; } + /** * The last updated time, in epoch seconds. */ @@ -235,6 +240,7 @@ public CommentDefinition withUpdatedBy(UserReferenceDefinition updatedBy) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -244,7 +250,6 @@ public CommentDefinition withUpdatedBy(Optional author = Optional.empty(); - + private Optional content = Optional.empty(); - + private Optional createdAt = Optional.empty(); - + private Optional updatedAt = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The document specific id for the comment. This field is case insensitive and should not be more than 200 characters in length. */ @@ -312,6 +315,7 @@ public Builder id(String id) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -330,6 +334,7 @@ public Builder author(Optional author) { return this; } + /** * Describes text content or base64 encoded binary content */ @@ -348,6 +353,7 @@ public Builder content(Optional content) { return this; } + /** * The creation time, in epoch seconds. */ @@ -366,6 +372,7 @@ public Builder createdAt(Optional createdAt) { return this; } + /** * The last updated time, in epoch seconds. */ @@ -384,6 +391,7 @@ public Builder updatedAt(Optional updatedAt) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -401,15 +409,13 @@ public Builder updatedBy(Optional updatedBy) this.updatedBy = updatedBy; return this; } - + public CommentDefinition build() { + return new CommentDefinition( - id, - author, - content, - createdAt, - updatedAt, - updatedBy); + id, author, content, + createdAt, updatedAt, updatedBy); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Company.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Company.java index f38d8d8b..9a65c8ab 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Company.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Company.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Optional; -public class Company { +public class Company { /** * User-friendly display name. */ @@ -155,7 +155,11 @@ public Company( public Company( String name) { - this(name, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(name, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -263,9 +267,10 @@ public Optional about() { return about; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * User-friendly display name. @@ -285,6 +290,7 @@ public Company withProfileUrl(String profileUrl) { return this; } + /** * Link to internal company company profile. */ @@ -303,6 +309,7 @@ public Company withWebsiteUrls(List websiteUrls) { return this; } + /** * Link to company's associated websites. */ @@ -321,6 +328,7 @@ public Company withLogoUrl(String logoUrl) { return this; } + /** * The URL of the company's logo. Public, Glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). */ @@ -339,6 +347,7 @@ public Company withLocation(String location) { return this; } + /** * User facing string representing the company's location. */ @@ -357,6 +366,7 @@ public Company withPhone(String phone) { return this; } + /** * Phone number as a number string. */ @@ -375,6 +385,7 @@ public Company withFax(String fax) { return this; } + /** * Fax number as a number string. */ @@ -393,6 +404,7 @@ public Company withIndustry(String industry) { return this; } + /** * User facing string representing the company's industry. */ @@ -411,6 +423,7 @@ public Company withAnnualRevenue(double annualRevenue) { return this; } + /** * Average company's annual revenue for reference. */ @@ -429,6 +442,7 @@ public Company withNumberOfEmployees(long numberOfEmployees) { return this; } + /** * Average company's number of employees for reference. */ @@ -447,6 +461,7 @@ public Company withStockSymbol(String stockSymbol) { return this; } + /** * Company's stock symbol if company is public. */ @@ -465,6 +480,7 @@ public Company withFoundedDate(LocalDate foundedDate) { return this; } + /** * The date when the company was founded. */ @@ -483,6 +499,7 @@ public Company withAbout(String about) { return this; } + /** * User facing description of company. */ @@ -492,7 +509,6 @@ public Company withAbout(Optional about) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -521,18 +537,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - profileUrl, - websiteUrls, - logoUrl, - location, - phone, - fax, - industry, - annualRevenue, - numberOfEmployees, - stockSymbol, - foundedDate, + name, profileUrl, websiteUrls, + logoUrl, location, phone, + fax, industry, annualRevenue, + numberOfEmployees, stockSymbol, foundedDate, about); } @@ -553,39 +561,41 @@ public String toString() { "foundedDate", foundedDate, "about", about); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private Optional profileUrl = Optional.empty(); - + private Optional> websiteUrls = Optional.empty(); - + private Optional logoUrl = Optional.empty(); - + private Optional location = Optional.empty(); - + private Optional phone = Optional.empty(); - + private Optional fax = Optional.empty(); - + private Optional industry = Optional.empty(); - + private Optional annualRevenue = Optional.empty(); - + private Optional numberOfEmployees = Optional.empty(); - + private Optional stockSymbol = Optional.empty(); - + private Optional foundedDate = Optional.empty(); - + private Optional about = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * User-friendly display name. */ @@ -595,6 +605,7 @@ public Builder name(String name) { return this; } + /** * Link to internal company company profile. */ @@ -613,6 +624,7 @@ public Builder profileUrl(Optional profileUrl) { return this; } + /** * Link to company's associated websites. */ @@ -631,6 +643,7 @@ public Builder websiteUrls(Optional> websiteUrls) { return this; } + /** * The URL of the company's logo. Public, Glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). */ @@ -649,6 +662,7 @@ public Builder logoUrl(Optional logoUrl) { return this; } + /** * User facing string representing the company's location. */ @@ -667,6 +681,7 @@ public Builder location(Optional location) { return this; } + /** * Phone number as a number string. */ @@ -685,6 +700,7 @@ public Builder phone(Optional phone) { return this; } + /** * Fax number as a number string. */ @@ -703,6 +719,7 @@ public Builder fax(Optional fax) { return this; } + /** * User facing string representing the company's industry. */ @@ -721,6 +738,7 @@ public Builder industry(Optional industry) { return this; } + /** * Average company's annual revenue for reference. */ @@ -739,6 +757,7 @@ public Builder annualRevenue(Optional annualRevenue) { return this; } + /** * Average company's number of employees for reference. */ @@ -757,6 +776,7 @@ public Builder numberOfEmployees(Optional numberOfEmployees) { return this; } + /** * Company's stock symbol if company is public. */ @@ -775,6 +795,7 @@ public Builder stockSymbol(Optional stockSymbol) { return this; } + /** * The date when the company was founded. */ @@ -793,6 +814,7 @@ public Builder foundedDate(Optional foundedDate) { return this; } + /** * User facing description of company. */ @@ -810,22 +832,16 @@ public Builder about(Optional about) { this.about = about; return this; } - + public Company build() { + return new Company( - name, - profileUrl, - websiteUrls, - logoUrl, - location, - phone, - fax, - industry, - annualRevenue, - numberOfEmployees, - stockSymbol, - foundedDate, + name, profileUrl, websiteUrls, + logoUrl, location, phone, + fax, industry, annualRevenue, + numberOfEmployees, stockSymbol, foundedDate, about); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ConferenceData.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ConferenceData.java index 28545dfc..be409d63 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ConferenceData.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ConferenceData.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class ConferenceData { @JsonProperty("provider") @@ -25,6 +26,7 @@ public class ConferenceData { @JsonProperty("uri") private String uri; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("source") private Optional source; @@ -67,9 +69,10 @@ public Optional source() { return (Optional) source; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ConferenceData withProvider(Provider provider) { Utils.checkNotNull(provider, "provider"); @@ -92,13 +95,13 @@ public ConferenceData withSource(ConferenceDataSource source) { return this; } + public ConferenceData withSource(Optional source) { Utils.checkNotNull(source, "source"); this.source = source; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +120,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - provider, - uri, - source); + provider, uri, source); } @Override @@ -129,25 +130,28 @@ public String toString() { "uri", uri, "source", source); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Provider provider; - + private String uri; - + private Optional source = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder provider(Provider provider) { Utils.checkNotNull(provider, "provider"); this.provider = provider; return this; } + /** * A permalink for the conference. */ @@ -157,6 +161,7 @@ public Builder uri(String uri) { return this; } + public Builder source(ConferenceDataSource source) { Utils.checkNotNull(source, "source"); this.source = Optional.ofNullable(source); @@ -168,12 +173,12 @@ public Builder source(Optional source) { this.source = source; return this; } - + public ConferenceData build() { + return new ConferenceData( - provider, - uri, - source); + provider, uri, source); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ContentDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ContentDefinition.java index fb0f7bb7..35f64094 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ContentDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ContentDefinition.java @@ -76,9 +76,10 @@ public Optional binaryContent() { return binaryContent; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ContentDefinition withMimeType(String mimeType) { Utils.checkNotNull(mimeType, "mimeType"); @@ -95,6 +96,7 @@ public ContentDefinition withTextContent(String textContent) { return this; } + /** * text content. Only one of textContent or binary content can be specified */ @@ -113,6 +115,7 @@ public ContentDefinition withBinaryContent(String binaryContent) { return this; } + /** * base64 encoded binary content. Only one of textContent or binary content can be specified */ @@ -122,7 +125,6 @@ public ContentDefinition withBinaryContent(Optional binaryContent) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -141,9 +143,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - mimeType, - textContent, - binaryContent); + mimeType, textContent, binaryContent); } @Override @@ -153,25 +153,28 @@ public String toString() { "textContent", textContent, "binaryContent", binaryContent); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String mimeType; - + private Optional textContent = Optional.empty(); - + private Optional binaryContent = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder mimeType(String mimeType) { Utils.checkNotNull(mimeType, "mimeType"); this.mimeType = mimeType; return this; } + /** * text content. Only one of textContent or binary content can be specified */ @@ -190,6 +193,7 @@ public Builder textContent(Optional textContent) { return this; } + /** * base64 encoded binary content. Only one of textContent or binary content can be specified */ @@ -207,12 +211,12 @@ public Builder binaryContent(Optional binaryContent) { this.binaryContent = binaryContent; return this; } - + public ContentDefinition build() { + return new ContentDefinition( - mimeType, - textContent, - binaryContent); + mimeType, textContent, binaryContent); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ContentInsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ContentInsightsResponse.java index 8fe51664..e22ccf4e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ContentInsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ContentInsightsResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class ContentInsightsResponse { +public class ContentInsightsResponse { /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -73,7 +73,8 @@ public ContentInsightsResponse( } public ContentInsightsResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -118,9 +119,10 @@ public Optional minVisitorThreshold() { return minVisitorThreshold; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). @@ -131,6 +133,7 @@ public ContentInsightsResponse withLastLogTimestamp(long lastLogTimestamp) { return this; } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -149,6 +152,7 @@ public ContentInsightsResponse withDocumentInsights(List docume return this; } + /** * Insights for documents. */ @@ -167,6 +171,7 @@ public ContentInsightsResponse withDepartments(List departments) { return this; } + /** * list of departments applicable for contents tab. */ @@ -185,6 +190,7 @@ public ContentInsightsResponse withMinDepartmentSizeThreshold(long minDepartment return this; } + /** * Min threshold in size of departments while populating results, otherwise 0. */ @@ -203,6 +209,7 @@ public ContentInsightsResponse withMinVisitorThreshold(long minVisitorThreshold) return this; } + /** * Minimum number of visitors to a document required to be included in insights. */ @@ -212,7 +219,6 @@ public ContentInsightsResponse withMinVisitorThreshold(Optional minVisitor return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -233,11 +239,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - lastLogTimestamp, - documentInsights, - departments, - minDepartmentSizeThreshold, - minVisitorThreshold); + lastLogTimestamp, documentInsights, departments, + minDepartmentSizeThreshold, minVisitorThreshold); } @Override @@ -249,23 +252,25 @@ public String toString() { "minDepartmentSizeThreshold", minDepartmentSizeThreshold, "minVisitorThreshold", minVisitorThreshold); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional lastLogTimestamp = Optional.empty(); - + private Optional> documentInsights = Optional.empty(); - + private Optional> departments = Optional.empty(); - + private Optional minDepartmentSizeThreshold = Optional.empty(); - + private Optional minVisitorThreshold = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -284,6 +289,7 @@ public Builder lastLogTimestamp(Optional lastLogTimestamp) { return this; } + /** * Insights for documents. */ @@ -302,6 +308,7 @@ public Builder documentInsights(Optional> docume return this; } + /** * list of departments applicable for contents tab. */ @@ -320,6 +327,7 @@ public Builder departments(Optional> departments) { return this; } + /** * Min threshold in size of departments while populating results, otherwise 0. */ @@ -338,6 +346,7 @@ public Builder minDepartmentSizeThreshold(Optional minDepartmentSizeThresh return this; } + /** * Minimum number of visitors to a document required to be included in insights. */ @@ -355,14 +364,13 @@ public Builder minVisitorThreshold(Optional minVisitorThreshold) { this.minVisitorThreshold = minVisitorThreshold; return this; } - + public ContentInsightsResponse build() { + return new ContentInsightsResponse( - lastLogTimestamp, - documentInsights, - departments, - minDepartmentSizeThreshold, - minVisitorThreshold); + lastLogTimestamp, documentInsights, departments, + minDepartmentSizeThreshold, minVisitorThreshold); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CountInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CountInfo.java index 481d9044..e754cb4d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CountInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CountInfo.java @@ -15,14 +15,15 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class CountInfo { +public class CountInfo { /** * The counter value */ @JsonProperty("count") private long count; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("period") private Optional period; @@ -74,9 +75,10 @@ public Optional org() { return org; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The counter value @@ -93,6 +95,7 @@ public CountInfo withPeriod(Period period) { return this; } + public CountInfo withPeriod(Optional period) { Utils.checkNotNull(period, "period"); this.period = period; @@ -108,6 +111,7 @@ public CountInfo withOrg(String org) { return this; } + /** * The unit of organization over which we did the count aggregation, e.g. org (department) or company */ @@ -117,7 +121,6 @@ public CountInfo withOrg(Optional org) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -136,9 +139,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - count, - period, - org); + count, period, org); } @Override @@ -148,19 +149,21 @@ public String toString() { "period", period, "org", org); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long count; - + private Optional period = Optional.empty(); - + private Optional org = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The counter value */ @@ -170,6 +173,7 @@ public Builder count(long count) { return this; } + public Builder period(Period period) { Utils.checkNotNull(period, "period"); this.period = Optional.ofNullable(period); @@ -182,6 +186,7 @@ public Builder period(Optional period) { return this; } + /** * The unit of organization over which we did the count aggregation, e.g. org (department) or company */ @@ -199,12 +204,12 @@ public Builder org(Optional org) { this.org = org; return this; } - + public CountInfo build() { + return new CountInfo( - count, - period, - org); + count, period, org); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAnnouncementRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAnnouncementRequest.java index 874cb09c..44b0d592 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAnnouncementRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAnnouncementRequest.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class CreateAnnouncementRequest { +public class CreateAnnouncementRequest { /** * The date and time at which the announcement becomes active. */ @@ -37,6 +37,7 @@ public class CreateAnnouncementRequest { @JsonProperty("title") private String title; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("body") private Optional body; @@ -48,10 +49,12 @@ public class CreateAnnouncementRequest { @JsonProperty("emoji") private Optional emoji; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("banner") private Optional banner; @@ -155,7 +158,11 @@ public CreateAnnouncementRequest( OffsetDateTime startTime, OffsetDateTime endTime, String title) { - this(startTime, endTime, title, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(startTime, endTime, title, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -267,9 +274,10 @@ public Optional viewUrl() { return viewUrl; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The date and time at which the announcement becomes active. @@ -304,6 +312,7 @@ public CreateAnnouncementRequest withBody(StructuredText body) { return this; } + public CreateAnnouncementRequest withBody(Optional body) { Utils.checkNotNull(body, "body"); this.body = body; @@ -319,6 +328,7 @@ public CreateAnnouncementRequest withEmoji(String emoji) { return this; } + /** * An emoji used to indicate the nature of the announcement. */ @@ -334,6 +344,7 @@ public CreateAnnouncementRequest withThumbnail(Thumbnail thumbnail) { return this; } + public CreateAnnouncementRequest withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -346,6 +357,7 @@ public CreateAnnouncementRequest withBanner(Thumbnail banner) { return this; } + public CreateAnnouncementRequest withBanner(Optional banner) { Utils.checkNotNull(banner, "banner"); this.banner = banner; @@ -361,6 +373,7 @@ public CreateAnnouncementRequest withAudienceFilters(List audienceF return this; } + /** * Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. */ @@ -379,6 +392,7 @@ public CreateAnnouncementRequest withSourceDocumentId(String sourceDocumentId) { return this; } + /** * The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). */ @@ -397,6 +411,7 @@ public CreateAnnouncementRequest withHideAttribution(boolean hideAttribution) { return this; } + /** * Whether or not to hide an author attribution. */ @@ -415,6 +430,7 @@ public CreateAnnouncementRequest withChannel(CreateAnnouncementRequestChannel ch return this; } + /** * This determines whether this is a Social Feed post or a regular announcement. */ @@ -433,6 +449,7 @@ public CreateAnnouncementRequest withPostType(CreateAnnouncementRequestPostType return this; } + /** * This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site. */ @@ -451,6 +468,7 @@ public CreateAnnouncementRequest withIsPrioritized(boolean isPrioritized) { return this; } + /** * Used by the Social Feed to pin posts to the front of the feed. */ @@ -469,6 +487,7 @@ public CreateAnnouncementRequest withViewUrl(String viewUrl) { return this; } + /** * URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED". */ @@ -478,7 +497,6 @@ public CreateAnnouncementRequest withViewUrl(Optional viewUrl) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -508,20 +526,11 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - startTime, - endTime, - title, - body, - emoji, - thumbnail, - banner, - audienceFilters, - sourceDocumentId, - hideAttribution, - channel, - postType, - isPrioritized, - viewUrl); + startTime, endTime, title, + body, emoji, thumbnail, + banner, audienceFilters, sourceDocumentId, + hideAttribution, channel, postType, + isPrioritized, viewUrl); } @Override @@ -542,41 +551,43 @@ public String toString() { "isPrioritized", isPrioritized, "viewUrl", viewUrl); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private OffsetDateTime startTime; - + private OffsetDateTime endTime; - + private String title; - + private Optional body = Optional.empty(); - + private Optional emoji = Optional.empty(); - + private Optional thumbnail = Optional.empty(); - + private Optional banner = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional sourceDocumentId = Optional.empty(); - + private Optional hideAttribution = Optional.empty(); - + private Optional channel = Optional.empty(); - + private Optional postType = Optional.empty(); - + private Optional isPrioritized = Optional.empty(); - + private Optional viewUrl = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The date and time at which the announcement becomes active. */ @@ -586,6 +597,7 @@ public Builder startTime(OffsetDateTime startTime) { return this; } + /** * The date and time at which the announcement expires. */ @@ -595,6 +607,7 @@ public Builder endTime(OffsetDateTime endTime) { return this; } + /** * The headline of the announcement. */ @@ -604,6 +617,7 @@ public Builder title(String title) { return this; } + public Builder body(StructuredText body) { Utils.checkNotNull(body, "body"); this.body = Optional.ofNullable(body); @@ -616,6 +630,7 @@ public Builder body(Optional body) { return this; } + /** * An emoji used to indicate the nature of the announcement. */ @@ -634,6 +649,7 @@ public Builder emoji(Optional emoji) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -646,6 +662,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + public Builder banner(Thumbnail banner) { Utils.checkNotNull(banner, "banner"); this.banner = Optional.ofNullable(banner); @@ -658,6 +675,7 @@ public Builder banner(Optional banner) { return this; } + /** * Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. */ @@ -676,6 +694,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). */ @@ -694,6 +713,7 @@ public Builder sourceDocumentId(Optional sourceDocumentId) { return this; } + /** * Whether or not to hide an author attribution. */ @@ -712,6 +732,7 @@ public Builder hideAttribution(Optional hideAttribution) { return this; } + /** * This determines whether this is a Social Feed post or a regular announcement. */ @@ -730,6 +751,7 @@ public Builder channel(Optional chan return this; } + /** * This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site. */ @@ -748,6 +770,7 @@ public Builder postType(Optional po return this; } + /** * Used by the Social Feed to pin posts to the front of the feed. */ @@ -766,6 +789,7 @@ public Builder isPrioritized(Optional isPrioritized) { return this; } + /** * URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED". */ @@ -783,23 +807,16 @@ public Builder viewUrl(Optional viewUrl) { this.viewUrl = viewUrl; return this; } - + public CreateAnnouncementRequest build() { + return new CreateAnnouncementRequest( - startTime, - endTime, - title, - body, - emoji, - thumbnail, - banner, - audienceFilters, - sourceDocumentId, - hideAttribution, - channel, - postType, - isPrioritized, - viewUrl); + startTime, endTime, title, + body, emoji, thumbnail, + banner, audienceFilters, sourceDocumentId, + hideAttribution, channel, postType, + isPrioritized, viewUrl); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAnswerRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAnswerRequest.java index 852038bb..d4aa7b80 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAnswerRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAnswerRequest.java @@ -10,6 +10,7 @@ import java.lang.Override; import java.lang.String; + public class CreateAnswerRequest { @JsonProperty("data") @@ -27,9 +28,10 @@ public AnswerCreationData data() { return data; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CreateAnswerRequest withData(AnswerCreationData data) { Utils.checkNotNull(data, "data"); @@ -37,7 +39,6 @@ public CreateAnswerRequest withData(AnswerCreationData data) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -62,24 +63,28 @@ public String toString() { return Utils.toString(CreateAnswerRequest.class, "data", data); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private AnswerCreationData data; - + private Builder() { // force use of static builder() method } + public Builder data(AnswerCreationData data) { Utils.checkNotNull(data, "data"); this.data = data; return this; } - + public CreateAnswerRequest build() { + return new CreateAnswerRequest( data); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAuthTokenResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAuthTokenResponse.java index dd92114d..66ab4512 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAuthTokenResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateAuthTokenResponse.java @@ -11,8 +11,8 @@ import java.lang.Override; import java.lang.String; -public class CreateAuthTokenResponse { +public class CreateAuthTokenResponse { /** * An authentication token that can be passed to any endpoint via Bearer Authentication */ @@ -51,9 +51,10 @@ public long expirationTime() { return expirationTime; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * An authentication token that can be passed to any endpoint via Bearer Authentication @@ -73,7 +74,6 @@ public CreateAuthTokenResponse withExpirationTime(long expirationTime) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -91,8 +91,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - token, - expirationTime); + token, expirationTime); } @Override @@ -101,17 +100,19 @@ public String toString() { "token", token, "expirationTime", expirationTime); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String token; - + private Long expirationTime; - + private Builder() { // force use of static builder() method } + /** * An authentication token that can be passed to any endpoint via Bearer Authentication */ @@ -121,6 +122,7 @@ public Builder token(String token) { return this; } + /** * Unix timestamp for when this token expires (in seconds since epoch UTC). */ @@ -129,11 +131,12 @@ public Builder expirationTime(long expirationTime) { this.expirationTime = expirationTime; return this; } - + public CreateAuthTokenResponse build() { + return new CreateAuthTokenResponse( - token, - expirationTime); + token, expirationTime); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateCollectionRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateCollectionRequest.java index b7fd2e10..e9aeffc5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateCollectionRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateCollectionRequest.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class CreateCollectionRequest { +public class CreateCollectionRequest { /** * The unique name of the Collection. */ @@ -74,6 +74,7 @@ public class CreateCollectionRequest { @JsonProperty("parentId") private Optional parentId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; @@ -131,7 +132,10 @@ public CreateCollectionRequest( public CreateCollectionRequest( String name) { - this(name, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(name, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -223,9 +227,10 @@ public Optional newNextItemId() { return newNextItemId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique name of the Collection. @@ -245,6 +250,7 @@ public CreateCollectionRequest withDescription(String description) { return this; } + /** * A brief summary of the Collection's contents. */ @@ -263,6 +269,7 @@ public CreateCollectionRequest withAddedRoles(List addedR return this; } + /** * A list of added user roles for the Collection. */ @@ -281,6 +288,7 @@ public CreateCollectionRequest withRemovedRoles(List remo return this; } + /** * A list of removed user roles for the Collection. */ @@ -299,6 +307,7 @@ public CreateCollectionRequest withAudienceFilters(List audienceFil return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -317,6 +326,7 @@ public CreateCollectionRequest withIcon(String icon) { return this; } + /** * The emoji icon of this Collection. */ @@ -335,6 +345,7 @@ public CreateCollectionRequest withAdminLocked(boolean adminLocked) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -353,6 +364,7 @@ public CreateCollectionRequest withParentId(long parentId) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -368,6 +380,7 @@ public CreateCollectionRequest withThumbnail(Thumbnail thumbnail) { return this; } + public CreateCollectionRequest withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -383,6 +396,7 @@ public CreateCollectionRequest withAllowedDatasource(String allowedDatasource) { return this; } + /** * The datasource type this Collection can hold. */ @@ -401,6 +415,7 @@ public CreateCollectionRequest withNewNextItemId(String newNextItemId) { return this; } + /** * The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection. Only used if parentId is specified. */ @@ -410,7 +425,6 @@ public CreateCollectionRequest withNewNextItemId(Optional newNextItemId) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -437,17 +451,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - newNextItemId); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, newNextItemId); } @Override @@ -465,35 +472,37 @@ public String toString() { "allowedDatasource", allowedDatasource, "newNextItemId", newNextItemId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private Optional description = Optional.empty(); - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Optional adminLocked = Optional.empty(); - + private Optional parentId = Optional.empty(); - + private Optional thumbnail = Optional.empty(); - + private Optional allowedDatasource = Optional.empty(); - + private Optional newNextItemId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The unique name of the Collection. */ @@ -503,6 +512,7 @@ public Builder name(String name) { return this; } + /** * A brief summary of the Collection's contents. */ @@ -521,6 +531,7 @@ public Builder description(Optional description) { return this; } + /** * A list of added user roles for the Collection. */ @@ -539,6 +550,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of removed user roles for the Collection. */ @@ -557,6 +569,7 @@ public Builder removedRoles(Optional> remo return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -575,6 +588,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The emoji icon of this Collection. */ @@ -593,6 +607,7 @@ public Builder icon(Optional icon) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -611,6 +626,7 @@ public Builder adminLocked(Optional adminLocked) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -629,6 +645,7 @@ public Builder parentId(Optional parentId) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -641,6 +658,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + /** * The datasource type this Collection can hold. */ @@ -659,6 +677,7 @@ public Builder allowedDatasource(Optional allowedDatasource) { return this; } + /** * The (optional) ItemId of the next CollectionItem in sequence. If omitted, will be added to the end of the Collection. Only used if parentId is specified. */ @@ -676,20 +695,15 @@ public Builder newNextItemId(Optional newNextItemId) { this.newNextItemId = newNextItemId; return this; } - + public CreateCollectionRequest build() { + return new CreateCollectionRequest( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - newNextItemId); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, newNextItemId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateCollectionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateCollectionResponse.java index eb034fca..df59e180 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateCollectionResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateCollectionResponse.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Optional; -public class CreateCollectionResponse { +public class CreateCollectionResponse { /** * The unique name of the Collection. */ @@ -74,6 +74,7 @@ public class CreateCollectionResponse { @JsonProperty("parentId") private Optional parentId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; @@ -85,6 +86,7 @@ public class CreateCollectionResponse { @JsonProperty("allowedDatasource") private Optional allowedDatasource; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; @@ -95,18 +97,22 @@ public class CreateCollectionResponse { @JsonProperty("id") private long id; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createTime") private Optional createTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updateTime") private Optional updateTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("creator") private Optional creator; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedBy") private Optional updatedBy; @@ -132,6 +138,7 @@ public class CreateCollectionResponse { @JsonProperty("items") private Optional> items; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("pinMetadata") private Optional pinMetadata; @@ -157,13 +164,16 @@ public class CreateCollectionResponse { @JsonProperty("roles") private Optional> roles; + @JsonProperty("errorCode") private CreateCollectionResponseErrorCode errorCode; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("collection") private Optional collection; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private Optional error; @@ -255,7 +265,15 @@ public CreateCollectionResponse( String description, long id, CreateCollectionResponseErrorCode errorCode) { - this(name, description, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), errorCode, Optional.empty(), Optional.empty()); + this(name, description, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), id, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), errorCode, + Optional.empty(), Optional.empty()); } /** @@ -450,9 +468,10 @@ public Optional error() { return (Optional) error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique name of the Collection. @@ -481,6 +500,7 @@ public CreateCollectionResponse withAddedRoles(List added return this; } + /** * A list of added user roles for the Collection. */ @@ -499,6 +519,7 @@ public CreateCollectionResponse withRemovedRoles(List rem return this; } + /** * A list of removed user roles for the Collection. */ @@ -517,6 +538,7 @@ public CreateCollectionResponse withAudienceFilters(List audienceFi return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -535,6 +557,7 @@ public CreateCollectionResponse withIcon(String icon) { return this; } + /** * The emoji icon of this Collection. */ @@ -553,6 +576,7 @@ public CreateCollectionResponse withAdminLocked(boolean adminLocked) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -571,6 +595,7 @@ public CreateCollectionResponse withParentId(long parentId) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -586,6 +611,7 @@ public CreateCollectionResponse withThumbnail(Thumbnail thumbnail) { return this; } + public CreateCollectionResponse withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -601,6 +627,7 @@ public CreateCollectionResponse withAllowedDatasource(String allowedDatasource) return this; } + /** * The datasource type this Collection can hold. */ @@ -616,6 +643,7 @@ public CreateCollectionResponse withPermissions(ObjectPermissions permissions) { return this; } + public CreateCollectionResponse withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -637,6 +665,7 @@ public CreateCollectionResponse withCreateTime(OffsetDateTime createTime) { return this; } + public CreateCollectionResponse withCreateTime(Optional createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = createTime; @@ -649,6 +678,7 @@ public CreateCollectionResponse withUpdateTime(OffsetDateTime updateTime) { return this; } + public CreateCollectionResponse withUpdateTime(Optional updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = updateTime; @@ -661,6 +691,7 @@ public CreateCollectionResponse withCreator(Person creator) { return this; } + public CreateCollectionResponse withCreator(Optional creator) { Utils.checkNotNull(creator, "creator"); this.creator = creator; @@ -673,6 +704,7 @@ public CreateCollectionResponse withUpdatedBy(Person updatedBy) { return this; } + public CreateCollectionResponse withUpdatedBy(Optional updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = updatedBy; @@ -688,6 +720,7 @@ public CreateCollectionResponse withItemCount(long itemCount) { return this; } + /** * The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. */ @@ -706,6 +739,7 @@ public CreateCollectionResponse withChildCount(long childCount) { return this; } + /** * The number of children Collections. Separated from the actual children so we can grab the count without children. */ @@ -724,6 +758,7 @@ public CreateCollectionResponse withItems(List items) { return this; } + /** * The items in this Collection. */ @@ -739,6 +774,7 @@ public CreateCollectionResponse withPinMetadata(CollectionPinnedMetadata pinMeta return this; } + public CreateCollectionResponse withPinMetadata(Optional pinMetadata) { Utils.checkNotNull(pinMetadata, "pinMetadata"); this.pinMetadata = pinMetadata; @@ -754,6 +790,7 @@ public CreateCollectionResponse withShortcuts(List shortcuts) { return this; } + /** * The names of the shortcuts (Go Links) that point to this Collection. */ @@ -772,6 +809,7 @@ public CreateCollectionResponse withChildren(List children) { return this; } + /** * The children Collections of this Collection. */ @@ -790,6 +828,7 @@ public CreateCollectionResponse withRoles(List roles) { return this; } + /** * A list of user roles for the Collection. */ @@ -811,6 +850,7 @@ public CreateCollectionResponse withCollection(Collection collection) { return this; } + public CreateCollectionResponse withCollection(Optional collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; @@ -823,13 +863,13 @@ public CreateCollectionResponse withError(CollectionError1 error) { return this; } + public CreateCollectionResponse withError(Optional error) { Utils.checkNotNull(error, "error"); this.error = error; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -871,32 +911,15 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - permissions, - id, - createTime, - updateTime, - creator, - updatedBy, - itemCount, - childCount, - items, - pinMetadata, - shortcuts, - children, - roles, - errorCode, - collection, - error); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, permissions, id, + createTime, updateTime, creator, + updatedBy, itemCount, childCount, + items, pinMetadata, shortcuts, + children, roles, errorCode, + collection, error); } @Override @@ -929,65 +952,67 @@ public String toString() { "collection", collection, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private String description; - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Optional adminLocked = Optional.empty(); - + private Optional parentId = Optional.empty(); - + private Optional thumbnail = Optional.empty(); - + private Optional allowedDatasource = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Long id; - + private Optional createTime = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional creator = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional itemCount = Optional.empty(); - + private Optional childCount = Optional.empty(); - + private Optional> items = Optional.empty(); - + private Optional pinMetadata = Optional.empty(); - + private Optional> shortcuts = Optional.empty(); - + private Optional> children = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private CreateCollectionResponseErrorCode errorCode; - + private Optional collection = Optional.empty(); - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The unique name of the Collection. */ @@ -997,6 +1022,7 @@ public Builder name(String name) { return this; } + /** * A brief summary of the Collection's contents. */ @@ -1006,6 +1032,7 @@ public Builder description(String description) { return this; } + /** * A list of added user roles for the Collection. */ @@ -1024,6 +1051,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of removed user roles for the Collection. */ @@ -1042,6 +1070,7 @@ public Builder removedRoles(Optional> remo return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -1060,6 +1089,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The emoji icon of this Collection. */ @@ -1078,6 +1108,7 @@ public Builder icon(Optional icon) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -1096,6 +1127,7 @@ public Builder adminLocked(Optional adminLocked) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -1114,6 +1146,7 @@ public Builder parentId(Optional parentId) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -1126,6 +1159,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + /** * The datasource type this Collection can hold. */ @@ -1144,6 +1178,7 @@ public Builder allowedDatasource(Optional allowedDatasource) { return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -1156,6 +1191,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * The unique ID of the Collection. */ @@ -1165,6 +1201,7 @@ public Builder id(long id) { return this; } + public Builder createTime(OffsetDateTime createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = Optional.ofNullable(createTime); @@ -1177,6 +1214,7 @@ public Builder createTime(Optional createTime) { return this; } + public Builder updateTime(OffsetDateTime updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = Optional.ofNullable(updateTime); @@ -1189,6 +1227,7 @@ public Builder updateTime(Optional updateTime) { return this; } + public Builder creator(Person creator) { Utils.checkNotNull(creator, "creator"); this.creator = Optional.ofNullable(creator); @@ -1201,6 +1240,7 @@ public Builder creator(Optional creator) { return this; } + public Builder updatedBy(Person updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = Optional.ofNullable(updatedBy); @@ -1213,6 +1253,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + /** * The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. */ @@ -1231,6 +1272,7 @@ public Builder itemCount(Optional itemCount) { return this; } + /** * The number of children Collections. Separated from the actual children so we can grab the count without children. */ @@ -1249,6 +1291,7 @@ public Builder childCount(Optional childCount) { return this; } + /** * The items in this Collection. */ @@ -1267,6 +1310,7 @@ public Builder items(Optional> items) { return this; } + public Builder pinMetadata(CollectionPinnedMetadata pinMetadata) { Utils.checkNotNull(pinMetadata, "pinMetadata"); this.pinMetadata = Optional.ofNullable(pinMetadata); @@ -1279,6 +1323,7 @@ public Builder pinMetadata(Optional pinMetad return this; } + /** * The names of the shortcuts (Go Links) that point to this Collection. */ @@ -1297,6 +1342,7 @@ public Builder shortcuts(Optional> shortcuts) { return this; } + /** * The children Collections of this Collection. */ @@ -1315,6 +1361,7 @@ public Builder children(Optional> children) { return this; } + /** * A list of user roles for the Collection. */ @@ -1333,12 +1380,14 @@ public Builder roles(Optional> roles) { return this; } + public Builder errorCode(CreateCollectionResponseErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); this.errorCode = errorCode; return this; } + public Builder collection(Collection collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -1351,6 +1400,7 @@ public Builder collection(Optional collection) { return this; } + public Builder error(CollectionError1 error) { Utils.checkNotNull(error, "error"); this.error = Optional.ofNullable(error); @@ -1362,35 +1412,20 @@ public Builder error(Optional error) { this.error = error; return this; } - + public CreateCollectionResponse build() { + return new CreateCollectionResponse( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - permissions, - id, - createTime, - updateTime, - creator, - updatedBy, - itemCount, - childCount, - items, - pinMetadata, - shortcuts, - children, - roles, - errorCode, - collection, - error); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, permissions, id, + createTime, updateTime, creator, + updatedBy, itemCount, childCount, + items, pinMetadata, shortcuts, + children, roles, errorCode, + collection, error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateDlpReportRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateDlpReportRequest.java index bd76b10f..2149e894 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateDlpReportRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateDlpReportRequest.java @@ -15,8 +15,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class CreateDlpReportRequest { +public class CreateDlpReportRequest { /** * Name of the policy being created. */ @@ -62,7 +62,8 @@ public CreateDlpReportRequest( } public CreateDlpReportRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -99,9 +100,10 @@ public Optional autoHideDocs() { return autoHideDocs; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Name of the policy being created. @@ -112,6 +114,7 @@ public CreateDlpReportRequest withName(String name) { return this; } + /** * Name of the policy being created. */ @@ -130,6 +133,7 @@ public CreateDlpReportRequest withConfig(DlpConfig config) { return this; } + /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -148,6 +152,7 @@ public CreateDlpReportRequest withFrequency(DlpFrequency frequency) { return this; } + /** * Interval between scans. DAILY is deprecated. */ @@ -166,6 +171,7 @@ public CreateDlpReportRequest withAutoHideDocs(boolean autoHideDocs) { return this; } + /** * Controls whether the policy should hide documents with violations. */ @@ -175,7 +181,6 @@ public CreateDlpReportRequest withAutoHideDocs(Optional autoHideDocs) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -195,9 +200,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - config, - frequency, + name, config, frequency, autoHideDocs); } @@ -209,21 +212,23 @@ public String toString() { "frequency", frequency, "autoHideDocs", autoHideDocs); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional config = Optional.empty(); - + private Optional frequency = Optional.empty(); - + private Optional autoHideDocs = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Name of the policy being created. */ @@ -242,6 +247,7 @@ public Builder name(Optional name) { return this; } + /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -260,6 +266,7 @@ public Builder config(Optional config) { return this; } + /** * Interval between scans. DAILY is deprecated. */ @@ -278,6 +285,7 @@ public Builder frequency(Optional frequency) { return this; } + /** * Controls whether the policy should hide documents with violations. */ @@ -295,13 +303,13 @@ public Builder autoHideDocs(Optional autoHideDocs) { this.autoHideDocs = autoHideDocs; return this; } - + public CreateDlpReportRequest build() { + return new CreateDlpReportRequest( - name, - config, - frequency, + name, config, frequency, autoHideDocs); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateDlpReportResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateDlpReportResponse.java index 15b0610a..7b4a9453 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateDlpReportResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateDlpReportResponse.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class CreateDlpReportResponse { +public class CreateDlpReportResponse { /** * Full policy information that will be used for scans. */ @@ -43,9 +43,10 @@ public Optional report() { return (Optional) report; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Full policy information that will be used for scans. @@ -56,6 +57,7 @@ public CreateDlpReportResponse withReport(DlpReport report) { return this; } + /** * Full policy information that will be used for scans. */ @@ -65,7 +67,6 @@ public CreateDlpReportResponse withReport(Optional report) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -90,15 +91,17 @@ public String toString() { return Utils.toString(CreateDlpReportResponse.class, "report", report); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional report = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Full policy information that will be used for scans. */ @@ -116,10 +119,12 @@ public Builder report(Optional report) { this.report = report; return this; } - + public CreateDlpReportResponse build() { + return new CreateDlpReportResponse( report); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateShortcutRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateShortcutRequest.java index 0437bebf..66cf31a0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateShortcutRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateShortcutRequest.java @@ -10,6 +10,7 @@ import java.lang.Override; import java.lang.String; + public class CreateShortcutRequest { @JsonProperty("data") @@ -27,9 +28,10 @@ public ShortcutMutableProperties data() { return data; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CreateShortcutRequest withData(ShortcutMutableProperties data) { Utils.checkNotNull(data, "data"); @@ -37,7 +39,6 @@ public CreateShortcutRequest withData(ShortcutMutableProperties data) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -62,24 +63,28 @@ public String toString() { return Utils.toString(CreateShortcutRequest.class, "data", data); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private ShortcutMutableProperties data; - + private Builder() { // force use of static builder() method } + public Builder data(ShortcutMutableProperties data) { Utils.checkNotNull(data, "data"); this.data = data; return this; } - + public CreateShortcutRequest build() { + return new CreateShortcutRequest( data); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateShortcutResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateShortcutResponse.java index b23d64e8..f81106ce 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateShortcutResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CreateShortcutResponse.java @@ -14,12 +14,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class CreateShortcutResponse { @JsonInclude(Include.NON_ABSENT) @JsonProperty("shortcut") private Optional shortcut; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private Optional error; @@ -50,9 +52,10 @@ public Optional error() { return (Optional) error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CreateShortcutResponse withShortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); @@ -60,6 +63,7 @@ public CreateShortcutResponse withShortcut(Shortcut shortcut) { return this; } + public CreateShortcutResponse withShortcut(Optional shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = shortcut; @@ -72,13 +76,13 @@ public CreateShortcutResponse withError(ShortcutError error) { return this; } + public CreateShortcutResponse withError(Optional error) { Utils.checkNotNull(error, "error"); this.error = error; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -96,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - shortcut, - error); + shortcut, error); } @Override @@ -106,17 +109,19 @@ public String toString() { "shortcut", shortcut, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional shortcut = Optional.empty(); - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder shortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = Optional.ofNullable(shortcut); @@ -129,6 +134,7 @@ public Builder shortcut(Optional shortcut) { return this; } + public Builder error(ShortcutError error) { Utils.checkNotNull(error, "error"); this.error = Optional.ofNullable(error); @@ -140,11 +146,12 @@ public Builder error(Optional error) { this.error = error; return this; } - + public CreateShortcutResponse build() { + return new CreateShortcutResponse( - shortcut, - error); + shortcut, error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDataValue.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDataValue.java index 63dc8289..2a4e4354 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDataValue.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDataValue.java @@ -17,12 +17,14 @@ import java.util.List; import java.util.Optional; + public class CustomDataValue { @JsonInclude(Include.NON_ABSENT) @JsonProperty("displayLabel") private Optional displayLabel; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("stringValue") private Optional stringValue; @@ -34,10 +36,12 @@ public class CustomDataValue { @JsonProperty("stringListValue") private Optional> stringListValue; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("numberValue") private Optional numberValue; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("booleanValue") private Optional booleanValue; @@ -62,7 +66,8 @@ public CustomDataValue( } public CustomDataValue() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } @JsonIgnore @@ -94,9 +99,10 @@ public Optional booleanValue() { return booleanValue; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CustomDataValue withDisplayLabel(String displayLabel) { Utils.checkNotNull(displayLabel, "displayLabel"); @@ -104,6 +110,7 @@ public CustomDataValue withDisplayLabel(String displayLabel) { return this; } + public CustomDataValue withDisplayLabel(Optional displayLabel) { Utils.checkNotNull(displayLabel, "displayLabel"); this.displayLabel = displayLabel; @@ -116,6 +123,7 @@ public CustomDataValue withStringValue(String stringValue) { return this; } + public CustomDataValue withStringValue(Optional stringValue) { Utils.checkNotNull(stringValue, "stringValue"); this.stringValue = stringValue; @@ -131,6 +139,7 @@ public CustomDataValue withStringListValue(List stringListValue) { return this; } + /** * list of strings for multi-value properties */ @@ -146,6 +155,7 @@ public CustomDataValue withNumberValue(double numberValue) { return this; } + public CustomDataValue withNumberValue(Optional numberValue) { Utils.checkNotNull(numberValue, "numberValue"); this.numberValue = numberValue; @@ -158,13 +168,13 @@ public CustomDataValue withBooleanValue(boolean booleanValue) { return this; } + public CustomDataValue withBooleanValue(Optional booleanValue) { Utils.checkNotNull(booleanValue, "booleanValue"); this.booleanValue = booleanValue; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -185,11 +195,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - displayLabel, - stringValue, - stringListValue, - numberValue, - booleanValue); + displayLabel, stringValue, stringListValue, + numberValue, booleanValue); } @Override @@ -201,23 +208,25 @@ public String toString() { "numberValue", numberValue, "booleanValue", booleanValue); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional displayLabel = Optional.empty(); - + private Optional stringValue = Optional.empty(); - + private Optional> stringListValue = Optional.empty(); - + private Optional numberValue = Optional.empty(); - + private Optional booleanValue = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder displayLabel(String displayLabel) { Utils.checkNotNull(displayLabel, "displayLabel"); this.displayLabel = Optional.ofNullable(displayLabel); @@ -230,6 +239,7 @@ public Builder displayLabel(Optional displayLabel) { return this; } + public Builder stringValue(String stringValue) { Utils.checkNotNull(stringValue, "stringValue"); this.stringValue = Optional.ofNullable(stringValue); @@ -242,6 +252,7 @@ public Builder stringValue(Optional stringValue) { return this; } + /** * list of strings for multi-value properties */ @@ -260,6 +271,7 @@ public Builder stringListValue(Optional> stringListValue) return this; } + public Builder numberValue(double numberValue) { Utils.checkNotNull(numberValue, "numberValue"); this.numberValue = Optional.ofNullable(numberValue); @@ -272,6 +284,7 @@ public Builder numberValue(Optional numberValue) { return this; } + public Builder booleanValue(boolean booleanValue) { Utils.checkNotNull(booleanValue, "booleanValue"); this.booleanValue = Optional.ofNullable(booleanValue); @@ -283,14 +296,13 @@ public Builder booleanValue(Optional booleanValue) { this.booleanValue = booleanValue; return this; } - + public CustomDataValue build() { + return new CustomDataValue( - displayLabel, - stringValue, - stringListValue, - numberValue, - booleanValue); + displayLabel, stringValue, stringListValue, + numberValue, booleanValue); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfig.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfig.java index dbf749a0..f3fbb17c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfig.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomDatasourceConfig.java @@ -24,7 +24,6 @@ *

Structure describing config properties of a custom datasource */ public class CustomDatasourceConfig { - /** * Unique identifier of datasource instance to which this config applies. */ @@ -122,6 +121,7 @@ public class CustomDatasourceConfig { @JsonProperty("redlistTitleRegex") private Optional redlistTitleRegex; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("connectorType") private Optional connectorType; @@ -297,7 +297,15 @@ public CustomDatasourceConfig( public CustomDatasourceConfig( String name) { - this(name, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(name, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -522,9 +530,10 @@ public Optional isTestDatasource() { return isTestDatasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique identifier of datasource instance to which this config applies. @@ -544,6 +553,7 @@ public CustomDatasourceConfig withDisplayName(String displayName) { return this; } + /** * The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. */ @@ -562,6 +572,7 @@ public CustomDatasourceConfig withDatasourceCategory(DatasourceCategory datasour return this; } + /** * The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. */ @@ -580,6 +591,7 @@ public CustomDatasourceConfig withUrlRegex(String urlRegex) { return this; } + /** * Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.** */ @@ -598,6 +610,7 @@ public CustomDatasourceConfig withIconUrl(String iconUrl) { return this; } + /** * The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). */ @@ -616,6 +629,7 @@ public CustomDatasourceConfig withObjectDefinitions(List objec return this; } + /** * The list of top-level `objectType`s for the datasource. */ @@ -634,6 +648,7 @@ public CustomDatasourceConfig withSuggestionText(String suggestionText) { return this; } + /** * Example text for what to search for in this datasource */ @@ -652,6 +667,7 @@ public CustomDatasourceConfig withHomeUrl(String homeUrl) { return this; } + /** * The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. */ @@ -670,6 +686,7 @@ public CustomDatasourceConfig withCrawlerSeedUrls(List crawlerSeedUrls) return this; } + /** * This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. */ @@ -688,6 +705,7 @@ public CustomDatasourceConfig withIconDarkUrl(String iconDarkUrl) { return this; } + /** * The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). */ @@ -706,6 +724,7 @@ public CustomDatasourceConfig withHideBuiltInFacets(List hideB return this; } + /** * List of built-in facet types that should be hidden for the datasource. */ @@ -724,6 +743,7 @@ public CustomDatasourceConfig withCanonicalizingURLRegex(List connectorType) { Utils.checkNotNull(connectorType, "connectorType"); this.connectorType = connectorType; @@ -790,6 +813,7 @@ public CustomDatasourceConfig withQuicklinks(List quicklinks) { return this; } + /** * List of actions for this datasource instance that will show up in autocomplete and app card, e.g. "Create new issue" for jira */ @@ -808,6 +832,7 @@ public CustomDatasourceConfig withRenderConfigPreset(String renderConfigPreset) return this; } + /** * The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details */ @@ -826,6 +851,7 @@ public CustomDatasourceConfig withAliases(List aliases) { return this; } + /** * Aliases that can be used as `app` operator-values. */ @@ -844,6 +870,7 @@ public CustomDatasourceConfig withIsOnPrem(boolean isOnPrem) { return this; } + /** * Whether or not this datasource is hosted on-premise. */ @@ -862,6 +889,7 @@ public CustomDatasourceConfig withTrustUrlRegexForViewActivity(boolean trustUrlR return this; } + /** * True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. */ @@ -880,6 +908,7 @@ public CustomDatasourceConfig withIncludeUtmSource(boolean includeUtmSource) { return this; } + /** * If true, a utm_source query param will be added to outbound links to this datasource within Glean. */ @@ -898,6 +927,7 @@ public CustomDatasourceConfig withStripFragmentInCanonicalUrl(boolean stripFragm return this; } + /** * If true, the fragment part of the URL will be stripped when converting to a canonical url. */ @@ -916,6 +946,7 @@ public CustomDatasourceConfig withIdentityDatasourceName(String identityDatasour return this; } + /** * If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already. */ @@ -934,6 +965,7 @@ public CustomDatasourceConfig withProductAccessGroup(String productAccessGroup) return this; } + /** * If the datasource uses a specific product access group, then the name of that group. */ @@ -952,6 +984,7 @@ public CustomDatasourceConfig withIsUserReferencedByEmail(boolean isUserReferenc return this; } + /** * whether email is used to reference users in document ACLs and in group memberships. */ @@ -970,6 +1003,7 @@ public CustomDatasourceConfig withIsEntityDatasource(boolean isEntityDatasource) return this; } + /** * True if this datasource is used to push custom entities. */ @@ -988,6 +1022,7 @@ public CustomDatasourceConfig withIsTestDatasource(boolean isTestDatasource) { return this; } + /** * True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. */ @@ -997,7 +1032,6 @@ public CustomDatasourceConfig withIsTestDatasource(Optional isTestDatas return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -1040,33 +1074,15 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - displayName, - datasourceCategory, - urlRegex, - iconUrl, - objectDefinitions, - suggestionText, - homeUrl, - crawlerSeedUrls, - iconDarkUrl, - hideBuiltInFacets, - canonicalizingURLRegex, - canonicalizingTitleRegex, - redlistTitleRegex, - connectorType, - quicklinks, - renderConfigPreset, - aliases, - isOnPrem, - trustUrlRegexForViewActivity, - includeUtmSource, - stripFragmentInCanonicalUrl, - identityDatasourceName, - productAccessGroup, - isUserReferencedByEmail, - isEntityDatasource, - isTestDatasource); + name, displayName, datasourceCategory, + urlRegex, iconUrl, objectDefinitions, + suggestionText, homeUrl, crawlerSeedUrls, + iconDarkUrl, hideBuiltInFacets, canonicalizingURLRegex, + canonicalizingTitleRegex, redlistTitleRegex, connectorType, + quicklinks, renderConfigPreset, aliases, + isOnPrem, trustUrlRegexForViewActivity, includeUtmSource, + stripFragmentInCanonicalUrl, identityDatasourceName, productAccessGroup, + isUserReferencedByEmail, isEntityDatasource, isTestDatasource); } @Override @@ -1100,67 +1116,69 @@ public String toString() { "isEntityDatasource", isEntityDatasource, "isTestDatasource", isTestDatasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private Optional displayName = Optional.empty(); - + private Optional datasourceCategory; - + private Optional urlRegex = Optional.empty(); - + private Optional iconUrl = Optional.empty(); - + private Optional> objectDefinitions = Optional.empty(); - + private Optional suggestionText = Optional.empty(); - + private Optional homeUrl = Optional.empty(); - + private Optional> crawlerSeedUrls = Optional.empty(); - + private Optional iconDarkUrl = Optional.empty(); - + private Optional> hideBuiltInFacets = Optional.empty(); - + private Optional> canonicalizingURLRegex = Optional.empty(); - + private Optional> canonicalizingTitleRegex = Optional.empty(); - + private Optional redlistTitleRegex = Optional.empty(); - + private Optional connectorType = Optional.empty(); - + private Optional> quicklinks = Optional.empty(); - + private Optional renderConfigPreset = Optional.empty(); - + private Optional> aliases = Optional.empty(); - + private Optional isOnPrem = Optional.empty(); - + private Optional trustUrlRegexForViewActivity; - + private Optional includeUtmSource = Optional.empty(); - + private Optional stripFragmentInCanonicalUrl; - + private Optional identityDatasourceName = Optional.empty(); - + private Optional productAccessGroup = Optional.empty(); - + private Optional isUserReferencedByEmail = Optional.empty(); - + private Optional isEntityDatasource; - + private Optional isTestDatasource; - + private Builder() { // force use of static builder() method } + /** * Unique identifier of datasource instance to which this config applies. */ @@ -1170,6 +1188,7 @@ public Builder name(String name) { return this; } + /** * The user-friendly instance label to display. If omitted, falls back to the title-cased `name`. */ @@ -1188,6 +1207,7 @@ public Builder displayName(Optional displayName) { return this; } + /** * The type of this datasource. It is an important signal for relevance and must be specified and cannot be UNCATEGORIZED. Please refer to [this](https://developers.glean.com/docs/indexing_api_datasource_category/) for more details. */ @@ -1206,6 +1226,7 @@ public Builder datasourceCategory(Optional datasou return this; } + /** * Regular expression that matches URLs of documents of the datasource instance. The behavior for multiple matches is non-deterministic. **Note: `urlRegex` is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false). Please add a regex as specific as possible to this datasource instance.** */ @@ -1224,6 +1245,7 @@ public Builder urlRegex(Optional urlRegex) { return this; } + /** * The URL to an image to be displayed as an icon for this datasource instance. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). */ @@ -1242,6 +1264,7 @@ public Builder iconUrl(Optional iconUrl) { return this; } + /** * The list of top-level `objectType`s for the datasource. */ @@ -1260,6 +1283,7 @@ public Builder objectDefinitions(Optional> obje return this; } + /** * Example text for what to search for in this datasource */ @@ -1278,6 +1302,7 @@ public Builder suggestionText(Optional suggestionText) { return this; } + /** * The URL of the landing page for this datasource instance. Should point to the most useful page for users, not the company marketing page. */ @@ -1296,6 +1321,7 @@ public Builder homeUrl(Optional homeUrl) { return this; } + /** * This only applies to WEB_CRAWL and BROWSER_CRAWL datasources. Defines the seed URLs for crawling. */ @@ -1314,6 +1340,7 @@ public Builder crawlerSeedUrls(Optional> crawlerSeedUrls) return this; } + /** * The URL to an image to be displayed as an icon for this datasource instance in dark mode. Must have a transparency mask. SVG are recommended over PNG. Public, scio-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). */ @@ -1332,6 +1359,7 @@ public Builder iconDarkUrl(Optional iconDarkUrl) { return this; } + /** * List of built-in facet types that should be hidden for the datasource. */ @@ -1350,6 +1378,7 @@ public Builder hideBuiltInFacets(Optional> hide return this; } + /** * A list of regular expressions to apply to an arbitrary URL to transform it into a canonical URL for this datasource instance. Regexes are to be applied in the order specified in this list. */ @@ -1368,6 +1397,7 @@ public Builder canonicalizingURLRegex(Optional redlistTitleRegex) { return this; } + public Builder connectorType(CustomDatasourceConfigConnectorType connectorType) { Utils.checkNotNull(connectorType, "connectorType"); this.connectorType = Optional.ofNullable(connectorType); @@ -1416,6 +1448,7 @@ public Builder connectorType(Optional> quicklinks) { return this; } + /** * The name of a render config to use for displaying results from this datasource. Any well known datasource name may be used to render the same as that source, e.g. `web` or `gdrive`. Please refer to [this](https://developers.glean.com/docs/rendering_search_results/) for more details */ @@ -1452,6 +1486,7 @@ public Builder renderConfigPreset(Optional renderConfigPreset) { return this; } + /** * Aliases that can be used as `app` operator-values. */ @@ -1470,6 +1505,7 @@ public Builder aliases(Optional> aliases) { return this; } + /** * Whether or not this datasource is hosted on-premise. */ @@ -1488,6 +1524,7 @@ public Builder isOnPrem(Optional isOnPrem) { return this; } + /** * True if browser activity is able to report the correct URL for VIEW events. Set this to true if the URLs reported by Chrome are constant throughout each page load. Set this to false if the page has Javascript that modifies the URL during or after the load. */ @@ -1506,6 +1543,7 @@ public Builder trustUrlRegexForViewActivity(Optional trustUrlRegexForVi return this; } + /** * If true, a utm_source query param will be added to outbound links to this datasource within Glean. */ @@ -1524,6 +1562,7 @@ public Builder includeUtmSource(Optional includeUtmSource) { return this; } + /** * If true, the fragment part of the URL will be stripped when converting to a canonical url. */ @@ -1542,6 +1581,7 @@ public Builder stripFragmentInCanonicalUrl(Optional stripFragmentInCano return this; } + /** * If the datasource uses another datasource for identity info, then the name of the datasource. The identity datasource must exist already. */ @@ -1560,6 +1600,7 @@ public Builder identityDatasourceName(Optional identityDatasourceName) { return this; } + /** * If the datasource uses a specific product access group, then the name of that group. */ @@ -1578,6 +1619,7 @@ public Builder productAccessGroup(Optional productAccessGroup) { return this; } + /** * whether email is used to reference users in document ACLs and in group memberships. */ @@ -1596,6 +1638,7 @@ public Builder isUserReferencedByEmail(Optional isUserReferencedByEmail return this; } + /** * True if this datasource is used to push custom entities. */ @@ -1614,6 +1657,7 @@ public Builder isEntityDatasource(Optional isEntityDatasource) { return this; } + /** * True if this datasource will be used for testing purpose only. Documents from such a datasource wouldn't have any effect on search rankings. */ @@ -1631,7 +1675,7 @@ public Builder isTestDatasource(Optional isTestDatasource) { this.isTestDatasource = isTestDatasource; return this; } - + public CustomDatasourceConfig build() { if (datasourceCategory == null) { datasourceCategory = _SINGLETON_VALUE_DatasourceCategory.value(); @@ -1648,36 +1692,20 @@ public CustomDatasourceConfig build() { if (isTestDatasource == null) { isTestDatasource = _SINGLETON_VALUE_IsTestDatasource.value(); } + return new CustomDatasourceConfig( - name, - displayName, - datasourceCategory, - urlRegex, - iconUrl, - objectDefinitions, - suggestionText, - homeUrl, - crawlerSeedUrls, - iconDarkUrl, - hideBuiltInFacets, - canonicalizingURLRegex, - canonicalizingTitleRegex, - redlistTitleRegex, - connectorType, - quicklinks, - renderConfigPreset, - aliases, - isOnPrem, - trustUrlRegexForViewActivity, - includeUtmSource, - stripFragmentInCanonicalUrl, - identityDatasourceName, - productAccessGroup, - isUserReferencedByEmail, - isEntityDatasource, - isTestDatasource); + name, displayName, datasourceCategory, + urlRegex, iconUrl, objectDefinitions, + suggestionText, homeUrl, crawlerSeedUrls, + iconDarkUrl, hideBuiltInFacets, canonicalizingURLRegex, + canonicalizingTitleRegex, redlistTitleRegex, connectorType, + quicklinks, renderConfigPreset, aliases, + isOnPrem, trustUrlRegexForViewActivity, includeUtmSource, + stripFragmentInCanonicalUrl, identityDatasourceName, productAccessGroup, + isUserReferencedByEmail, isEntityDatasource, isTestDatasource); } + private static final LazySingletonValue> _SINGLETON_VALUE_DatasourceCategory = new LazySingletonValue<>( "datasourceCategory", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomEntity.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomEntity.java index 8bad12f8..b009aa10 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomEntity.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomEntity.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class CustomEntity { @JsonInclude(Include.NON_ABSENT) @@ -49,6 +50,7 @@ public class CustomEntity { @JsonProperty("objectType") private Optional objectType; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("metadata") private Optional metadata; @@ -86,7 +88,9 @@ public CustomEntity( } public CustomEntity() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @SuppressWarnings("unchecked") @@ -142,9 +146,10 @@ public Optional> roles() { return (Optional>) roles; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CustomEntity withPermissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); @@ -152,6 +157,7 @@ public CustomEntity withPermissions(ObjectPermissions permissions) { return this; } + public CustomEntity withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -167,6 +173,7 @@ public CustomEntity withId(String id) { return this; } + /** * Unique identifier. */ @@ -185,6 +192,7 @@ public CustomEntity withTitle(String title) { return this; } + /** * Title or name of the custom entity. */ @@ -203,6 +211,7 @@ public CustomEntity withDatasource(String datasource) { return this; } + /** * The datasource the custom entity is from. */ @@ -221,6 +230,7 @@ public CustomEntity withObjectType(String objectType) { return this; } + /** * The type of the entity. Interpretation is specific to each datasource */ @@ -236,6 +246,7 @@ public CustomEntity withMetadata(CustomEntityMetadata metadata) { return this; } + public CustomEntity withMetadata(Optional metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; @@ -251,6 +262,7 @@ public CustomEntity withRoles(List roles) { return this; } + /** * A list of user roles for the custom entity explicitly granted by the owner. */ @@ -260,7 +272,6 @@ public CustomEntity withRoles(Optional> ro return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -283,12 +294,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - permissions, - id, - title, - datasource, - objectType, - metadata, + permissions, id, title, + datasource, objectType, metadata, roles); } @@ -303,27 +310,29 @@ public String toString() { "metadata", metadata, "roles", roles); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional permissions = Optional.empty(); - + private Optional id = Optional.empty(); - + private Optional title = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional objectType = Optional.empty(); - + private Optional metadata = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -336,6 +345,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * Unique identifier. */ @@ -354,6 +364,7 @@ public Builder id(Optional id) { return this; } + /** * Title or name of the custom entity. */ @@ -372,6 +383,7 @@ public Builder title(Optional title) { return this; } + /** * The datasource the custom entity is from. */ @@ -390,6 +402,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * The type of the entity. Interpretation is specific to each datasource */ @@ -408,6 +421,7 @@ public Builder objectType(Optional objectType) { return this; } + public Builder metadata(CustomEntityMetadata metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = Optional.ofNullable(metadata); @@ -420,6 +434,7 @@ public Builder metadata(Optional metadata) { return this; } + /** * A list of user roles for the custom entity explicitly granted by the owner. */ @@ -437,16 +452,14 @@ public Builder roles(Optional> roles) { this.roles = roles; return this; } - + public CustomEntity build() { + return new CustomEntity( - permissions, - id, - title, - datasource, - objectType, - metadata, + permissions, id, title, + datasource, objectType, metadata, roles); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomEntityMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomEntityMetadata.java index 7402a6b8..fdcabc61 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomEntityMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomEntityMetadata.java @@ -15,8 +15,8 @@ import java.util.Map; import java.util.Optional; -public class CustomEntityMetadata { +public class CustomEntityMetadata { /** * Custom fields specific to individual datasources */ @@ -44,9 +44,10 @@ public Optional> customData() { return (Optional>) customData; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Custom fields specific to individual datasources @@ -57,6 +58,7 @@ public CustomEntityMetadata withCustomData(Map customDa return this; } + /** * Custom fields specific to individual datasources */ @@ -66,7 +68,6 @@ public CustomEntityMetadata withCustomData(Optional> customData = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Custom fields specific to individual datasources */ @@ -117,10 +120,12 @@ public Builder customData(Optional> custo this.customData = customData; return this; } - + public CustomEntityMetadata build() { + return new CustomEntityMetadata( customData); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldData.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldData.java index 3342c72c..de7f9a58 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldData.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldData.java @@ -17,14 +17,15 @@ import java.util.List; import java.util.Optional; -public class CustomFieldData { +public class CustomFieldData { /** * A user-facing label for this field. */ @JsonProperty("label") private String label; + @JsonProperty("values") private List values; @@ -75,9 +76,10 @@ public Optional displayable() { return displayable; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A user-facing label for this field. @@ -103,6 +105,7 @@ public CustomFieldData withDisplayable(boolean displayable) { return this; } + /** * Determines whether the client should display this custom field */ @@ -112,7 +115,6 @@ public CustomFieldData withDisplayable(Optional displayable) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -131,9 +133,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - label, - values, - displayable); + label, values, displayable); } @Override @@ -143,19 +143,21 @@ public String toString() { "values", values, "displayable", displayable); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String label; - + private List values; - + private Optional displayable; - + private Builder() { // force use of static builder() method } + /** * A user-facing label for this field. */ @@ -165,12 +167,14 @@ public Builder label(String label) { return this; } + public Builder values(List values) { Utils.checkNotNull(values, "values"); this.values = values; return this; } + /** * Determines whether the client should display this custom field */ @@ -188,17 +192,17 @@ public Builder displayable(Optional displayable) { this.displayable = displayable; return this; } - + public CustomFieldData build() { if (displayable == null) { displayable = _SINGLETON_VALUE_Displayable.value(); } + return new CustomFieldData( - label, - values, - displayable); + label, values, displayable); } + private static final LazySingletonValue> _SINGLETON_VALUE_Displayable = new LazySingletonValue<>( "displayable", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValueHyperlink.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValueHyperlink.java index d54874df..d0be0d2a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValueHyperlink.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValueHyperlink.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class CustomFieldValueHyperlink { +public class CustomFieldValueHyperlink { /** * Anchor text for hyperlink. */ @@ -59,9 +59,10 @@ public Optional urlLink() { return urlLink; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Anchor text for hyperlink. @@ -72,6 +73,7 @@ public CustomFieldValueHyperlink withUrlAnchor(String urlAnchor) { return this; } + /** * Anchor text for hyperlink. */ @@ -90,6 +92,7 @@ public CustomFieldValueHyperlink withUrlLink(String urlLink) { return this; } + /** * Link for this URL. */ @@ -99,7 +102,6 @@ public CustomFieldValueHyperlink withUrlLink(Optional urlLink) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,8 +119,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - urlAnchor, - urlLink); + urlAnchor, urlLink); } @Override @@ -127,17 +128,19 @@ public String toString() { "urlAnchor", urlAnchor, "urlLink", urlLink); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional urlAnchor = Optional.empty(); - + private Optional urlLink = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Anchor text for hyperlink. */ @@ -156,6 +159,7 @@ public Builder urlAnchor(Optional urlAnchor) { return this; } + /** * Link for this URL. */ @@ -173,11 +177,12 @@ public Builder urlLink(Optional urlLink) { this.urlLink = urlLink; return this; } - + public CustomFieldValueHyperlink build() { + return new CustomFieldValueHyperlink( - urlAnchor, - urlLink); + urlAnchor, urlLink); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValuePerson.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValuePerson.java index 3377f593..6f846779 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValuePerson.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValuePerson.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class CustomFieldValuePerson { @JsonInclude(Include.NON_ABSENT) @@ -37,9 +38,10 @@ public Optional person() { return (Optional) person; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CustomFieldValuePerson withPerson(Person person) { Utils.checkNotNull(person, "person"); @@ -47,13 +49,13 @@ public CustomFieldValuePerson withPerson(Person person) { return this; } + public CustomFieldValuePerson withPerson(Optional person) { Utils.checkNotNull(person, "person"); this.person = person; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -78,15 +80,17 @@ public String toString() { return Utils.toString(CustomFieldValuePerson.class, "person", person); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional person = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder person(Person person) { Utils.checkNotNull(person, "person"); this.person = Optional.ofNullable(person); @@ -98,10 +102,12 @@ public Builder person(Optional person) { this.person = person; return this; } - + public CustomFieldValuePerson build() { + return new CustomFieldValuePerson( person); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValueStr.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValueStr.java index 2897ec96..84e201c1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValueStr.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomFieldValueStr.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class CustomFieldValueStr { +public class CustomFieldValueStr { /** * Text field for string value. */ @@ -41,9 +41,10 @@ public Optional strText() { return strText; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Text field for string value. @@ -54,6 +55,7 @@ public CustomFieldValueStr withStrText(String strText) { return this; } + /** * Text field for string value. */ @@ -63,7 +65,6 @@ public CustomFieldValueStr withStrText(Optional strText) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(CustomFieldValueStr.class, "strText", strText); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional strText = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Text field for string value. */ @@ -114,10 +117,12 @@ public Builder strText(Optional strText) { this.strText = strText; return this; } - + public CustomFieldValueStr build() { + return new CustomFieldValueStr( strText); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomProperty.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomProperty.java index 9b4b4695..92cc45f4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomProperty.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomProperty.java @@ -61,9 +61,10 @@ public Optional value() { return (Optional) value; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CustomProperty withName(String name) { Utils.checkNotNull(name, "name"); @@ -71,6 +72,7 @@ public CustomProperty withName(String name) { return this; } + public CustomProperty withName(Optional name) { Utils.checkNotNull(name, "name"); this.name = name; @@ -86,6 +88,7 @@ public CustomProperty withValue(Object value) { return this; } + /** * Must either be a string or an array of strings. An integer, boolean, etc. is not valid. When OpenAPI Generator supports `oneOf`, we can semantically enforce this. */ @@ -95,7 +98,6 @@ public CustomProperty withValue(Optional value) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -113,8 +115,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - value); + name, value); } @Override @@ -123,17 +124,19 @@ public String toString() { "name", name, "value", value); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional value = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder name(String name) { Utils.checkNotNull(name, "name"); this.name = Optional.ofNullable(name); @@ -146,6 +149,7 @@ public Builder name(Optional name) { return this; } + /** * Must either be a string or an array of strings. An integer, boolean, etc. is not valid. When OpenAPI Generator supports `oneOf`, we can semantically enforce this. */ @@ -163,11 +167,12 @@ public Builder value(Optional value) { this.value = value; return this; } - + public CustomProperty build() { + return new CustomProperty( - name, - value); + name, value); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Customer.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Customer.java index 28c791d7..20dee538 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Customer.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Customer.java @@ -19,8 +19,8 @@ import java.util.Map; import java.util.Optional; -public class Customer { +public class Customer { /** * Unique identifier. */ @@ -34,6 +34,7 @@ public class Customer { @JsonProperty("domains") private Optional> domains; + @JsonProperty("company") private Company company; @@ -51,6 +52,7 @@ public class Customer { @JsonProperty("poc") private Optional> poc; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("metadata") private Optional metadata; @@ -120,7 +122,10 @@ public Customer( public Customer( String id, Company company) { - this(id, Optional.empty(), company, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(id, Optional.empty(), company, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -202,9 +207,10 @@ public Optional notes() { return notes; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique identifier. @@ -224,6 +230,7 @@ public Customer withDomains(List domains) { return this; } + /** * Link to company's associated website domains. */ @@ -248,6 +255,7 @@ public Customer withDocumentCounts(Map documentCounts) { return this; } + /** * A map of {string, int} pairs representing counts of each document type associated with this customer. */ @@ -266,6 +274,7 @@ public Customer withPoc(List poc) { return this; } + /** * A list of POC for company. */ @@ -281,6 +290,7 @@ public Customer withMetadata(CustomerMetadata metadata) { return this; } + public Customer withMetadata(Optional metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; @@ -296,6 +306,7 @@ public Customer withMergedCustomers(List mergedCustomers) { return this; } + /** * A list of Customers. */ @@ -314,6 +325,7 @@ public Customer withStartDate(LocalDate startDate) { return this; } + /** * The date when the interaction with customer started. */ @@ -332,6 +344,7 @@ public Customer withContractAnnualRevenue(double contractAnnualRevenue) { return this; } + /** * Average contract annual revenue with that customer. */ @@ -350,6 +363,7 @@ public Customer withNotes(String notes) { return this; } + /** * User facing (potentially generated) notes about company. */ @@ -359,7 +373,6 @@ public Customer withNotes(Optional notes) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -385,15 +398,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - domains, - company, - documentCounts, - poc, - metadata, - mergedCustomers, - startDate, - contractAnnualRevenue, + id, domains, company, + documentCounts, poc, metadata, + mergedCustomers, startDate, contractAnnualRevenue, notes); } @@ -411,33 +418,35 @@ public String toString() { "contractAnnualRevenue", contractAnnualRevenue, "notes", notes); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private Optional> domains = Optional.empty(); - + private Company company; - + private Optional> documentCounts = Optional.empty(); - + private Optional> poc = Optional.empty(); - + private Optional metadata = Optional.empty(); - + private Optional> mergedCustomers = Optional.empty(); - + private Optional startDate = Optional.empty(); - + private Optional contractAnnualRevenue = Optional.empty(); - + private Optional notes = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique identifier. */ @@ -447,6 +456,7 @@ public Builder id(String id) { return this; } + /** * Link to company's associated website domains. */ @@ -465,12 +475,14 @@ public Builder domains(Optional> domains) { return this; } + public Builder company(Company company) { Utils.checkNotNull(company, "company"); this.company = company; return this; } + /** * A map of {string, int} pairs representing counts of each document type associated with this customer. */ @@ -489,6 +501,7 @@ public Builder documentCounts(Optional> documentCoun return this; } + /** * A list of POC for company. */ @@ -507,6 +520,7 @@ public Builder poc(Optional> poc) { return this; } + public Builder metadata(CustomerMetadata metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = Optional.ofNullable(metadata); @@ -519,6 +533,7 @@ public Builder metadata(Optional metadata) { return this; } + /** * A list of Customers. */ @@ -537,6 +552,7 @@ public Builder mergedCustomers(Optional> mergedCustomer return this; } + /** * The date when the interaction with customer started. */ @@ -555,6 +571,7 @@ public Builder startDate(Optional startDate) { return this; } + /** * Average contract annual revenue with that customer. */ @@ -573,6 +590,7 @@ public Builder contractAnnualRevenue(Optional contractAnnualRevenue) { return this; } + /** * User facing (potentially generated) notes about company. */ @@ -590,19 +608,15 @@ public Builder notes(Optional notes) { this.notes = notes; return this; } - + public Customer build() { + return new Customer( - id, - domains, - company, - documentCounts, - poc, - metadata, - mergedCustomers, - startDate, - contractAnnualRevenue, + id, domains, company, + documentCounts, poc, metadata, + mergedCustomers, startDate, contractAnnualRevenue, notes); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomerMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomerMetadata.java index ea50dd7a..739f410c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomerMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/CustomerMetadata.java @@ -15,8 +15,8 @@ import java.util.Map; import java.util.Optional; -public class CustomerMetadata { +public class CustomerMetadata { /** * The user visible id of the salesforce customer account. */ @@ -62,9 +62,10 @@ public Optional> customData() { return (Optional>) customData; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The user visible id of the salesforce customer account. @@ -75,6 +76,7 @@ public CustomerMetadata withDatasourceId(String datasourceId) { return this; } + /** * The user visible id of the salesforce customer account. */ @@ -93,6 +95,7 @@ public CustomerMetadata withCustomData(Map customData) return this; } + /** * Custom fields specific to individual datasources */ @@ -102,7 +105,6 @@ public CustomerMetadata withCustomData(Optional datasourceId = Optional.empty(); - + private Optional> customData = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The user visible id of the salesforce customer account. */ @@ -159,6 +162,7 @@ public Builder datasourceId(Optional datasourceId) { return this; } + /** * Custom fields specific to individual datasources */ @@ -176,11 +180,12 @@ public Builder customData(Optional> custo this.customData = customData; return this; } - + public CustomerMetadata build() { + return new CustomerMetadata( - datasourceId, - customData); + datasourceId, customData); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceBulkMembershipDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceBulkMembershipDefinition.java index 40f512e2..7d0a52ed 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceBulkMembershipDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceBulkMembershipDefinition.java @@ -19,7 +19,6 @@ *

describes the membership row of a group in the bulk uploaded. Only one of memberUserId and memberGroupName can be specified. */ public class DatasourceBulkMembershipDefinition { - /** * If the member is a user, then the email or datasource id for the user */ @@ -64,9 +63,10 @@ public Optional memberGroupName() { return memberGroupName; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * If the member is a user, then the email or datasource id for the user @@ -77,6 +77,7 @@ public DatasourceBulkMembershipDefinition withMemberUserId(String memberUserId) return this; } + /** * If the member is a user, then the email or datasource id for the user */ @@ -95,6 +96,7 @@ public DatasourceBulkMembershipDefinition withMemberGroupName(String memberGroup return this; } + /** * If the member is a group, then the name of the member group */ @@ -104,7 +106,6 @@ public DatasourceBulkMembershipDefinition withMemberGroupName(Optional m return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -122,8 +123,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - memberUserId, - memberGroupName); + memberUserId, memberGroupName); } @Override @@ -132,17 +132,19 @@ public String toString() { "memberUserId", memberUserId, "memberGroupName", memberGroupName); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional memberUserId = Optional.empty(); - + private Optional memberGroupName = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * If the member is a user, then the email or datasource id for the user */ @@ -161,6 +163,7 @@ public Builder memberUserId(Optional memberUserId) { return this; } + /** * If the member is a group, then the name of the member group */ @@ -178,11 +181,12 @@ public Builder memberGroupName(Optional memberGroupName) { this.memberGroupName = memberGroupName; return this; } - + public DatasourceBulkMembershipDefinition build() { + return new DatasourceBulkMembershipDefinition( - memberUserId, - memberGroupName); + memberUserId, memberGroupName); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceGroupDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceGroupDefinition.java index aab1476c..3ab23e83 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceGroupDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceGroupDefinition.java @@ -16,7 +16,6 @@ *

describes a group in the datasource */ public class DatasourceGroupDefinition { - /** * name of the group. Should be unique among all groups for the datasource, and cannot have spaces. */ @@ -38,9 +37,10 @@ public String name() { return name; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * name of the group. Should be unique among all groups for the datasource, and cannot have spaces. @@ -51,7 +51,6 @@ public DatasourceGroupDefinition withName(String name) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -76,15 +75,17 @@ public String toString() { return Utils.toString(DatasourceGroupDefinition.class, "name", name); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private Builder() { // force use of static builder() method } + /** * name of the group. Should be unique among all groups for the datasource, and cannot have spaces. */ @@ -93,10 +94,12 @@ public Builder name(String name) { this.name = name; return this; } - + public DatasourceGroupDefinition build() { + return new DatasourceGroupDefinition( name); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceMembershipDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceMembershipDefinition.java index a368870b..d004f31f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceMembershipDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceMembershipDefinition.java @@ -19,7 +19,6 @@ *

describes the membership row of a group. Only one of memberUserId and memberGroupName can be specified. */ public class DatasourceMembershipDefinition { - /** * The group for which the membership is specified */ @@ -82,9 +81,10 @@ public Optional memberGroupName() { return memberGroupName; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The group for which the membership is specified @@ -104,6 +104,7 @@ public DatasourceMembershipDefinition withMemberUserId(String memberUserId) { return this; } + /** * If the member is a user, then the email or datasource id for the user */ @@ -122,6 +123,7 @@ public DatasourceMembershipDefinition withMemberGroupName(String memberGroupName return this; } + /** * If the member is a group, then the name of the member group */ @@ -131,7 +133,6 @@ public DatasourceMembershipDefinition withMemberGroupName(Optional membe return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -150,9 +151,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - groupName, - memberUserId, - memberGroupName); + groupName, memberUserId, memberGroupName); } @Override @@ -162,19 +161,21 @@ public String toString() { "memberUserId", memberUserId, "memberGroupName", memberGroupName); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String groupName; - + private Optional memberUserId = Optional.empty(); - + private Optional memberGroupName = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The group for which the membership is specified */ @@ -184,6 +185,7 @@ public Builder groupName(String groupName) { return this; } + /** * If the member is a user, then the email or datasource id for the user */ @@ -202,6 +204,7 @@ public Builder memberUserId(Optional memberUserId) { return this; } + /** * If the member is a group, then the name of the member group */ @@ -219,12 +222,12 @@ public Builder memberGroupName(Optional memberGroupName) { this.memberGroupName = memberGroupName; return this; } - + public DatasourceMembershipDefinition build() { + return new DatasourceMembershipDefinition( - groupName, - memberUserId, - memberGroupName); + groupName, memberUserId, memberGroupName); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceObjectTypeDocumentCountEntry.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceObjectTypeDocumentCountEntry.java index 848d1690..24a2f045 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceObjectTypeDocumentCountEntry.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceObjectTypeDocumentCountEntry.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class DatasourceObjectTypeDocumentCountEntry { +public class DatasourceObjectTypeDocumentCountEntry { /** * The object type of the document */ @@ -60,9 +60,10 @@ public Optional count() { return count; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The object type of the document @@ -73,6 +74,7 @@ public DatasourceObjectTypeDocumentCountEntry withObjectType(String objectType) return this; } + /** * The object type of the document */ @@ -91,6 +93,7 @@ public DatasourceObjectTypeDocumentCountEntry withCount(long count) { return this; } + /** * The number of documents of the corresponding objectType */ @@ -100,7 +103,6 @@ public DatasourceObjectTypeDocumentCountEntry withCount(Optional count) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,8 +120,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - objectType, - count); + objectType, count); } @Override @@ -128,17 +129,19 @@ public String toString() { "objectType", objectType, "count", count); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional objectType = Optional.empty(); - + private Optional count = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The object type of the document */ @@ -157,6 +160,7 @@ public Builder objectType(Optional objectType) { return this; } + /** * The number of documents of the corresponding objectType */ @@ -174,11 +178,12 @@ public Builder count(Optional count) { this.count = count; return this; } - + public DatasourceObjectTypeDocumentCountEntry build() { + return new DatasourceObjectTypeDocumentCountEntry( - objectType, - count); + objectType, count); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceProfile.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceProfile.java index 3cbbb911..4833367f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceProfile.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceProfile.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class DatasourceProfile { +public class DatasourceProfile { /** * The datasource the profile is of. */ @@ -71,7 +71,8 @@ public DatasourceProfile( public DatasourceProfile( String datasource, String handle) { - this(datasource, handle, Optional.empty(), Optional.empty(), Optional.empty()); + this(datasource, handle, Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -114,9 +115,10 @@ public Optional isUserGenerated() { return isUserGenerated; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The datasource the profile is of. @@ -145,6 +147,7 @@ public DatasourceProfile withUrl(String url) { return this; } + /** * URL to view the entity's profile. */ @@ -163,6 +166,7 @@ public DatasourceProfile withNativeAppUrl(String nativeAppUrl) { return this; } + /** * A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...). */ @@ -181,6 +185,7 @@ public DatasourceProfile withIsUserGenerated(boolean isUserGenerated) { return this; } + /** * For internal use only. True iff the data source profile was manually added by a user from within Glean (aka not from the original data source) */ @@ -190,7 +195,6 @@ public DatasourceProfile withIsUserGenerated(Optional isUserGenerated) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -211,11 +215,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasource, - handle, - url, - nativeAppUrl, - isUserGenerated); + datasource, handle, url, + nativeAppUrl, isUserGenerated); } @Override @@ -227,23 +228,25 @@ public String toString() { "nativeAppUrl", nativeAppUrl, "isUserGenerated", isUserGenerated); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private String handle; - + private Optional url = Optional.empty(); - + private Optional nativeAppUrl = Optional.empty(); - + private Optional isUserGenerated = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The datasource the profile is of. */ @@ -253,6 +256,7 @@ public Builder datasource(String datasource) { return this; } + /** * The display name of the entity in the given datasource. */ @@ -262,6 +266,7 @@ public Builder handle(String handle) { return this; } + /** * URL to view the entity's profile. */ @@ -280,6 +285,7 @@ public Builder url(Optional url) { return this; } + /** * A deep link, if available, into the datasource's native application for the entity's platform (i.e. slack://...). */ @@ -298,6 +304,7 @@ public Builder nativeAppUrl(Optional nativeAppUrl) { return this; } + /** * For internal use only. True iff the data source profile was manually added by a user from within Glean (aka not from the original data source) */ @@ -315,14 +322,13 @@ public Builder isUserGenerated(Optional isUserGenerated) { this.isUserGenerated = isUserGenerated; return this; } - + public DatasourceProfile build() { + return new DatasourceProfile( - datasource, - handle, - url, - nativeAppUrl, - isUserGenerated); + datasource, handle, url, + nativeAppUrl, isUserGenerated); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceUserDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceUserDefinition.java index 14b2e95f..0794c921 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceUserDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DatasourceUserDefinition.java @@ -31,6 +31,7 @@ public class DatasourceUserDefinition { @JsonProperty("userId") private Optional userId; + @JsonProperty("name") private String name; @@ -60,7 +61,8 @@ public DatasourceUserDefinition( public DatasourceUserDefinition( String email, String name) { - this(email, Optional.empty(), name, Optional.empty()); + this(email, Optional.empty(), name, + Optional.empty()); } @JsonIgnore @@ -89,9 +91,10 @@ public Optional isActive() { return isActive; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public DatasourceUserDefinition withEmail(String email) { Utils.checkNotNull(email, "email"); @@ -108,6 +111,7 @@ public DatasourceUserDefinition withUserId(String userId) { return this; } + /** * To be supplied if the user id in the datasource is not the email */ @@ -132,6 +136,7 @@ public DatasourceUserDefinition withIsActive(boolean isActive) { return this; } + /** * set to false if the user is a former employee or a bot */ @@ -141,7 +146,6 @@ public DatasourceUserDefinition withIsActive(Optional isActive) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -161,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - email, - userId, - name, + email, userId, name, isActive); } @@ -175,27 +177,30 @@ public String toString() { "name", name, "isActive", isActive); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String email; - + private Optional userId = Optional.empty(); - + private String name; - + private Optional isActive = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder email(String email) { Utils.checkNotNull(email, "email"); this.email = email; return this; } + /** * To be supplied if the user id in the datasource is not the email */ @@ -214,12 +219,14 @@ public Builder userId(Optional userId) { return this; } + public Builder name(String name) { Utils.checkNotNull(name, "name"); this.name = name; return this; } + /** * set to false if the user is a former employee or a bot */ @@ -237,13 +244,13 @@ public Builder isActive(Optional isActive) { this.isActive = isActive; return this; } - + public DatasourceUserDefinition build() { + return new DatasourceUserDefinition( - email, - userId, - name, + email, userId, name, isActive); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusIdentityResponseComponent.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusIdentityResponseComponent.java index 71f83f06..d4c50e66 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusIdentityResponseComponent.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusIdentityResponseComponent.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class DebugDatasourceStatusIdentityResponseComponent { +public class DebugDatasourceStatusIdentityResponseComponent { /** * Information about active and recent successful uploads for the datasource */ @@ -24,6 +24,7 @@ public class DebugDatasourceStatusIdentityResponseComponent { @JsonProperty("bulkUploadHistory") private Optional> bulkUploadHistory; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("counts") private Optional counts; @@ -57,9 +58,10 @@ public Optional counts() { return (Optional) counts; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Information about active and recent successful uploads for the datasource @@ -70,6 +72,7 @@ public DebugDatasourceStatusIdentityResponseComponent withBulkUploadHistory(List return this; } + /** * Information about active and recent successful uploads for the datasource */ @@ -85,13 +88,13 @@ public DebugDatasourceStatusIdentityResponseComponent withCounts(DebugDatasource return this; } + public DebugDatasourceStatusIdentityResponseComponent withCounts(Optional counts) { Utils.checkNotNull(counts, "counts"); this.counts = counts; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -109,8 +112,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - bulkUploadHistory, - counts); + bulkUploadHistory, counts); } @Override @@ -119,17 +121,19 @@ public String toString() { "bulkUploadHistory", bulkUploadHistory, "counts", counts); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> bulkUploadHistory = Optional.empty(); - + private Optional counts = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Information about active and recent successful uploads for the datasource */ @@ -148,6 +152,7 @@ public Builder bulkUploadHistory(Optional return this; } + public Builder counts(DebugDatasourceStatusIdentityResponseComponentCounts counts) { Utils.checkNotNull(counts, "counts"); this.counts = Optional.ofNullable(counts); @@ -159,11 +164,12 @@ public Builder counts(Optional uploaded() { return uploaded; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The number of users/groups/memberships uploaded @@ -55,6 +56,7 @@ public DebugDatasourceStatusIdentityResponseComponentCounts withUploaded(long up return this; } + /** * The number of users/groups/memberships uploaded */ @@ -64,7 +66,6 @@ public DebugDatasourceStatusIdentityResponseComponentCounts withUploaded(Optiona return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -89,15 +90,17 @@ public String toString() { return Utils.toString(DebugDatasourceStatusIdentityResponseComponentCounts.class, "uploaded", uploaded); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional uploaded = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The number of users/groups/memberships uploaded */ @@ -115,10 +118,12 @@ public Builder uploaded(Optional uploaded) { this.uploaded = uploaded; return this; } - + public DebugDatasourceStatusIdentityResponseComponentCounts build() { + return new DebugDatasourceStatusIdentityResponseComponentCounts( uploaded); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponse.java index f8c553b2..fbc5e277 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponse.java @@ -25,6 +25,7 @@ public class DebugDatasourceStatusResponse { @JsonProperty("documents") private Optional documents; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("identity") private Optional identity; @@ -74,9 +75,10 @@ public Optional datasourceVisibility() { return (Optional) datasourceVisibility; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public DebugDatasourceStatusResponse withDocuments(Documents documents) { Utils.checkNotNull(documents, "documents"); @@ -84,6 +86,7 @@ public DebugDatasourceStatusResponse withDocuments(Documents documents) { return this; } + public DebugDatasourceStatusResponse withDocuments(Optional documents) { Utils.checkNotNull(documents, "documents"); this.documents = documents; @@ -96,6 +99,7 @@ public DebugDatasourceStatusResponse withIdentity(Identity identity) { return this; } + public DebugDatasourceStatusResponse withIdentity(Optional identity) { Utils.checkNotNull(identity, "identity"); this.identity = identity; @@ -111,6 +115,7 @@ public DebugDatasourceStatusResponse withDatasourceVisibility(DatasourceVisibili return this; } + /** * The visibility of the datasource, an enum of VISIBLE_TO_ALL, VISIBLE_TO_TEST_GROUP, NOT_VISIBLE */ @@ -120,7 +125,6 @@ public DebugDatasourceStatusResponse withDatasourceVisibility(Optional documents = Optional.empty(); - + private Optional identity = Optional.empty(); - + private Optional datasourceVisibility = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder documents(Documents documents) { Utils.checkNotNull(documents, "documents"); this.documents = Optional.ofNullable(documents); @@ -176,6 +180,7 @@ public Builder documents(Optional documents) { return this; } + public Builder identity(Identity identity) { Utils.checkNotNull(identity, "identity"); this.identity = Optional.ofNullable(identity); @@ -188,6 +193,7 @@ public Builder identity(Optional identity) { return this; } + /** * The visibility of the datasource, an enum of VISIBLE_TO_ALL, VISIBLE_TO_TEST_GROUP, NOT_VISIBLE */ @@ -205,12 +211,12 @@ public Builder datasourceVisibility(Optional dat this.datasourceVisibility = datasourceVisibility; return this; } - + public DebugDatasourceStatusResponse build() { + return new DebugDatasourceStatusResponse( - documents, - identity, - datasourceVisibility); + documents, identity, datasourceVisibility); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponseCounts.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponseCounts.java index 620d827e..e6450120 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponseCounts.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDatasourceStatusResponseCounts.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class DebugDatasourceStatusResponseCounts { +public class DebugDatasourceStatusResponseCounts { /** * A list of object types and corresponding upload counts */ @@ -63,9 +63,10 @@ public Optional> indexed() { return (Optional>) indexed; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A list of object types and corresponding upload counts @@ -76,6 +77,7 @@ public DebugDatasourceStatusResponseCounts withUploaded(List> uploaded = Optional.empty(); - + private Optional> indexed = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A list of object types and corresponding upload counts */ @@ -160,6 +163,7 @@ public Builder uploaded(OptionalDescribes the request body of the /debug/{datasource}/document API call. */ public class DebugDocumentRequest { - /** * Object type of the document to get the status for. */ @@ -55,9 +54,10 @@ public String docId() { return docId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Object type of the document to get the status for. @@ -77,7 +77,6 @@ public DebugDocumentRequest withDocId(String docId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -95,8 +94,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - objectType, - docId); + objectType, docId); } @Override @@ -105,17 +103,19 @@ public String toString() { "objectType", objectType, "docId", docId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String objectType; - + private String docId; - + private Builder() { // force use of static builder() method } + /** * Object type of the document to get the status for. */ @@ -125,6 +125,7 @@ public Builder objectType(String objectType) { return this; } + /** * Glean Document ID within the datasource to get the status for. */ @@ -133,11 +134,12 @@ public Builder docId(String docId) { this.docId = docId; return this; } - + public DebugDocumentRequest build() { + return new DebugDocumentRequest( - objectType, - docId); + objectType, docId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDocumentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDocumentResponse.java index 92d447c9..dd4e4873 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDocumentResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDocumentResponse.java @@ -20,7 +20,6 @@ *

Describes the response body of the /debug/{datasource}/document API call */ public class DebugDocumentResponse { - /** * Describes the document status response body */ @@ -67,9 +66,10 @@ public Optional uploadedPermissions() { return (Optional) uploadedPermissions; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Describes the document status response body @@ -80,6 +80,7 @@ public DebugDocumentResponse withStatus(DocumentStatusResponse status) { return this; } + /** * Describes the document status response body */ @@ -98,6 +99,7 @@ public DebugDocumentResponse withUploadedPermissions(DocumentPermissionsDefiniti return this; } + /** * describes the access control details of the document */ @@ -107,7 +109,6 @@ public DebugDocumentResponse withUploadedPermissions(Optional status = Optional.empty(); - + private Optional uploadedPermissions = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Describes the document status response body */ @@ -164,6 +166,7 @@ public Builder status(Optional status) { return this; } + /** * describes the access control details of the document */ @@ -181,11 +184,12 @@ public Builder uploadedPermissions(OptionalDescribes the request body of the /debug/{datasource}/documents API call. */ public class DebugDocumentsRequest { - /** * Documents to fetch debug information for */ @@ -39,9 +38,10 @@ public List debugDocuments() { return debugDocuments; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Documents to fetch debug information for @@ -52,7 +52,6 @@ public DebugDocumentsRequest withDebugDocuments(List debug return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -77,15 +76,17 @@ public String toString() { return Utils.toString(DebugDocumentsRequest.class, "debugDocuments", debugDocuments); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List debugDocuments; - + private Builder() { // force use of static builder() method } + /** * Documents to fetch debug information for */ @@ -94,10 +95,12 @@ public Builder debugDocuments(List debugDocuments) { this.debugDocuments = debugDocuments; return this; } - + public DebugDocumentsRequest build() { + return new DebugDocumentsRequest( debugDocuments); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDocumentsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDocumentsResponse.java index 43bce98e..fb421c2a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDocumentsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugDocumentsResponse.java @@ -21,7 +21,6 @@ *

Describes the response body of a single document in the /debug/{datasource}/documents API call */ public class DebugDocumentsResponse { - /** * List of document ids/urls and their debug information */ @@ -49,9 +48,10 @@ public Optional> documentStatuses() { return (Optional>) documentStatuses; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of document ids/urls and their debug information @@ -62,6 +62,7 @@ public DebugDocumentsResponse withDocumentStatuses(List> documentStatuses = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * List of document ids/urls and their debug information */ @@ -122,10 +124,12 @@ public Builder documentStatuses(OptionalDescribes the response body of a single document in the /debug/{datasource}/documents API call */ public class DebugDocumentsResponseItem { - /** * Id of the document */ @@ -84,9 +83,10 @@ public Optional debugInfo() { return (Optional) debugInfo; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Id of the document @@ -97,6 +97,7 @@ public DebugDocumentsResponseItem withDocId(String docId) { return this; } + /** * Id of the document */ @@ -115,6 +116,7 @@ public DebugDocumentsResponseItem withObjectType(String objectType) { return this; } + /** * objectType of the document */ @@ -133,6 +135,7 @@ public DebugDocumentsResponseItem withDebugInfo(DebugDocumentResponse debugInfo) return this; } + /** * Describes the response body of the /debug/{datasource}/document API call */ @@ -142,7 +145,6 @@ public DebugDocumentsResponseItem withDebugInfo(Optional docId = Optional.empty(); - + private Optional objectType = Optional.empty(); - + private Optional debugInfo = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Id of the document */ @@ -204,6 +206,7 @@ public Builder docId(Optional docId) { return this; } + /** * objectType of the document */ @@ -222,6 +225,7 @@ public Builder objectType(Optional objectType) { return this; } + /** * Describes the response body of the /debug/{datasource}/document API call */ @@ -239,12 +243,12 @@ public Builder debugInfo(Optional debugInfo) { this.debugInfo = debugInfo; return this; } - + public DebugDocumentsResponseItem build() { + return new DebugDocumentsResponseItem( - docId, - objectType, - debugInfo); + docId, objectType, debugInfo); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugUserRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugUserRequest.java index 39cc8534..7417b17a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugUserRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugUserRequest.java @@ -16,7 +16,6 @@ *

Describes the request body of the /debug/{datasource}/user API call */ public class DebugUserRequest { - /** * Email ID of the user to get the status for */ @@ -38,9 +37,10 @@ public String email() { return email; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Email ID of the user to get the status for @@ -51,7 +51,6 @@ public DebugUserRequest withEmail(String email) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -76,15 +75,17 @@ public String toString() { return Utils.toString(DebugUserRequest.class, "email", email); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String email; - + private Builder() { // force use of static builder() method } + /** * Email ID of the user to get the status for */ @@ -93,10 +94,12 @@ public Builder email(String email) { this.email = email; return this; } - + public DebugUserRequest build() { + return new DebugUserRequest( email); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugUserResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugUserResponse.java index 6568ca8d..dcea9b4c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugUserResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DebugUserResponse.java @@ -21,7 +21,6 @@ *

Describes the response body of the /debug/{datasource}/user API call */ public class DebugUserResponse { - /** * Describes the user status response body */ @@ -68,9 +67,10 @@ public Optional> uploadedGroups() { return (Optional>) uploadedGroups; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Describes the user status response body @@ -81,6 +81,7 @@ public DebugUserResponse withStatus(UserStatusResponse status) { return this; } + /** * Describes the user status response body */ @@ -99,6 +100,7 @@ public DebugUserResponse withUploadedGroups(List uplo return this; } + /** * List of groups the user is a member of, as uploaded via permissions API. */ @@ -108,7 +110,6 @@ public DebugUserResponse withUploadedGroups(Optional status = Optional.empty(); - + private Optional> uploadedGroups = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Describes the user status response body */ @@ -165,6 +167,7 @@ public Builder status(Optional status) { return this; } + /** * List of groups the user is a member of, as uploaded via permissions API. */ @@ -182,11 +185,12 @@ public Builder uploadedGroups(Optional this.uploadedGroups = uploadedGroups; return this; } - + public DebugUserResponse build() { + return new DebugUserResponse( - status, - uploadedGroups); + status, uploadedGroups); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteAnnouncementRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteAnnouncementRequest.java index 13aea5b9..f060347e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteAnnouncementRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteAnnouncementRequest.java @@ -11,8 +11,8 @@ import java.lang.Override; import java.lang.String; -public class DeleteAnnouncementRequest { +public class DeleteAnnouncementRequest { /** * The opaque id of the announcement to be deleted. */ @@ -34,9 +34,10 @@ public long id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque id of the announcement to be deleted. @@ -47,7 +48,6 @@ public DeleteAnnouncementRequest withId(long id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,15 +72,17 @@ public String toString() { return Utils.toString(DeleteAnnouncementRequest.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long id; - + private Builder() { // force use of static builder() method } + /** * The opaque id of the announcement to be deleted. */ @@ -89,10 +91,12 @@ public Builder id(long id) { this.id = id; return this; } - + public DeleteAnnouncementRequest build() { + return new DeleteAnnouncementRequest( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteAnswerRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteAnswerRequest.java index 20b5b050..b12f7063 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteAnswerRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteAnswerRequest.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class DeleteAnswerRequest { +public class DeleteAnswerRequest { /** * The opaque ID of the Answer. */ @@ -60,9 +60,10 @@ public Optional docId() { return docId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque ID of the Answer. @@ -82,6 +83,7 @@ public DeleteAnswerRequest withDocId(String docId) { return this; } + /** * Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. */ @@ -91,7 +93,6 @@ public DeleteAnswerRequest withDocId(Optional docId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -109,8 +110,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - docId); + id, docId); } @Override @@ -119,17 +119,19 @@ public String toString() { "id", id, "docId", docId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long id; - + private Optional docId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque ID of the Answer. */ @@ -139,6 +141,7 @@ public Builder id(long id) { return this; } + /** * Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. */ @@ -156,11 +159,12 @@ public Builder docId(Optional docId) { this.docId = docId; return this; } - + public DeleteAnswerRequest build() { + return new DeleteAnswerRequest( - id, - docId); + id, docId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteChatFilesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteChatFilesRequest.java index 5df48594..fb7c88ff 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteChatFilesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteChatFilesRequest.java @@ -11,8 +11,8 @@ import java.lang.String; import java.util.List; -public class DeleteChatFilesRequest { +public class DeleteChatFilesRequest { /** * IDs of files to delete. */ @@ -34,9 +34,10 @@ public List fileIds() { return fileIds; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * IDs of files to delete. @@ -47,7 +48,6 @@ public DeleteChatFilesRequest withFileIds(List fileIds) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,15 +72,17 @@ public String toString() { return Utils.toString(DeleteChatFilesRequest.class, "fileIds", fileIds); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List fileIds; - + private Builder() { // force use of static builder() method } + /** * IDs of files to delete. */ @@ -89,10 +91,12 @@ public Builder fileIds(List fileIds) { this.fileIds = fileIds; return this; } - + public DeleteChatFilesRequest build() { + return new DeleteChatFilesRequest( fileIds); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteChatsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteChatsRequest.java index 1759c310..5eb48e91 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteChatsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteChatsRequest.java @@ -11,8 +11,8 @@ import java.lang.String; import java.util.List; -public class DeleteChatsRequest { +public class DeleteChatsRequest { /** * A non-empty list of ids of the Chats to be deleted. */ @@ -34,9 +34,10 @@ public List ids() { return ids; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A non-empty list of ids of the Chats to be deleted. @@ -47,7 +48,6 @@ public DeleteChatsRequest withIds(List ids) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,15 +72,17 @@ public String toString() { return Utils.toString(DeleteChatsRequest.class, "ids", ids); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List ids; - + private Builder() { // force use of static builder() method } + /** * A non-empty list of ids of the Chats to be deleted. */ @@ -89,10 +91,12 @@ public Builder ids(List ids) { this.ids = ids; return this; } - + public DeleteChatsRequest build() { + return new DeleteChatsRequest( ids); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionItemRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionItemRequest.java index 40fabc34..33f4c5cb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionItemRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionItemRequest.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class DeleteCollectionItemRequest { +public class DeleteCollectionItemRequest { /** * The ID of the Collection to remove an item in. */ @@ -78,9 +78,10 @@ public Optional documentId() { return documentId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the Collection to remove an item in. @@ -109,6 +110,7 @@ public DeleteCollectionItemRequest withDocumentId(String documentId) { return this; } + /** * The (optional) Glean Document ID of the CollectionItem to remove from this Collection if this is an indexed document. */ @@ -118,7 +120,6 @@ public DeleteCollectionItemRequest withDocumentId(Optional documentId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -137,9 +138,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - collectionId, - itemId, - documentId); + collectionId, itemId, documentId); } @Override @@ -149,19 +148,21 @@ public String toString() { "itemId", itemId, "documentId", documentId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Double collectionId; - + private String itemId; - + private Optional documentId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ID of the Collection to remove an item in. */ @@ -171,6 +172,7 @@ public Builder collectionId(double collectionId) { return this; } + /** * The item ID of the CollectionItem to remove from this Collection. */ @@ -180,6 +182,7 @@ public Builder itemId(String itemId) { return this; } + /** * The (optional) Glean Document ID of the CollectionItem to remove from this Collection if this is an indexed document. */ @@ -197,12 +200,12 @@ public Builder documentId(Optional documentId) { this.documentId = documentId; return this; } - + public DeleteCollectionItemRequest build() { + return new DeleteCollectionItemRequest( - collectionId, - itemId, - documentId); + collectionId, itemId, documentId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionItemResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionItemResponse.java index e4bc425b..ed25a9a6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionItemResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionItemResponse.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class DeleteCollectionItemResponse { @JsonInclude(Include.NON_ABSENT) @@ -37,9 +38,10 @@ public Optional collection() { return (Optional) collection; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public DeleteCollectionItemResponse withCollection(Collection collection) { Utils.checkNotNull(collection, "collection"); @@ -47,13 +49,13 @@ public DeleteCollectionItemResponse withCollection(Collection collection) { return this; } + public DeleteCollectionItemResponse withCollection(Optional collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -78,15 +80,17 @@ public String toString() { return Utils.toString(DeleteCollectionItemResponse.class, "collection", collection); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional collection = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder collection(Collection collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -98,10 +102,12 @@ public Builder collection(Optional collection) { this.collection = collection; return this; } - + public DeleteCollectionItemResponse build() { + return new DeleteCollectionItemResponse( collection); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionRequest.java index 3c5d4949..79a354d4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteCollectionRequest.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class DeleteCollectionRequest { +public class DeleteCollectionRequest { /** * The IDs of the Collections to delete. */ @@ -61,9 +61,10 @@ public Optional allowedDatasource() { return allowedDatasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The IDs of the Collections to delete. @@ -83,6 +84,7 @@ public DeleteCollectionRequest withAllowedDatasource(String allowedDatasource) { return this; } + /** * The datasource allowed in the Collection to be deleted. */ @@ -92,7 +94,6 @@ public DeleteCollectionRequest withAllowedDatasource(Optional allowedDat return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -110,8 +111,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - ids, - allowedDatasource); + ids, allowedDatasource); } @Override @@ -120,17 +120,19 @@ public String toString() { "ids", ids, "allowedDatasource", allowedDatasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List ids; - + private Optional allowedDatasource = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The IDs of the Collections to delete. */ @@ -140,6 +142,7 @@ public Builder ids(List ids) { return this; } + /** * The datasource allowed in the Collection to be deleted. */ @@ -157,11 +160,12 @@ public Builder allowedDatasource(Optional allowedDatasource) { this.allowedDatasource = allowedDatasource; return this; } - + public DeleteCollectionRequest build() { + return new DeleteCollectionRequest( - ids, - allowedDatasource); + ids, allowedDatasource); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteDocumentRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteDocumentRequest.java index 2162cd9d..52a01954 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteDocumentRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteDocumentRequest.java @@ -20,7 +20,6 @@ *

Describes the request body of the /deletedocument API call */ public class DeleteDocumentRequest { - /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -66,7 +65,8 @@ public DeleteDocumentRequest( String datasource, String objectType, String id) { - this(Optional.empty(), datasource, objectType, id); + this(Optional.empty(), datasource, objectType, + id); } /** @@ -101,9 +101,10 @@ public String id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. @@ -114,6 +115,7 @@ public DeleteDocumentRequest withVersion(long version) { return this; } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -150,7 +152,6 @@ public DeleteDocumentRequest withId(String id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -170,9 +171,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - datasource, - objectType, + version, datasource, objectType, id); } @@ -184,21 +183,23 @@ public String toString() { "objectType", objectType, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + private String datasource; - + private String objectType; - + private String id; - + private Builder() { // force use of static builder() method } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -217,6 +218,7 @@ public Builder version(Optional version) { return this; } + /** * datasource of the document */ @@ -226,6 +228,7 @@ public Builder datasource(String datasource) { return this; } + /** * object type of the document */ @@ -235,6 +238,7 @@ public Builder objectType(String objectType) { return this; } + /** * The id of the document */ @@ -243,13 +247,13 @@ public Builder id(String id) { this.id = id; return this; } - + public DeleteDocumentRequest build() { + return new DeleteDocumentRequest( - version, - datasource, - objectType, + version, datasource, objectType, id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteEmployeeRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteEmployeeRequest.java index 7a2fd372..c3614276 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteEmployeeRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteEmployeeRequest.java @@ -20,7 +20,6 @@ *

Describes the request body of the /deleteemployee API call */ public class DeleteEmployeeRequest { - /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -65,9 +64,10 @@ public String employeeEmail() { return employeeEmail; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. @@ -78,6 +78,7 @@ public DeleteEmployeeRequest withVersion(long version) { return this; } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -96,7 +97,6 @@ public DeleteEmployeeRequest withEmployeeEmail(String employeeEmail) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -114,8 +114,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - employeeEmail); + version, employeeEmail); } @Override @@ -124,17 +123,19 @@ public String toString() { "version", version, "employeeEmail", employeeEmail); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + private String employeeEmail; - + private Builder() { // force use of static builder() method } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -153,6 +154,7 @@ public Builder version(Optional version) { return this; } + /** * The deleted employee's email */ @@ -161,11 +163,12 @@ public Builder employeeEmail(String employeeEmail) { this.employeeEmail = employeeEmail; return this; } - + public DeleteEmployeeRequest build() { + return new DeleteEmployeeRequest( - version, - employeeEmail); + version, employeeEmail); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteGroupRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteGroupRequest.java index aa868695..c6f167de 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteGroupRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteGroupRequest.java @@ -20,7 +20,6 @@ *

Describes the request body of the /deletegroup API call */ public class DeleteGroupRequest { - /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -83,9 +82,10 @@ public String groupName() { return groupName; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. @@ -96,6 +96,7 @@ public DeleteGroupRequest withVersion(long version) { return this; } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -123,7 +124,6 @@ public DeleteGroupRequest withGroupName(String groupName) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -142,9 +142,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - datasource, - groupName); + version, datasource, groupName); } @Override @@ -154,19 +152,21 @@ public String toString() { "datasource", datasource, "groupName", groupName); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + private String datasource; - + private String groupName; - + private Builder() { // force use of static builder() method } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -185,6 +185,7 @@ public Builder version(Optional version) { return this; } + /** * The datasource for which the group is removed */ @@ -194,6 +195,7 @@ public Builder datasource(String datasource) { return this; } + /** * the name of the group to be deleted */ @@ -202,12 +204,12 @@ public Builder groupName(String groupName) { this.groupName = groupName; return this; } - + public DeleteGroupRequest build() { + return new DeleteGroupRequest( - version, - datasource, - groupName); + version, datasource, groupName); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteMembershipRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteMembershipRequest.java index a502b095..4e468b4e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteMembershipRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteMembershipRequest.java @@ -20,7 +20,6 @@ *

Describes the request body of the /deletemembership API call */ public class DeleteMembershipRequest { - /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -83,9 +82,10 @@ public DatasourceMembershipDefinition membership() { return membership; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. @@ -96,6 +96,7 @@ public DeleteMembershipRequest withVersion(long version) { return this; } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -123,7 +124,6 @@ public DeleteMembershipRequest withMembership(DatasourceMembershipDefinition mem return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -142,9 +142,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - datasource, - membership); + version, datasource, membership); } @Override @@ -154,19 +152,21 @@ public String toString() { "datasource", datasource, "membership", membership); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + private String datasource; - + private DatasourceMembershipDefinition membership; - + private Builder() { // force use of static builder() method } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -185,6 +185,7 @@ public Builder version(Optional version) { return this; } + /** * The datasource for which the membership is removed */ @@ -194,6 +195,7 @@ public Builder datasource(String datasource) { return this; } + /** * describes the membership row of a group. Only one of memberUserId and memberGroupName can be specified. */ @@ -202,12 +204,12 @@ public Builder membership(DatasourceMembershipDefinition membership) { this.membership = membership; return this; } - + public DeleteMembershipRequest build() { + return new DeleteMembershipRequest( - version, - datasource, - membership); + version, datasource, membership); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteShortcutRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteShortcutRequest.java index 688c01ad..6f041981 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteShortcutRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteShortcutRequest.java @@ -11,8 +11,8 @@ import java.lang.Override; import java.lang.String; -public class DeleteShortcutRequest { +public class DeleteShortcutRequest { /** * The opaque id of the user generated content. */ @@ -34,9 +34,10 @@ public long id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque id of the user generated content. @@ -47,7 +48,6 @@ public DeleteShortcutRequest withId(long id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,15 +72,17 @@ public String toString() { return Utils.toString(DeleteShortcutRequest.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long id; - + private Builder() { // force use of static builder() method } + /** * The opaque id of the user generated content. */ @@ -89,10 +91,12 @@ public Builder id(long id) { this.id = id; return this; } - + public DeleteShortcutRequest build() { + return new DeleteShortcutRequest( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteTeamRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteTeamRequest.java index 678f6751..1b865cff 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteTeamRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteTeamRequest.java @@ -16,7 +16,6 @@ *

Describes the request body of the /deleteteam API call */ public class DeleteTeamRequest { - /** * The deleted team's id */ @@ -38,9 +37,10 @@ public String id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The deleted team's id @@ -51,7 +51,6 @@ public DeleteTeamRequest withId(String id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -76,15 +75,17 @@ public String toString() { return Utils.toString(DeleteTeamRequest.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private Builder() { // force use of static builder() method } + /** * The deleted team's id */ @@ -93,10 +94,12 @@ public Builder id(String id) { this.id = id; return this; } - + public DeleteTeamRequest build() { + return new DeleteTeamRequest( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteUserRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteUserRequest.java index 2533f75a..6b01599a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteUserRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DeleteUserRequest.java @@ -20,7 +20,6 @@ *

Describes the request body of the /deleteuser API call */ public class DeleteUserRequest { - /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -83,9 +82,10 @@ public String email() { return email; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. @@ -96,6 +96,7 @@ public DeleteUserRequest withVersion(long version) { return this; } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -123,7 +124,6 @@ public DeleteUserRequest withEmail(String email) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -142,9 +142,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - datasource, - email); + version, datasource, email); } @Override @@ -154,19 +152,21 @@ public String toString() { "datasource", datasource, "email", email); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + private String datasource; - + private String email; - + private Builder() { // force use of static builder() method } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -185,6 +185,7 @@ public Builder version(Optional version) { return this; } + /** * The datasource for which the user is removed */ @@ -194,6 +195,7 @@ public Builder datasource(String datasource) { return this; } + /** * The email of the user to be deleted */ @@ -202,12 +204,12 @@ public Builder email(String email) { this.email = email; return this; } - + public DeleteUserRequest build() { + return new DeleteUserRequest( - version, - datasource, - email); + version, datasource, email); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Disambiguation.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Disambiguation.java index aa49e0ad..f5ebf5a6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Disambiguation.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Disambiguation.java @@ -20,7 +20,6 @@ *

A disambiguation between multiple entities with the same name */ public class Disambiguation { - /** * Name of the ambiguous entity */ @@ -84,9 +83,10 @@ public Optional type() { return (Optional) type; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Name of the ambiguous entity @@ -97,6 +97,7 @@ public Disambiguation withName(String name) { return this; } + /** * Name of the ambiguous entity */ @@ -115,6 +116,7 @@ public Disambiguation withId(String id) { return this; } + /** * The unique id of the entity in the knowledge graph */ @@ -133,6 +135,7 @@ public Disambiguation withType(EntityType type) { return this; } + /** * The type of entity. */ @@ -142,7 +145,6 @@ public Disambiguation withType(Optional type) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -161,9 +163,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - id, - type); + name, id, type); } @Override @@ -173,19 +173,21 @@ public String toString() { "id", id, "type", type); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional id = Optional.empty(); - + private Optional type = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Name of the ambiguous entity */ @@ -204,6 +206,7 @@ public Builder name(Optional name) { return this; } + /** * The unique id of the entity in the knowledge graph */ @@ -222,6 +225,7 @@ public Builder id(Optional id) { return this; } + /** * The type of entity. */ @@ -239,12 +243,12 @@ public Builder type(Optional type) { this.type = type; return this; } - + public Disambiguation build() { + return new Disambiguation( - name, - id, - type); + name, id, type); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DisplayableListItemUIConfig.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DisplayableListItemUIConfig.java index dcc9819c..f54baa31 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DisplayableListItemUIConfig.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DisplayableListItemUIConfig.java @@ -20,7 +20,6 @@ *

UI configurations for each item of the list */ public class DisplayableListItemUIConfig { - /** * show a "New" pill next to the item */ @@ -47,9 +46,10 @@ public Optional showNewIndicator() { return showNewIndicator; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * show a "New" pill next to the item @@ -60,6 +60,7 @@ public DisplayableListItemUIConfig withShowNewIndicator(boolean showNewIndicator return this; } + /** * show a "New" pill next to the item */ @@ -69,7 +70,6 @@ public DisplayableListItemUIConfig withShowNewIndicator(Optional showNe return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -94,15 +94,17 @@ public String toString() { return Utils.toString(DisplayableListItemUIConfig.class, "showNewIndicator", showNewIndicator); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional showNewIndicator = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * show a "New" pill next to the item */ @@ -120,10 +122,12 @@ public Builder showNewIndicator(Optional showNewIndicator) { this.showNewIndicator = showNewIndicator; return this; } - + public DisplayableListItemUIConfig build() { + return new DisplayableListItemUIConfig( showNewIndicator); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpConfig.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpConfig.java index 942d29a1..8c24f5d1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpConfig.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpConfig.java @@ -24,7 +24,6 @@ *

Detailed configuration of what documents and sensitive content will be scanned. */ public class DlpConfig { - /** * Synonymous with report/policy id. */ @@ -72,6 +71,7 @@ public class DlpConfig { @JsonProperty("sensitiveContentOptions") private Optional sensitiveContentOptions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("reportName") private Optional reportName; @@ -162,7 +162,11 @@ public DlpConfig( } public DlpConfig() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -278,9 +282,10 @@ public Optional allowlistOptions() { return (Optional) allowlistOptions; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Synonymous with report/policy id. @@ -291,6 +296,7 @@ public DlpConfig withVersion(long version) { return this; } + /** * Synonymous with report/policy id. */ @@ -312,6 +318,7 @@ public DlpConfig withSensitiveInfoTypes(List sensitiveInfoTyp return this; } + /** * DEPRECATED - use `sensitiveContentOptions` instead. * @@ -333,6 +340,7 @@ public DlpConfig withInputOptions(InputOptions inputOptions) { return this; } + /** * Controls which data-sources and what time-range to include in scans. */ @@ -353,6 +361,7 @@ public DlpConfig withExternalSharingOptions(ExternalSharingOptions externalShari return this; } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -373,6 +382,7 @@ public DlpConfig withBroadSharingOptions(SharingOptions broadSharingOptions) { return this; } + /** * Controls how "shared" a document must be to get picked for scans. */ @@ -391,6 +401,7 @@ public DlpConfig withSensitiveContentOptions(SensitiveContentOptions sensitiveCo return this; } + /** * Options for defining sensitive content within scanned documents. */ @@ -406,6 +417,7 @@ public DlpConfig withReportName(String reportName) { return this; } + public DlpConfig withReportName(Optional reportName) { Utils.checkNotNull(reportName, "reportName"); this.reportName = reportName; @@ -421,6 +433,7 @@ public DlpConfig withFrequency(String frequency) { return this; } + /** * Interval between scans. */ @@ -439,6 +452,7 @@ public DlpConfig withCreatedBy(DlpPerson createdBy) { return this; } + /** * Details about the person who created this report/policy. */ @@ -457,6 +471,7 @@ public DlpConfig withCreatedAt(String createdAt) { return this; } + /** * Timestamp at which this configuration was created. */ @@ -475,6 +490,7 @@ public DlpConfig withRedactQuote(boolean redactQuote) { return this; } + /** * redact quote in findings of the report */ @@ -493,6 +509,7 @@ public DlpConfig withAutoHideDocs(boolean autoHideDocs) { return this; } + /** * auto hide documents with findings in the report */ @@ -511,6 +528,7 @@ public DlpConfig withAllowlistOptions(AllowlistOptions allowlistOptions) { return this; } + /** * Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. */ @@ -520,7 +538,6 @@ public DlpConfig withAllowlistOptions(Optional allow return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -549,18 +566,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - sensitiveInfoTypes, - inputOptions, - externalSharingOptions, - broadSharingOptions, - sensitiveContentOptions, - reportName, - frequency, - createdBy, - createdAt, - redactQuote, - autoHideDocs, + version, sensitiveInfoTypes, inputOptions, + externalSharingOptions, broadSharingOptions, sensitiveContentOptions, + reportName, frequency, createdBy, + createdAt, redactQuote, autoHideDocs, allowlistOptions); } @@ -581,41 +590,43 @@ public String toString() { "autoHideDocs", autoHideDocs, "allowlistOptions", allowlistOptions); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + @Deprecated private Optional> sensitiveInfoTypes = Optional.empty(); - + private Optional inputOptions = Optional.empty(); - + @Deprecated private Optional externalSharingOptions = Optional.empty(); - + private Optional broadSharingOptions = Optional.empty(); - + private Optional sensitiveContentOptions = Optional.empty(); - + private Optional reportName = Optional.empty(); - + private Optional frequency = Optional.empty(); - + private Optional createdBy = Optional.empty(); - + private Optional createdAt = Optional.empty(); - + private Optional redactQuote = Optional.empty(); - + private Optional autoHideDocs = Optional.empty(); - + private Optional allowlistOptions = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Synonymous with report/policy id. */ @@ -634,6 +645,7 @@ public Builder version(Optional version) { return this; } + /** * DEPRECATED - use `sensitiveContentOptions` instead. * @@ -658,6 +670,7 @@ public Builder sensitiveInfoTypes(Optional> se return this; } + /** * Controls which data-sources and what time-range to include in scans. */ @@ -676,6 +689,7 @@ public Builder inputOptions(Optional inputOptions) { return this; } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -698,6 +712,7 @@ public Builder externalSharingOptions(Optional return this; } + /** * Controls how "shared" a document must be to get picked for scans. */ @@ -716,6 +731,7 @@ public Builder broadSharingOptions(Optional broadShari return this; } + /** * Options for defining sensitive content within scanned documents. */ @@ -734,6 +750,7 @@ public Builder sensitiveContentOptions(Optional reportName) { return this; } + /** * Interval between scans. */ @@ -764,6 +782,7 @@ public Builder frequency(Optional frequency) { return this; } + /** * Details about the person who created this report/policy. */ @@ -782,6 +801,7 @@ public Builder createdBy(Optional createdBy) { return this; } + /** * Timestamp at which this configuration was created. */ @@ -800,6 +820,7 @@ public Builder createdAt(Optional createdAt) { return this; } + /** * redact quote in findings of the report */ @@ -818,6 +839,7 @@ public Builder redactQuote(Optional redactQuote) { return this; } + /** * auto hide documents with findings in the report */ @@ -836,6 +858,7 @@ public Builder autoHideDocs(Optional autoHideDocs) { return this; } + /** * Terms that are allow-listed during the scans. If any finding picked up by a rule exactly matches a term in the allow-list, it will not be counted as a violation. */ @@ -853,22 +876,16 @@ public Builder allowlistOptions(Optional allowlistOp this.allowlistOptions = allowlistOptions; return this; } - + public DlpConfig build() { + return new DlpConfig( - version, - sensitiveInfoTypes, - inputOptions, - externalSharingOptions, - broadSharingOptions, - sensitiveContentOptions, - reportName, - frequency, - createdBy, - createdAt, - redactQuote, - autoHideDocs, + version, sensitiveInfoTypes, inputOptions, + externalSharingOptions, broadSharingOptions, sensitiveContentOptions, + reportName, frequency, createdBy, + createdAt, redactQuote, autoHideDocs, allowlistOptions); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpPerson.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpPerson.java index 9da69789..a46b5da4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpPerson.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpPerson.java @@ -20,7 +20,6 @@ *

Details about the person who created this report/policy. */ public class DlpPerson { - /** * The display name. */ @@ -33,6 +32,7 @@ public class DlpPerson { @JsonProperty("obfuscatedId") private String obfuscatedId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("metadata") private Optional metadata; @@ -78,9 +78,10 @@ public Optional metadata() { return (Optional) metadata; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The display name. @@ -106,13 +107,13 @@ public DlpPerson withMetadata(DlpPersonMetadata metadata) { return this; } + public DlpPerson withMetadata(Optional metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -131,9 +132,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - obfuscatedId, - metadata); + name, obfuscatedId, metadata); } @Override @@ -143,19 +142,21 @@ public String toString() { "obfuscatedId", obfuscatedId, "metadata", metadata); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private String obfuscatedId; - + private Optional metadata = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The display name. */ @@ -165,6 +166,7 @@ public Builder name(String name) { return this; } + /** * An opaque identifier that can be used to request metadata for a Person. */ @@ -174,6 +176,7 @@ public Builder obfuscatedId(String obfuscatedId) { return this; } + public Builder metadata(DlpPersonMetadata metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = Optional.ofNullable(metadata); @@ -185,12 +188,12 @@ public Builder metadata(Optional metadata) { this.metadata = metadata; return this; } - + public DlpPerson build() { + return new DlpPerson( - name, - obfuscatedId, - metadata); + name, obfuscatedId, metadata); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpPersonMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpPersonMetadata.java index 8d8567a8..16b546bd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpPersonMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpPersonMetadata.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class DlpPersonMetadata { +public class DlpPersonMetadata { /** * The first name of the person */ @@ -59,9 +59,10 @@ public Optional email() { return email; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The first name of the person @@ -72,6 +73,7 @@ public DlpPersonMetadata withFirstName(String firstName) { return this; } + /** * The first name of the person */ @@ -90,6 +92,7 @@ public DlpPersonMetadata withEmail(String email) { return this; } + /** * The user's primary email address */ @@ -99,7 +102,6 @@ public DlpPersonMetadata withEmail(Optional email) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,8 +119,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - firstName, - email); + firstName, email); } @Override @@ -127,17 +128,19 @@ public String toString() { "firstName", firstName, "email", email); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional firstName = Optional.empty(); - + private Optional email = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The first name of the person */ @@ -156,6 +159,7 @@ public Builder firstName(Optional firstName) { return this; } + /** * The user's primary email address */ @@ -173,11 +177,12 @@ public Builder email(Optional email) { this.email = email; return this; } - + public DlpPersonMetadata build() { + return new DlpPersonMetadata( - firstName, - email); + firstName, email); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpReport.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpReport.java index 662dc111..d7baeb63 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpReport.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DlpReport.java @@ -26,6 +26,7 @@ public class DlpReport { @JsonProperty("id") private Optional id; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("name") private Optional name; @@ -79,6 +80,7 @@ public class DlpReport { @JsonProperty("autoHideDocs") private Optional autoHideDocs; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("lastScanStatus") private Optional lastScanStatus; @@ -138,7 +140,10 @@ public DlpReport( } public DlpReport() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } @JsonIgnore @@ -234,9 +239,10 @@ public Optional updatedBy() { return (Optional) updatedBy; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public DlpReport withId(String id) { Utils.checkNotNull(id, "id"); @@ -244,6 +250,7 @@ public DlpReport withId(String id) { return this; } + public DlpReport withId(Optional id) { Utils.checkNotNull(id, "id"); this.id = id; @@ -256,6 +263,7 @@ public DlpReport withName(String name) { return this; } + public DlpReport withName(Optional name) { Utils.checkNotNull(name, "name"); this.name = name; @@ -271,6 +279,7 @@ public DlpReport withConfig(DlpConfig config) { return this; } + /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -289,6 +298,7 @@ public DlpReport withFrequency(DlpFrequency frequency) { return this; } + /** * Interval between scans. DAILY is deprecated. */ @@ -307,6 +317,7 @@ public DlpReport withStatus(DlpReportStatus status) { return this; } + /** * The status of the policy/report. Only ACTIVE status will be picked for scans. */ @@ -325,6 +336,7 @@ public DlpReport withCreatedBy(DlpPerson createdBy) { return this; } + /** * Details about the person who created this report/policy. */ @@ -343,6 +355,7 @@ public DlpReport withCreatedAt(String createdAt) { return this; } + /** * Timestamp at which the policy was created. */ @@ -361,6 +374,7 @@ public DlpReport withLastUpdatedAt(String lastUpdatedAt) { return this; } + /** * Timestamp at which the policy was last updated. */ @@ -379,6 +393,7 @@ public DlpReport withAutoHideDocs(boolean autoHideDocs) { return this; } + /** * Auto hide documents with findings in the policy. */ @@ -394,6 +409,7 @@ public DlpReport withLastScanStatus(LastScanStatus lastScanStatus) { return this; } + public DlpReport withLastScanStatus(Optional lastScanStatus) { Utils.checkNotNull(lastScanStatus, "lastScanStatus"); this.lastScanStatus = lastScanStatus; @@ -409,6 +425,7 @@ public DlpReport withLastScanStartTime(String lastScanStartTime) { return this; } + /** * The timestamp at which the report's last run/scan began. */ @@ -427,6 +444,7 @@ public DlpReport withUpdatedBy(DlpPerson updatedBy) { return this; } + /** * Details about the person who created this report/policy. */ @@ -436,7 +454,6 @@ public DlpReport withUpdatedBy(Optional updatedBy) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -464,18 +481,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - name, - config, - frequency, - status, - createdBy, - createdAt, - lastUpdatedAt, - autoHideDocs, - lastScanStatus, - lastScanStartTime, - updatedBy); + id, name, config, + frequency, status, createdBy, + createdAt, lastUpdatedAt, autoHideDocs, + lastScanStatus, lastScanStartTime, updatedBy); } @Override @@ -494,37 +503,39 @@ public String toString() { "lastScanStartTime", lastScanStartTime, "updatedBy", updatedBy); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional name = Optional.empty(); - + private Optional config = Optional.empty(); - + private Optional frequency = Optional.empty(); - + private Optional status = Optional.empty(); - + private Optional createdBy = Optional.empty(); - + private Optional createdAt = Optional.empty(); - + private Optional lastUpdatedAt = Optional.empty(); - + private Optional autoHideDocs = Optional.empty(); - + private Optional lastScanStatus = Optional.empty(); - + private Optional lastScanStartTime = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder id(String id) { Utils.checkNotNull(id, "id"); this.id = Optional.ofNullable(id); @@ -537,6 +548,7 @@ public Builder id(Optional id) { return this; } + public Builder name(String name) { Utils.checkNotNull(name, "name"); this.name = Optional.ofNullable(name); @@ -549,6 +561,7 @@ public Builder name(Optional name) { return this; } + /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -567,6 +580,7 @@ public Builder config(Optional config) { return this; } + /** * Interval between scans. DAILY is deprecated. */ @@ -585,6 +599,7 @@ public Builder frequency(Optional frequency) { return this; } + /** * The status of the policy/report. Only ACTIVE status will be picked for scans. */ @@ -603,6 +618,7 @@ public Builder status(Optional status) { return this; } + /** * Details about the person who created this report/policy. */ @@ -621,6 +637,7 @@ public Builder createdBy(Optional createdBy) { return this; } + /** * Timestamp at which the policy was created. */ @@ -639,6 +656,7 @@ public Builder createdAt(Optional createdAt) { return this; } + /** * Timestamp at which the policy was last updated. */ @@ -657,6 +675,7 @@ public Builder lastUpdatedAt(Optional lastUpdatedAt) { return this; } + /** * Auto hide documents with findings in the policy. */ @@ -675,6 +694,7 @@ public Builder autoHideDocs(Optional autoHideDocs) { return this; } + public Builder lastScanStatus(LastScanStatus lastScanStatus) { Utils.checkNotNull(lastScanStatus, "lastScanStatus"); this.lastScanStatus = Optional.ofNullable(lastScanStatus); @@ -687,6 +707,7 @@ public Builder lastScanStatus(Optional lastScanStatus) return this; } + /** * The timestamp at which the report's last run/scan began. */ @@ -705,6 +726,7 @@ public Builder lastScanStartTime(Optional lastScanStartTime) { return this; } + /** * Details about the person who created this report/policy. */ @@ -722,21 +744,15 @@ public Builder updatedBy(Optional updatedBy) { this.updatedBy = updatedBy; return this; } - + public DlpReport build() { + return new DlpReport( - id, - name, - config, - frequency, - status, - createdBy, - createdAt, - lastUpdatedAt, - autoHideDocs, - lastScanStatus, - lastScanStartTime, - updatedBy); + id, name, config, + frequency, status, createdBy, + createdAt, lastUpdatedAt, autoHideDocs, + lastScanStatus, lastScanStartTime, updatedBy); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Document.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Document.java index cd482ab1..3af1cebf 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Document.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Document.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class Document { +public class Document { /** * The Glean Document ID. */ @@ -45,14 +45,17 @@ public class Document { @JsonProperty("docType") private Optional docType; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("content") private Optional content; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("containerDocument") private Optional containerDocument; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("parentDocument") private Optional parentDocument; @@ -71,6 +74,7 @@ public class Document { @JsonProperty("url") private Optional url; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("metadata") private Optional metadata; @@ -120,7 +124,10 @@ public Document( } public Document() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -205,9 +212,10 @@ public Optional> sections() { return (Optional>) sections; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The Glean Document ID. @@ -218,6 +226,7 @@ public Document withId(String id) { return this; } + /** * The Glean Document ID. */ @@ -236,6 +245,7 @@ public Document withDatasource(String datasource) { return this; } + /** * The app or other repository type from which the document was extracted */ @@ -254,6 +264,7 @@ public Document withConnectorType(ConnectorType connectorType) { return this; } + /** * The source from which document content was pulled, e.g. an API crawl or browser history */ @@ -272,6 +283,7 @@ public Document withDocType(String docType) { return this; } + /** * The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). */ @@ -287,6 +299,7 @@ public Document withContent(DocumentContent content) { return this; } + public Document withContent(Optional content) { Utils.checkNotNull(content, "content"); this.content = content; @@ -299,6 +312,7 @@ public Document withContainerDocument(Document containerDocument) { return this; } + public Document withContainerDocument(Optional containerDocument) { Utils.checkNotNull(containerDocument, "containerDocument"); this.containerDocument = containerDocument; @@ -311,6 +325,7 @@ public Document withParentDocument(Document parentDocument) { return this; } + public Document withParentDocument(Optional parentDocument) { Utils.checkNotNull(parentDocument, "parentDocument"); this.parentDocument = parentDocument; @@ -326,6 +341,7 @@ public Document withTitle(String title) { return this; } + /** * The title of the document. */ @@ -344,6 +360,7 @@ public Document withUrl(String url) { return this; } + /** * A permalink for the document. */ @@ -359,6 +376,7 @@ public Document withMetadata(DocumentMetadata metadata) { return this; } + public Document withMetadata(Optional metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; @@ -374,6 +392,7 @@ public Document withSections(List sections) { return this; } + /** * A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page. */ @@ -383,7 +402,6 @@ public Document withSections(Optional> sections) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -410,17 +428,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - datasource, - connectorType, - docType, - content, - containerDocument, - parentDocument, - title, - url, - metadata, - sections); + id, datasource, connectorType, + docType, content, containerDocument, + parentDocument, title, url, + metadata, sections); } @Override @@ -438,35 +449,37 @@ public String toString() { "metadata", metadata, "sections", sections); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional connectorType = Optional.empty(); - + private Optional docType = Optional.empty(); - + private Optional content = Optional.empty(); - + private Optional containerDocument = Optional.empty(); - + private Optional parentDocument = Optional.empty(); - + private Optional title = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional metadata = Optional.empty(); - + private Optional> sections = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The Glean Document ID. */ @@ -485,6 +498,7 @@ public Builder id(Optional id) { return this; } + /** * The app or other repository type from which the document was extracted */ @@ -503,6 +517,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * The source from which document content was pulled, e.g. an API crawl or browser history */ @@ -521,6 +536,7 @@ public Builder connectorType(Optional connectorType) { return this; } + /** * The datasource-specific type of the document (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). */ @@ -539,6 +555,7 @@ public Builder docType(Optional docType) { return this; } + public Builder content(DocumentContent content) { Utils.checkNotNull(content, "content"); this.content = Optional.ofNullable(content); @@ -551,6 +568,7 @@ public Builder content(Optional content) { return this; } + public Builder containerDocument(Document containerDocument) { Utils.checkNotNull(containerDocument, "containerDocument"); this.containerDocument = Optional.ofNullable(containerDocument); @@ -563,6 +581,7 @@ public Builder containerDocument(Optional containerDocument) return this; } + public Builder parentDocument(Document parentDocument) { Utils.checkNotNull(parentDocument, "parentDocument"); this.parentDocument = Optional.ofNullable(parentDocument); @@ -575,6 +594,7 @@ public Builder parentDocument(Optional parentDocument) { return this; } + /** * The title of the document. */ @@ -593,6 +613,7 @@ public Builder title(Optional title) { return this; } + /** * A permalink for the document. */ @@ -611,6 +632,7 @@ public Builder url(Optional url) { return this; } + public Builder metadata(DocumentMetadata metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = Optional.ofNullable(metadata); @@ -623,6 +645,7 @@ public Builder metadata(Optional metadata) { return this; } + /** * A list of content sub-sections in the document, e.g. text blocks with different headings in a Drive doc or Confluence page. */ @@ -640,20 +663,15 @@ public Builder sections(Optional> sections) { this.sections = sections; return this; } - + public Document build() { + return new Document( - id, - datasource, - connectorType, - docType, - content, - containerDocument, - parentDocument, - title, - url, - metadata, - sections); + id, datasource, connectorType, + docType, content, containerDocument, + parentDocument, title, url, + metadata, sections); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentContent.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentContent.java index 8483f444..951f4369 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentContent.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentContent.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class DocumentContent { +public class DocumentContent { /** * The plaintext content of the document. */ @@ -44,9 +44,10 @@ public Optional> fullTextList() { return (Optional>) fullTextList; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The plaintext content of the document. @@ -57,6 +58,7 @@ public DocumentContent withFullTextList(List fullTextList) { return this; } + /** * The plaintext content of the document. */ @@ -66,7 +68,6 @@ public DocumentContent withFullTextList(Optional> fullTex return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -91,15 +92,17 @@ public String toString() { return Utils.toString(DocumentContent.class, "fullTextList", fullTextList); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> fullTextList = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The plaintext content of the document. */ @@ -117,10 +120,12 @@ public Builder fullTextList(Optional> fullTextList) { this.fullTextList = fullTextList; return this; } - + public DocumentContent build() { + return new DocumentContent( fullTextList); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentDefinition.java index 004431fe..26948669 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentDefinition.java @@ -22,7 +22,6 @@ *

Indexable document structure */ public class DocumentDefinition { - /** * Document title, in plain text, if present. If not present, the title would be attempted to be extracted from the content. */ @@ -58,6 +57,7 @@ public class DocumentDefinition { @JsonProperty("containerObjectType") private Optional containerObjectType; + @JsonProperty("datasource") private String datasource; @@ -152,6 +152,7 @@ public class DocumentDefinition { @JsonProperty("interactions") private Optional interactions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("status") private Optional status; @@ -252,7 +253,14 @@ public DocumentDefinition( public DocumentDefinition( String datasource) { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), datasource, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), datasource, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -444,9 +452,10 @@ public Optional> customProperties() { return (Optional>) customProperties; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Document title, in plain text, if present. If not present, the title would be attempted to be extracted from the content. @@ -457,6 +466,7 @@ public DocumentDefinition withTitle(String title) { return this; } + /** * Document title, in plain text, if present. If not present, the title would be attempted to be extracted from the content. */ @@ -475,6 +485,7 @@ public DocumentDefinition withFilename(String filename) { return this; } + /** * Source filename, in plain text, for the document. May be used as a fallback title for the document, if the title is not provided and cannot be extracted from the content. Populate this if there is no explicit title for the document and the content is sourced from a file. */ @@ -493,6 +504,7 @@ public DocumentDefinition withContainer(String container) { return this; } + /** * The container name for the content (Folder for example for file content). */ @@ -511,6 +523,7 @@ public DocumentDefinition withContainerDatasourceId(String containerDatasourceId return this; } + /** * This represents the datasource sepcific id of the container. */ @@ -529,6 +542,7 @@ public DocumentDefinition withContainerObjectType(String containerObjectType) { return this; } + /** * This represents the object type of the container. It cannot have spaces or _ */ @@ -553,6 +567,7 @@ public DocumentDefinition withObjectType(String objectType) { return this; } + /** * The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ */ @@ -571,6 +586,7 @@ public DocumentDefinition withViewURL(String viewURL) { return this; } + /** * The permalink for viewing the document. **Note: viewURL is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false).**' */ @@ -589,6 +605,7 @@ public DocumentDefinition withId(String id) { return this; } + /** * The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. */ @@ -607,6 +624,7 @@ public DocumentDefinition withSummary(ContentDefinition summary) { return this; } + /** * Describes text content or base64 encoded binary content */ @@ -625,6 +643,7 @@ public DocumentDefinition withBody(ContentDefinition body) { return this; } + /** * Describes text content or base64 encoded binary content */ @@ -643,6 +662,7 @@ public DocumentDefinition withAuthor(UserReferenceDefinition author) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -661,6 +681,7 @@ public DocumentDefinition withOwner(UserReferenceDefinition owner) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -679,6 +700,7 @@ public DocumentDefinition withPermissions(DocumentPermissionsDefinition permissi return this; } + /** * describes the access control details of the document */ @@ -697,6 +719,7 @@ public DocumentDefinition withCreatedAt(long createdAt) { return this; } + /** * The creation time, in epoch seconds. */ @@ -715,6 +738,7 @@ public DocumentDefinition withUpdatedAt(long updatedAt) { return this; } + /** * The last update time, in epoch seconds. */ @@ -733,6 +757,7 @@ public DocumentDefinition withUpdatedBy(UserReferenceDefinition updatedBy) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -751,6 +776,7 @@ public DocumentDefinition withTags(List tags) { return this; } + /** * Labels associated with the document. */ @@ -769,6 +795,7 @@ public DocumentDefinition withInteractions(DocumentInteractionsDefinition intera return this; } + /** * describes the interactions on the document */ @@ -784,6 +811,7 @@ public DocumentDefinition withStatus(String status) { return this; } + public DocumentDefinition withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; @@ -799,6 +827,7 @@ public DocumentDefinition withAdditionalUrls(List additionalUrls) { return this; } + /** * Additional variations of the URL that this document points to. */ @@ -817,6 +846,7 @@ public DocumentDefinition withComments(List comments) { return this; } + /** * Comments associated with the document. */ @@ -835,6 +865,7 @@ public DocumentDefinition withCustomProperties(List customProper return this; } + /** * Additional metadata properties of the document. These can surface as [facets and operators](https://developers.glean.com/docs/facets_and_operators_for_custom_datasources/). */ @@ -844,7 +875,6 @@ public DocumentDefinition withCustomProperties(Optional title = Optional.empty(); - + private Optional filename = Optional.empty(); - + private Optional container = Optional.empty(); - + private Optional containerDatasourceId = Optional.empty(); - + private Optional containerObjectType = Optional.empty(); - + private String datasource; - + private Optional objectType = Optional.empty(); - + private Optional viewURL = Optional.empty(); - + private Optional id = Optional.empty(); - + private Optional summary = Optional.empty(); - + private Optional body = Optional.empty(); - + private Optional author = Optional.empty(); - + private Optional owner = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Optional createdAt = Optional.empty(); - + private Optional updatedAt = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional> tags = Optional.empty(); - + private Optional interactions = Optional.empty(); - + private Optional status = Optional.empty(); - + private Optional> additionalUrls = Optional.empty(); - + private Optional> comments = Optional.empty(); - + private Optional> customProperties = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Document title, in plain text, if present. If not present, the title would be attempted to be extracted from the content. */ @@ -1006,6 +1023,7 @@ public Builder title(Optional title) { return this; } + /** * Source filename, in plain text, for the document. May be used as a fallback title for the document, if the title is not provided and cannot be extracted from the content. Populate this if there is no explicit title for the document and the content is sourced from a file. */ @@ -1024,6 +1042,7 @@ public Builder filename(Optional filename) { return this; } + /** * The container name for the content (Folder for example for file content). */ @@ -1042,6 +1061,7 @@ public Builder container(Optional container) { return this; } + /** * This represents the datasource sepcific id of the container. */ @@ -1060,6 +1080,7 @@ public Builder containerDatasourceId(Optional containerDatasourceId) { return this; } + /** * This represents the object type of the container. It cannot have spaces or _ */ @@ -1078,12 +1099,14 @@ public Builder containerObjectType(Optional containerObjectType) { return this; } + public Builder datasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = datasource; return this; } + /** * The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ */ @@ -1102,6 +1125,7 @@ public Builder objectType(Optional objectType) { return this; } + /** * The permalink for viewing the document. **Note: viewURL is a required field for non-entity datasources, but not required if the datasource is used to push custom entities (ie. datasources where isEntityDatasource is false).**' */ @@ -1120,6 +1144,7 @@ public Builder viewURL(Optional viewURL) { return this; } + /** * The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. */ @@ -1138,6 +1163,7 @@ public Builder id(Optional id) { return this; } + /** * Describes text content or base64 encoded binary content */ @@ -1156,6 +1182,7 @@ public Builder summary(Optional summary) { return this; } + /** * Describes text content or base64 encoded binary content */ @@ -1174,6 +1201,7 @@ public Builder body(Optional body) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -1192,6 +1220,7 @@ public Builder author(Optional author) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -1210,6 +1239,7 @@ public Builder owner(Optional owner) { return this; } + /** * describes the access control details of the document */ @@ -1228,6 +1258,7 @@ public Builder permissions(Optional per return this; } + /** * The creation time, in epoch seconds. */ @@ -1246,6 +1277,7 @@ public Builder createdAt(Optional createdAt) { return this; } + /** * The last update time, in epoch seconds. */ @@ -1264,6 +1296,7 @@ public Builder updatedAt(Optional updatedAt) { return this; } + /** * Describes how a user is referenced in a document. The user can be referenced by email or by a datasource specific id. */ @@ -1282,6 +1315,7 @@ public Builder updatedBy(Optional updatedBy) return this; } + /** * Labels associated with the document. */ @@ -1300,6 +1334,7 @@ public Builder tags(Optional> tags) { return this; } + /** * describes the interactions on the document */ @@ -1318,6 +1353,7 @@ public Builder interactions(Optional i return this; } + public Builder status(String status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); @@ -1330,6 +1366,7 @@ public Builder status(Optional status) { return this; } + /** * Additional variations of the URL that this document points to. */ @@ -1348,6 +1385,7 @@ public Builder additionalUrls(Optional> additionalUrls) { return this; } + /** * Comments associated with the document. */ @@ -1366,6 +1404,7 @@ public Builder comments(Optional> comments) { return this; } + /** * Additional metadata properties of the document. These can surface as [facets and operators](https://developers.glean.com/docs/facets_and_operators_for_custom_datasources/). */ @@ -1383,32 +1422,19 @@ public Builder customProperties(Optional> customP this.customProperties = customProperties; return this; } - + public DocumentDefinition build() { + return new DocumentDefinition( - title, - filename, - container, - containerDatasourceId, - containerObjectType, - datasource, - objectType, - viewURL, - id, - summary, - body, - author, - owner, - permissions, - createdAt, - updatedAt, - updatedBy, - tags, - interactions, - status, - additionalUrls, - comments, - customProperties); + title, filename, container, + containerDatasourceId, containerObjectType, datasource, + objectType, viewURL, id, + summary, body, author, + owner, permissions, createdAt, + updatedAt, updatedBy, tags, + interactions, status, additionalUrls, + comments, customProperties); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInsight.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInsight.java index fc826079..50b67e3b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInsight.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInsight.java @@ -14,15 +14,18 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class DocumentInsight { @JsonProperty("document") private Document document; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("viewCount") private Optional viewCount; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("visitorCount") private Optional visitorCount; @@ -62,9 +65,10 @@ public Optional visitorCount() { return (Optional) visitorCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public DocumentInsight withDocument(Document document) { Utils.checkNotNull(document, "document"); @@ -78,6 +82,7 @@ public DocumentInsight withViewCount(CountInfo viewCount) { return this; } + public DocumentInsight withViewCount(Optional viewCount) { Utils.checkNotNull(viewCount, "viewCount"); this.viewCount = viewCount; @@ -90,13 +95,13 @@ public DocumentInsight withVisitorCount(CountInfo visitorCount) { return this; } + public DocumentInsight withVisitorCount(Optional visitorCount) { Utils.checkNotNull(visitorCount, "visitorCount"); this.visitorCount = visitorCount; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -115,9 +120,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - document, - viewCount, - visitorCount); + document, viewCount, visitorCount); } @Override @@ -127,25 +130,28 @@ public String toString() { "viewCount", viewCount, "visitorCount", visitorCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Document document; - + private Optional viewCount = Optional.empty(); - + private Optional visitorCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder document(Document document) { Utils.checkNotNull(document, "document"); this.document = document; return this; } + public Builder viewCount(CountInfo viewCount) { Utils.checkNotNull(viewCount, "viewCount"); this.viewCount = Optional.ofNullable(viewCount); @@ -158,6 +164,7 @@ public Builder viewCount(Optional viewCount) { return this; } + public Builder visitorCount(CountInfo visitorCount) { Utils.checkNotNull(visitorCount, "visitorCount"); this.visitorCount = Optional.ofNullable(visitorCount); @@ -169,12 +176,12 @@ public Builder visitorCount(Optional visitorCount) { this.visitorCount = visitorCount; return this; } - + public DocumentInsight build() { + return new DocumentInsight( - document, - viewCount, - visitorCount); + document, viewCount, visitorCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInteractions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInteractions.java index a35b9799..794b8f2a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInteractions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInteractions.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class DocumentInteractions { +public class DocumentInteractions { /** * The count of comments (thread replies in the case of slack). */ @@ -43,6 +43,7 @@ public class DocumentInteractions { @Deprecated private Optional> reactions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("reacts") private Optional> reacts; @@ -54,6 +55,7 @@ public class DocumentInteractions { @JsonProperty("shares") private Optional> shares; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("visitorCount") private Optional visitorCount; @@ -81,7 +83,8 @@ public DocumentInteractions( } public DocumentInteractions() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -133,9 +136,10 @@ public Optional visitorCount() { return (Optional) visitorCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The count of comments (thread replies in the case of slack). @@ -146,6 +150,7 @@ public DocumentInteractions withNumComments(long numComments) { return this; } + /** * The count of comments (thread replies in the case of slack). */ @@ -164,6 +169,7 @@ public DocumentInteractions withNumReactions(long numReactions) { return this; } + /** * The count of reactions on the document. */ @@ -185,6 +191,7 @@ public DocumentInteractions withReactions(List reactions) { return this; } + /** * To be deprecated in favor of reacts. A (potentially non-exhaustive) list of reactions for the document. * @@ -203,6 +210,7 @@ public DocumentInteractions withReacts(List reacts) { return this; } + public DocumentInteractions withReacts(Optional> reacts) { Utils.checkNotNull(reacts, "reacts"); this.reacts = reacts; @@ -218,6 +226,7 @@ public DocumentInteractions withShares(List shares) { return this; } + /** * Describes instances of someone posting a link to this document in one of our indexed datasources. */ @@ -233,13 +242,13 @@ public DocumentInteractions withVisitorCount(CountInfo visitorCount) { return this; } + public DocumentInteractions withVisitorCount(Optional visitorCount) { Utils.checkNotNull(visitorCount, "visitorCount"); this.visitorCount = visitorCount; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -261,12 +270,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - numComments, - numReactions, - reactions, - reacts, - shares, - visitorCount); + numComments, numReactions, reactions, + reacts, shares, visitorCount); } @Override @@ -279,26 +284,28 @@ public String toString() { "shares", shares, "visitorCount", visitorCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional numComments = Optional.empty(); - + private Optional numReactions = Optional.empty(); - + @Deprecated private Optional> reactions = Optional.empty(); - + private Optional> reacts = Optional.empty(); - + private Optional> shares = Optional.empty(); - + private Optional visitorCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The count of comments (thread replies in the case of slack). */ @@ -317,6 +324,7 @@ public Builder numComments(Optional numComments) { return this; } + /** * The count of reactions on the document. */ @@ -335,6 +343,7 @@ public Builder numReactions(Optional numReactions) { return this; } + /** * To be deprecated in favor of reacts. A (potentially non-exhaustive) list of reactions for the document. * @@ -359,6 +368,7 @@ public Builder reactions(Optional> reactions) { return this; } + public Builder reacts(List reacts) { Utils.checkNotNull(reacts, "reacts"); this.reacts = Optional.ofNullable(reacts); @@ -371,6 +381,7 @@ public Builder reacts(Optional> reacts) { return this; } + /** * Describes instances of someone posting a link to this document in one of our indexed datasources. */ @@ -389,6 +400,7 @@ public Builder shares(Optional> shares) { return this; } + public Builder visitorCount(CountInfo visitorCount) { Utils.checkNotNull(visitorCount, "visitorCount"); this.visitorCount = Optional.ofNullable(visitorCount); @@ -400,15 +412,13 @@ public Builder visitorCount(Optional visitorCount) { this.visitorCount = visitorCount; return this; } - + public DocumentInteractions build() { + return new DocumentInteractions( - numComments, - numReactions, - reactions, - reacts, - shares, - visitorCount); + numComments, numReactions, reactions, + reacts, shares, visitorCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInteractionsDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInteractionsDefinition.java index aa4f356c..ea82f5b9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInteractionsDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentInteractionsDefinition.java @@ -25,10 +25,12 @@ public class DocumentInteractionsDefinition { @JsonProperty("numViews") private Optional numViews; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("numLikes") private Optional numLikes; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("numComments") private Optional numComments; @@ -65,9 +67,10 @@ public Optional numComments() { return numComments; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public DocumentInteractionsDefinition withNumViews(long numViews) { Utils.checkNotNull(numViews, "numViews"); @@ -75,6 +78,7 @@ public DocumentInteractionsDefinition withNumViews(long numViews) { return this; } + public DocumentInteractionsDefinition withNumViews(Optional numViews) { Utils.checkNotNull(numViews, "numViews"); this.numViews = numViews; @@ -87,6 +91,7 @@ public DocumentInteractionsDefinition withNumLikes(long numLikes) { return this; } + public DocumentInteractionsDefinition withNumLikes(Optional numLikes) { Utils.checkNotNull(numLikes, "numLikes"); this.numLikes = numLikes; @@ -99,13 +104,13 @@ public DocumentInteractionsDefinition withNumComments(long numComments) { return this; } + public DocumentInteractionsDefinition withNumComments(Optional numComments) { Utils.checkNotNull(numComments, "numComments"); this.numComments = numComments; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -124,9 +129,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - numViews, - numLikes, - numComments); + numViews, numLikes, numComments); } @Override @@ -136,19 +139,21 @@ public String toString() { "numLikes", numLikes, "numComments", numComments); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional numViews = Optional.empty(); - + private Optional numLikes = Optional.empty(); - + private Optional numComments = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder numViews(long numViews) { Utils.checkNotNull(numViews, "numViews"); this.numViews = Optional.ofNullable(numViews); @@ -161,6 +166,7 @@ public Builder numViews(Optional numViews) { return this; } + public Builder numLikes(long numLikes) { Utils.checkNotNull(numLikes, "numLikes"); this.numLikes = Optional.ofNullable(numLikes); @@ -173,6 +179,7 @@ public Builder numLikes(Optional numLikes) { return this; } + public Builder numComments(long numComments) { Utils.checkNotNull(numComments, "numComments"); this.numComments = Optional.ofNullable(numComments); @@ -184,12 +191,12 @@ public Builder numComments(Optional numComments) { this.numComments = numComments; return this; } - + public DocumentInteractionsDefinition build() { + return new DocumentInteractionsDefinition( - numViews, - numLikes, - numComments); + numViews, numLikes, numComments); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentMetadata.java index 3c9965a6..7345f714 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentMetadata.java @@ -17,6 +17,7 @@ import java.util.Map; import java.util.Optional; + public class DocumentMetadata { @JsonInclude(Include.NON_ABSENT) @@ -65,6 +66,7 @@ public class DocumentMetadata { @JsonProperty("parentId") private Optional parentId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("mimeType") private Optional mimeType; @@ -90,18 +92,22 @@ public class DocumentMetadata { @JsonProperty("documentIdHash") private Optional documentIdHash; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createTime") private Optional createTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updateTime") private Optional updateTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("author") private Optional author; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("owner") private Optional owner; @@ -155,10 +161,12 @@ public class DocumentMetadata { @JsonProperty("priority") private Optional priority; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("assignedTo") private Optional assignedTo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedBy") private Optional updatedBy; @@ -184,22 +192,27 @@ public class DocumentMetadata { @JsonProperty("datasourceId") private Optional datasourceId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("interactions") private Optional interactions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("verification") private Optional verification; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("viewerInfo") private Optional viewerInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("visitCount") private Optional visitCount; @@ -232,14 +245,17 @@ public class DocumentMetadata { @JsonProperty("documentCategory") private Optional documentCategory; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("contactPerson") private Optional contactPerson; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("indexStatus") private Optional indexStatus; @@ -376,7 +392,20 @@ public DocumentMetadata( } public DocumentMetadata() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @JsonIgnore @@ -672,9 +701,10 @@ public Optional> ancestors() { return (Optional>) ancestors; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public DocumentMetadata withDatasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); @@ -682,6 +712,7 @@ public DocumentMetadata withDatasource(String datasource) { return this; } + public DocumentMetadata withDatasource(Optional datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = datasource; @@ -697,6 +728,7 @@ public DocumentMetadata withDatasourceInstance(String datasourceInstance) { return this; } + /** * The datasource instance from which the document was extracted. */ @@ -715,6 +747,7 @@ public DocumentMetadata withObjectType(String objectType) { return this; } + /** * The type of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). */ @@ -733,6 +766,7 @@ public DocumentMetadata withContainer(String container) { return this; } + /** * The name of the container (higher level parent, not direct parent) of the result. Interpretation is specific to each datasource (e.g. Channels for Slack, Project for Jira). cf. parentId */ @@ -751,6 +785,7 @@ public DocumentMetadata withContainerId(String containerId) { return this; } + /** * The Glean Document ID of the container. Uniquely identifies the container. */ @@ -769,6 +804,7 @@ public DocumentMetadata withSuperContainerId(String superContainerId) { return this; } + /** * The Glean Document ID of the super container. Super container represents a broader abstraction that contains many containers. For example, whereas container might refer to a folder, super container would refer to a drive. */ @@ -787,6 +823,7 @@ public DocumentMetadata withParentId(String parentId) { return this; } + /** * The id of the direct parent of the result. Interpretation is specific to each datasource (e.g. parent issue for Jira). cf. container */ @@ -802,6 +839,7 @@ public DocumentMetadata withMimeType(String mimeType) { return this; } + public DocumentMetadata withMimeType(Optional mimeType) { Utils.checkNotNull(mimeType, "mimeType"); this.mimeType = mimeType; @@ -817,6 +855,7 @@ public DocumentMetadata withDocumentId(String documentId) { return this; } + /** * The index-wide unique identifier. */ @@ -835,6 +874,7 @@ public DocumentMetadata withLoggingId(String loggingId) { return this; } + /** * A unique identifier used to represent the document in any logging or feedback requests in place of documentId. */ @@ -853,6 +893,7 @@ public DocumentMetadata withDocumentIdHash(String documentIdHash) { return this; } + /** * Hash of the Glean Document ID. */ @@ -868,6 +909,7 @@ public DocumentMetadata withCreateTime(OffsetDateTime createTime) { return this; } + public DocumentMetadata withCreateTime(Optional createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = createTime; @@ -880,6 +922,7 @@ public DocumentMetadata withUpdateTime(OffsetDateTime updateTime) { return this; } + public DocumentMetadata withUpdateTime(Optional updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = updateTime; @@ -892,6 +935,7 @@ public DocumentMetadata withAuthor(Person author) { return this; } + public DocumentMetadata withAuthor(Optional author) { Utils.checkNotNull(author, "author"); this.author = author; @@ -904,6 +948,7 @@ public DocumentMetadata withOwner(Person owner) { return this; } + public DocumentMetadata withOwner(Optional owner) { Utils.checkNotNull(owner, "owner"); this.owner = owner; @@ -919,6 +964,7 @@ public DocumentMetadata withMentionedPeople(List mentionedPeople) { return this; } + /** * A list of people mentioned in the document. */ @@ -937,6 +983,7 @@ public DocumentMetadata withVisibility(DocumentVisibility visibility) { return this; } + /** * The level of visibility of the document as understood by our system. */ @@ -955,6 +1002,7 @@ public DocumentMetadata withComponents(List components) { return this; } + /** * A list of components this result is associated with. Interpretation is specific to each datasource. (e.g. for Jira issues, these are [components](https://confluence.atlassian.com/jirasoftwarecloud/organizing-work-with-components-764478279.html).) */ @@ -973,6 +1021,7 @@ public DocumentMetadata withStatus(String status) { return this; } + /** * The status or disposition of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue status such as Done, In Progress or Will Not Fix). */ @@ -991,6 +1040,7 @@ public DocumentMetadata withStatusCategory(String statusCategory) { return this; } + /** * The status category of the result. Meant to be more general than status. Interpretation is specific to each datasource. */ @@ -1009,6 +1059,7 @@ public DocumentMetadata withPins(List pins) { return this; } + /** * A list of stars associated with this result. "Pin" is an older name. */ @@ -1027,6 +1078,7 @@ public DocumentMetadata withPriority(String priority) { return this; } + /** * The document priority. Interpretation is datasource specific. */ @@ -1042,6 +1094,7 @@ public DocumentMetadata withAssignedTo(Person assignedTo) { return this; } + public DocumentMetadata withAssignedTo(Optional assignedTo) { Utils.checkNotNull(assignedTo, "assignedTo"); this.assignedTo = assignedTo; @@ -1054,6 +1107,7 @@ public DocumentMetadata withUpdatedBy(Person updatedBy) { return this; } + public DocumentMetadata withUpdatedBy(Optional updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = updatedBy; @@ -1069,6 +1123,7 @@ public DocumentMetadata withLabels(List labels) { return this; } + /** * A list of tags for the document. Interpretation is datasource specific. */ @@ -1087,6 +1142,7 @@ public DocumentMetadata withCollections(List collections) { return this; } + /** * A list of collections that the document belongs to. */ @@ -1105,6 +1161,7 @@ public DocumentMetadata withDatasourceId(String datasourceId) { return this; } + /** * The user-visible datasource specific id (e.g. Salesforce case number for example, GitHub PR number). */ @@ -1120,6 +1177,7 @@ public DocumentMetadata withInteractions(DocumentInteractions interactions) { return this; } + public DocumentMetadata withInteractions(Optional interactions) { Utils.checkNotNull(interactions, "interactions"); this.interactions = interactions; @@ -1132,6 +1190,7 @@ public DocumentMetadata withVerification(Verification verification) { return this; } + public DocumentMetadata withVerification(Optional verification) { Utils.checkNotNull(verification, "verification"); this.verification = verification; @@ -1144,6 +1203,7 @@ public DocumentMetadata withViewerInfo(ViewerInfo viewerInfo) { return this; } + public DocumentMetadata withViewerInfo(Optional viewerInfo) { Utils.checkNotNull(viewerInfo, "viewerInfo"); this.viewerInfo = viewerInfo; @@ -1156,6 +1216,7 @@ public DocumentMetadata withPermissions(ObjectPermissions permissions) { return this; } + public DocumentMetadata withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -1168,6 +1229,7 @@ public DocumentMetadata withVisitCount(CountInfo visitCount) { return this; } + public DocumentMetadata withVisitCount(Optional visitCount) { Utils.checkNotNull(visitCount, "visitCount"); this.visitCount = visitCount; @@ -1183,6 +1245,7 @@ public DocumentMetadata withShortcuts(List shortcuts) { return this; } + /** * A list of shortcuts of which destination URL is for the document. */ @@ -1201,6 +1264,7 @@ public DocumentMetadata withPath(String path) { return this; } + /** * For file datasources like onedrive/github etc this has the path to the file */ @@ -1219,6 +1283,7 @@ public DocumentMetadata withCustomData(Map customData) return this; } + /** * Custom fields specific to individual datasources */ @@ -1237,6 +1302,7 @@ public DocumentMetadata withDocumentCategory(String documentCategory) { return this; } + /** * The document's document_category(.proto). */ @@ -1252,6 +1318,7 @@ public DocumentMetadata withContactPerson(Person contactPerson) { return this; } + public DocumentMetadata withContactPerson(Optional contactPerson) { Utils.checkNotNull(contactPerson, "contactPerson"); this.contactPerson = contactPerson; @@ -1264,6 +1331,7 @@ public DocumentMetadata withThumbnail(Thumbnail thumbnail) { return this; } + public DocumentMetadata withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -1276,6 +1344,7 @@ public DocumentMetadata withIndexStatus(IndexStatus indexStatus) { return this; } + public DocumentMetadata withIndexStatus(Optional indexStatus) { Utils.checkNotNull(indexStatus, "indexStatus"); this.indexStatus = indexStatus; @@ -1291,6 +1360,7 @@ public DocumentMetadata withAncestors(List ancestors) { return this; } + /** * A list of documents that are ancestors of this document in the hierarchy of the document's datasource, for example parent folders or containers. Ancestors can be of different types and some may not be indexed. Higher level ancestors appear earlier in the list. */ @@ -1300,7 +1370,6 @@ public DocumentMetadata withAncestors(Optional> ancesto return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -1356,45 +1425,19 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasource, - datasourceInstance, - objectType, - container, - containerId, - superContainerId, - parentId, - mimeType, - documentId, - loggingId, - documentIdHash, - createTime, - updateTime, - author, - owner, - mentionedPeople, - visibility, - components, - status, - statusCategory, - pins, - priority, - assignedTo, - updatedBy, - labels, - collections, - datasourceId, - interactions, - verification, - viewerInfo, - permissions, - visitCount, - shortcuts, - path, - customData, - documentCategory, - contactPerson, - thumbnail, - indexStatus, + datasource, datasourceInstance, objectType, + container, containerId, superContainerId, + parentId, mimeType, documentId, + loggingId, documentIdHash, createTime, + updateTime, author, owner, + mentionedPeople, visibility, components, + status, statusCategory, pins, + priority, assignedTo, updatedBy, + labels, collections, datasourceId, + interactions, verification, viewerInfo, + permissions, visitCount, shortcuts, + path, customData, documentCategory, + contactPerson, thumbnail, indexStatus, ancestors); } @@ -1442,93 +1485,95 @@ public String toString() { "indexStatus", indexStatus, "ancestors", ancestors); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional datasource = Optional.empty(); - + private Optional datasourceInstance = Optional.empty(); - + private Optional objectType = Optional.empty(); - + private Optional container = Optional.empty(); - + private Optional containerId = Optional.empty(); - + private Optional superContainerId = Optional.empty(); - + private Optional parentId = Optional.empty(); - + private Optional mimeType = Optional.empty(); - + private Optional documentId = Optional.empty(); - + private Optional loggingId = Optional.empty(); - + private Optional documentIdHash = Optional.empty(); - + private Optional createTime = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional author = Optional.empty(); - + private Optional owner = Optional.empty(); - + private Optional> mentionedPeople = Optional.empty(); - + private Optional visibility = Optional.empty(); - + private Optional> components = Optional.empty(); - + private Optional status = Optional.empty(); - + private Optional statusCategory = Optional.empty(); - + private Optional> pins = Optional.empty(); - + private Optional priority = Optional.empty(); - + private Optional assignedTo = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional> labels = Optional.empty(); - + private Optional> collections = Optional.empty(); - + private Optional datasourceId = Optional.empty(); - + private Optional interactions = Optional.empty(); - + private Optional verification = Optional.empty(); - + private Optional viewerInfo = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Optional visitCount = Optional.empty(); - + private Optional> shortcuts = Optional.empty(); - + private Optional path = Optional.empty(); - + private Optional> customData = Optional.empty(); - + private Optional documentCategory = Optional.empty(); - + private Optional contactPerson = Optional.empty(); - + private Optional thumbnail = Optional.empty(); - + private Optional indexStatus = Optional.empty(); - + private Optional> ancestors = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder datasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = Optional.ofNullable(datasource); @@ -1541,6 +1586,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * The datasource instance from which the document was extracted. */ @@ -1559,6 +1605,7 @@ public Builder datasourceInstance(Optional datasourceInstance) { return this; } + /** * The type of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue type such as Bug or Feature Request). */ @@ -1577,6 +1624,7 @@ public Builder objectType(Optional objectType) { return this; } + /** * The name of the container (higher level parent, not direct parent) of the result. Interpretation is specific to each datasource (e.g. Channels for Slack, Project for Jira). cf. parentId */ @@ -1595,6 +1643,7 @@ public Builder container(Optional container) { return this; } + /** * The Glean Document ID of the container. Uniquely identifies the container. */ @@ -1613,6 +1662,7 @@ public Builder containerId(Optional containerId) { return this; } + /** * The Glean Document ID of the super container. Super container represents a broader abstraction that contains many containers. For example, whereas container might refer to a folder, super container would refer to a drive. */ @@ -1631,6 +1681,7 @@ public Builder superContainerId(Optional superContainerId) { return this; } + /** * The id of the direct parent of the result. Interpretation is specific to each datasource (e.g. parent issue for Jira). cf. container */ @@ -1649,6 +1700,7 @@ public Builder parentId(Optional parentId) { return this; } + public Builder mimeType(String mimeType) { Utils.checkNotNull(mimeType, "mimeType"); this.mimeType = Optional.ofNullable(mimeType); @@ -1661,6 +1713,7 @@ public Builder mimeType(Optional mimeType) { return this; } + /** * The index-wide unique identifier. */ @@ -1679,6 +1732,7 @@ public Builder documentId(Optional documentId) { return this; } + /** * A unique identifier used to represent the document in any logging or feedback requests in place of documentId. */ @@ -1697,6 +1751,7 @@ public Builder loggingId(Optional loggingId) { return this; } + /** * Hash of the Glean Document ID. */ @@ -1715,6 +1770,7 @@ public Builder documentIdHash(Optional documentIdHash) { return this; } + public Builder createTime(OffsetDateTime createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = Optional.ofNullable(createTime); @@ -1727,6 +1783,7 @@ public Builder createTime(Optional createTime) { return this; } + public Builder updateTime(OffsetDateTime updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = Optional.ofNullable(updateTime); @@ -1739,6 +1796,7 @@ public Builder updateTime(Optional updateTime) { return this; } + public Builder author(Person author) { Utils.checkNotNull(author, "author"); this.author = Optional.ofNullable(author); @@ -1751,6 +1809,7 @@ public Builder author(Optional author) { return this; } + public Builder owner(Person owner) { Utils.checkNotNull(owner, "owner"); this.owner = Optional.ofNullable(owner); @@ -1763,6 +1822,7 @@ public Builder owner(Optional owner) { return this; } + /** * A list of people mentioned in the document. */ @@ -1781,6 +1841,7 @@ public Builder mentionedPeople(Optional> mentionedPeople) return this; } + /** * The level of visibility of the document as understood by our system. */ @@ -1799,6 +1860,7 @@ public Builder visibility(Optional visibility) { return this; } + /** * A list of components this result is associated with. Interpretation is specific to each datasource. (e.g. for Jira issues, these are [components](https://confluence.atlassian.com/jirasoftwarecloud/organizing-work-with-components-764478279.html).) */ @@ -1817,6 +1879,7 @@ public Builder components(Optional> components) { return this; } + /** * The status or disposition of the result. Interpretation is specific to each datasource. (e.g. for Jira issues, this is the issue status such as Done, In Progress or Will Not Fix). */ @@ -1835,6 +1898,7 @@ public Builder status(Optional status) { return this; } + /** * The status category of the result. Meant to be more general than status. Interpretation is specific to each datasource. */ @@ -1853,6 +1917,7 @@ public Builder statusCategory(Optional statusCategory) { return this; } + /** * A list of stars associated with this result. "Pin" is an older name. */ @@ -1871,6 +1936,7 @@ public Builder pins(Optional> pins) { return this; } + /** * The document priority. Interpretation is datasource specific. */ @@ -1889,6 +1955,7 @@ public Builder priority(Optional priority) { return this; } + public Builder assignedTo(Person assignedTo) { Utils.checkNotNull(assignedTo, "assignedTo"); this.assignedTo = Optional.ofNullable(assignedTo); @@ -1901,6 +1968,7 @@ public Builder assignedTo(Optional assignedTo) { return this; } + public Builder updatedBy(Person updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = Optional.ofNullable(updatedBy); @@ -1913,6 +1981,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + /** * A list of tags for the document. Interpretation is datasource specific. */ @@ -1931,6 +2000,7 @@ public Builder labels(Optional> labels) { return this; } + /** * A list of collections that the document belongs to. */ @@ -1949,6 +2019,7 @@ public Builder collections(Optional> collections) { return this; } + /** * The user-visible datasource specific id (e.g. Salesforce case number for example, GitHub PR number). */ @@ -1967,6 +2038,7 @@ public Builder datasourceId(Optional datasourceId) { return this; } + public Builder interactions(DocumentInteractions interactions) { Utils.checkNotNull(interactions, "interactions"); this.interactions = Optional.ofNullable(interactions); @@ -1979,6 +2051,7 @@ public Builder interactions(Optional interaction return this; } + public Builder verification(Verification verification) { Utils.checkNotNull(verification, "verification"); this.verification = Optional.ofNullable(verification); @@ -1991,6 +2064,7 @@ public Builder verification(Optional verification) { return this; } + public Builder viewerInfo(ViewerInfo viewerInfo) { Utils.checkNotNull(viewerInfo, "viewerInfo"); this.viewerInfo = Optional.ofNullable(viewerInfo); @@ -2003,6 +2077,7 @@ public Builder viewerInfo(Optional viewerInfo) { return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -2015,6 +2090,7 @@ public Builder permissions(Optional permissions) { return this; } + public Builder visitCount(CountInfo visitCount) { Utils.checkNotNull(visitCount, "visitCount"); this.visitCount = Optional.ofNullable(visitCount); @@ -2027,6 +2103,7 @@ public Builder visitCount(Optional visitCount) { return this; } + /** * A list of shortcuts of which destination URL is for the document. */ @@ -2045,6 +2122,7 @@ public Builder shortcuts(Optional> shortcuts) { return this; } + /** * For file datasources like onedrive/github etc this has the path to the file */ @@ -2063,6 +2141,7 @@ public Builder path(Optional path) { return this; } + /** * Custom fields specific to individual datasources */ @@ -2081,6 +2160,7 @@ public Builder customData(Optional> custo return this; } + /** * The document's document_category(.proto). */ @@ -2099,6 +2179,7 @@ public Builder documentCategory(Optional documentCategory) { return this; } + public Builder contactPerson(Person contactPerson) { Utils.checkNotNull(contactPerson, "contactPerson"); this.contactPerson = Optional.ofNullable(contactPerson); @@ -2111,6 +2192,7 @@ public Builder contactPerson(Optional contactPerson) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -2123,6 +2205,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + public Builder indexStatus(IndexStatus indexStatus) { Utils.checkNotNull(indexStatus, "indexStatus"); this.indexStatus = Optional.ofNullable(indexStatus); @@ -2135,6 +2218,7 @@ public Builder indexStatus(Optional indexStatus) { return this; } + /** * A list of documents that are ancestors of this document in the hierarchy of the document's datasource, for example parent folders or containers. Ancestors can be of different types and some may not be indexed. Higher level ancestors appear earlier in the list. */ @@ -2152,49 +2236,25 @@ public Builder ancestors(Optional> ancestors) { this.ancestors = ancestors; return this; } - + public DocumentMetadata build() { + return new DocumentMetadata( - datasource, - datasourceInstance, - objectType, - container, - containerId, - superContainerId, - parentId, - mimeType, - documentId, - loggingId, - documentIdHash, - createTime, - updateTime, - author, - owner, - mentionedPeople, - visibility, - components, - status, - statusCategory, - pins, - priority, - assignedTo, - updatedBy, - labels, - collections, - datasourceId, - interactions, - verification, - viewerInfo, - permissions, - visitCount, - shortcuts, - path, - customData, - documentCategory, - contactPerson, - thumbnail, - indexStatus, + datasource, datasourceInstance, objectType, + container, containerId, superContainerId, + parentId, mimeType, documentId, + loggingId, documentIdHash, createTime, + updateTime, author, owner, + mentionedPeople, visibility, components, + status, statusCategory, pins, + priority, assignedTo, updatedBy, + labels, collections, datasourceId, + interactions, verification, viewerInfo, + permissions, visitCount, shortcuts, + path, customData, documentCategory, + contactPerson, thumbnail, indexStatus, ancestors); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentOrError.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentOrError.java index 0787e10c..74cd2ea4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentOrError.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentOrError.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class DocumentOrError { +public class DocumentOrError { /** * The text for error, reason. */ @@ -41,9 +41,10 @@ public Optional error() { return error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The text for error, reason. @@ -54,6 +55,7 @@ public DocumentOrError withError(String error) { return this; } + /** * The text for error, reason. */ @@ -63,7 +65,6 @@ public DocumentOrError withError(Optional error) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(DocumentOrError.class, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The text for error, reason. */ @@ -114,10 +117,12 @@ public Builder error(Optional error) { this.error = error; return this; } - + public DocumentOrError build() { + return new DocumentOrError( error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentPermissionsDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentPermissionsDefinition.java index 20acb538..4ba67a8f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentPermissionsDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentPermissionsDefinition.java @@ -22,7 +22,6 @@ *

describes the access control details of the document */ public class DocumentPermissionsDefinition { - /** * List of users who can view the document */ @@ -78,7 +77,8 @@ public DocumentPermissionsDefinition( } public DocumentPermissionsDefinition() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -124,9 +124,10 @@ public Optional allowAllDatasourceUsersAccess() { return allowAllDatasourceUsersAccess; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of users who can view the document @@ -137,6 +138,7 @@ public DocumentPermissionsDefinition withAllowedUsers(List allowedGroup return this; } + /** * List of groups that can view the document */ @@ -173,6 +176,7 @@ public DocumentPermissionsDefinition withAllowedGroupIntersections(List> allowedUsers = Optional.empty(); - + private Optional> allowedGroups = Optional.empty(); - + private Optional> allowedGroupIntersections = Optional.empty(); - + private Optional allowAnonymousAccess = Optional.empty(); - + private Optional allowAllDatasourceUsersAccess = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * List of users who can view the document */ @@ -290,6 +294,7 @@ public Builder allowedUsers(Optional> al return this; } + /** * List of groups that can view the document */ @@ -308,6 +313,7 @@ public Builder allowedGroups(Optional> allowedGroups) { return this; } + /** * List of allowed group intersections. This describes a permissions constraint of the form ((GroupA AND GroupB AND GroupC) OR (GroupX AND GroupY) OR ... */ @@ -326,6 +332,7 @@ public Builder allowedGroupIntersections(Optional allowAnonymousAccess) { return this; } + /** * If true, then any user who has an account in the datasource can view the document. */ @@ -361,14 +369,13 @@ public Builder allowAllDatasourceUsersAccess(Optional allowAllDatasourc this.allowAllDatasourceUsersAccess = allowAllDatasourceUsersAccess; return this; } - + public DocumentPermissionsDefinition build() { + return new DocumentPermissionsDefinition( - allowedUsers, - allowedGroups, - allowedGroupIntersections, - allowAnonymousAccess, - allowAllDatasourceUsersAccess); + allowedUsers, allowedGroups, allowedGroupIntersections, + allowAnonymousAccess, allowAllDatasourceUsersAccess); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSection.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSection.java index 0abfedd3..64d2c126 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSection.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSection.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class DocumentSection { +public class DocumentSection { /** * The title of the document section (e.g. the section header). */ @@ -59,9 +59,10 @@ public Optional url() { return url; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The title of the document section (e.g. the section header). @@ -72,6 +73,7 @@ public DocumentSection withTitle(String title) { return this; } + /** * The title of the document section (e.g. the section header). */ @@ -90,6 +92,7 @@ public DocumentSection withUrl(String url) { return this; } + /** * The permalink of the document section. */ @@ -99,7 +102,6 @@ public DocumentSection withUrl(Optional url) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,8 +119,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - title, - url); + title, url); } @Override @@ -127,17 +128,19 @@ public String toString() { "title", title, "url", url); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional title = Optional.empty(); - + private Optional url = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The title of the document section (e.g. the section header). */ @@ -156,6 +159,7 @@ public Builder title(Optional title) { return this; } + /** * The permalink of the document section. */ @@ -173,11 +177,12 @@ public Builder url(Optional url) { this.url = url; return this; } - + public DocumentSection build() { + return new DocumentSection( - title, - url); + title, url); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec1.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec1.java index b1fd0a64..24310069 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec1.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec1.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class DocumentSpec1 { +public class DocumentSpec1 { /** * The URL of the document. */ @@ -41,9 +41,10 @@ public Optional url() { return url; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The URL of the document. @@ -54,6 +55,7 @@ public DocumentSpec1 withUrl(String url) { return this; } + /** * The URL of the document. */ @@ -63,7 +65,6 @@ public DocumentSpec1 withUrl(Optional url) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(DocumentSpec1.class, "url", url); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional url = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The URL of the document. */ @@ -114,10 +117,12 @@ public Builder url(Optional url) { this.url = url; return this; } - + public DocumentSpec1 build() { + return new DocumentSpec1( url); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec2.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec2.java index e1f1bba8..58d1345b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec2.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec2.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class DocumentSpec2 { +public class DocumentSpec2 { /** * The ID of the document. */ @@ -41,9 +41,10 @@ public Optional id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the document. @@ -54,6 +55,7 @@ public DocumentSpec2 withId(String id) { return this; } + /** * The ID of the document. */ @@ -63,7 +65,6 @@ public DocumentSpec2 withId(Optional id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(DocumentSpec2.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ID of the document. */ @@ -114,10 +117,12 @@ public Builder id(Optional id) { this.id = id; return this; } - + public DocumentSpec2 build() { + return new DocumentSpec2( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec3.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec3.java index 0bf975fe..6bceff27 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec3.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentSpec3.java @@ -15,8 +15,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class DocumentSpec3 { +public class DocumentSpec3 { /** * The type of the user generated content (UGC datasource). */ @@ -80,9 +80,10 @@ public Optional docType() { return docType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The type of the user generated content (UGC datasource). @@ -93,6 +94,7 @@ public DocumentSpec3 withUgcType(DocumentSpecUgcType ugcType) { return this; } + /** * The type of the user generated content (UGC datasource). */ @@ -111,6 +113,7 @@ public DocumentSpec3 withContentId(long contentId) { return this; } + /** * The id for user generated content. */ @@ -129,6 +132,7 @@ public DocumentSpec3 withDocType(String docType) { return this; } + /** * The specific type of the user generated content type. */ @@ -138,7 +142,6 @@ public DocumentSpec3 withDocType(Optional docType) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -157,9 +160,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - ugcType, - contentId, - docType); + ugcType, contentId, docType); } @Override @@ -169,19 +170,21 @@ public String toString() { "contentId", contentId, "docType", docType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional ugcType = Optional.empty(); - + private Optional contentId = Optional.empty(); - + private Optional docType = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The type of the user generated content (UGC datasource). */ @@ -200,6 +203,7 @@ public Builder ugcType(Optional ugcType) { return this; } + /** * The id for user generated content. */ @@ -218,6 +222,7 @@ public Builder contentId(Optional contentId) { return this; } + /** * The specific type of the user generated content type. */ @@ -235,12 +240,12 @@ public Builder docType(Optional docType) { this.docType = docType; return this; } - + public DocumentSpec3 build() { + return new DocumentSpec3( - ugcType, - contentId, - docType); + ugcType, contentId, docType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentStatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentStatusResponse.java index b6c7d778..312ba62c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentStatusResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentStatusResponse.java @@ -19,7 +19,6 @@ *

Describes the document status response body */ public class DocumentStatusResponse { - /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN */ @@ -75,7 +74,8 @@ public DocumentStatusResponse( } public DocumentStatusResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -118,9 +118,10 @@ public Optional permissionIdentityStatus() { return permissionIdentityStatus; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN @@ -131,6 +132,7 @@ public DocumentStatusResponse withUploadStatus(String uploadStatus) { return this; } + /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN */ @@ -149,6 +151,7 @@ public DocumentStatusResponse withLastUploadedAt(String lastUploadedAt) { return this; } + /** * Time of last successful upload for the document, in ISO 8601 format */ @@ -167,6 +170,7 @@ public DocumentStatusResponse withIndexingStatus(String indexingStatus) { return this; } + /** * Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN */ @@ -185,6 +189,7 @@ public DocumentStatusResponse withLastIndexedAt(String lastIndexedAt) { return this; } + /** * Time of last successful indexing for the document, in ISO 8601 format */ @@ -203,6 +208,7 @@ public DocumentStatusResponse withPermissionIdentityStatus(String permissionIden return this; } + /** * Permission identity status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN (Always unknown if `identityDatasourceName` is set). Document visibility may be affected status is `NOT_UPLOADED`. */ @@ -212,7 +218,6 @@ public DocumentStatusResponse withPermissionIdentityStatus(Optional perm return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -233,11 +238,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - uploadStatus, - lastUploadedAt, - indexingStatus, - lastIndexedAt, - permissionIdentityStatus); + uploadStatus, lastUploadedAt, indexingStatus, + lastIndexedAt, permissionIdentityStatus); } @Override @@ -249,23 +251,25 @@ public String toString() { "lastIndexedAt", lastIndexedAt, "permissionIdentityStatus", permissionIdentityStatus); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional uploadStatus = Optional.empty(); - + private Optional lastUploadedAt = Optional.empty(); - + private Optional indexingStatus = Optional.empty(); - + private Optional lastIndexedAt = Optional.empty(); - + private Optional permissionIdentityStatus = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN */ @@ -284,6 +288,7 @@ public Builder uploadStatus(Optional uploadStatus) { return this; } + /** * Time of last successful upload for the document, in ISO 8601 format */ @@ -302,6 +307,7 @@ public Builder lastUploadedAt(Optional lastUploadedAt) { return this; } + /** * Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN */ @@ -320,6 +326,7 @@ public Builder indexingStatus(Optional indexingStatus) { return this; } + /** * Time of last successful indexing for the document, in ISO 8601 format */ @@ -338,6 +345,7 @@ public Builder lastIndexedAt(Optional lastIndexedAt) { return this; } + /** * Permission identity status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN (Always unknown if `identityDatasourceName` is set). Document visibility may be affected status is `NOT_UPLOADED`. */ @@ -355,14 +363,13 @@ public Builder permissionIdentityStatus(Optional permissionIdentityStatu this.permissionIdentityStatus = permissionIdentityStatus; return this; } - + public DocumentStatusResponse build() { + return new DocumentStatusResponse( - uploadStatus, - lastUploadedAt, - indexingStatus, - lastIndexedAt, - permissionIdentityStatus); + uploadStatus, lastUploadedAt, indexingStatus, + lastIndexedAt, permissionIdentityStatus); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentVisibilityOverride.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentVisibilityOverride.java index 636ebede..28f88e7c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentVisibilityOverride.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentVisibilityOverride.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class DocumentVisibilityOverride { @JsonInclude(Include.NON_ABSENT) @@ -55,9 +56,10 @@ public Optional override() { return (Optional) override; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public DocumentVisibilityOverride withDocId(String docId) { Utils.checkNotNull(docId, "docId"); @@ -65,6 +67,7 @@ public DocumentVisibilityOverride withDocId(String docId) { return this; } + public DocumentVisibilityOverride withDocId(Optional docId) { Utils.checkNotNull(docId, "docId"); this.docId = docId; @@ -80,6 +83,7 @@ public DocumentVisibilityOverride withOverride(DocumentVisibilityOverrideOverrid return this; } + /** * The visibility-override state of the document. */ @@ -89,7 +93,6 @@ public DocumentVisibilityOverride withOverride(Optional docId = Optional.empty(); - + private Optional override = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder docId(String docId) { Utils.checkNotNull(docId, "docId"); this.docId = Optional.ofNullable(docId); @@ -140,6 +144,7 @@ public Builder docId(Optional docId) { return this; } + /** * The visibility-override state of the document. */ @@ -157,11 +162,12 @@ public Builder override(Optional o this.override = override; return this; } - + public DocumentVisibilityOverride build() { + return new DocumentVisibilityOverride( - docId, - override); + docId, override); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentVisibilityUpdateResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentVisibilityUpdateResult.java index 3f9f186b..e5fb95ac 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentVisibilityUpdateResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/DocumentVisibilityUpdateResult.java @@ -15,6 +15,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class DocumentVisibilityUpdateResult { @JsonInclude(Include.NON_ABSENT) @@ -74,9 +75,10 @@ public Optional success() { return success; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public DocumentVisibilityUpdateResult withDocId(String docId) { Utils.checkNotNull(docId, "docId"); @@ -84,6 +86,7 @@ public DocumentVisibilityUpdateResult withDocId(String docId) { return this; } + public DocumentVisibilityUpdateResult withDocId(Optional docId) { Utils.checkNotNull(docId, "docId"); this.docId = docId; @@ -99,6 +102,7 @@ public DocumentVisibilityUpdateResult withOverride(DocumentVisibilityUpdateResul return this; } + /** * The visibility-override state of the document. */ @@ -117,6 +121,7 @@ public DocumentVisibilityUpdateResult withSuccess(boolean success) { return this; } + /** * Whether this document was successfully set to its desired visibility state. */ @@ -126,7 +131,6 @@ public DocumentVisibilityUpdateResult withSuccess(Optional success) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -145,9 +149,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - docId, - override, - success); + docId, override, success); } @Override @@ -157,19 +159,21 @@ public String toString() { "override", override, "success", success); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional docId = Optional.empty(); - + private Optional override = Optional.empty(); - + private Optional success = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder docId(String docId) { Utils.checkNotNull(docId, "docId"); this.docId = Optional.ofNullable(docId); @@ -182,6 +186,7 @@ public Builder docId(Optional docId) { return this; } + /** * The visibility-override state of the document. */ @@ -200,6 +205,7 @@ public Builder override(Optional success) { this.success = success; return this; } - + public DocumentVisibilityUpdateResult build() { + return new DocumentVisibilityUpdateResult( - docId, - override, - success); + docId, override, success); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Documents.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Documents.java index 9ddb166d..6b5079c2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Documents.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Documents.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class Documents { +public class Documents { /** * Information about active and recent successful uploads for the datasource */ @@ -24,6 +24,7 @@ public class Documents { @JsonProperty("bulkUploadHistory") private Optional> bulkUploadHistory; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("counts") private Optional counts; @@ -76,9 +77,10 @@ public Optional> processingHistory() { return (Optional>) processingHistory; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Information about active and recent successful uploads for the datasource @@ -89,6 +91,7 @@ public Documents withBulkUploadHistory(List bulkUploadHi return this; } + /** * Information about active and recent successful uploads for the datasource */ @@ -104,6 +107,7 @@ public Documents withCounts(DebugDatasourceStatusResponseCounts counts) { return this; } + public Documents withCounts(Optional counts) { Utils.checkNotNull(counts, "counts"); this.counts = counts; @@ -119,6 +123,7 @@ public Documents withProcessingHistory(List processingHi return this; } + /** * Information about processing history for the datasource */ @@ -128,7 +133,6 @@ public Documents withProcessingHistory(Optional> bulkUploadHistory = Optional.empty(); - + private Optional counts = Optional.empty(); - + private Optional> processingHistory = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Information about active and recent successful uploads for the datasource */ @@ -190,6 +194,7 @@ public Builder bulkUploadHistory(Optional return this; } + public Builder counts(DebugDatasourceStatusResponseCounts counts) { Utils.checkNotNull(counts, "counts"); this.counts = Optional.ofNullable(counts); @@ -202,6 +207,7 @@ public Builder counts(Optional co return this; } + /** * Information about processing history for the datasource */ @@ -219,12 +225,12 @@ public Builder processingHistory(Optional this.processingHistory = processingHistory; return this; } - + public Documents build() { + return new Documents( - bulkUploadHistory, - counts, - processingHistory); + bulkUploadHistory, counts, processingHistory); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditAnswerRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditAnswerRequest.java index d36f8baa..43337c08 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditAnswerRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditAnswerRequest.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class EditAnswerRequest { +public class EditAnswerRequest { /** * The opaque ID of the Answer. */ @@ -32,6 +32,7 @@ public class EditAnswerRequest { @JsonProperty("docId") private Optional docId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("question") private Optional question; @@ -88,10 +89,12 @@ public class EditAnswerRequest { @JsonProperty("roles") private Optional> roles; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceDocumentSpec") private Optional sourceDocumentSpec; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceType") private Optional sourceType; @@ -110,6 +113,7 @@ public class EditAnswerRequest { @JsonProperty("removedCollections") private Optional> removedCollections; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("combinedAnswerText") private Optional combinedAnswerText; @@ -165,7 +169,11 @@ public EditAnswerRequest( public EditAnswerRequest( long id) { - this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -289,9 +297,10 @@ public Optional combinedAnswerText() { return (Optional) combinedAnswerText; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque ID of the Answer. @@ -311,6 +320,7 @@ public EditAnswerRequest withDocId(String docId) { return this; } + /** * Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. */ @@ -326,6 +336,7 @@ public EditAnswerRequest withQuestion(String question) { return this; } + public EditAnswerRequest withQuestion(Optional question) { Utils.checkNotNull(question, "question"); this.question = question; @@ -341,6 +352,7 @@ public EditAnswerRequest withQuestionVariations(List questionVariations) return this; } + /** * Additional ways of phrasing this question. */ @@ -359,6 +371,7 @@ public EditAnswerRequest withBodyText(String bodyText) { return this; } + /** * The plain text answer to the question. */ @@ -380,6 +393,7 @@ public EditAnswerRequest withBoardId(long boardId) { return this; } + /** * The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted. * @@ -401,6 +415,7 @@ public EditAnswerRequest withAudienceFilters(List audienceFilters) return this; } + /** * Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. */ @@ -419,6 +434,7 @@ public EditAnswerRequest withAddedRoles(List addedRoles) return this; } + /** * A list of user roles for the answer added by the owner. */ @@ -437,6 +453,7 @@ public EditAnswerRequest withRemovedRoles(List removedRol return this; } + /** * A list of user roles for the answer removed by the owner. */ @@ -455,6 +472,7 @@ public EditAnswerRequest withRoles(List roles) { return this; } + /** * A list of roles for this answer explicitly granted by an owner, editor, or admin. */ @@ -470,6 +488,7 @@ public EditAnswerRequest withSourceDocumentSpec(DocumentSpecUnion sourceDocument return this; } + public EditAnswerRequest withSourceDocumentSpec(Optional sourceDocumentSpec) { Utils.checkNotNull(sourceDocumentSpec, "sourceDocumentSpec"); this.sourceDocumentSpec = sourceDocumentSpec; @@ -482,6 +501,7 @@ public EditAnswerRequest withSourceType(EditAnswerRequestSourceType sourceType) return this; } + public EditAnswerRequest withSourceType(Optional sourceType) { Utils.checkNotNull(sourceType, "sourceType"); this.sourceType = sourceType; @@ -497,6 +517,7 @@ public EditAnswerRequest withAddedCollections(List addedCollections) { return this; } + /** * IDs of Collections to which a document is added. */ @@ -515,6 +536,7 @@ public EditAnswerRequest withRemovedCollections(List removedCollections) { return this; } + /** * IDs of Collections from which a document is removed. */ @@ -530,13 +552,13 @@ public EditAnswerRequest withCombinedAnswerText(StructuredTextMutableProperties return this; } + public EditAnswerRequest withCombinedAnswerText(Optional combinedAnswerText) { Utils.checkNotNull(combinedAnswerText, "combinedAnswerText"); this.combinedAnswerText = combinedAnswerText; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -567,21 +589,11 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - docId, - question, - questionVariations, - bodyText, - boardId, - audienceFilters, - addedRoles, - removedRoles, - roles, - sourceDocumentSpec, - sourceType, - addedCollections, - removedCollections, - combinedAnswerText); + id, docId, question, + questionVariations, bodyText, boardId, + audienceFilters, addedRoles, removedRoles, + roles, sourceDocumentSpec, sourceType, + addedCollections, removedCollections, combinedAnswerText); } @Override @@ -603,44 +615,46 @@ public String toString() { "removedCollections", removedCollections, "combinedAnswerText", combinedAnswerText); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long id; - + private Optional docId = Optional.empty(); - + private Optional question = Optional.empty(); - + private Optional> questionVariations = Optional.empty(); - + private Optional bodyText = Optional.empty(); - + @Deprecated private Optional boardId = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private Optional sourceDocumentSpec = Optional.empty(); - + private Optional sourceType = Optional.empty(); - + private Optional> addedCollections = Optional.empty(); - + private Optional> removedCollections = Optional.empty(); - + private Optional combinedAnswerText = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque ID of the Answer. */ @@ -650,6 +664,7 @@ public Builder id(long id) { return this; } + /** * Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. */ @@ -668,6 +683,7 @@ public Builder docId(Optional docId) { return this; } + public Builder question(String question) { Utils.checkNotNull(question, "question"); this.question = Optional.ofNullable(question); @@ -680,6 +696,7 @@ public Builder question(Optional question) { return this; } + /** * Additional ways of phrasing this question. */ @@ -698,6 +715,7 @@ public Builder questionVariations(Optional> questionVaria return this; } + /** * The plain text answer to the question. */ @@ -716,6 +734,7 @@ public Builder bodyText(Optional bodyText) { return this; } + /** * The parent board ID of this Answer, or 0 if it's a floating Answer. Adding Answers to Answer Boards is no longer permitted. * @@ -740,6 +759,7 @@ public Builder boardId(Optional boardId) { return this; } + /** * Filters which restrict who should see the answer. Values are taken from the corresponding filters in people search. */ @@ -758,6 +778,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * A list of user roles for the answer added by the owner. */ @@ -776,6 +797,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of user roles for the answer removed by the owner. */ @@ -794,6 +816,7 @@ public Builder removedRoles(Optional> remo return this; } + /** * A list of roles for this answer explicitly granted by an owner, editor, or admin. */ @@ -812,6 +835,7 @@ public Builder roles(Optional> roles) { return this; } + public Builder sourceDocumentSpec(DocumentSpecUnion sourceDocumentSpec) { Utils.checkNotNull(sourceDocumentSpec, "sourceDocumentSpec"); this.sourceDocumentSpec = Optional.ofNullable(sourceDocumentSpec); @@ -824,6 +848,7 @@ public Builder sourceDocumentSpec(Optional sourceDo return this; } + public Builder sourceType(EditAnswerRequestSourceType sourceType) { Utils.checkNotNull(sourceType, "sourceType"); this.sourceType = Optional.ofNullable(sourceType); @@ -836,6 +861,7 @@ public Builder sourceType(Optional source return this; } + /** * IDs of Collections to which a document is added. */ @@ -854,6 +880,7 @@ public Builder addedCollections(Optional> addedCollections) return this; } + /** * IDs of Collections from which a document is removed. */ @@ -872,6 +899,7 @@ public Builder removedCollections(Optional> removedCollecti return this; } + public Builder combinedAnswerText(StructuredTextMutableProperties combinedAnswerText) { Utils.checkNotNull(combinedAnswerText, "combinedAnswerText"); this.combinedAnswerText = Optional.ofNullable(combinedAnswerText); @@ -883,24 +911,16 @@ public Builder combinedAnswerText(Optional name = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Long collectionId; - + private String itemId; - + private Builder() { // force use of static builder() method } + /** * The optional name of the Collection item. */ @@ -262,6 +265,7 @@ public Builder name(Optional name) { return this; } + /** * A helpful description of why this CollectionItem is in the Collection that it's in. */ @@ -280,6 +284,7 @@ public Builder description(Optional description) { return this; } + /** * The emoji icon for this CollectionItem. Only used for Text type items. */ @@ -298,6 +303,7 @@ public Builder icon(Optional icon) { return this; } + /** * The ID of the Collection to edit CollectionItems in. */ @@ -307,6 +313,7 @@ public Builder collectionId(long collectionId) { return this; } + /** * The ID of the CollectionItem to edit. */ @@ -315,14 +322,13 @@ public Builder itemId(String itemId) { this.itemId = itemId; return this; } - + public EditCollectionItemRequest build() { + return new EditCollectionItemRequest( - name, - description, - icon, - collectionId, - itemId); + name, description, icon, + collectionId, itemId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionItemResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionItemResponse.java index 3cf7226e..7e0c84b1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionItemResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionItemResponse.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class EditCollectionItemResponse { @JsonInclude(Include.NON_ABSENT) @@ -37,9 +38,10 @@ public Optional collection() { return (Optional) collection; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public EditCollectionItemResponse withCollection(Collection collection) { Utils.checkNotNull(collection, "collection"); @@ -47,13 +49,13 @@ public EditCollectionItemResponse withCollection(Collection collection) { return this; } + public EditCollectionItemResponse withCollection(Optional collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -78,15 +80,17 @@ public String toString() { return Utils.toString(EditCollectionItemResponse.class, "collection", collection); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional collection = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder collection(Collection collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -98,10 +102,12 @@ public Builder collection(Optional collection) { this.collection = collection; return this; } - + public EditCollectionItemResponse build() { + return new EditCollectionItemResponse( collection); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionRequest.java index 74ed8568..bc395fd2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionRequest.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class EditCollectionRequest { +public class EditCollectionRequest { /** * The unique name of the Collection. */ @@ -74,6 +74,7 @@ public class EditCollectionRequest { @JsonProperty("parentId") private Optional parentId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; @@ -131,7 +132,10 @@ public EditCollectionRequest( public EditCollectionRequest( String name, long id) { - this(name, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), id); + this(name, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), id); } /** @@ -223,9 +227,10 @@ public long id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique name of the Collection. @@ -245,6 +250,7 @@ public EditCollectionRequest withDescription(String description) { return this; } + /** * A brief summary of the Collection's contents. */ @@ -263,6 +269,7 @@ public EditCollectionRequest withAddedRoles(List addedRol return this; } + /** * A list of added user roles for the Collection. */ @@ -281,6 +288,7 @@ public EditCollectionRequest withRemovedRoles(List remove return this; } + /** * A list of removed user roles for the Collection. */ @@ -299,6 +307,7 @@ public EditCollectionRequest withAudienceFilters(List audienceFilte return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -317,6 +326,7 @@ public EditCollectionRequest withIcon(String icon) { return this; } + /** * The emoji icon of this Collection. */ @@ -335,6 +345,7 @@ public EditCollectionRequest withAdminLocked(boolean adminLocked) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -353,6 +364,7 @@ public EditCollectionRequest withParentId(long parentId) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -368,6 +380,7 @@ public EditCollectionRequest withThumbnail(Thumbnail thumbnail) { return this; } + public EditCollectionRequest withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -383,6 +396,7 @@ public EditCollectionRequest withAllowedDatasource(String allowedDatasource) { return this; } + /** * The datasource type this Collection can hold. */ @@ -401,7 +415,6 @@ public EditCollectionRequest withId(long id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -428,17 +441,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - id); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, id); } @Override @@ -456,35 +462,37 @@ public String toString() { "allowedDatasource", allowedDatasource, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private Optional description = Optional.empty(); - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Optional adminLocked = Optional.empty(); - + private Optional parentId = Optional.empty(); - + private Optional thumbnail = Optional.empty(); - + private Optional allowedDatasource = Optional.empty(); - + private Long id; - + private Builder() { // force use of static builder() method } + /** * The unique name of the Collection. */ @@ -494,6 +502,7 @@ public Builder name(String name) { return this; } + /** * A brief summary of the Collection's contents. */ @@ -512,6 +521,7 @@ public Builder description(Optional description) { return this; } + /** * A list of added user roles for the Collection. */ @@ -530,6 +540,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of removed user roles for the Collection. */ @@ -548,6 +559,7 @@ public Builder removedRoles(Optional> remo return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -566,6 +578,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The emoji icon of this Collection. */ @@ -584,6 +597,7 @@ public Builder icon(Optional icon) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -602,6 +616,7 @@ public Builder adminLocked(Optional adminLocked) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -620,6 +635,7 @@ public Builder parentId(Optional parentId) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -632,6 +648,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + /** * The datasource type this Collection can hold. */ @@ -650,6 +667,7 @@ public Builder allowedDatasource(Optional allowedDatasource) { return this; } + /** * The ID of the Collection to modify. */ @@ -658,20 +676,15 @@ public Builder id(long id) { this.id = id; return this; } - + public EditCollectionRequest build() { + return new EditCollectionRequest( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - id); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionResponse.java index 96faf77f..3fcad3a1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditCollectionResponse.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Optional; -public class EditCollectionResponse { +public class EditCollectionResponse { /** * The unique name of the Collection. */ @@ -74,6 +74,7 @@ public class EditCollectionResponse { @JsonProperty("parentId") private Optional parentId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; @@ -85,6 +86,7 @@ public class EditCollectionResponse { @JsonProperty("allowedDatasource") private Optional allowedDatasource; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; @@ -95,18 +97,22 @@ public class EditCollectionResponse { @JsonProperty("id") private long id; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createTime") private Optional createTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updateTime") private Optional updateTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("creator") private Optional creator; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedBy") private Optional updatedBy; @@ -132,6 +138,7 @@ public class EditCollectionResponse { @JsonProperty("items") private Optional> items; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("pinMetadata") private Optional pinMetadata; @@ -157,13 +164,16 @@ public class EditCollectionResponse { @JsonProperty("roles") private Optional> roles; + @JsonProperty("errorCode") private EditCollectionResponseErrorCode errorCode; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("collection") private Optional collection; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private Optional error; @@ -255,7 +265,15 @@ public EditCollectionResponse( String description, long id, EditCollectionResponseErrorCode errorCode) { - this(name, description, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), errorCode, Optional.empty(), Optional.empty()); + this(name, description, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), id, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), errorCode, + Optional.empty(), Optional.empty()); } /** @@ -450,9 +468,10 @@ public Optional error() { return (Optional) error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique name of the Collection. @@ -481,6 +500,7 @@ public EditCollectionResponse withAddedRoles(List addedRo return this; } + /** * A list of added user roles for the Collection. */ @@ -499,6 +519,7 @@ public EditCollectionResponse withRemovedRoles(List remov return this; } + /** * A list of removed user roles for the Collection. */ @@ -517,6 +538,7 @@ public EditCollectionResponse withAudienceFilters(List audienceFilt return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -535,6 +557,7 @@ public EditCollectionResponse withIcon(String icon) { return this; } + /** * The emoji icon of this Collection. */ @@ -553,6 +576,7 @@ public EditCollectionResponse withAdminLocked(boolean adminLocked) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -571,6 +595,7 @@ public EditCollectionResponse withParentId(long parentId) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -586,6 +611,7 @@ public EditCollectionResponse withThumbnail(Thumbnail thumbnail) { return this; } + public EditCollectionResponse withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -601,6 +627,7 @@ public EditCollectionResponse withAllowedDatasource(String allowedDatasource) { return this; } + /** * The datasource type this Collection can hold. */ @@ -616,6 +643,7 @@ public EditCollectionResponse withPermissions(ObjectPermissions permissions) { return this; } + public EditCollectionResponse withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -637,6 +665,7 @@ public EditCollectionResponse withCreateTime(OffsetDateTime createTime) { return this; } + public EditCollectionResponse withCreateTime(Optional createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = createTime; @@ -649,6 +678,7 @@ public EditCollectionResponse withUpdateTime(OffsetDateTime updateTime) { return this; } + public EditCollectionResponse withUpdateTime(Optional updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = updateTime; @@ -661,6 +691,7 @@ public EditCollectionResponse withCreator(Person creator) { return this; } + public EditCollectionResponse withCreator(Optional creator) { Utils.checkNotNull(creator, "creator"); this.creator = creator; @@ -673,6 +704,7 @@ public EditCollectionResponse withUpdatedBy(Person updatedBy) { return this; } + public EditCollectionResponse withUpdatedBy(Optional updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = updatedBy; @@ -688,6 +720,7 @@ public EditCollectionResponse withItemCount(long itemCount) { return this; } + /** * The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. */ @@ -706,6 +739,7 @@ public EditCollectionResponse withChildCount(long childCount) { return this; } + /** * The number of children Collections. Separated from the actual children so we can grab the count without children. */ @@ -724,6 +758,7 @@ public EditCollectionResponse withItems(List items) { return this; } + /** * The items in this Collection. */ @@ -739,6 +774,7 @@ public EditCollectionResponse withPinMetadata(CollectionPinnedMetadata pinMetada return this; } + public EditCollectionResponse withPinMetadata(Optional pinMetadata) { Utils.checkNotNull(pinMetadata, "pinMetadata"); this.pinMetadata = pinMetadata; @@ -754,6 +790,7 @@ public EditCollectionResponse withShortcuts(List shortcuts) { return this; } + /** * The names of the shortcuts (Go Links) that point to this Collection. */ @@ -772,6 +809,7 @@ public EditCollectionResponse withChildren(List children) { return this; } + /** * The children Collections of this Collection. */ @@ -790,6 +828,7 @@ public EditCollectionResponse withRoles(List roles) { return this; } + /** * A list of user roles for the Collection. */ @@ -811,6 +850,7 @@ public EditCollectionResponse withCollection(Collection collection) { return this; } + public EditCollectionResponse withCollection(Optional collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; @@ -823,13 +863,13 @@ public EditCollectionResponse withError(CollectionError2 error) { return this; } + public EditCollectionResponse withError(Optional error) { Utils.checkNotNull(error, "error"); this.error = error; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -871,32 +911,15 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - permissions, - id, - createTime, - updateTime, - creator, - updatedBy, - itemCount, - childCount, - items, - pinMetadata, - shortcuts, - children, - roles, - errorCode, - collection, - error); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, permissions, id, + createTime, updateTime, creator, + updatedBy, itemCount, childCount, + items, pinMetadata, shortcuts, + children, roles, errorCode, + collection, error); } @Override @@ -929,65 +952,67 @@ public String toString() { "collection", collection, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private String description; - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional icon = Optional.empty(); - + private Optional adminLocked = Optional.empty(); - + private Optional parentId = Optional.empty(); - + private Optional thumbnail = Optional.empty(); - + private Optional allowedDatasource = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Long id; - + private Optional createTime = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional creator = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional itemCount = Optional.empty(); - + private Optional childCount = Optional.empty(); - + private Optional> items = Optional.empty(); - + private Optional pinMetadata = Optional.empty(); - + private Optional> shortcuts = Optional.empty(); - + private Optional> children = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private EditCollectionResponseErrorCode errorCode; - + private Optional collection = Optional.empty(); - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The unique name of the Collection. */ @@ -997,6 +1022,7 @@ public Builder name(String name) { return this; } + /** * A brief summary of the Collection's contents. */ @@ -1006,6 +1032,7 @@ public Builder description(String description) { return this; } + /** * A list of added user roles for the Collection. */ @@ -1024,6 +1051,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of removed user roles for the Collection. */ @@ -1042,6 +1070,7 @@ public Builder removedRoles(Optional> remo return this; } + /** * Filters which restrict who should see this Collection. Values are taken from the corresponding filters in people search. */ @@ -1060,6 +1089,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The emoji icon of this Collection. */ @@ -1078,6 +1108,7 @@ public Builder icon(Optional icon) { return this; } + /** * Indicates whether edits are allowed for everyone or only admins. */ @@ -1096,6 +1127,7 @@ public Builder adminLocked(Optional adminLocked) { return this; } + /** * The parent of this Collection, or 0 if it's a top-level Collection. */ @@ -1114,6 +1146,7 @@ public Builder parentId(Optional parentId) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -1126,6 +1159,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + /** * The datasource type this Collection can hold. */ @@ -1144,6 +1178,7 @@ public Builder allowedDatasource(Optional allowedDatasource) { return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -1156,6 +1191,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * The unique ID of the Collection. */ @@ -1165,6 +1201,7 @@ public Builder id(long id) { return this; } + public Builder createTime(OffsetDateTime createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = Optional.ofNullable(createTime); @@ -1177,6 +1214,7 @@ public Builder createTime(Optional createTime) { return this; } + public Builder updateTime(OffsetDateTime updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = Optional.ofNullable(updateTime); @@ -1189,6 +1227,7 @@ public Builder updateTime(Optional updateTime) { return this; } + public Builder creator(Person creator) { Utils.checkNotNull(creator, "creator"); this.creator = Optional.ofNullable(creator); @@ -1201,6 +1240,7 @@ public Builder creator(Optional creator) { return this; } + public Builder updatedBy(Person updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = Optional.ofNullable(updatedBy); @@ -1213,6 +1253,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + /** * The number of items currently in the Collection. Separated from the actual items so we can grab the count without items. */ @@ -1231,6 +1272,7 @@ public Builder itemCount(Optional itemCount) { return this; } + /** * The number of children Collections. Separated from the actual children so we can grab the count without children. */ @@ -1249,6 +1291,7 @@ public Builder childCount(Optional childCount) { return this; } + /** * The items in this Collection. */ @@ -1267,6 +1310,7 @@ public Builder items(Optional> items) { return this; } + public Builder pinMetadata(CollectionPinnedMetadata pinMetadata) { Utils.checkNotNull(pinMetadata, "pinMetadata"); this.pinMetadata = Optional.ofNullable(pinMetadata); @@ -1279,6 +1323,7 @@ public Builder pinMetadata(Optional pinMetad return this; } + /** * The names of the shortcuts (Go Links) that point to this Collection. */ @@ -1297,6 +1342,7 @@ public Builder shortcuts(Optional> shortcuts) { return this; } + /** * The children Collections of this Collection. */ @@ -1315,6 +1361,7 @@ public Builder children(Optional> children) { return this; } + /** * A list of user roles for the Collection. */ @@ -1333,12 +1380,14 @@ public Builder roles(Optional> roles) { return this; } + public Builder errorCode(EditCollectionResponseErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); this.errorCode = errorCode; return this; } + public Builder collection(Collection collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -1351,6 +1400,7 @@ public Builder collection(Optional collection) { return this; } + public Builder error(CollectionError2 error) { Utils.checkNotNull(error, "error"); this.error = Optional.ofNullable(error); @@ -1362,35 +1412,20 @@ public Builder error(Optional error) { this.error = error; return this; } - + public EditCollectionResponse build() { + return new EditCollectionResponse( - name, - description, - addedRoles, - removedRoles, - audienceFilters, - icon, - adminLocked, - parentId, - thumbnail, - allowedDatasource, - permissions, - id, - createTime, - updateTime, - creator, - updatedBy, - itemCount, - childCount, - items, - pinMetadata, - shortcuts, - children, - roles, - errorCode, - collection, - error); + name, description, addedRoles, + removedRoles, audienceFilters, icon, + adminLocked, parentId, thumbnail, + allowedDatasource, permissions, id, + createTime, updateTime, creator, + updatedBy, itemCount, childCount, + items, pinMetadata, shortcuts, + children, roles, errorCode, + collection, error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditPinRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditPinRequest.java index 15f90c40..15b526c4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EditPinRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EditPinRequest.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class EditPinRequest { +public class EditPinRequest { /** * The query strings for which the pinned result will show. */ @@ -81,9 +81,10 @@ public Optional id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The query strings for which the pinned result will show. @@ -94,6 +95,7 @@ public EditPinRequest withQueries(List queries) { return this; } + /** * The query strings for which the pinned result will show. */ @@ -112,6 +114,7 @@ public EditPinRequest withAudienceFilters(List audienceFilters) { return this; } + /** * Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. */ @@ -130,6 +133,7 @@ public EditPinRequest withId(String id) { return this; } + /** * The opaque id of the pin to be edited. */ @@ -139,7 +143,6 @@ public EditPinRequest withId(Optional id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -158,9 +161,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - queries, - audienceFilters, - id); + queries, audienceFilters, id); } @Override @@ -170,19 +171,21 @@ public String toString() { "audienceFilters", audienceFilters, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> queries = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional id = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The query strings for which the pinned result will show. */ @@ -201,6 +204,7 @@ public Builder queries(Optional> queries) { return this; } + /** * Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. */ @@ -219,6 +223,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The opaque id of the pin to be edited. */ @@ -236,12 +241,12 @@ public Builder id(Optional id) { this.id = id; return this; } - + public EditPinRequest build() { + return new EditPinRequest( - queries, - audienceFilters, - id); + queries, audienceFilters, id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EmployeeInfoDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EmployeeInfoDefinition.java index f7844d92..cf0f54fc 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EmployeeInfoDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EmployeeInfoDefinition.java @@ -25,7 +25,6 @@ *

Describes employee info */ public class EmployeeInfoDefinition { - /** * The employee's email */ @@ -304,7 +303,15 @@ public EmployeeInfoDefinition( public EmployeeInfoDefinition( String email, String department) { - this(email, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), department, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(email, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), department, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -533,9 +540,10 @@ public Optional> additionalFields() { return (Optional>) additionalFields; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The employee's email @@ -555,6 +563,7 @@ public EmployeeInfoDefinition withFirstName(String firstName) { return this; } + /** * The first name of the employee. **Note**: The value cannot be empty */ @@ -573,6 +582,7 @@ public EmployeeInfoDefinition withLastName(String lastName) { return this; } + /** * The last name of the employee. **Note**: The value cannot be empty */ @@ -591,6 +601,7 @@ public EmployeeInfoDefinition withPreferredName(String preferredName) { return this; } + /** * The preferred name or nickname of the employee */ @@ -609,6 +620,7 @@ public EmployeeInfoDefinition withId(String id) { return this; } + /** * **[Advanced]** A unique universal internal identifier for the employee. This is solely used for understanding manager relationships along with `managerId`. */ @@ -627,6 +639,7 @@ public EmployeeInfoDefinition withPhoneNumber(String phoneNumber) { return this; } + /** * The employee's phone number. */ @@ -648,6 +661,7 @@ public EmployeeInfoDefinition withLocation(String location) { return this; } + /** * The employee's location (city/office name etc). * @@ -669,6 +683,7 @@ public EmployeeInfoDefinition withStructuredLocation(StructuredLocation structur return this; } + /** * Detailed location with information about country, state, city etc. */ @@ -687,6 +702,7 @@ public EmployeeInfoDefinition withTitle(String title) { return this; } + /** * The employee's role title. */ @@ -705,6 +721,7 @@ public EmployeeInfoDefinition withPhotoUrl(String photoUrl) { return this; } + /** * The employee's profile pic */ @@ -723,6 +740,7 @@ public EmployeeInfoDefinition withBusinessUnit(String businessUnit) { return this; } + /** * Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. */ @@ -750,6 +768,7 @@ public EmployeeInfoDefinition withDatasourceProfiles(List dat return this; } + /** * The datasource profiles of the employee, e.g. `Slack`,`Github`. */ @@ -768,6 +787,7 @@ public EmployeeInfoDefinition withTeams(List teams) { return this; } + /** * Info about the employee's team(s) */ @@ -786,6 +806,7 @@ public EmployeeInfoDefinition withStartDate(LocalDate startDate) { return this; } + /** * The date when the employee started */ @@ -804,6 +825,7 @@ public EmployeeInfoDefinition withEndDate(LocalDate endDate) { return this; } + /** * If a former employee, the last date of employment. */ @@ -822,6 +844,7 @@ public EmployeeInfoDefinition withBio(String bio) { return this; } + /** * Short biography or mission statement of the employee. */ @@ -840,6 +863,7 @@ public EmployeeInfoDefinition withPronoun(String pronoun) { return this; } + /** * She/her, He/his or other pronoun. */ @@ -858,6 +882,7 @@ public EmployeeInfoDefinition withAlsoKnownAs(List alsoKnownAs) { return this; } + /** * Other names associated with the employee. */ @@ -876,6 +901,7 @@ public EmployeeInfoDefinition withProfileUrl(String profileUrl) { return this; } + /** * Link to internal company person profile. */ @@ -894,6 +920,7 @@ public EmployeeInfoDefinition withSocialNetworks(List s return this; } + /** * List of social network profiles. */ @@ -912,6 +939,7 @@ public EmployeeInfoDefinition withManagerEmail(String managerEmail) { return this; } + /** * The email of the employee's manager */ @@ -930,6 +958,7 @@ public EmployeeInfoDefinition withManagerId(String managerId) { return this; } + /** * **[Advanced]** A unique universal internal identifier for the employee's manager. This is solely used in conjunction with `id`. */ @@ -948,6 +977,7 @@ public EmployeeInfoDefinition withType(String type) { return this; } + /** * The type of the employee, an enum of `FULL_TIME`, `CONTRACTOR`, `NON_EMPLOYEE` */ @@ -966,6 +996,7 @@ public EmployeeInfoDefinition withRelationships(List relatio return this; } + /** * List of unidirectional relationships with other employees. E.g. this employee (`A`) is a CHIEF_OF_STAFF to another employee (`B`); or this employee (`A`) is an EXECUTIVE_ASSISTANT of another employee (`C`). The mapping should be attached to `A`'s profile. */ @@ -984,6 +1015,7 @@ public EmployeeInfoDefinition withStatus(String status) { return this; } + /** * The status of the employee, an enum of `CURRENT`, `FUTURE`, `EX` */ @@ -1002,6 +1034,7 @@ public EmployeeInfoDefinition withAdditionalFields(List firstName = Optional.empty(); - + private Optional lastName = Optional.empty(); - + private Optional preferredName = Optional.empty(); - + private Optional id = Optional.empty(); - + private Optional phoneNumber = Optional.empty(); - + @Deprecated private Optional location = Optional.empty(); - + private Optional structuredLocation = Optional.empty(); - + private Optional title = Optional.empty(); - + private Optional photoUrl = Optional.empty(); - + private Optional businessUnit = Optional.empty(); - + private String department; - + private Optional> datasourceProfiles = Optional.empty(); - + private Optional> teams = Optional.empty(); - + private Optional startDate = Optional.empty(); - + private Optional endDate = Optional.empty(); - + private Optional bio = Optional.empty(); - + private Optional pronoun = Optional.empty(); - + private Optional> alsoKnownAs = Optional.empty(); - + private Optional profileUrl = Optional.empty(); - + private Optional> socialNetworks = Optional.empty(); - + private Optional managerEmail = Optional.empty(); - + private Optional managerId = Optional.empty(); - + private Optional type; - + private Optional> relationships = Optional.empty(); - + private Optional status; - + private Optional> additionalFields = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The employee's email */ @@ -1185,6 +1201,7 @@ public Builder email(String email) { return this; } + /** * The first name of the employee. **Note**: The value cannot be empty */ @@ -1203,6 +1220,7 @@ public Builder firstName(Optional firstName) { return this; } + /** * The last name of the employee. **Note**: The value cannot be empty */ @@ -1221,6 +1239,7 @@ public Builder lastName(Optional lastName) { return this; } + /** * The preferred name or nickname of the employee */ @@ -1239,6 +1258,7 @@ public Builder preferredName(Optional preferredName) { return this; } + /** * **[Advanced]** A unique universal internal identifier for the employee. This is solely used for understanding manager relationships along with `managerId`. */ @@ -1257,6 +1277,7 @@ public Builder id(Optional id) { return this; } + /** * The employee's phone number. */ @@ -1275,6 +1296,7 @@ public Builder phoneNumber(Optional phoneNumber) { return this; } + /** * The employee's location (city/office name etc). * @@ -1299,6 +1321,7 @@ public Builder location(Optional location) { return this; } + /** * Detailed location with information about country, state, city etc. */ @@ -1317,6 +1340,7 @@ public Builder structuredLocation(Optional structu return this; } + /** * The employee's role title. */ @@ -1335,6 +1359,7 @@ public Builder title(Optional title) { return this; } + /** * The employee's profile pic */ @@ -1353,6 +1378,7 @@ public Builder photoUrl(Optional photoUrl) { return this; } + /** * Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. */ @@ -1371,6 +1397,7 @@ public Builder businessUnit(Optional businessUnit) { return this; } + /** * An organizational unit where everyone has a similar task, e.g. `Engineering`. */ @@ -1380,6 +1407,7 @@ public Builder department(String department) { return this; } + /** * The datasource profiles of the employee, e.g. `Slack`,`Github`. */ @@ -1398,6 +1426,7 @@ public Builder datasourceProfiles(Optional> da return this; } + /** * Info about the employee's team(s) */ @@ -1416,6 +1445,7 @@ public Builder teams(Optional> teams) { return this; } + /** * The date when the employee started */ @@ -1434,6 +1464,7 @@ public Builder startDate(Optional startDate) { return this; } + /** * If a former employee, the last date of employment. */ @@ -1452,6 +1483,7 @@ public Builder endDate(Optional endDate) { return this; } + /** * Short biography or mission statement of the employee. */ @@ -1470,6 +1502,7 @@ public Builder bio(Optional bio) { return this; } + /** * She/her, He/his or other pronoun. */ @@ -1488,6 +1521,7 @@ public Builder pronoun(Optional pronoun) { return this; } + /** * Other names associated with the employee. */ @@ -1506,6 +1540,7 @@ public Builder alsoKnownAs(Optional> alsoKnownAs) { return this; } + /** * Link to internal company person profile. */ @@ -1524,6 +1559,7 @@ public Builder profileUrl(Optional profileUrl) { return this; } + /** * List of social network profiles. */ @@ -1542,6 +1578,7 @@ public Builder socialNetworks(Optional> return this; } + /** * The email of the employee's manager */ @@ -1560,6 +1597,7 @@ public Builder managerEmail(Optional managerEmail) { return this; } + /** * **[Advanced]** A unique universal internal identifier for the employee's manager. This is solely used in conjunction with `id`. */ @@ -1578,6 +1616,7 @@ public Builder managerId(Optional managerId) { return this; } + /** * The type of the employee, an enum of `FULL_TIME`, `CONTRACTOR`, `NON_EMPLOYEE` */ @@ -1596,6 +1635,7 @@ public Builder type(Optional type) { return this; } + /** * List of unidirectional relationships with other employees. E.g. this employee (`A`) is a CHIEF_OF_STAFF to another employee (`B`); or this employee (`A`) is an EXECUTIVE_ASSISTANT of another employee (`C`). The mapping should be attached to `A`'s profile. */ @@ -1614,6 +1654,7 @@ public Builder relationships(Optional> relati return this; } + /** * The status of the employee, an enum of `CURRENT`, `FUTURE`, `EX` */ @@ -1632,6 +1673,7 @@ public Builder status(Optional status) { return this; } + /** * List of additional fields with more information about the employee. */ @@ -1649,7 +1691,7 @@ public Builder additionalFields(Optional> _SINGLETON_VALUE_Type = new LazySingletonValue<>( "type", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EmployeeTeamInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EmployeeTeamInfo.java index 102d14a6..6f104b7a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EmployeeTeamInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EmployeeTeamInfo.java @@ -19,7 +19,6 @@ *

Information about which team an employee belongs to */ public class EmployeeTeamInfo { - /** * unique identifier for this team */ @@ -82,9 +81,10 @@ public Optional url() { return url; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * unique identifier for this team @@ -95,6 +95,7 @@ public EmployeeTeamInfo withId(String id) { return this; } + /** * unique identifier for this team */ @@ -113,6 +114,7 @@ public EmployeeTeamInfo withName(String name) { return this; } + /** * Team name */ @@ -131,6 +133,7 @@ public EmployeeTeamInfo withUrl(String url) { return this; } + /** * Link to internal company team page */ @@ -140,7 +143,6 @@ public EmployeeTeamInfo withUrl(Optional url) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -159,9 +161,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - name, - url); + id, name, url); } @Override @@ -171,19 +171,21 @@ public String toString() { "name", name, "url", url); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional name = Optional.empty(); - + private Optional url = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * unique identifier for this team */ @@ -202,6 +204,7 @@ public Builder id(Optional id) { return this; } + /** * Team name */ @@ -220,6 +223,7 @@ public Builder name(Optional name) { return this; } + /** * Link to internal company team page */ @@ -237,12 +241,12 @@ public Builder url(Optional url) { this.url = url; return this; } - + public EmployeeTeamInfo build() { + return new EmployeeTeamInfo( - id, - name, - url); + id, name, url); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EntityRelationship.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EntityRelationship.java index a2a469bc..ec7e4785 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EntityRelationship.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EntityRelationship.java @@ -16,7 +16,6 @@ *

Describes a relationship edge between a source and destination entity */ public class EntityRelationship { - /** * The title or type of relationship. Currently an enum of `CHIEF_OF_STAFF`, `EXECUTIVE_ASSISTANT` */ @@ -55,9 +54,10 @@ public String email() { return email; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The title or type of relationship. Currently an enum of `CHIEF_OF_STAFF`, `EXECUTIVE_ASSISTANT` @@ -77,7 +77,6 @@ public EntityRelationship withEmail(String email) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -95,8 +94,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - email); + name, email); } @Override @@ -105,17 +103,19 @@ public String toString() { "name", name, "email", email); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private String email; - + private Builder() { // force use of static builder() method } + /** * The title or type of relationship. Currently an enum of `CHIEF_OF_STAFF`, `EXECUTIVE_ASSISTANT` */ @@ -125,6 +125,7 @@ public Builder name(String name) { return this; } + /** * Email of the person with whom the relationship exists. Per the example above, either `B` or `C`'s email depending on the relationship. */ @@ -133,11 +134,12 @@ public Builder email(String email) { this.email = email; return this; } - + public EntityRelationship build() { + return new EntityRelationship( - name, - email); + name, email); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Error.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Error.java index 5465bd1e..7dbbef82 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Error.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Error.java @@ -13,6 +13,7 @@ import java.lang.String; import java.util.Optional; + public class Error { @JsonInclude(Include.NON_ABSENT) @@ -35,9 +36,10 @@ public Optional message() { return message; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public Error withMessage(String message) { Utils.checkNotNull(message, "message"); @@ -45,13 +47,13 @@ public Error withMessage(String message) { return this; } + public Error withMessage(Optional message) { Utils.checkNotNull(message, "message"); this.message = message; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -76,15 +78,17 @@ public String toString() { return Utils.toString(Error.class, "message", message); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional message = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder message(String message) { Utils.checkNotNull(message, "message"); this.message = Optional.ofNullable(message); @@ -96,10 +100,12 @@ public Builder message(Optional message) { this.message = message; return this; } - + public Error build() { + return new Error( message); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ErrorMessage.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ErrorMessage.java index e87fb682..9fd362d3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ErrorMessage.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ErrorMessage.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class ErrorMessage { +public class ErrorMessage { /** * The datasource this message relates to. */ @@ -22,6 +22,7 @@ public class ErrorMessage { @JsonProperty("source") private Optional source; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("errorMessage") private Optional errorMessage; @@ -53,9 +54,10 @@ public Optional errorMessage() { return errorMessage; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The datasource this message relates to. @@ -66,6 +68,7 @@ public ErrorMessage withSource(String source) { return this; } + /** * The datasource this message relates to. */ @@ -81,13 +84,13 @@ public ErrorMessage withErrorMessage(String errorMessage) { return this; } + public ErrorMessage withErrorMessage(Optional errorMessage) { Utils.checkNotNull(errorMessage, "errorMessage"); this.errorMessage = errorMessage; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -105,8 +108,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - source, - errorMessage); + source, errorMessage); } @Override @@ -115,17 +117,19 @@ public String toString() { "source", source, "errorMessage", errorMessage); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional source = Optional.empty(); - + private Optional errorMessage = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The datasource this message relates to. */ @@ -144,6 +148,7 @@ public Builder source(Optional source) { return this; } + public Builder errorMessage(String errorMessage) { Utils.checkNotNull(errorMessage, "errorMessage"); this.errorMessage = Optional.ofNullable(errorMessage); @@ -155,11 +160,12 @@ public Builder errorMessage(Optional errorMessage) { this.errorMessage = errorMessage; return this; } - + public ErrorMessage build() { + return new ErrorMessage( - source, - errorMessage); + source, errorMessage); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/EventClassification.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/EventClassification.java index 0deeb4c0..b26c72fa 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/EventClassification.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/EventClassification.java @@ -21,7 +21,6 @@ *

A generated classification of a given event. */ public class EventClassification { - /** * The name for a generated classification of an event. */ @@ -29,6 +28,7 @@ public class EventClassification { @JsonProperty("name") private Optional name; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("strategies") private Optional> strategies; @@ -62,9 +62,10 @@ public Optional> strategies() { return (Optional>) strategies; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The name for a generated classification of an event. @@ -75,6 +76,7 @@ public EventClassification withName(EventClassificationName name) { return this; } + /** * The name for a generated classification of an event. */ @@ -90,13 +92,13 @@ public EventClassification withStrategies(List strategies) { return this; } + public EventClassification withStrategies(Optional> strategies) { Utils.checkNotNull(strategies, "strategies"); this.strategies = strategies; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -114,8 +116,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - strategies); + name, strategies); } @Override @@ -124,17 +125,19 @@ public String toString() { "name", name, "strategies", strategies); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional> strategies = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The name for a generated classification of an event. */ @@ -153,6 +156,7 @@ public Builder name(Optional name) { return this; } + public Builder strategies(List strategies) { Utils.checkNotNull(strategies, "strategies"); this.strategies = Optional.ofNullable(strategies); @@ -164,11 +168,12 @@ public Builder strategies(Optional> strategies this.strategies = strategies; return this; } - + public EventClassification build() { + return new EventClassification( - name, - strategies); + name, strategies); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ExternalSharingOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ExternalSharingOptions.java index 4115ba26..35181cd7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ExternalSharingOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ExternalSharingOptions.java @@ -27,7 +27,6 @@ */ @Deprecated public class ExternalSharingOptions { - /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -88,6 +87,7 @@ public class ExternalSharingOptions { @JsonProperty("userIds") private Optional> userIds; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("domainAccessEnabled") private Optional domainAccessEnabled; @@ -124,7 +124,9 @@ public ExternalSharingOptions( } public ExternalSharingOptions() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -201,9 +203,10 @@ public Optional domainAccessEnabled() { return domainAccessEnabled; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * @@ -216,6 +219,7 @@ public ExternalSharingOptions withEnabled(boolean enabled) { return this; } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -236,6 +240,7 @@ public ExternalSharingOptions withThreshold(long threshold) { return this; } + /** * The minimum number of users the document is shared with. */ @@ -254,6 +259,7 @@ public ExternalSharingOptions withThresholdEnabled(boolean thresholdEnabled) { return this; } + /** * Documents will be filtered based on how many people have access to it. */ @@ -274,6 +280,7 @@ public ExternalSharingOptions withAnyoneWithLinkEnabled(boolean anyoneWithLinkEn return this; } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -294,6 +301,7 @@ public ExternalSharingOptions withAnyoneInternalEnabled(boolean anyoneInternalEn return this; } + /** * Only users within the organization can access the document. */ @@ -312,6 +320,7 @@ public ExternalSharingOptions withAnonymousAccessEnabled(boolean anonymousAccess return this; } + /** * Anyone on the internet can access the document. */ @@ -330,6 +339,7 @@ public ExternalSharingOptions withUserAccessEnabled(boolean userAccessEnabled) { return this; } + /** * Enable user access check */ @@ -348,6 +358,7 @@ public ExternalSharingOptions withUserIds(List userIds) { return this; } + /** * Any one of the specified users can access the document. */ @@ -363,13 +374,13 @@ public ExternalSharingOptions withDomainAccessEnabled(boolean domainAccessEnable return this; } + public ExternalSharingOptions withDomainAccessEnabled(Optional domainAccessEnabled) { Utils.checkNotNull(domainAccessEnabled, "domainAccessEnabled"); this.domainAccessEnabled = domainAccessEnabled; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -394,15 +405,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - enabled, - threshold, - thresholdEnabled, - anyoneWithLinkEnabled, - anyoneInternalEnabled, - anonymousAccessEnabled, - userAccessEnabled, - userIds, - domainAccessEnabled); + enabled, threshold, thresholdEnabled, + anyoneWithLinkEnabled, anyoneInternalEnabled, anonymousAccessEnabled, + userAccessEnabled, userIds, domainAccessEnabled); } @Override @@ -418,33 +423,35 @@ public String toString() { "userIds", userIds, "domainAccessEnabled", domainAccessEnabled); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + @Deprecated private Optional enabled = Optional.empty(); - + private Optional threshold = Optional.empty(); - + private Optional thresholdEnabled = Optional.empty(); - + @Deprecated private Optional anyoneWithLinkEnabled = Optional.empty(); - + private Optional anyoneInternalEnabled = Optional.empty(); - + private Optional anonymousAccessEnabled = Optional.empty(); - + private Optional userAccessEnabled = Optional.empty(); - + private Optional> userIds = Optional.empty(); - + private Optional domainAccessEnabled = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -467,6 +474,7 @@ public Builder enabled(Optional enabled) { return this; } + /** * The minimum number of users the document is shared with. */ @@ -485,6 +493,7 @@ public Builder threshold(Optional threshold) { return this; } + /** * Documents will be filtered based on how many people have access to it. */ @@ -503,6 +512,7 @@ public Builder thresholdEnabled(Optional thresholdEnabled) { return this; } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -525,6 +535,7 @@ public Builder anyoneWithLinkEnabled(Optional anyoneWithLinkEnabled) { return this; } + /** * Only users within the organization can access the document. */ @@ -543,6 +554,7 @@ public Builder anyoneInternalEnabled(Optional anyoneInternalEnabled) { return this; } + /** * Anyone on the internet can access the document. */ @@ -561,6 +573,7 @@ public Builder anonymousAccessEnabled(Optional anonymousAccessEnabled) return this; } + /** * Enable user access check */ @@ -579,6 +592,7 @@ public Builder userAccessEnabled(Optional userAccessEnabled) { return this; } + /** * Any one of the specified users can access the document. */ @@ -597,6 +611,7 @@ public Builder userIds(Optional> userIds) { return this; } + public Builder domainAccessEnabled(boolean domainAccessEnabled) { Utils.checkNotNull(domainAccessEnabled, "domainAccessEnabled"); this.domainAccessEnabled = Optional.ofNullable(domainAccessEnabled); @@ -608,18 +623,14 @@ public Builder domainAccessEnabled(Optional domainAccessEnabled) { this.domainAccessEnabled = domainAccessEnabled; return this; } - + public ExternalSharingOptions build() { + return new ExternalSharingOptions( - enabled, - threshold, - thresholdEnabled, - anyoneWithLinkEnabled, - anyoneInternalEnabled, - anonymousAccessEnabled, - userAccessEnabled, - userIds, - domainAccessEnabled); + enabled, threshold, thresholdEnabled, + anyoneWithLinkEnabled, anyoneInternalEnabled, anonymousAccessEnabled, + userAccessEnabled, userIds, domainAccessEnabled); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ExternalShortcut.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ExternalShortcut.java index ffb3164c..5a87ef0c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ExternalShortcut.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ExternalShortcut.java @@ -15,8 +15,8 @@ import java.lang.String; import java.util.Optional; -public class ExternalShortcut { +public class ExternalShortcut { /** * link text following the viewPrefix as entered by the user. For example, if the view prefix is `go/` and the shortened URL is `go/abc`, then `abc` is the inputAlias. */ @@ -132,7 +132,10 @@ public ExternalShortcut( String destinationUrl, String createdBy, String intermediateUrl) { - this(inputAlias, Optional.empty(), destinationUrl, createdBy, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), intermediateUrl, Optional.empty(), Optional.empty()); + this(inputAlias, Optional.empty(), destinationUrl, + createdBy, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), intermediateUrl, + Optional.empty(), Optional.empty()); } /** @@ -223,9 +226,10 @@ public Optional editUrl() { return editUrl; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * link text following the viewPrefix as entered by the user. For example, if the view prefix is `go/` and the shortened URL is `go/abc`, then `abc` is the inputAlias. @@ -245,6 +249,7 @@ public ExternalShortcut withDescription(String description) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -281,6 +286,7 @@ public ExternalShortcut withCreateTime(long createTime) { return this; } + /** * The time the shortcut was created in epoch seconds. */ @@ -299,6 +305,7 @@ public ExternalShortcut withUpdatedBy(String updatedBy) { return this; } + /** * Email of the user who last updated this shortcut. */ @@ -317,6 +324,7 @@ public ExternalShortcut withUpdateTime(long updateTime) { return this; } + /** * The time the shortcut was updated in epoch seconds. */ @@ -335,6 +343,7 @@ public ExternalShortcut withTitle(String title) { return this; } + /** * Title of the golink */ @@ -362,6 +371,7 @@ public ExternalShortcut withDecayedVisitScore(double decayedVisitScore) { return this; } + /** * decayed visits score for ranking */ @@ -380,6 +390,7 @@ public ExternalShortcut withEditUrl(String editUrl) { return this; } + /** * The URL using which the user can access the edit page of the shortcut. */ @@ -389,7 +400,6 @@ public ExternalShortcut withEditUrl(Optional editUrl) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -416,17 +426,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - inputAlias, - description, - destinationUrl, - createdBy, - createTime, - updatedBy, - updateTime, - title, - intermediateUrl, - decayedVisitScore, - editUrl); + inputAlias, description, destinationUrl, + createdBy, createTime, updatedBy, + updateTime, title, intermediateUrl, + decayedVisitScore, editUrl); } @Override @@ -444,35 +447,37 @@ public String toString() { "decayedVisitScore", decayedVisitScore, "editUrl", editUrl); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String inputAlias; - + private Optional description = Optional.empty(); - + private String destinationUrl; - + private String createdBy; - + private Optional createTime = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional title = Optional.empty(); - + private String intermediateUrl; - + private Optional decayedVisitScore = Optional.empty(); - + private Optional editUrl = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * link text following the viewPrefix as entered by the user. For example, if the view prefix is `go/` and the shortened URL is `go/abc`, then `abc` is the inputAlias. */ @@ -482,6 +487,7 @@ public Builder inputAlias(String inputAlias) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -500,6 +506,7 @@ public Builder description(Optional description) { return this; } + /** * destination URL for the shortcut. */ @@ -509,6 +516,7 @@ public Builder destinationUrl(String destinationUrl) { return this; } + /** * Email of the user who created this shortcut. */ @@ -518,6 +526,7 @@ public Builder createdBy(String createdBy) { return this; } + /** * The time the shortcut was created in epoch seconds. */ @@ -536,6 +545,7 @@ public Builder createTime(Optional createTime) { return this; } + /** * Email of the user who last updated this shortcut. */ @@ -554,6 +564,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + /** * The time the shortcut was updated in epoch seconds. */ @@ -572,6 +583,7 @@ public Builder updateTime(Optional updateTime) { return this; } + /** * Title of the golink */ @@ -590,6 +602,7 @@ public Builder title(Optional title) { return this; } + /** * The URL from which the user is then redirected to the destination URL. */ @@ -599,6 +612,7 @@ public Builder intermediateUrl(String intermediateUrl) { return this; } + /** * decayed visits score for ranking */ @@ -617,6 +631,7 @@ public Builder decayedVisitScore(Optional decayedVisitScore) { return this; } + /** * The URL using which the user can access the edit page of the shortcut. */ @@ -634,20 +649,15 @@ public Builder editUrl(Optional editUrl) { this.editUrl = editUrl; return this; } - + public ExternalShortcut build() { + return new ExternalShortcut( - inputAlias, - description, - destinationUrl, - createdBy, - createTime, - updatedBy, - updateTime, - title, - intermediateUrl, - decayedVisitScore, - editUrl); + inputAlias, description, destinationUrl, + createdBy, createTime, updatedBy, + updateTime, title, intermediateUrl, + decayedVisitScore, editUrl); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ExtractedQnA.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ExtractedQnA.java index f7e9388a..dfc1ae64 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ExtractedQnA.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ExtractedQnA.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class ExtractedQnA { +public class ExtractedQnA { /** * Heading text that was matched to produce this result. */ @@ -30,6 +30,7 @@ public class ExtractedQnA { @JsonProperty("question") private Optional question; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("questionResult") private Optional questionResult; @@ -73,9 +74,10 @@ public Optional questionResult() { return (Optional) questionResult; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Heading text that was matched to produce this result. @@ -86,6 +88,7 @@ public ExtractedQnA withHeading(String heading) { return this; } + /** * Heading text that was matched to produce this result. */ @@ -104,6 +107,7 @@ public ExtractedQnA withQuestion(String question) { return this; } + /** * Question text that was matched to produce this result. */ @@ -119,13 +123,13 @@ public ExtractedQnA withQuestionResult(SearchResult questionResult) { return this; } + public ExtractedQnA withQuestionResult(Optional questionResult) { Utils.checkNotNull(questionResult, "questionResult"); this.questionResult = questionResult; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -144,9 +148,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - heading, - question, - questionResult); + heading, question, questionResult); } @Override @@ -156,19 +158,21 @@ public String toString() { "question", question, "questionResult", questionResult); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional heading = Optional.empty(); - + private Optional question = Optional.empty(); - + private Optional questionResult = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Heading text that was matched to produce this result. */ @@ -187,6 +191,7 @@ public Builder heading(Optional heading) { return this; } + /** * Question text that was matched to produce this result. */ @@ -205,6 +210,7 @@ public Builder question(Optional question) { return this; } + public Builder questionResult(SearchResult questionResult) { Utils.checkNotNull(questionResult, "questionResult"); this.questionResult = Optional.ofNullable(questionResult); @@ -216,12 +222,12 @@ public Builder questionResult(Optional questionResult) { this.questionResult = questionResult; return this; } - + public ExtractedQnA build() { + return new ExtractedQnA( - heading, - question, - questionResult); + heading, question, questionResult); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetBucket.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetBucket.java index 5ab11332..4a931b1f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetBucket.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetBucket.java @@ -15,8 +15,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class FacetBucket { +public class FacetBucket { /** * Estimated number of results in this facet. */ @@ -38,6 +38,7 @@ public class FacetBucket { @JsonProperty("percentage") private Optional percentage; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("value") private Optional value; @@ -59,7 +60,8 @@ public FacetBucket( } public FacetBucket() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -92,9 +94,10 @@ public Optional value() { return (Optional) value; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Estimated number of results in this facet. @@ -105,6 +108,7 @@ public FacetBucket withCount(long count) { return this; } + /** * Estimated number of results in this facet. */ @@ -123,6 +127,7 @@ public FacetBucket withDatasource(String datasource) { return this; } + /** * The datasource the value belongs to. This will be used by the all tab to show types across all datasources. */ @@ -141,6 +146,7 @@ public FacetBucket withPercentage(long percentage) { return this; } + /** * Estimated percentage of results in this facet. */ @@ -156,13 +162,13 @@ public FacetBucket withValue(FacetValue value) { return this; } + public FacetBucket withValue(Optional value) { Utils.checkNotNull(value, "value"); this.value = value; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -182,9 +188,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - count, - datasource, - percentage, + count, datasource, percentage, value); } @@ -196,21 +200,23 @@ public String toString() { "percentage", percentage, "value", value); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional count = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional percentage = Optional.empty(); - + private Optional value = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Estimated number of results in this facet. */ @@ -229,6 +235,7 @@ public Builder count(Optional count) { return this; } + /** * The datasource the value belongs to. This will be used by the all tab to show types across all datasources. */ @@ -247,6 +254,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * Estimated percentage of results in this facet. */ @@ -265,6 +273,7 @@ public Builder percentage(Optional percentage) { return this; } + public Builder value(FacetValue value) { Utils.checkNotNull(value, "value"); this.value = Optional.ofNullable(value); @@ -276,13 +285,13 @@ public Builder value(Optional value) { this.value = value; return this; } - + public FacetBucket build() { + return new FacetBucket( - count, - datasource, - percentage, + count, datasource, percentage, value); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetBucketFilter.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetBucketFilter.java index a699c678..c89b0d71 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetBucketFilter.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetBucketFilter.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class FacetBucketFilter { +public class FacetBucketFilter { /** * The facet whose buckets should be filtered. */ @@ -59,9 +59,10 @@ public Optional prefix() { return prefix; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The facet whose buckets should be filtered. @@ -72,6 +73,7 @@ public FacetBucketFilter withFacet(String facet) { return this; } + /** * The facet whose buckets should be filtered. */ @@ -90,6 +92,7 @@ public FacetBucketFilter withPrefix(String prefix) { return this; } + /** * The per-term prefix that facet buckets should be filtered on. */ @@ -99,7 +102,6 @@ public FacetBucketFilter withPrefix(Optional prefix) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,8 +119,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - facet, - prefix); + facet, prefix); } @Override @@ -127,17 +128,19 @@ public String toString() { "facet", facet, "prefix", prefix); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional facet = Optional.empty(); - + private Optional prefix = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The facet whose buckets should be filtered. */ @@ -156,6 +159,7 @@ public Builder facet(Optional facet) { return this; } + /** * The per-term prefix that facet buckets should be filtered on. */ @@ -173,11 +177,12 @@ public Builder prefix(Optional prefix) { this.prefix = prefix; return this; } - + public FacetBucketFilter build() { + return new FacetBucketFilter( - facet, - prefix); + facet, prefix); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilter.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilter.java index 5d44637f..5e93eba7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilter.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilter.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class FacetFilter { @JsonInclude(Include.NON_ABSENT) @@ -74,9 +75,10 @@ public Optional groupName() { return groupName; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public FacetFilter withFieldName(String fieldName) { Utils.checkNotNull(fieldName, "fieldName"); @@ -84,6 +86,7 @@ public FacetFilter withFieldName(String fieldName) { return this; } + public FacetFilter withFieldName(Optional fieldName) { Utils.checkNotNull(fieldName, "fieldName"); this.fieldName = fieldName; @@ -99,6 +102,7 @@ public FacetFilter withValues(List values) { return this; } + /** * Within a single FacetFilter, the values are to be treated like an OR. For example, fieldName type with values [EQUALS Presentation, EQUALS Spreadsheet] means we want to show a document if it's a Presentation OR a Spreadsheet. */ @@ -117,6 +121,7 @@ public FacetFilter withGroupName(String groupName) { return this; } + /** * Indicates the value of a facet, if any, that the given facet is grouped under. This is only used for nested facets, for example, fieldName could be owner and groupName would be Spreadsheet if showing all owners for spreadsheets as a nested facet. */ @@ -126,7 +131,6 @@ public FacetFilter withGroupName(Optional groupName) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -145,9 +149,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - fieldName, - values, - groupName); + fieldName, values, groupName); } @Override @@ -157,19 +159,21 @@ public String toString() { "values", values, "groupName", groupName); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional fieldName = Optional.empty(); - + private Optional> values = Optional.empty(); - + private Optional groupName = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder fieldName(String fieldName) { Utils.checkNotNull(fieldName, "fieldName"); this.fieldName = Optional.ofNullable(fieldName); @@ -182,6 +186,7 @@ public Builder fieldName(Optional fieldName) { return this; } + /** * Within a single FacetFilter, the values are to be treated like an OR. For example, fieldName type with values [EQUALS Presentation, EQUALS Spreadsheet] means we want to show a document if it's a Presentation OR a Spreadsheet. */ @@ -200,6 +205,7 @@ public Builder values(Optional> values) { return this; } + /** * Indicates the value of a facet, if any, that the given facet is grouped under. This is only used for nested facets, for example, fieldName could be owner and groupName would be Spreadsheet if showing all owners for spreadsheets as a nested facet. */ @@ -217,12 +223,12 @@ public Builder groupName(Optional groupName) { this.groupName = groupName; return this; } - + public FacetFilter build() { + return new FacetFilter( - fieldName, - values, - groupName); + fieldName, values, groupName); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilterSet.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilterSet.java index 01352e8b..1bed7a73 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilterSet.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilterSet.java @@ -43,9 +43,10 @@ public Optional> filters() { return (Optional>) filters; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public FacetFilterSet withFilters(List filters) { Utils.checkNotNull(filters, "filters"); @@ -53,13 +54,13 @@ public FacetFilterSet withFilters(List filters) { return this; } + public FacetFilterSet withFilters(Optional> filters) { Utils.checkNotNull(filters, "filters"); this.filters = filters; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -84,15 +85,17 @@ public String toString() { return Utils.toString(FacetFilterSet.class, "filters", filters); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> filters = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder filters(List filters) { Utils.checkNotNull(filters, "filters"); this.filters = Optional.ofNullable(filters); @@ -104,10 +107,12 @@ public Builder filters(Optional> filters) { this.filters = filters; return this; } - + public FacetFilterSet build() { + return new FacetFilterSet( filters); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilterValue.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilterValue.java index 2e5f4cdc..f26681a2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilterValue.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetFilterValue.java @@ -16,12 +16,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class FacetFilterValue { @JsonInclude(Include.NON_ABSENT) @JsonProperty("value") private Optional value; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("relationType") private Optional relationType; @@ -75,9 +77,10 @@ public Optional isNegated() { return isNegated; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public FacetFilterValue withValue(String value) { Utils.checkNotNull(value, "value"); @@ -85,6 +88,7 @@ public FacetFilterValue withValue(String value) { return this; } + public FacetFilterValue withValue(Optional value) { Utils.checkNotNull(value, "value"); this.value = value; @@ -97,6 +101,7 @@ public FacetFilterValue withRelationType(RelationType relationType) { return this; } + public FacetFilterValue withRelationType(Optional relationType) { Utils.checkNotNull(relationType, "relationType"); this.relationType = relationType; @@ -115,6 +120,7 @@ public FacetFilterValue withIsNegated(boolean isNegated) { return this; } + /** * DEPRECATED - please use relationType instead * @@ -127,7 +133,6 @@ public FacetFilterValue withIsNegated(Optional isNegated) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -146,9 +151,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - value, - relationType, - isNegated); + value, relationType, isNegated); } @Override @@ -158,20 +161,22 @@ public String toString() { "relationType", relationType, "isNegated", isNegated); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional value = Optional.empty(); - + private Optional relationType = Optional.empty(); - + @Deprecated private Optional isNegated = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder value(String value) { Utils.checkNotNull(value, "value"); this.value = Optional.ofNullable(value); @@ -184,6 +189,7 @@ public Builder value(Optional value) { return this; } + public Builder relationType(RelationType relationType) { Utils.checkNotNull(relationType, "relationType"); this.relationType = Optional.ofNullable(relationType); @@ -196,6 +202,7 @@ public Builder relationType(Optional relationType) { return this; } + /** * DEPRECATED - please use relationType instead * @@ -219,12 +226,12 @@ public Builder isNegated(Optional isNegated) { this.isNegated = isNegated; return this; } - + public FacetFilterValue build() { + return new FacetFilterValue( - value, - relationType, - isNegated); + value, relationType, isNegated); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetResult.java index 4f9539d5..356aac0b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetResult.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class FacetResult { +public class FacetResult { /** * The source of this facet (e.g. container_name, type, last_updated_at). */ @@ -73,7 +73,8 @@ public FacetResult( } public FacetResult() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -117,9 +118,10 @@ public Optional groupName() { return groupName; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The source of this facet (e.g. container_name, type, last_updated_at). @@ -130,6 +132,7 @@ public FacetResult withSourceName(String sourceName) { return this; } + /** * The source of this facet (e.g. container_name, type, last_updated_at). */ @@ -148,6 +151,7 @@ public FacetResult withOperatorName(String operatorName) { return this; } + /** * How to display this facet. Currently supportes 'SelectSingle' and 'SelectMultiple'. */ @@ -166,6 +170,7 @@ public FacetResult withBuckets(List buckets) { return this; } + /** * A list of unique buckets that exist within this result set. */ @@ -184,6 +189,7 @@ public FacetResult withHasMoreBuckets(boolean hasMoreBuckets) { return this; } + /** * Returns true if more buckets exist than those returned. Additional buckets can be retrieve by requesting again with a higher facetBucketSize. */ @@ -202,6 +208,7 @@ public FacetResult withGroupName(String groupName) { return this; } + /** * For most facets this will be the empty string, meaning the facet is high-level and applies to all documents for the datasource. When non-empty, this is used to group facets together (i.e. group facets for each doctype for a certain datasource) */ @@ -211,7 +218,6 @@ public FacetResult withGroupName(Optional groupName) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -232,11 +238,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - sourceName, - operatorName, - buckets, - hasMoreBuckets, - groupName); + sourceName, operatorName, buckets, + hasMoreBuckets, groupName); } @Override @@ -248,23 +251,25 @@ public String toString() { "hasMoreBuckets", hasMoreBuckets, "groupName", groupName); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional sourceName = Optional.empty(); - + private Optional operatorName = Optional.empty(); - + private Optional> buckets = Optional.empty(); - + private Optional hasMoreBuckets = Optional.empty(); - + private Optional groupName = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The source of this facet (e.g. container_name, type, last_updated_at). */ @@ -283,6 +288,7 @@ public Builder sourceName(Optional sourceName) { return this; } + /** * How to display this facet. Currently supportes 'SelectSingle' and 'SelectMultiple'. */ @@ -301,6 +307,7 @@ public Builder operatorName(Optional operatorName) { return this; } + /** * A list of unique buckets that exist within this result set. */ @@ -319,6 +326,7 @@ public Builder buckets(Optional> buckets) { return this; } + /** * Returns true if more buckets exist than those returned. Additional buckets can be retrieve by requesting again with a higher facetBucketSize. */ @@ -337,6 +345,7 @@ public Builder hasMoreBuckets(Optional hasMoreBuckets) { return this; } + /** * For most facets this will be the empty string, meaning the facet is high-level and applies to all documents for the datasource. When non-empty, this is used to group facets together (i.e. group facets for each doctype for a certain datasource) */ @@ -354,14 +363,13 @@ public Builder groupName(Optional groupName) { this.groupName = groupName; return this; } - + public FacetResult build() { + return new FacetResult( - sourceName, - operatorName, - buckets, - hasMoreBuckets, - groupName); + sourceName, operatorName, buckets, + hasMoreBuckets, groupName); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetValue.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetValue.java index 4a2e4421..80758d80 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetValue.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FacetValue.java @@ -15,8 +15,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class FacetValue { +public class FacetValue { /** * The value that should be set in the FacetFilter when applying this filter to a search request. */ @@ -24,6 +24,7 @@ public class FacetValue { @JsonProperty("stringValue") private Optional stringValue; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("integerValue") private Optional integerValue; @@ -59,7 +60,8 @@ public FacetValue( } public FacetValue() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -92,9 +94,10 @@ public Optional iconConfig() { return (Optional) iconConfig; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The value that should be set in the FacetFilter when applying this filter to a search request. @@ -105,6 +108,7 @@ public FacetValue withStringValue(String stringValue) { return this; } + /** * The value that should be set in the FacetFilter when applying this filter to a search request. */ @@ -120,6 +124,7 @@ public FacetValue withIntegerValue(long integerValue) { return this; } + public FacetValue withIntegerValue(Optional integerValue) { Utils.checkNotNull(integerValue, "integerValue"); this.integerValue = integerValue; @@ -135,6 +140,7 @@ public FacetValue withDisplayLabel(String displayLabel) { return this; } + /** * An optional user-friendly label to display in place of the facet value. */ @@ -153,6 +159,7 @@ public FacetValue withIconConfig(IconConfig iconConfig) { return this; } + /** * Defines how to render an icon */ @@ -162,7 +169,6 @@ public FacetValue withIconConfig(Optional iconConfig) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -182,9 +188,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - stringValue, - integerValue, - displayLabel, + stringValue, integerValue, displayLabel, iconConfig); } @@ -196,21 +200,23 @@ public String toString() { "displayLabel", displayLabel, "iconConfig", iconConfig); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional stringValue = Optional.empty(); - + private Optional integerValue = Optional.empty(); - + private Optional displayLabel = Optional.empty(); - + private Optional iconConfig = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The value that should be set in the FacetFilter when applying this filter to a search request. */ @@ -229,6 +235,7 @@ public Builder stringValue(Optional stringValue) { return this; } + public Builder integerValue(long integerValue) { Utils.checkNotNull(integerValue, "integerValue"); this.integerValue = Optional.ofNullable(integerValue); @@ -241,6 +248,7 @@ public Builder integerValue(Optional integerValue) { return this; } + /** * An optional user-friendly label to display in place of the facet value. */ @@ -259,6 +267,7 @@ public Builder displayLabel(Optional displayLabel) { return this; } + /** * Defines how to render an icon */ @@ -276,13 +285,13 @@ public Builder iconConfig(Optional iconConfig) { this.iconConfig = iconConfig; return this; } - + public FacetValue build() { + return new FacetValue( - stringValue, - integerValue, - displayLabel, + stringValue, integerValue, displayLabel, iconConfig); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FavoriteInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FavoriteInfo.java index d68166bf..90ee3a12 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FavoriteInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FavoriteInfo.java @@ -16,6 +16,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class FavoriteInfo { @JsonInclude(Include.NON_ABSENT) @@ -60,7 +61,8 @@ public FavoriteInfo( } public FavoriteInfo() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @SuppressWarnings("unchecked") @@ -93,9 +95,10 @@ public Optional favoritedByUser() { return favoritedByUser; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public FavoriteInfo withUgcType(UgcType ugcType) { Utils.checkNotNull(ugcType, "ugcType"); @@ -103,6 +106,7 @@ public FavoriteInfo withUgcType(UgcType ugcType) { return this; } + public FavoriteInfo withUgcType(Optional ugcType) { Utils.checkNotNull(ugcType, "ugcType"); this.ugcType = ugcType; @@ -118,6 +122,7 @@ public FavoriteInfo withId(String id) { return this; } + /** * Opaque id of the UGC. */ @@ -136,6 +141,7 @@ public FavoriteInfo withCount(long count) { return this; } + /** * Number of users this object has been favorited by. */ @@ -154,6 +160,7 @@ public FavoriteInfo withFavoritedByUser(boolean favoritedByUser) { return this; } + /** * If the requesting user has favorited this object. */ @@ -163,7 +170,6 @@ public FavoriteInfo withFavoritedByUser(Optional favoritedByUser) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -183,9 +189,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - ugcType, - id, - count, + ugcType, id, count, favoritedByUser); } @@ -197,21 +201,23 @@ public String toString() { "count", count, "favoritedByUser", favoritedByUser); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional ugcType = Optional.empty(); - + private Optional id = Optional.empty(); - + private Optional count = Optional.empty(); - + private Optional favoritedByUser = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder ugcType(UgcType ugcType) { Utils.checkNotNull(ugcType, "ugcType"); this.ugcType = Optional.ofNullable(ugcType); @@ -224,6 +230,7 @@ public Builder ugcType(Optional ugcType) { return this; } + /** * Opaque id of the UGC. */ @@ -242,6 +249,7 @@ public Builder id(Optional id) { return this; } + /** * Number of users this object has been favorited by. */ @@ -260,6 +268,7 @@ public Builder count(Optional count) { return this; } + /** * If the requesting user has favorited this object. */ @@ -277,13 +286,13 @@ public Builder favoritedByUser(Optional favoritedByUser) { this.favoritedByUser = favoritedByUser; return this; } - + public FavoriteInfo build() { + return new FavoriteInfo( - ugcType, - id, - count, + ugcType, id, count, favoritedByUser); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedEntry.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedEntry.java index 6846745d..28bfa965 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedEntry.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedEntry.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class FeedEntry { +public class FeedEntry { /** * optional ID associated with a single feed entry (displayable_list_id) */ @@ -30,14 +30,17 @@ public class FeedEntry { @JsonProperty("title") private String title; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createdBy") private Optional createdBy; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("uiConfig") private Optional uiConfig; @@ -70,38 +73,47 @@ public class FeedEntry { @JsonProperty("viewUrl") private Optional viewUrl; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("document") private Optional document; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("event") private Optional event; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("announcement") private Optional announcement; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("collection") private Optional collection; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("collectionItem") private Optional collectionItem; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("person") private Optional person; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("app") private Optional app; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("promptTemplate") private Optional promptTemplate; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("workflow") private Optional workflow; @@ -113,6 +125,7 @@ public class FeedEntry { @JsonProperty("activities") private Optional> activities; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("documentVisitorCount") private Optional documentVisitorCount; @@ -183,7 +196,13 @@ public FeedEntry( public FeedEntry( String title) { - this(Optional.empty(), title, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), title, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -322,9 +341,10 @@ public Optional documentVisitorCount() { return (Optional) documentVisitorCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * optional ID associated with a single feed entry (displayable_list_id) @@ -335,6 +355,7 @@ public FeedEntry withEntryId(String entryId) { return this; } + /** * optional ID associated with a single feed entry (displayable_list_id) */ @@ -359,6 +380,7 @@ public FeedEntry withThumbnail(Thumbnail thumbnail) { return this; } + public FeedEntry withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -371,6 +393,7 @@ public FeedEntry withCreatedBy(Person createdBy) { return this; } + public FeedEntry withCreatedBy(Optional createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; @@ -383,6 +406,7 @@ public FeedEntry withUiConfig(UiConfig uiConfig) { return this; } + public FeedEntry withUiConfig(Optional uiConfig) { Utils.checkNotNull(uiConfig, "uiConfig"); this.uiConfig = uiConfig; @@ -398,6 +422,7 @@ public FeedEntry withJustificationType(JustificationType justificationType) { return this; } + /** * Type of the justification. */ @@ -416,6 +441,7 @@ public FeedEntry withJustification(String justification) { return this; } + /** * Server side generated justification string if server provides one. */ @@ -434,6 +460,7 @@ public FeedEntry withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular feed entry in this particular response. To be used for /feedback reporting. */ @@ -452,6 +479,7 @@ public FeedEntry withViewUrl(String viewUrl) { return this; } + /** * View URL for the entry if based on links that are not documents in Glean. */ @@ -467,6 +495,7 @@ public FeedEntry withDocument(Document document) { return this; } + public FeedEntry withDocument(Optional document) { Utils.checkNotNull(document, "document"); this.document = document; @@ -479,6 +508,7 @@ public FeedEntry withEvent(CalendarEvent event) { return this; } + public FeedEntry withEvent(Optional event) { Utils.checkNotNull(event, "event"); this.event = event; @@ -491,6 +521,7 @@ public FeedEntry withAnnouncement(Announcement announcement) { return this; } + public FeedEntry withAnnouncement(Optional announcement) { Utils.checkNotNull(announcement, "announcement"); this.announcement = announcement; @@ -503,6 +534,7 @@ public FeedEntry withCollection(Collection collection) { return this; } + public FeedEntry withCollection(Optional collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; @@ -515,6 +547,7 @@ public FeedEntry withCollectionItem(CollectionItem collectionItem) { return this; } + public FeedEntry withCollectionItem(Optional collectionItem) { Utils.checkNotNull(collectionItem, "collectionItem"); this.collectionItem = collectionItem; @@ -527,6 +560,7 @@ public FeedEntry withPerson(Person person) { return this; } + public FeedEntry withPerson(Optional person) { Utils.checkNotNull(person, "person"); this.person = person; @@ -539,6 +573,7 @@ public FeedEntry withApp(AppResult app) { return this; } + public FeedEntry withApp(Optional app) { Utils.checkNotNull(app, "app"); this.app = app; @@ -551,6 +586,7 @@ public FeedEntry withPromptTemplate(PromptTemplateResult promptTemplate) { return this; } + public FeedEntry withPromptTemplate(Optional promptTemplate) { Utils.checkNotNull(promptTemplate, "promptTemplate"); this.promptTemplate = promptTemplate; @@ -563,6 +599,7 @@ public FeedEntry withWorkflow(WorkflowResult workflow) { return this; } + public FeedEntry withWorkflow(Optional workflow) { Utils.checkNotNull(workflow, "workflow"); this.workflow = workflow; @@ -578,6 +615,7 @@ public FeedEntry withActivities(List activities) { return this; } + /** * List of activity where each activity has user, action, timestamp. */ @@ -593,13 +631,13 @@ public FeedEntry withDocumentVisitorCount(CountInfo documentVisitorCount) { return this; } + public FeedEntry withDocumentVisitorCount(Optional documentVisitorCount) { Utils.checkNotNull(documentVisitorCount, "documentVisitorCount"); this.documentVisitorCount = documentVisitorCount; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -635,26 +673,13 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - entryId, - title, - thumbnail, - createdBy, - uiConfig, - justificationType, - justification, - trackingToken, - viewUrl, - document, - event, - announcement, - collection, - collectionItem, - person, - app, - promptTemplate, - workflow, - activities, - documentVisitorCount); + entryId, title, thumbnail, + createdBy, uiConfig, justificationType, + justification, trackingToken, viewUrl, + document, event, announcement, + collection, collectionItem, person, + app, promptTemplate, workflow, + activities, documentVisitorCount); } @Override @@ -681,53 +706,55 @@ public String toString() { "activities", activities, "documentVisitorCount", documentVisitorCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional entryId = Optional.empty(); - + private String title; - + private Optional thumbnail = Optional.empty(); - + private Optional createdBy = Optional.empty(); - + private Optional uiConfig = Optional.empty(); - + private Optional justificationType = Optional.empty(); - + private Optional justification = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional viewUrl = Optional.empty(); - + private Optional document = Optional.empty(); - + private Optional event = Optional.empty(); - + private Optional announcement = Optional.empty(); - + private Optional collection = Optional.empty(); - + private Optional collectionItem = Optional.empty(); - + private Optional person = Optional.empty(); - + private Optional app = Optional.empty(); - + private Optional promptTemplate = Optional.empty(); - + private Optional workflow = Optional.empty(); - + private Optional> activities = Optional.empty(); - + private Optional documentVisitorCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * optional ID associated with a single feed entry (displayable_list_id) */ @@ -746,6 +773,7 @@ public Builder entryId(Optional entryId) { return this; } + /** * Title for the result. Can be document title, event title and so on. */ @@ -755,6 +783,7 @@ public Builder title(String title) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -767,6 +796,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + public Builder createdBy(Person createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = Optional.ofNullable(createdBy); @@ -779,6 +809,7 @@ public Builder createdBy(Optional createdBy) { return this; } + public Builder uiConfig(UiConfig uiConfig) { Utils.checkNotNull(uiConfig, "uiConfig"); this.uiConfig = Optional.ofNullable(uiConfig); @@ -791,6 +822,7 @@ public Builder uiConfig(Optional uiConfig) { return this; } + /** * Type of the justification. */ @@ -809,6 +841,7 @@ public Builder justificationType(Optional justifica return this; } + /** * Server side generated justification string if server provides one. */ @@ -827,6 +860,7 @@ public Builder justification(Optional justification) { return this; } + /** * An opaque token that represents this particular feed entry in this particular response. To be used for /feedback reporting. */ @@ -845,6 +879,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + /** * View URL for the entry if based on links that are not documents in Glean. */ @@ -863,6 +898,7 @@ public Builder viewUrl(Optional viewUrl) { return this; } + public Builder document(Document document) { Utils.checkNotNull(document, "document"); this.document = Optional.ofNullable(document); @@ -875,6 +911,7 @@ public Builder document(Optional document) { return this; } + public Builder event(CalendarEvent event) { Utils.checkNotNull(event, "event"); this.event = Optional.ofNullable(event); @@ -887,6 +924,7 @@ public Builder event(Optional event) { return this; } + public Builder announcement(Announcement announcement) { Utils.checkNotNull(announcement, "announcement"); this.announcement = Optional.ofNullable(announcement); @@ -899,6 +937,7 @@ public Builder announcement(Optional announcement) { return this; } + public Builder collection(Collection collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -911,6 +950,7 @@ public Builder collection(Optional collection) { return this; } + public Builder collectionItem(CollectionItem collectionItem) { Utils.checkNotNull(collectionItem, "collectionItem"); this.collectionItem = Optional.ofNullable(collectionItem); @@ -923,6 +963,7 @@ public Builder collectionItem(Optional collectionItem) return this; } + public Builder person(Person person) { Utils.checkNotNull(person, "person"); this.person = Optional.ofNullable(person); @@ -935,6 +976,7 @@ public Builder person(Optional person) { return this; } + public Builder app(AppResult app) { Utils.checkNotNull(app, "app"); this.app = Optional.ofNullable(app); @@ -947,6 +989,7 @@ public Builder app(Optional app) { return this; } + public Builder promptTemplate(PromptTemplateResult promptTemplate) { Utils.checkNotNull(promptTemplate, "promptTemplate"); this.promptTemplate = Optional.ofNullable(promptTemplate); @@ -959,6 +1002,7 @@ public Builder promptTemplate(Optional promptTem return this; } + public Builder workflow(WorkflowResult workflow) { Utils.checkNotNull(workflow, "workflow"); this.workflow = Optional.ofNullable(workflow); @@ -971,6 +1015,7 @@ public Builder workflow(Optional workflow) { return this; } + /** * List of activity where each activity has user, action, timestamp. */ @@ -989,6 +1034,7 @@ public Builder activities(Optional> activities) { return this; } + public Builder documentVisitorCount(CountInfo documentVisitorCount) { Utils.checkNotNull(documentVisitorCount, "documentVisitorCount"); this.documentVisitorCount = Optional.ofNullable(documentVisitorCount); @@ -1000,29 +1046,18 @@ public Builder documentVisitorCount(Optional documentVisito this.documentVisitorCount = documentVisitorCount; return this; } - + public FeedEntry build() { + return new FeedEntry( - entryId, - title, - thumbnail, - createdBy, - uiConfig, - justificationType, - justification, - trackingToken, - viewUrl, - document, - event, - announcement, - collection, - collectionItem, - person, - app, - promptTemplate, - workflow, - activities, - documentVisitorCount); + entryId, title, thumbnail, + createdBy, uiConfig, justificationType, + justification, trackingToken, viewUrl, + document, event, announcement, + collection, collectionItem, person, + app, promptTemplate, workflow, + activities, documentVisitorCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequest.java index 6155bb5c..2800730d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequest.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class FeedRequest { +public class FeedRequest { /** * Categories of content requested. An allowlist gives flexibility to request content separately or together. */ @@ -25,6 +25,7 @@ public class FeedRequest { @JsonProperty("categories") private Optional> categories; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("requestOptions") private Optional requestOptions; @@ -36,6 +37,7 @@ public class FeedRequest { @JsonProperty("timeoutMillis") private Optional timeoutMillis; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sessionInfo") private Optional sessionInfo; @@ -57,7 +59,8 @@ public FeedRequest( } public FeedRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -89,9 +92,10 @@ public Optional sessionInfo() { return (Optional) sessionInfo; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Categories of content requested. An allowlist gives flexibility to request content separately or together. @@ -102,6 +106,7 @@ public FeedRequest withCategories(List categories) { return this; } + /** * Categories of content requested. An allowlist gives flexibility to request content separately or together. */ @@ -117,6 +122,7 @@ public FeedRequest withRequestOptions(FeedRequestOptions requestOptions) { return this; } + public FeedRequest withRequestOptions(Optional requestOptions) { Utils.checkNotNull(requestOptions, "requestOptions"); this.requestOptions = requestOptions; @@ -132,6 +138,7 @@ public FeedRequest withTimeoutMillis(long timeoutMillis) { return this; } + /** * Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. */ @@ -147,13 +154,13 @@ public FeedRequest withSessionInfo(SessionInfo sessionInfo) { return this; } + public FeedRequest withSessionInfo(Optional sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = sessionInfo; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -173,9 +180,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - categories, - requestOptions, - timeoutMillis, + categories, requestOptions, timeoutMillis, sessionInfo); } @@ -187,21 +192,23 @@ public String toString() { "timeoutMillis", timeoutMillis, "sessionInfo", sessionInfo); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> categories = Optional.empty(); - + private Optional requestOptions = Optional.empty(); - + private Optional timeoutMillis = Optional.empty(); - + private Optional sessionInfo = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Categories of content requested. An allowlist gives flexibility to request content separately or together. */ @@ -220,6 +227,7 @@ public Builder categories(Optional> categori return this; } + public Builder requestOptions(FeedRequestOptions requestOptions) { Utils.checkNotNull(requestOptions, "requestOptions"); this.requestOptions = Optional.ofNullable(requestOptions); @@ -232,6 +240,7 @@ public Builder requestOptions(Optional requestOpti return this; } + /** * Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. */ @@ -250,6 +259,7 @@ public Builder timeoutMillis(Optional timeoutMillis) { return this; } + public Builder sessionInfo(SessionInfo sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = Optional.ofNullable(sessionInfo); @@ -261,13 +271,13 @@ public Builder sessionInfo(Optional sessionInfo) { this.sessionInfo = sessionInfo; return this; } - + public FeedRequest build() { + return new FeedRequest( - categories, - requestOptions, - timeoutMillis, + categories, requestOptions, timeoutMillis, sessionInfo); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestOptions.java index 1b29dcca..b4d9109a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedRequestOptions.java @@ -17,8 +17,8 @@ import java.util.Map; import java.util.Optional; -public class FeedRequestOptions { +public class FeedRequestOptions { /** * Number of results asked in response. If a result is a collection, counts as one. */ @@ -46,6 +46,7 @@ public class FeedRequestOptions { @JsonProperty("datasourceFilter") private Optional> datasourceFilter; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("chatZeroStateSuggestionOptions") private Optional chatZeroStateSuggestionOptions; @@ -71,7 +72,8 @@ public FeedRequestOptions( public FeedRequestOptions( long resultSize) { - this(resultSize, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(resultSize, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -114,9 +116,10 @@ public Optional chatZeroStateSuggestionOptions() return (Optional) chatZeroStateSuggestionOptions; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Number of results asked in response. If a result is a collection, counts as one. @@ -136,6 +139,7 @@ public FeedRequestOptions withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -154,6 +158,7 @@ public FeedRequestOptions withCategoryToResultSize(Map datasourceFilter) { return this; } + /** * Datasources for which content should be included. Empty is for all. */ @@ -187,13 +193,13 @@ public FeedRequestOptions withChatZeroStateSuggestionOptions(ChatZeroStateSugges return this; } + public FeedRequestOptions withChatZeroStateSuggestionOptions(Optional chatZeroStateSuggestionOptions) { Utils.checkNotNull(chatZeroStateSuggestionOptions, "chatZeroStateSuggestionOptions"); this.chatZeroStateSuggestionOptions = chatZeroStateSuggestionOptions; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -214,11 +220,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - resultSize, - timezoneOffset, - categoryToResultSize, - datasourceFilter, - chatZeroStateSuggestionOptions); + resultSize, timezoneOffset, categoryToResultSize, + datasourceFilter, chatZeroStateSuggestionOptions); } @Override @@ -230,23 +233,25 @@ public String toString() { "datasourceFilter", datasourceFilter, "chatZeroStateSuggestionOptions", chatZeroStateSuggestionOptions); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long resultSize; - + private Optional timezoneOffset = Optional.empty(); - + private Optional> categoryToResultSize = Optional.empty(); - + private Optional> datasourceFilter = Optional.empty(); - + private Optional chatZeroStateSuggestionOptions = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Number of results asked in response. If a result is a collection, counts as one. */ @@ -256,6 +261,7 @@ public Builder resultSize(long resultSize) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -274,6 +280,7 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + /** * Mapping from category to number of results asked for the category. */ @@ -292,6 +299,7 @@ public Builder categoryToResultSize(Optional> datasourceFilte return this; } + public Builder chatZeroStateSuggestionOptions(ChatZeroStateSuggestionOptions chatZeroStateSuggestionOptions) { Utils.checkNotNull(chatZeroStateSuggestionOptions, "chatZeroStateSuggestionOptions"); this.chatZeroStateSuggestionOptions = Optional.ofNullable(chatZeroStateSuggestionOptions); @@ -321,14 +330,13 @@ public Builder chatZeroStateSuggestionOptions(Optional> results; @@ -81,7 +82,8 @@ public FeedResponse( public FeedResponse( long serverTimestamp) { - this(Optional.empty(), Optional.empty(), serverTimestamp, Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), serverTimestamp, + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -132,9 +134,10 @@ public Optional mentionsTimeWindowInHours() { return mentionsTimeWindowInHours; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of experiment ids for the corresponding request. @@ -145,6 +148,7 @@ public FeedResponse withExperimentIds(List experimentIds) { return this; } + /** * List of experiment ids for the corresponding request. */ @@ -163,6 +167,7 @@ public FeedResponse withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular feed response. */ @@ -187,6 +192,7 @@ public FeedResponse withResults(List results) { return this; } + public FeedResponse withResults(Optional> results) { Utils.checkNotNull(results, "results"); this.results = results; @@ -202,6 +208,7 @@ public FeedResponse withFacetResults(Map> facetResults return this; } + /** * Map from category to the list of facets that can be used to filter the entry's content. */ @@ -220,6 +227,7 @@ public FeedResponse withMentionsTimeWindowInHours(long mentionsTimeWindowInHours return this; } + /** * The time window (in hours) used for generating user mentions. */ @@ -229,7 +237,6 @@ public FeedResponse withMentionsTimeWindowInHours(Optional mentionsTimeWin return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -251,12 +258,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - experimentIds, - trackingToken, - serverTimestamp, - results, - facetResults, - mentionsTimeWindowInHours); + experimentIds, trackingToken, serverTimestamp, + results, facetResults, mentionsTimeWindowInHours); } @Override @@ -269,25 +272,27 @@ public String toString() { "facetResults", facetResults, "mentionsTimeWindowInHours", mentionsTimeWindowInHours); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> experimentIds = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Long serverTimestamp; - + private Optional> results = Optional.empty(); - + private Optional>> facetResults = Optional.empty(); - + private Optional mentionsTimeWindowInHours = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * List of experiment ids for the corresponding request. */ @@ -306,6 +311,7 @@ public Builder experimentIds(Optional> experimentIds) { return this; } + /** * An opaque token that represents this particular feed response. */ @@ -324,6 +330,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + /** * Server unix timestamp (in seconds since epoch UTC). */ @@ -333,6 +340,7 @@ public Builder serverTimestamp(long serverTimestamp) { return this; } + public Builder results(List results) { Utils.checkNotNull(results, "results"); this.results = Optional.ofNullable(results); @@ -345,6 +353,7 @@ public Builder results(Optional> results) { return this; } + /** * Map from category to the list of facets that can be used to filter the entry's content. */ @@ -363,6 +372,7 @@ public Builder facetResults(Optional>> f return this; } + /** * The time window (in hours) used for generating user mentions. */ @@ -380,15 +390,13 @@ public Builder mentionsTimeWindowInHours(Optional mentionsTimeWindowInHour this.mentionsTimeWindowInHours = mentionsTimeWindowInHours; return this; } - + public FeedResponse build() { + return new FeedResponse( - experimentIds, - trackingToken, - serverTimestamp, - results, - facetResults, - mentionsTimeWindowInHours); + experimentIds, trackingToken, serverTimestamp, + results, facetResults, mentionsTimeWindowInHours); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResult.java index b863c9ed..7e04cec4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedResult.java @@ -16,14 +16,15 @@ import java.util.List; import java.util.Optional; -public class FeedResult { +public class FeedResult { /** * Category of the result, one of the requested categories in incoming request. */ @JsonProperty("category") private FeedResultCategory category; + @JsonProperty("primaryEntry") private FeedEntry primaryEntry; @@ -60,7 +61,8 @@ public FeedResult( public FeedResult( FeedResultCategory category, FeedEntry primaryEntry) { - this(category, primaryEntry, Optional.empty(), Optional.empty()); + this(category, primaryEntry, Optional.empty(), + Optional.empty()); } /** @@ -93,9 +95,10 @@ public Optional rank() { return rank; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Category of the result, one of the requested categories in incoming request. @@ -121,6 +124,7 @@ public FeedResult withSecondaryEntries(List secondaryEntries) { return this; } + /** * Secondary entries for the result e.g. suggested docs for the calendar, carousel. */ @@ -139,6 +143,7 @@ public FeedResult withRank(long rank) { return this; } + /** * Rank of the result. Rank is suggested by server. Client side rank may differ. */ @@ -148,7 +153,6 @@ public FeedResult withRank(Optional rank) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -168,9 +172,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - category, - primaryEntry, - secondaryEntries, + category, primaryEntry, secondaryEntries, rank); } @@ -182,21 +184,23 @@ public String toString() { "secondaryEntries", secondaryEntries, "rank", rank); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private FeedResultCategory category; - + private FeedEntry primaryEntry; - + private Optional> secondaryEntries = Optional.empty(); - + private Optional rank = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Category of the result, one of the requested categories in incoming request. */ @@ -206,12 +210,14 @@ public Builder category(FeedResultCategory category) { return this; } + public Builder primaryEntry(FeedEntry primaryEntry) { Utils.checkNotNull(primaryEntry, "primaryEntry"); this.primaryEntry = primaryEntry; return this; } + /** * Secondary entries for the result e.g. suggested docs for the calendar, carousel. */ @@ -230,6 +236,7 @@ public Builder secondaryEntries(Optional> secondaryEnt return this; } + /** * Rank of the result. Rank is suggested by server. Client side rank may differ. */ @@ -247,13 +254,13 @@ public Builder rank(Optional rank) { this.rank = rank; return this; } - + public FeedResult build() { + return new FeedResult( - category, - primaryEntry, - secondaryEntries, + category, primaryEntry, secondaryEntries, rank); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Feedback.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Feedback.java index 350ae5ad..a91a63f6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Feedback.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Feedback.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class Feedback { +public class Feedback { /** * Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. */ @@ -59,6 +59,7 @@ public class Feedback { @JsonProperty("payload") private Optional payload; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sessionInfo") private Optional sessionInfo; @@ -70,6 +71,7 @@ public class Feedback { @JsonProperty("timestamp") private Optional timestamp; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("user") private Optional user; @@ -109,18 +111,22 @@ public class Feedback { @JsonProperty("uiElement") private Optional uiElement; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("manualFeedbackInfo") private Optional manualFeedbackInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("seenFeedbackInfo") private Optional seenFeedbackInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("userViewInfo") private Optional userViewInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("workflowFeedbackInfo") private Optional workflowFeedbackInfo; @@ -206,7 +212,13 @@ public Feedback( public Feedback( List trackingTokens, Event event) { - this(Optional.empty(), Optional.empty(), trackingTokens, event, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), trackingTokens, + event, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -360,9 +372,10 @@ public Optional agentId() { return agentId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. @@ -373,6 +386,7 @@ public Feedback withId(String id) { return this; } + /** * Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. */ @@ -391,6 +405,7 @@ public Feedback withCategory(FeedbackCategory category) { return this; } + /** * The feature category to which the feedback applies. These should be broad product areas such as Announcements, Answers, Search, etc. rather than specific components or UI treatments within those areas. */ @@ -427,6 +442,7 @@ public Feedback withPosition(long position) { return this; } + /** * Position of the element in the case that the client controls order (such as feed and autocomplete). */ @@ -445,6 +461,7 @@ public Feedback withPayload(String payload) { return this; } + /** * For type MANUAL_FEEDBACK, contains string of user feedback. For autocomplete, partial query string. For feed, string of user feedback in addition to manual feedback signals extracted from all suggested content. */ @@ -460,6 +477,7 @@ public Feedback withSessionInfo(SessionInfo sessionInfo) { return this; } + public Feedback withSessionInfo(Optional sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = sessionInfo; @@ -475,6 +493,7 @@ public Feedback withTimestamp(OffsetDateTime timestamp) { return this; } + /** * The ISO 8601 timestamp when the event occured. */ @@ -490,6 +509,7 @@ public Feedback withUser(User user) { return this; } + public Feedback withUser(Optional user) { Utils.checkNotNull(user, "user"); this.user = user; @@ -505,6 +525,7 @@ public Feedback withPathname(String pathname) { return this; } + /** * The path the client was at when the feedback event triggered. */ @@ -523,6 +544,7 @@ public Feedback withChannels(List channels) { return this; } + /** * Where the feedback will be sent, e.g. to Glean, the user's company, or both. If no channels are specified, feedback will go only to Glean. */ @@ -541,6 +563,7 @@ public Feedback withUrl(String url) { return this; } + /** * The URL the client was at when the feedback event triggered. */ @@ -559,6 +582,7 @@ public Feedback withUiTree(List uiTree) { return this; } + /** * The UI element tree associated with the event, if any. */ @@ -577,6 +601,7 @@ public Feedback withUiElement(String uiElement) { return this; } + /** * The UI element associated with the event, if any. */ @@ -592,6 +617,7 @@ public Feedback withManualFeedbackInfo(ManualFeedbackInfo manualFeedbackInfo) { return this; } + public Feedback withManualFeedbackInfo(Optional manualFeedbackInfo) { Utils.checkNotNull(manualFeedbackInfo, "manualFeedbackInfo"); this.manualFeedbackInfo = manualFeedbackInfo; @@ -604,6 +630,7 @@ public Feedback withSeenFeedbackInfo(SeenFeedbackInfo seenFeedbackInfo) { return this; } + public Feedback withSeenFeedbackInfo(Optional seenFeedbackInfo) { Utils.checkNotNull(seenFeedbackInfo, "seenFeedbackInfo"); this.seenFeedbackInfo = seenFeedbackInfo; @@ -616,6 +643,7 @@ public Feedback withUserViewInfo(UserViewInfo userViewInfo) { return this; } + public Feedback withUserViewInfo(Optional userViewInfo) { Utils.checkNotNull(userViewInfo, "userViewInfo"); this.userViewInfo = userViewInfo; @@ -628,6 +656,7 @@ public Feedback withWorkflowFeedbackInfo(WorkflowFeedbackInfo workflowFeedbackIn return this; } + public Feedback withWorkflowFeedbackInfo(Optional workflowFeedbackInfo) { Utils.checkNotNull(workflowFeedbackInfo, "workflowFeedbackInfo"); this.workflowFeedbackInfo = workflowFeedbackInfo; @@ -643,6 +672,7 @@ public Feedback withApplicationId(String applicationId) { return this; } + /** * The application ID of the client that sent the feedback event. */ @@ -661,6 +691,7 @@ public Feedback withAgentId(String agentId) { return this; } + /** * The agent ID of the client that sent the feedback event. */ @@ -670,7 +701,6 @@ public Feedback withAgentId(Optional agentId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -706,26 +736,13 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - category, - trackingTokens, - event, - position, - payload, - sessionInfo, - timestamp, - user, - pathname, - channels, - url, - uiTree, - uiElement, - manualFeedbackInfo, - seenFeedbackInfo, - userViewInfo, - workflowFeedbackInfo, - applicationId, - agentId); + id, category, trackingTokens, + event, position, payload, + sessionInfo, timestamp, user, + pathname, channels, url, + uiTree, uiElement, manualFeedbackInfo, + seenFeedbackInfo, userViewInfo, workflowFeedbackInfo, + applicationId, agentId); } @Override @@ -752,53 +769,55 @@ public String toString() { "applicationId", applicationId, "agentId", agentId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional category = Optional.empty(); - + private List trackingTokens; - + private Event event; - + private Optional position = Optional.empty(); - + private Optional payload = Optional.empty(); - + private Optional sessionInfo = Optional.empty(); - + private Optional timestamp = Optional.empty(); - + private Optional user = Optional.empty(); - + private Optional pathname = Optional.empty(); - + private Optional> channels = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional> uiTree = Optional.empty(); - + private Optional uiElement = Optional.empty(); - + private Optional manualFeedbackInfo = Optional.empty(); - + private Optional seenFeedbackInfo = Optional.empty(); - + private Optional userViewInfo = Optional.empty(); - + private Optional workflowFeedbackInfo = Optional.empty(); - + private Optional applicationId = Optional.empty(); - + private Optional agentId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Universally unique identifier of the event. To allow for reliable retransmission, only the earliest received event of a given UUID is considered valid by the server and subsequent are ignored. */ @@ -817,6 +836,7 @@ public Builder id(Optional id) { return this; } + /** * The feature category to which the feedback applies. These should be broad product areas such as Announcements, Answers, Search, etc. rather than specific components or UI treatments within those areas. */ @@ -835,6 +855,7 @@ public Builder category(Optional category) { return this; } + /** * A list of server-generated trackingTokens to which this event applies. */ @@ -844,6 +865,7 @@ public Builder trackingTokens(List trackingTokens) { return this; } + /** * The action the user took within a Glean client with respect to the object referred to by the given `trackingToken`. */ @@ -853,6 +875,7 @@ public Builder event(Event event) { return this; } + /** * Position of the element in the case that the client controls order (such as feed and autocomplete). */ @@ -871,6 +894,7 @@ public Builder position(Optional position) { return this; } + /** * For type MANUAL_FEEDBACK, contains string of user feedback. For autocomplete, partial query string. For feed, string of user feedback in addition to manual feedback signals extracted from all suggested content. */ @@ -889,6 +913,7 @@ public Builder payload(Optional payload) { return this; } + public Builder sessionInfo(SessionInfo sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = Optional.ofNullable(sessionInfo); @@ -901,6 +926,7 @@ public Builder sessionInfo(Optional sessionInfo) { return this; } + /** * The ISO 8601 timestamp when the event occured. */ @@ -919,6 +945,7 @@ public Builder timestamp(Optional timestamp) { return this; } + public Builder user(User user) { Utils.checkNotNull(user, "user"); this.user = Optional.ofNullable(user); @@ -931,6 +958,7 @@ public Builder user(Optional user) { return this; } + /** * The path the client was at when the feedback event triggered. */ @@ -949,6 +977,7 @@ public Builder pathname(Optional pathname) { return this; } + /** * Where the feedback will be sent, e.g. to Glean, the user's company, or both. If no channels are specified, feedback will go only to Glean. */ @@ -967,6 +996,7 @@ public Builder channels(Optional> channels) { return this; } + /** * The URL the client was at when the feedback event triggered. */ @@ -985,6 +1015,7 @@ public Builder url(Optional url) { return this; } + /** * The UI element tree associated with the event, if any. */ @@ -1003,6 +1034,7 @@ public Builder uiTree(Optional> uiTree) { return this; } + /** * The UI element associated with the event, if any. */ @@ -1021,6 +1053,7 @@ public Builder uiElement(Optional uiElement) { return this; } + public Builder manualFeedbackInfo(ManualFeedbackInfo manualFeedbackInfo) { Utils.checkNotNull(manualFeedbackInfo, "manualFeedbackInfo"); this.manualFeedbackInfo = Optional.ofNullable(manualFeedbackInfo); @@ -1033,6 +1066,7 @@ public Builder manualFeedbackInfo(Optional manualF return this; } + public Builder seenFeedbackInfo(SeenFeedbackInfo seenFeedbackInfo) { Utils.checkNotNull(seenFeedbackInfo, "seenFeedbackInfo"); this.seenFeedbackInfo = Optional.ofNullable(seenFeedbackInfo); @@ -1045,6 +1079,7 @@ public Builder seenFeedbackInfo(Optional seenFeedbac return this; } + public Builder userViewInfo(UserViewInfo userViewInfo) { Utils.checkNotNull(userViewInfo, "userViewInfo"); this.userViewInfo = Optional.ofNullable(userViewInfo); @@ -1057,6 +1092,7 @@ public Builder userViewInfo(Optional userViewInfo) { return this; } + public Builder workflowFeedbackInfo(WorkflowFeedbackInfo workflowFeedbackInfo) { Utils.checkNotNull(workflowFeedbackInfo, "workflowFeedbackInfo"); this.workflowFeedbackInfo = Optional.ofNullable(workflowFeedbackInfo); @@ -1069,6 +1105,7 @@ public Builder workflowFeedbackInfo(Optional wor return this; } + /** * The application ID of the client that sent the feedback event. */ @@ -1087,6 +1124,7 @@ public Builder applicationId(Optional applicationId) { return this; } + /** * The agent ID of the client that sent the feedback event. */ @@ -1104,29 +1142,18 @@ public Builder agentId(Optional agentId) { this.agentId = agentId; return this; } - + public Feedback build() { + return new Feedback( - id, - category, - trackingTokens, - event, - position, - payload, - sessionInfo, - timestamp, - user, - pathname, - channels, - url, - uiTree, - uiElement, - manualFeedbackInfo, - seenFeedbackInfo, - userViewInfo, - workflowFeedbackInfo, - applicationId, - agentId); + id, category, trackingTokens, + event, position, payload, + sessionInfo, timestamp, user, + pathname, channels, url, + uiTree, uiElement, manualFeedbackInfo, + seenFeedbackInfo, userViewInfo, workflowFeedbackInfo, + applicationId, agentId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedbackChatExchange.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedbackChatExchange.java index c059bc76..34c7f09a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedbackChatExchange.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FeedbackChatExchange.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class FeedbackChatExchange { +public class FeedbackChatExchange { /** * Unix timestamp in millis for the chat request. */ @@ -53,6 +53,7 @@ public class FeedbackChatExchange { @JsonProperty("resultDocuments") private Optional> resultDocuments; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("response") private Optional response; @@ -80,7 +81,8 @@ public FeedbackChatExchange( } public FeedbackChatExchange() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -129,9 +131,10 @@ public Optional response() { return response; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unix timestamp in millis for the chat request. @@ -142,6 +145,7 @@ public FeedbackChatExchange withTimestamp(long timestamp) { return this; } + /** * Unix timestamp in millis for the chat request. */ @@ -160,6 +164,7 @@ public FeedbackChatExchange withAgent(String agent) { return this; } + /** * Either DEFAULT (company knowledge) or GPT (world knowledge). */ @@ -178,6 +183,7 @@ public FeedbackChatExchange withUserQuery(String userQuery) { return this; } + /** * Initial query entered by the user. */ @@ -196,6 +202,7 @@ public FeedbackChatExchange withSearchQuery(String searchQuery) { return this; } + /** * Search query performed by the agent. */ @@ -214,6 +221,7 @@ public FeedbackChatExchange withResultDocuments(List resultDocum return this; } + /** * List of documents read by the agent. */ @@ -229,13 +237,13 @@ public FeedbackChatExchange withResponse(String response) { return this; } + public FeedbackChatExchange withResponse(Optional response) { Utils.checkNotNull(response, "response"); this.response = response; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -257,12 +265,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timestamp, - agent, - userQuery, - searchQuery, - resultDocuments, - response); + timestamp, agent, userQuery, + searchQuery, resultDocuments, response); } @Override @@ -275,25 +279,27 @@ public String toString() { "resultDocuments", resultDocuments, "response", response); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timestamp = Optional.empty(); - + private Optional agent = Optional.empty(); - + private Optional userQuery = Optional.empty(); - + private Optional searchQuery = Optional.empty(); - + private Optional> resultDocuments = Optional.empty(); - + private Optional response = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unix timestamp in millis for the chat request. */ @@ -312,6 +318,7 @@ public Builder timestamp(Optional timestamp) { return this; } + /** * Either DEFAULT (company knowledge) or GPT (world knowledge). */ @@ -330,6 +337,7 @@ public Builder agent(Optional agent) { return this; } + /** * Initial query entered by the user. */ @@ -348,6 +356,7 @@ public Builder userQuery(Optional userQuery) { return this; } + /** * Search query performed by the agent. */ @@ -366,6 +375,7 @@ public Builder searchQuery(Optional searchQuery) { return this; } + /** * List of documents read by the agent. */ @@ -384,6 +394,7 @@ public Builder resultDocuments(Optional> resultDo return this; } + public Builder response(String response) { Utils.checkNotNull(response, "response"); this.response = Optional.ofNullable(response); @@ -395,15 +406,13 @@ public Builder response(Optional response) { this.response = response; return this; } - + public FeedbackChatExchange build() { + return new FeedbackChatExchange( - timestamp, - agent, - userQuery, - searchQuery, - resultDocuments, - response); + timestamp, agent, userQuery, + searchQuery, resultDocuments, response); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/File.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/File.java index 9a01a722..2d372b10 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/File.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/File.java @@ -10,11 +10,13 @@ import java.lang.Override; import java.lang.String; + public class File { @SpeakeasyMetadata("multipartForm:name=fileName") private String fileName; + @SpeakeasyMetadata("multipartForm:content") private byte[] content; @@ -38,9 +40,10 @@ public byte[] content() { return content; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public File withFileName(String fileName) { Utils.checkNotNull(fileName, "fileName"); @@ -54,7 +57,6 @@ public File withContent(byte[] content) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,8 +74,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - fileName, - content); + fileName, content); } @Override @@ -82,33 +83,37 @@ public String toString() { "fileName", fileName, "content", content); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String fileName; - + private byte[] content; - + private Builder() { // force use of static builder() method } + public Builder fileName(String fileName) { Utils.checkNotNull(fileName, "fileName"); this.fileName = fileName; return this; } + public Builder content(byte[] content) { Utils.checkNotNull(content, "content"); this.content = content; return this; } - + public File build() { + return new File( - fileName, - content); + fileName, content); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/FollowupAction.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/FollowupAction.java index 36bf1167..5faf95e6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/FollowupAction.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/FollowupAction.java @@ -20,7 +20,6 @@ *

A follow-up action that can be invoked by the user after a response. The action parameters are not included and need to be predicted/filled separately. */ public class FollowupAction { - /** * Unique identifier for this actionRun recommendation event. */ @@ -86,7 +85,8 @@ public FollowupAction( } public FollowupAction() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -137,9 +137,10 @@ public Optional userConfirmationRequired() { return userConfirmationRequired; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique identifier for this actionRun recommendation event. @@ -150,6 +151,7 @@ public FollowupAction withActionRunId(String actionRunId) { return this; } + /** * Unique identifier for this actionRun recommendation event. */ @@ -168,6 +170,7 @@ public FollowupAction withActionInstanceId(String actionInstanceId) { return this; } + /** * The ID of the action instance that will be invoked. */ @@ -186,6 +189,7 @@ public FollowupAction withActionId(String actionId) { return this; } + /** * The ID of the associated action. */ @@ -204,6 +208,7 @@ public FollowupAction withRecommendationText(String recommendationText) { return this; } + /** * Text to be displayed to the user when recommending the action instance. */ @@ -222,6 +227,7 @@ public FollowupAction withActionLabel(String actionLabel) { return this; } + /** * The label to be used when displaying a button to execute this action instance. */ @@ -240,6 +246,7 @@ public FollowupAction withUserConfirmationRequired(boolean userConfirmationRequi return this; } + /** * Whether user confirmation is needed before executing this action instance. */ @@ -249,7 +256,6 @@ public FollowupAction withUserConfirmationRequired(Optional userConfirm return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -271,12 +277,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - actionRunId, - actionInstanceId, - actionId, - recommendationText, - actionLabel, - userConfirmationRequired); + actionRunId, actionInstanceId, actionId, + recommendationText, actionLabel, userConfirmationRequired); } @Override @@ -289,25 +291,27 @@ public String toString() { "actionLabel", actionLabel, "userConfirmationRequired", userConfirmationRequired); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional actionRunId = Optional.empty(); - + private Optional actionInstanceId = Optional.empty(); - + private Optional actionId = Optional.empty(); - + private Optional recommendationText = Optional.empty(); - + private Optional actionLabel = Optional.empty(); - + private Optional userConfirmationRequired = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique identifier for this actionRun recommendation event. */ @@ -326,6 +330,7 @@ public Builder actionRunId(Optional actionRunId) { return this; } + /** * The ID of the action instance that will be invoked. */ @@ -344,6 +349,7 @@ public Builder actionInstanceId(Optional actionInstanceId) { return this; } + /** * The ID of the associated action. */ @@ -362,6 +368,7 @@ public Builder actionId(Optional actionId) { return this; } + /** * Text to be displayed to the user when recommending the action instance. */ @@ -380,6 +387,7 @@ public Builder recommendationText(Optional recommendationText) { return this; } + /** * The label to be used when displaying a button to execute this action instance. */ @@ -398,6 +406,7 @@ public Builder actionLabel(Optional actionLabel) { return this; } + /** * Whether user confirmation is needed before executing this action instance. */ @@ -415,15 +424,13 @@ public Builder userConfirmationRequired(Optional userConfirmationRequir this.userConfirmationRequired = userConfirmationRequired; return this; } - + public FollowupAction build() { + return new FollowupAction( - actionRunId, - actionInstanceId, - actionId, - recommendationText, - actionLabel, - userConfirmationRequired); + actionRunId, actionInstanceId, actionId, + recommendationText, actionLabel, userConfirmationRequired); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedAttachment.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedAttachment.java index 84a37d8c..b40da0b1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedAttachment.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedAttachment.java @@ -21,7 +21,6 @@ *

These are attachments that aren't natively present on the event, and have been smartly suggested. */ public class GeneratedAttachment { - /** * The name of method used to surface relevant data for a given calendar event. */ @@ -29,14 +28,17 @@ public class GeneratedAttachment { @JsonProperty("strategyName") private Optional strategyName; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("documents") private Optional> documents; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("person") private Optional person; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("customer") private Optional customer; @@ -48,6 +50,7 @@ public class GeneratedAttachment { @JsonProperty("externalLinks") private Optional> externalLinks; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("content") private Optional> content; @@ -75,7 +78,8 @@ public GeneratedAttachment( } public GeneratedAttachment() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -120,9 +124,10 @@ public Optional> content() { return (Optional>) content; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The name of method used to surface relevant data for a given calendar event. @@ -133,6 +138,7 @@ public GeneratedAttachment withStrategyName(EventStrategyName strategyName) { return this; } + /** * The name of method used to surface relevant data for a given calendar event. */ @@ -148,6 +154,7 @@ public GeneratedAttachment withDocuments(List documents) { return this; } + public GeneratedAttachment withDocuments(Optional> documents) { Utils.checkNotNull(documents, "documents"); this.documents = documents; @@ -160,6 +167,7 @@ public GeneratedAttachment withPerson(Person person) { return this; } + public GeneratedAttachment withPerson(Optional person) { Utils.checkNotNull(person, "person"); this.person = person; @@ -172,6 +180,7 @@ public GeneratedAttachment withCustomer(Customer customer) { return this; } + public GeneratedAttachment withCustomer(Optional customer) { Utils.checkNotNull(customer, "customer"); this.customer = customer; @@ -187,6 +196,7 @@ public GeneratedAttachment withExternalLinks(List externalLinks) return this; } + /** * A list of links to external sources outside of Glean. */ @@ -202,13 +212,13 @@ public GeneratedAttachment withContent(List content) return this; } + public GeneratedAttachment withContent(Optional> content) { Utils.checkNotNull(content, "content"); this.content = content; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -230,12 +240,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - strategyName, - documents, - person, - customer, - externalLinks, - content); + strategyName, documents, person, + customer, externalLinks, content); } @Override @@ -248,25 +254,27 @@ public String toString() { "externalLinks", externalLinks, "content", content); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional strategyName = Optional.empty(); - + private Optional> documents = Optional.empty(); - + private Optional person = Optional.empty(); - + private Optional customer = Optional.empty(); - + private Optional> externalLinks = Optional.empty(); - + private Optional> content = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The name of method used to surface relevant data for a given calendar event. */ @@ -285,6 +293,7 @@ public Builder strategyName(Optional strategyName) return this; } + public Builder documents(List documents) { Utils.checkNotNull(documents, "documents"); this.documents = Optional.ofNullable(documents); @@ -297,6 +306,7 @@ public Builder documents(Optional> documents) { return this; } + public Builder person(Person person) { Utils.checkNotNull(person, "person"); this.person = Optional.ofNullable(person); @@ -309,6 +319,7 @@ public Builder person(Optional person) { return this; } + public Builder customer(Customer customer) { Utils.checkNotNull(customer, "customer"); this.customer = Optional.ofNullable(customer); @@ -321,6 +332,7 @@ public Builder customer(Optional customer) { return this; } + /** * A list of links to external sources outside of Glean. */ @@ -339,6 +351,7 @@ public Builder externalLinks(Optional> externalLi return this; } + public Builder content(List content) { Utils.checkNotNull(content, "content"); this.content = Optional.ofNullable(content); @@ -350,15 +363,13 @@ public Builder content(Optional> cont this.content = content; return this; } - + public GeneratedAttachment build() { + return new GeneratedAttachment( - strategyName, - documents, - person, - customer, - externalLinks, - content); + strategyName, documents, person, + customer, externalLinks, content); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedAttachmentContent.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedAttachmentContent.java index c7840ef9..54ee6a3f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedAttachmentContent.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedAttachmentContent.java @@ -19,7 +19,6 @@ *

Content that has been generated or extrapolated from the documents present in the document field. */ public class GeneratedAttachmentContent { - /** * The header describing the generated content. */ @@ -64,9 +63,10 @@ public Optional text() { return text; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The header describing the generated content. @@ -77,6 +77,7 @@ public GeneratedAttachmentContent withDisplayHeader(String displayHeader) { return this; } + /** * The header describing the generated content. */ @@ -95,6 +96,7 @@ public GeneratedAttachmentContent withText(String text) { return this; } + /** * The content that has been generated. */ @@ -104,7 +106,6 @@ public GeneratedAttachmentContent withText(Optional text) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -122,8 +123,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - displayHeader, - text); + displayHeader, text); } @Override @@ -132,17 +132,19 @@ public String toString() { "displayHeader", displayHeader, "text", text); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional displayHeader = Optional.empty(); - + private Optional text = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The header describing the generated content. */ @@ -161,6 +163,7 @@ public Builder displayHeader(Optional displayHeader) { return this; } + /** * The content that has been generated. */ @@ -178,11 +181,12 @@ public Builder text(Optional text) { this.text = text; return this; } - + public GeneratedAttachmentContent build() { + return new GeneratedAttachmentContent( - displayHeader, - text); + displayHeader, text); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedQna.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedQna.java index 187b2a00..9f2ec7f5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedQna.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GeneratedQna.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class GeneratedQna { +public class GeneratedQna { /** * Search query rephrased into a question. */ @@ -102,7 +102,9 @@ public GeneratedQna( } public GeneratedQna() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -173,9 +175,10 @@ public Optional trackingToken() { return trackingToken; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Search query rephrased into a question. @@ -186,6 +189,7 @@ public GeneratedQna withQuestion(String question) { return this; } + /** * Search query rephrased into a question. */ @@ -204,6 +208,7 @@ public GeneratedQna withAnswer(String answer) { return this; } + /** * Answer generated for the given query or the generated question. */ @@ -222,6 +227,7 @@ public GeneratedQna withFollowUpPrompts(List followUpPrompts) { return this; } + /** * List of all follow-up prompts generated for the given query or the generated question. */ @@ -240,6 +246,7 @@ public GeneratedQna withFollowupActions(List followupActions) { return this; } + /** * List of follow-up actions generated for the given query or the generated question. */ @@ -258,6 +265,7 @@ public GeneratedQna withRanges(List ranges) { return this; } + /** * Answer subsections to mark with special formatting (citations, bolding etc) */ @@ -276,6 +284,7 @@ public GeneratedQna withStatus(GeneratedQnaStatus status) { return this; } + /** * Status of backend generating the answer */ @@ -294,6 +303,7 @@ public GeneratedQna withCursor(String cursor) { return this; } + /** * An opaque cursor representing the search request */ @@ -312,6 +322,7 @@ public GeneratedQna withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. */ @@ -321,7 +332,6 @@ public GeneratedQna withTrackingToken(Optional trackingToken) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -345,14 +355,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - question, - answer, - followUpPrompts, - followupActions, - ranges, - status, - cursor, - trackingToken); + question, answer, followUpPrompts, + followupActions, ranges, status, + cursor, trackingToken); } @Override @@ -367,29 +372,31 @@ public String toString() { "cursor", cursor, "trackingToken", trackingToken); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional question = Optional.empty(); - + private Optional answer = Optional.empty(); - + private Optional> followUpPrompts = Optional.empty(); - + private Optional> followupActions = Optional.empty(); - + private Optional> ranges = Optional.empty(); - + private Optional status = Optional.empty(); - + private Optional cursor = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Search query rephrased into a question. */ @@ -408,6 +415,7 @@ public Builder question(Optional question) { return this; } + /** * Answer generated for the given query or the generated question. */ @@ -426,6 +434,7 @@ public Builder answer(Optional answer) { return this; } + /** * List of all follow-up prompts generated for the given query or the generated question. */ @@ -444,6 +453,7 @@ public Builder followUpPrompts(Optional> followUpPrompts) return this; } + /** * List of follow-up actions generated for the given query or the generated question. */ @@ -462,6 +472,7 @@ public Builder followupActions(Optional> followup return this; } + /** * Answer subsections to mark with special formatting (citations, bolding etc) */ @@ -480,6 +491,7 @@ public Builder ranges(Optional> ranges) { return this; } + /** * Status of backend generating the answer */ @@ -498,6 +510,7 @@ public Builder status(Optional status) { return this; } + /** * An opaque cursor representing the search request */ @@ -516,6 +529,7 @@ public Builder cursor(Optional cursor) { return this; } + /** * An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. */ @@ -533,17 +547,14 @@ public Builder trackingToken(Optional trackingToken) { this.trackingToken = trackingToken; return this; } - + public GeneratedQna build() { + return new GeneratedQna( - question, - answer, - followUpPrompts, - followupActions, - ranges, - status, - cursor, - trackingToken); + question, answer, followUpPrompts, + followupActions, ranges, status, + cursor, trackingToken); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerError.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerError.java index 42a8eebc..357aa1dc 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerError.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerError.java @@ -14,12 +14,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class GetAnswerError { @JsonInclude(Include.NON_ABSENT) @JsonProperty("errorType") private Optional errorType; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("answerAuthor") private Optional answerAuthor; @@ -50,9 +52,10 @@ public Optional answerAuthor() { return (Optional) answerAuthor; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public GetAnswerError withErrorType(GetAnswerErrorErrorType errorType) { Utils.checkNotNull(errorType, "errorType"); @@ -60,6 +63,7 @@ public GetAnswerError withErrorType(GetAnswerErrorErrorType errorType) { return this; } + public GetAnswerError withErrorType(Optional errorType) { Utils.checkNotNull(errorType, "errorType"); this.errorType = errorType; @@ -72,13 +76,13 @@ public GetAnswerError withAnswerAuthor(Person answerAuthor) { return this; } + public GetAnswerError withAnswerAuthor(Optional answerAuthor) { Utils.checkNotNull(answerAuthor, "answerAuthor"); this.answerAuthor = answerAuthor; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -96,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - errorType, - answerAuthor); + errorType, answerAuthor); } @Override @@ -106,17 +109,19 @@ public String toString() { "errorType", errorType, "answerAuthor", answerAuthor); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional errorType = Optional.empty(); - + private Optional answerAuthor = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder errorType(GetAnswerErrorErrorType errorType) { Utils.checkNotNull(errorType, "errorType"); this.errorType = Optional.ofNullable(errorType); @@ -129,6 +134,7 @@ public Builder errorType(Optional errorType) return this; } + public Builder answerAuthor(Person answerAuthor) { Utils.checkNotNull(answerAuthor, "answerAuthor"); this.answerAuthor = Optional.ofNullable(answerAuthor); @@ -140,11 +146,12 @@ public Builder answerAuthor(Optional answerAuthor) { this.answerAuthor = answerAuthor; return this; } - + public GetAnswerError build() { + return new GetAnswerError( - errorType, - answerAuthor); + errorType, answerAuthor); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerRequest.java index 76b38bfa..74b393e6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerRequest.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class GetAnswerRequest { +public class GetAnswerRequest { /** * The opaque ID of the Answer. */ @@ -60,9 +60,10 @@ public Optional docId() { return docId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque ID of the Answer. @@ -73,6 +74,7 @@ public GetAnswerRequest withId(long id) { return this; } + /** * The opaque ID of the Answer. */ @@ -91,6 +93,7 @@ public GetAnswerRequest withDocId(String docId) { return this; } + /** * Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. */ @@ -100,7 +103,6 @@ public GetAnswerRequest withDocId(Optional docId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,8 +120,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - docId); + id, docId); } @Override @@ -128,17 +129,19 @@ public String toString() { "id", id, "docId", docId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional docId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque ID of the Answer. */ @@ -157,6 +160,7 @@ public Builder id(Optional id) { return this; } + /** * Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID isn't available. If both are available, using the Answer ID is preferred. */ @@ -174,11 +178,12 @@ public Builder docId(Optional docId) { this.docId = docId; return this; } - + public GetAnswerRequest build() { + return new GetAnswerRequest( - id, - docId); + id, docId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerResponse.java index 0d19c193..a2d5e27c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetAnswerResponse.java @@ -14,12 +14,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class GetAnswerResponse { @JsonInclude(Include.NON_ABSENT) @JsonProperty("answerResult") private Optional answerResult; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private Optional error; @@ -50,9 +52,10 @@ public Optional error() { return (Optional) error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public GetAnswerResponse withAnswerResult(AnswerResult answerResult) { Utils.checkNotNull(answerResult, "answerResult"); @@ -60,6 +63,7 @@ public GetAnswerResponse withAnswerResult(AnswerResult answerResult) { return this; } + public GetAnswerResponse withAnswerResult(Optional answerResult) { Utils.checkNotNull(answerResult, "answerResult"); this.answerResult = answerResult; @@ -72,13 +76,13 @@ public GetAnswerResponse withError(GetAnswerError error) { return this; } + public GetAnswerResponse withError(Optional error) { Utils.checkNotNull(error, "error"); this.error = error; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -96,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - answerResult, - error); + answerResult, error); } @Override @@ -106,17 +109,19 @@ public String toString() { "answerResult", answerResult, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional answerResult = Optional.empty(); - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder answerResult(AnswerResult answerResult) { Utils.checkNotNull(answerResult, "answerResult"); this.answerResult = Optional.ofNullable(answerResult); @@ -129,6 +134,7 @@ public Builder answerResult(Optional answerResult) { return this; } + public Builder error(GetAnswerError error) { Utils.checkNotNull(error, "error"); this.error = Optional.ofNullable(error); @@ -140,11 +146,12 @@ public Builder error(Optional error) { this.error = error; return this; } - + public GetAnswerResponse build() { + return new GetAnswerResponse( - answerResult, - error); + answerResult, error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatApplicationRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatApplicationRequest.java index 09b6a2b5..2a9048c2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatApplicationRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatApplicationRequest.java @@ -10,8 +10,8 @@ import java.lang.Override; import java.lang.String; -public class GetChatApplicationRequest { +public class GetChatApplicationRequest { /** * The id of the Chat application to be retrieved. */ @@ -33,9 +33,10 @@ public String id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The id of the Chat application to be retrieved. @@ -46,7 +47,6 @@ public GetChatApplicationRequest withId(String id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -71,15 +71,17 @@ public String toString() { return Utils.toString(GetChatApplicationRequest.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private Builder() { // force use of static builder() method } + /** * The id of the Chat application to be retrieved. */ @@ -88,10 +90,12 @@ public Builder id(String id) { this.id = id; return this; } - + public GetChatApplicationRequest build() { + return new GetChatApplicationRequest( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatApplicationResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatApplicationResponse.java index 6611c71c..c5c75e49 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatApplicationResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatApplicationResponse.java @@ -15,6 +15,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class GetChatApplicationResponse { @JsonInclude(Include.NON_ABSENT) @@ -38,9 +39,10 @@ public Optional application() { return (Optional) application; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public GetChatApplicationResponse withApplication(Object application) { Utils.checkNotNull(application, "application"); @@ -48,13 +50,13 @@ public GetChatApplicationResponse withApplication(Object application) { return this; } + public GetChatApplicationResponse withApplication(Optional application) { Utils.checkNotNull(application, "application"); this.application = application; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -79,15 +81,17 @@ public String toString() { return Utils.toString(GetChatApplicationResponse.class, "application", application); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional application = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder application(Object application) { Utils.checkNotNull(application, "application"); this.application = Optional.ofNullable(application); @@ -99,10 +103,12 @@ public Builder application(Optional application) { this.application = application; return this; } - + public GetChatApplicationResponse build() { + return new GetChatApplicationResponse( application); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatFilesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatFilesRequest.java index cb3e0947..88ee4164 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatFilesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatFilesRequest.java @@ -11,8 +11,8 @@ import java.lang.String; import java.util.List; -public class GetChatFilesRequest { +public class GetChatFilesRequest { /** * IDs of files to fetch. */ @@ -34,9 +34,10 @@ public List fileIds() { return fileIds; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * IDs of files to fetch. @@ -47,7 +48,6 @@ public GetChatFilesRequest withFileIds(List fileIds) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,15 +72,17 @@ public String toString() { return Utils.toString(GetChatFilesRequest.class, "fileIds", fileIds); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List fileIds; - + private Builder() { // force use of static builder() method } + /** * IDs of files to fetch. */ @@ -89,10 +91,12 @@ public Builder fileIds(List fileIds) { this.fileIds = fileIds; return this; } - + public GetChatFilesRequest build() { + return new GetChatFilesRequest( fileIds); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatFilesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatFilesResponse.java index 24ae5821..e7ef084b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatFilesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatFilesResponse.java @@ -15,8 +15,8 @@ import java.util.Map; import java.util.Optional; -public class GetChatFilesResponse { +public class GetChatFilesResponse { /** * A map of file IDs to ChatFile structs. */ @@ -44,9 +44,10 @@ public Optional> files() { return (Optional>) files; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A map of file IDs to ChatFile structs. @@ -57,6 +58,7 @@ public GetChatFilesResponse withFiles(Map files) { return this; } + /** * A map of file IDs to ChatFile structs. */ @@ -66,7 +68,6 @@ public GetChatFilesResponse withFiles(Optional> return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -91,15 +92,17 @@ public String toString() { return Utils.toString(GetChatFilesResponse.class, "files", files); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> files = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A map of file IDs to ChatFile structs. */ @@ -117,10 +120,12 @@ public Builder files(Optional> files) { this.files = files; return this; } - + public GetChatFilesResponse build() { + return new GetChatFilesResponse( files); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatRequest.java index 40f53445..211544ce 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatRequest.java @@ -10,8 +10,8 @@ import java.lang.Override; import java.lang.String; -public class GetChatRequest { +public class GetChatRequest { /** * The id of the Chat to be retrieved. */ @@ -33,9 +33,10 @@ public String id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The id of the Chat to be retrieved. @@ -46,7 +47,6 @@ public GetChatRequest withId(String id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -71,15 +71,17 @@ public String toString() { return Utils.toString(GetChatRequest.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private Builder() { // force use of static builder() method } + /** * The id of the Chat to be retrieved. */ @@ -88,10 +90,12 @@ public Builder id(String id) { this.id = id; return this; } - + public GetChatRequest build() { + return new GetChatRequest( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatResponse.java index 392fe10d..0356eb1e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetChatResponse.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class GetChatResponse { @JsonInclude(Include.NON_ABSENT) @@ -37,9 +38,10 @@ public Optional chatResult() { return (Optional) chatResult; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public GetChatResponse withChatResult(ChatResult chatResult) { Utils.checkNotNull(chatResult, "chatResult"); @@ -47,13 +49,13 @@ public GetChatResponse withChatResult(ChatResult chatResult) { return this; } + public GetChatResponse withChatResult(Optional chatResult) { Utils.checkNotNull(chatResult, "chatResult"); this.chatResult = chatResult; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -78,15 +80,17 @@ public String toString() { return Utils.toString(GetChatResponse.class, "chatResult", chatResult); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional chatResult = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder chatResult(ChatResult chatResult) { Utils.checkNotNull(chatResult, "chatResult"); this.chatResult = Optional.ofNullable(chatResult); @@ -98,10 +102,12 @@ public Builder chatResult(Optional chatResult) { this.chatResult = chatResult; return this; } - + public GetChatResponse build() { + return new GetChatResponse( chatResult); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetCollectionRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetCollectionRequest.java index 372b31be..92cd2021 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetCollectionRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetCollectionRequest.java @@ -15,8 +15,8 @@ import java.lang.String; import java.util.Optional; -public class GetCollectionRequest { +public class GetCollectionRequest { /** * The ID of the Collection to be retrieved. */ @@ -62,7 +62,8 @@ public GetCollectionRequest( public GetCollectionRequest( long id) { - this(id, Optional.empty(), Optional.empty(), Optional.empty()); + this(id, Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -97,9 +98,10 @@ public Optional allowedDatasource() { return allowedDatasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the Collection to be retrieved. @@ -119,6 +121,7 @@ public GetCollectionRequest withWithItems(boolean withItems) { return this; } + /** * Whether or not to include the Collection Items in this Collection. Only request if absolutely required, as this is expensive. */ @@ -137,6 +140,7 @@ public GetCollectionRequest withWithHierarchy(boolean withHierarchy) { return this; } + /** * Whether or not to include the top level Collection in this Collection's hierarchy. */ @@ -155,6 +159,7 @@ public GetCollectionRequest withAllowedDatasource(String allowedDatasource) { return this; } + /** * The datasource allowed in the Collection returned. */ @@ -164,7 +169,6 @@ public GetCollectionRequest withAllowedDatasource(Optional allowedDataso return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -184,9 +188,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - withItems, - withHierarchy, + id, withItems, withHierarchy, allowedDatasource); } @@ -198,21 +200,23 @@ public String toString() { "withHierarchy", withHierarchy, "allowedDatasource", allowedDatasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long id; - + private Optional withItems = Optional.empty(); - + private Optional withHierarchy = Optional.empty(); - + private Optional allowedDatasource = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ID of the Collection to be retrieved. */ @@ -222,6 +226,7 @@ public Builder id(long id) { return this; } + /** * Whether or not to include the Collection Items in this Collection. Only request if absolutely required, as this is expensive. */ @@ -240,6 +245,7 @@ public Builder withItems(Optional withItems) { return this; } + /** * Whether or not to include the top level Collection in this Collection's hierarchy. */ @@ -258,6 +264,7 @@ public Builder withHierarchy(Optional withHierarchy) { return this; } + /** * The datasource allowed in the Collection returned. */ @@ -275,13 +282,13 @@ public Builder allowedDatasource(Optional allowedDatasource) { this.allowedDatasource = allowedDatasource; return this; } - + public GetCollectionRequest build() { + return new GetCollectionRequest( - id, - withItems, - withHierarchy, + id, withItems, withHierarchy, allowedDatasource); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetCollectionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetCollectionResponse.java index 9eaee25f..35d7ae18 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetCollectionResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetCollectionResponse.java @@ -14,12 +14,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class GetCollectionResponse { @JsonInclude(Include.NON_ABSENT) @JsonProperty("collection") private Optional collection; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("rootCollection") private Optional rootCollection; @@ -31,6 +33,7 @@ public class GetCollectionResponse { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private Optional error; @@ -52,7 +55,8 @@ public GetCollectionResponse( } public GetCollectionResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @SuppressWarnings("unchecked") @@ -81,9 +85,10 @@ public Optional error() { return (Optional) error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public GetCollectionResponse withCollection(Collection collection) { Utils.checkNotNull(collection, "collection"); @@ -91,6 +96,7 @@ public GetCollectionResponse withCollection(Collection collection) { return this; } + public GetCollectionResponse withCollection(Optional collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; @@ -103,6 +109,7 @@ public GetCollectionResponse withRootCollection(Collection rootCollection) { return this; } + public GetCollectionResponse withRootCollection(Optional rootCollection) { Utils.checkNotNull(rootCollection, "rootCollection"); this.rootCollection = rootCollection; @@ -118,6 +125,7 @@ public GetCollectionResponse withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular Collection. To be used for `/feedback` reporting. */ @@ -133,13 +141,13 @@ public GetCollectionResponse withError(CollectionError3 error) { return this; } + public GetCollectionResponse withError(Optional error) { Utils.checkNotNull(error, "error"); this.error = error; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -159,9 +167,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - collection, - rootCollection, - trackingToken, + collection, rootCollection, trackingToken, error); } @@ -173,21 +179,23 @@ public String toString() { "trackingToken", trackingToken, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional collection = Optional.empty(); - + private Optional rootCollection = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder collection(Collection collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -200,6 +208,7 @@ public Builder collection(Optional collection) { return this; } + public Builder rootCollection(Collection rootCollection) { Utils.checkNotNull(rootCollection, "rootCollection"); this.rootCollection = Optional.ofNullable(rootCollection); @@ -212,6 +221,7 @@ public Builder rootCollection(Optional rootCollection) { return this; } + /** * An opaque token that represents this particular Collection. To be used for `/feedback` reporting. */ @@ -230,6 +240,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder error(CollectionError3 error) { Utils.checkNotNull(error, "error"); this.error = Optional.ofNullable(error); @@ -241,13 +252,13 @@ public Builder error(Optional error) { this.error = error; return this; } - + public GetCollectionResponse build() { + return new GetCollectionResponse( - collection, - rootCollection, - trackingToken, + collection, rootCollection, trackingToken, error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDatasourceConfigRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDatasourceConfigRequest.java index f06b4edd..8906a178 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDatasourceConfigRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDatasourceConfigRequest.java @@ -16,7 +16,6 @@ *

Describes the request body of the /getdatasourceconfig API call */ public class GetDatasourceConfigRequest { - /** * Datasource name for which config is needed. */ @@ -38,9 +37,10 @@ public String datasource() { return datasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Datasource name for which config is needed. @@ -51,7 +51,6 @@ public GetDatasourceConfigRequest withDatasource(String datasource) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -76,15 +75,17 @@ public String toString() { return Utils.toString(GetDatasourceConfigRequest.class, "datasource", datasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private Builder() { // force use of static builder() method } + /** * Datasource name for which config is needed. */ @@ -93,10 +94,12 @@ public Builder datasource(String datasource) { this.datasource = datasource; return this; } - + public GetDatasourceConfigRequest build() { + return new GetDatasourceConfigRequest( datasource); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDlpReportResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDlpReportResponse.java index 66e5cf48..20855a5c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDlpReportResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDlpReportResponse.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class GetDlpReportResponse { +public class GetDlpReportResponse { /** * Full policy information that will be used for scans. */ @@ -43,9 +43,10 @@ public Optional report() { return (Optional) report; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Full policy information that will be used for scans. @@ -56,6 +57,7 @@ public GetDlpReportResponse withReport(DlpReport report) { return this; } + /** * Full policy information that will be used for scans. */ @@ -65,7 +67,6 @@ public GetDlpReportResponse withReport(Optional report) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -90,15 +91,17 @@ public String toString() { return Utils.toString(GetDlpReportResponse.class, "report", report); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional report = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Full policy information that will be used for scans. */ @@ -116,10 +119,12 @@ public Builder report(Optional report) { this.report = report; return this; } - + public GetDlpReportResponse build() { + return new GetDlpReportResponse( report); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocPermissionsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocPermissionsRequest.java index ba374ef2..a22ce89b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocPermissionsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocPermissionsRequest.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class GetDocPermissionsRequest { +public class GetDocPermissionsRequest { /** * The Glean Document ID to retrieve permissions for. */ @@ -41,9 +41,10 @@ public Optional documentId() { return documentId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The Glean Document ID to retrieve permissions for. @@ -54,6 +55,7 @@ public GetDocPermissionsRequest withDocumentId(String documentId) { return this; } + /** * The Glean Document ID to retrieve permissions for. */ @@ -63,7 +65,6 @@ public GetDocPermissionsRequest withDocumentId(Optional documentId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(GetDocPermissionsRequest.class, "documentId", documentId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional documentId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The Glean Document ID to retrieve permissions for. */ @@ -114,10 +117,12 @@ public Builder documentId(Optional documentId) { this.documentId = documentId; return this; } - + public GetDocPermissionsRequest build() { + return new GetDocPermissionsRequest( documentId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocPermissionsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocPermissionsResponse.java index ea85d993..e543e3ae 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocPermissionsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocPermissionsResponse.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class GetDocPermissionsResponse { +public class GetDocPermissionsResponse { /** * A list of emails of users who have access to the document. If the document is visible to all Glean users, a list with only a single value of 'VISIBLE_TO_ALL'. */ @@ -44,9 +44,10 @@ public Optional> allowedUserEmails() { return (Optional>) allowedUserEmails; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A list of emails of users who have access to the document. If the document is visible to all Glean users, a list with only a single value of 'VISIBLE_TO_ALL'. @@ -57,6 +58,7 @@ public GetDocPermissionsResponse withAllowedUserEmails(List allowedUserE return this; } + /** * A list of emails of users who have access to the document. If the document is visible to all Glean users, a list with only a single value of 'VISIBLE_TO_ALL'. */ @@ -66,7 +68,6 @@ public GetDocPermissionsResponse withAllowedUserEmails(Optional> allowedUserEmails = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A list of emails of users who have access to the document. If the document is visible to all Glean users, a list with only a single value of 'VISIBLE_TO_ALL'. */ @@ -117,10 +120,12 @@ public Builder allowedUserEmails(Optional> allowedUserEma this.allowedUserEmails = allowedUserEmails; return this; } - + public GetDocPermissionsResponse build() { + return new GetDocPermissionsResponse( allowedUserEmails); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentCountRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentCountRequest.java index d1dc5eaf..9722d3a9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentCountRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentCountRequest.java @@ -16,7 +16,6 @@ *

Describes the request body of the /getdocumentcount API call */ public class GetDocumentCountRequest { - /** * Datasource name for which document count is needed. */ @@ -38,9 +37,10 @@ public String datasource() { return datasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Datasource name for which document count is needed. @@ -51,7 +51,6 @@ public GetDocumentCountRequest withDatasource(String datasource) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -76,15 +75,17 @@ public String toString() { return Utils.toString(GetDocumentCountRequest.class, "datasource", datasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private Builder() { // force use of static builder() method } + /** * Datasource name for which document count is needed. */ @@ -93,10 +94,12 @@ public Builder datasource(String datasource) { this.datasource = datasource; return this; } - + public GetDocumentCountRequest build() { + return new GetDocumentCountRequest( datasource); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentCountResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentCountResponse.java index 5df6f86f..e95c3df0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentCountResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentCountResponse.java @@ -20,7 +20,6 @@ *

Describes the response body of the /getdocumentcount API call */ public class GetDocumentCountResponse { - /** * Number of documents corresponding to the specified custom datasource. */ @@ -47,9 +46,10 @@ public Optional documentCount() { return documentCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Number of documents corresponding to the specified custom datasource. @@ -60,6 +60,7 @@ public GetDocumentCountResponse withDocumentCount(long documentCount) { return this; } + /** * Number of documents corresponding to the specified custom datasource. */ @@ -69,7 +70,6 @@ public GetDocumentCountResponse withDocumentCount(Optional documentCount) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -94,15 +94,17 @@ public String toString() { return Utils.toString(GetDocumentCountResponse.class, "documentCount", documentCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional documentCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Number of documents corresponding to the specified custom datasource. */ @@ -120,10 +122,12 @@ public Builder documentCount(Optional documentCount) { this.documentCount = documentCount; return this; } - + public GetDocumentCountResponse build() { + return new GetDocumentCountResponse( documentCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentStatusRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentStatusRequest.java index 169714b2..ad3bff13 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentStatusRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentStatusRequest.java @@ -16,7 +16,6 @@ *

Describes the request body for /getdocumentstatus API call */ public class GetDocumentStatusRequest { - /** * Datasource to get fetch document status for */ @@ -72,9 +71,10 @@ public String docId() { return docId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Datasource to get fetch document status for @@ -103,7 +103,6 @@ public GetDocumentStatusRequest withDocId(String docId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -122,9 +121,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasource, - objectType, - docId); + datasource, objectType, docId); } @Override @@ -134,19 +131,21 @@ public String toString() { "objectType", objectType, "docId", docId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private String objectType; - + private String docId; - + private Builder() { // force use of static builder() method } + /** * Datasource to get fetch document status for */ @@ -156,6 +155,7 @@ public Builder datasource(String datasource) { return this; } + /** * Object type of the document to get the status for */ @@ -165,6 +165,7 @@ public Builder objectType(String objectType) { return this; } + /** * Glean Document ID within the datasource to get the status for. */ @@ -173,12 +174,12 @@ public Builder docId(String docId) { this.docId = docId; return this; } - + public GetDocumentStatusRequest build() { + return new GetDocumentStatusRequest( - datasource, - objectType, - docId); + datasource, objectType, docId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentStatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentStatusResponse.java index 006ef009..51384e3d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentStatusResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentStatusResponse.java @@ -20,7 +20,6 @@ *

Describes the response body of the /getdocumentstatus API call */ public class GetDocumentStatusResponse { - /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN */ @@ -66,7 +65,8 @@ public GetDocumentStatusResponse( } public GetDocumentStatusResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -101,9 +101,10 @@ public Optional lastIndexedAt() { return lastIndexedAt; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN @@ -114,6 +115,7 @@ public GetDocumentStatusResponse withUploadStatus(String uploadStatus) { return this; } + /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN */ @@ -132,6 +134,7 @@ public GetDocumentStatusResponse withLastUploadedAt(long lastUploadedAt) { return this; } + /** * Time of last successful upload, in epoch seconds */ @@ -150,6 +153,7 @@ public GetDocumentStatusResponse withIndexingStatus(String indexingStatus) { return this; } + /** * Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN */ @@ -168,6 +172,7 @@ public GetDocumentStatusResponse withLastIndexedAt(long lastIndexedAt) { return this; } + /** * Time of last successful indexing, in epoch seconds */ @@ -177,7 +182,6 @@ public GetDocumentStatusResponse withLastIndexedAt(Optional lastIndexedAt) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -197,9 +201,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - uploadStatus, - lastUploadedAt, - indexingStatus, + uploadStatus, lastUploadedAt, indexingStatus, lastIndexedAt); } @@ -211,21 +213,23 @@ public String toString() { "indexingStatus", indexingStatus, "lastIndexedAt", lastIndexedAt); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional uploadStatus = Optional.empty(); - + private Optional lastUploadedAt = Optional.empty(); - + private Optional indexingStatus = Optional.empty(); - + private Optional lastIndexedAt = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN */ @@ -244,6 +248,7 @@ public Builder uploadStatus(Optional uploadStatus) { return this; } + /** * Time of last successful upload, in epoch seconds */ @@ -262,6 +267,7 @@ public Builder lastUploadedAt(Optional lastUploadedAt) { return this; } + /** * Indexing status, enum of NOT_INDEXED, INDEXED, STATUS_UNKNOWN */ @@ -280,6 +286,7 @@ public Builder indexingStatus(Optional indexingStatus) { return this; } + /** * Time of last successful indexing, in epoch seconds */ @@ -297,13 +304,13 @@ public Builder lastIndexedAt(Optional lastIndexedAt) { this.lastIndexedAt = lastIndexedAt; return this; } - + public GetDocumentStatusResponse build() { + return new GetDocumentStatusResponse( - uploadStatus, - lastUploadedAt, - indexingStatus, + uploadStatus, lastUploadedAt, indexingStatus, lastIndexedAt); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentVisibilityOverridesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentVisibilityOverridesResponse.java index 34c73cc0..9dcb21e0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentVisibilityOverridesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentVisibilityOverridesResponse.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class GetDocumentVisibilityOverridesResponse { @JsonInclude(Include.NON_ABSENT) @@ -38,9 +39,10 @@ public Optional> visibilityOverrides() { return (Optional>) visibilityOverrides; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public GetDocumentVisibilityOverridesResponse withVisibilityOverrides(List visibilityOverrides) { Utils.checkNotNull(visibilityOverrides, "visibilityOverrides"); @@ -48,13 +50,13 @@ public GetDocumentVisibilityOverridesResponse withVisibilityOverrides(List> visibilityOverrides) { Utils.checkNotNull(visibilityOverrides, "visibilityOverrides"); this.visibilityOverrides = visibilityOverrides; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -79,15 +81,17 @@ public String toString() { return Utils.toString(GetDocumentVisibilityOverridesResponse.class, "visibilityOverrides", visibilityOverrides); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> visibilityOverrides = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder visibilityOverrides(List visibilityOverrides) { Utils.checkNotNull(visibilityOverrides, "visibilityOverrides"); this.visibilityOverrides = Optional.ofNullable(visibilityOverrides); @@ -99,10 +103,12 @@ public Builder visibilityOverrides(Optional cursor() { return cursor; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. @@ -93,6 +94,7 @@ public GetDocumentsByFacetsRequest withDatasourcesFilter(List datasource return this; } + /** * Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. */ @@ -120,6 +122,7 @@ public GetDocumentsByFacetsRequest withCursor(String cursor) { return this; } + /** * Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. */ @@ -129,7 +132,6 @@ public GetDocumentsByFacetsRequest withCursor(Optional cursor) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -148,9 +150,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasourcesFilter, - filterSets, - cursor); + datasourcesFilter, filterSets, cursor); } @Override @@ -160,19 +160,21 @@ public String toString() { "filterSets", filterSets, "cursor", cursor); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> datasourcesFilter = Optional.empty(); - + private List filterSets; - + private Optional cursor = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. */ @@ -191,6 +193,7 @@ public Builder datasourcesFilter(Optional> datasourcesFil return this; } + /** * A list of facet filter sets that will be OR'ed together. An AND is assumed between different filters in each set. */ @@ -200,6 +203,7 @@ public Builder filterSets(List filterSets) { return this; } + /** * Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. */ @@ -217,12 +221,12 @@ public Builder cursor(Optional cursor) { this.cursor = cursor; return this; } - + public GetDocumentsByFacetsRequest build() { + return new GetDocumentsByFacetsRequest( - datasourcesFilter, - filterSets, - cursor); + datasourcesFilter, filterSets, cursor); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentsByFacetsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentsByFacetsResponse.java index 6915df44..f8fd55fe 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentsByFacetsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentsByFacetsResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class GetDocumentsByFacetsResponse { +public class GetDocumentsByFacetsResponse { /** * The document details, ordered by score. */ @@ -81,9 +81,10 @@ public Optional cursor() { return cursor; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The document details, ordered by score. @@ -94,6 +95,7 @@ public GetDocumentsByFacetsResponse withDocuments(List documents) { return this; } + /** * The document details, ordered by score. */ @@ -112,6 +114,7 @@ public GetDocumentsByFacetsResponse withHasMoreResults(boolean hasMoreResults) { return this; } + /** * Whether more results are available. Use cursor to retrieve them. */ @@ -130,6 +133,7 @@ public GetDocumentsByFacetsResponse withCursor(String cursor) { return this; } + /** * Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. */ @@ -139,7 +143,6 @@ public GetDocumentsByFacetsResponse withCursor(Optional cursor) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -158,9 +161,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - documents, - hasMoreResults, - cursor); + documents, hasMoreResults, cursor); } @Override @@ -170,19 +171,21 @@ public String toString() { "hasMoreResults", hasMoreResults, "cursor", cursor); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> documents = Optional.empty(); - + private Optional hasMoreResults = Optional.empty(); - + private Optional cursor = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The document details, ordered by score. */ @@ -201,6 +204,7 @@ public Builder documents(Optional> documents) { return this; } + /** * Whether more results are available. Use cursor to retrieve them. */ @@ -219,6 +223,7 @@ public Builder hasMoreResults(Optional hasMoreResults) { return this; } + /** * Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. */ @@ -236,12 +241,12 @@ public Builder cursor(Optional cursor) { this.cursor = cursor; return this; } - + public GetDocumentsByFacetsResponse build() { + return new GetDocumentsByFacetsResponse( - documents, - hasMoreResults, - cursor); + documents, hasMoreResults, cursor); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentsRequest.java index 382dcee4..1e8b9f36 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetDocumentsRequest.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class GetDocumentsRequest { +public class GetDocumentsRequest { /** * The specification for the documents to be retrieved. */ @@ -62,9 +62,10 @@ public Optional> includeFields() { return (Optional>) includeFields; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The specification for the documents to be retrieved. @@ -84,6 +85,7 @@ public GetDocumentsRequest withIncludeFields(List documentSpecs; - + private Optional> includeFields = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The specification for the documents to be retrieved. */ @@ -141,6 +143,7 @@ public Builder documentSpecs(List documentSpecs) { return this; } + /** * List of Document fields to return (that aren't returned by default) */ @@ -158,11 +161,12 @@ public Builder includeFields(Optional> documents() { return (Optional>) documents; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The document details or the error if document is not found. @@ -57,6 +58,7 @@ public GetDocumentsResponse withDocuments(Map docu return this; } + /** * The document details or the error if document is not found. */ @@ -66,7 +68,6 @@ public GetDocumentsResponse withDocuments(Optional> documents = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The document details or the error if document is not found. */ @@ -117,10 +120,12 @@ public Builder documents(Optional> d this.documents = documents; return this; } - + public GetDocumentsResponse build() { + return new GetDocumentsResponse( documents); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetPinRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetPinRequest.java index 63143821..65a95b61 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetPinRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetPinRequest.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class GetPinRequest { +public class GetPinRequest { /** * The opaque id of the pin to be fetched. */ @@ -41,9 +41,10 @@ public Optional id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque id of the pin to be fetched. @@ -54,6 +55,7 @@ public GetPinRequest withId(String id) { return this; } + /** * The opaque id of the pin to be fetched. */ @@ -63,7 +65,6 @@ public GetPinRequest withId(Optional id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(GetPinRequest.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque id of the pin to be fetched. */ @@ -114,10 +117,12 @@ public Builder id(Optional id) { this.id = id; return this; } - + public GetPinRequest build() { + return new GetPinRequest( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetPinResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetPinResponse.java index 03e066ee..79a2a5ad 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetPinResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetPinResponse.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class GetPinResponse { @JsonInclude(Include.NON_ABSENT) @@ -37,9 +38,10 @@ public Optional pin() { return (Optional) pin; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public GetPinResponse withPin(PinDocument pin) { Utils.checkNotNull(pin, "pin"); @@ -47,13 +49,13 @@ public GetPinResponse withPin(PinDocument pin) { return this; } + public GetPinResponse withPin(Optional pin) { Utils.checkNotNull(pin, "pin"); this.pin = pin; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -78,15 +80,17 @@ public String toString() { return Utils.toString(GetPinResponse.class, "pin", pin); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional pin = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder pin(PinDocument pin) { Utils.checkNotNull(pin, "pin"); this.pin = Optional.ofNullable(pin); @@ -98,10 +102,12 @@ public Builder pin(Optional pin) { this.pin = pin; return this; } - + public GetPinResponse build() { + return new GetPinResponse( pin); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutRequest.java index 7103cfc0..3c77a754 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutRequest.java @@ -10,8 +10,8 @@ import java.lang.Override; import java.lang.String; -public class GetShortcutRequest { +public class GetShortcutRequest { /** * The alias for the shortcut, including any arguments for variable shortcuts. */ @@ -33,9 +33,10 @@ public String alias() { return alias; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The alias for the shortcut, including any arguments for variable shortcuts. @@ -46,7 +47,6 @@ public GetShortcutRequest withAlias(String alias) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -71,15 +71,17 @@ public String toString() { return Utils.toString(GetShortcutRequest.class, "alias", alias); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String alias; - + private Builder() { // force use of static builder() method } + /** * The alias for the shortcut, including any arguments for variable shortcuts. */ @@ -88,10 +90,12 @@ public Builder alias(String alias) { this.alias = alias; return this; } - + public GetShortcutRequest build() { + return new GetShortcutRequest( alias); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutResponse.java index acf8f0eb..75283ee0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetShortcutResponse.java @@ -14,12 +14,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class GetShortcutResponse { @JsonInclude(Include.NON_ABSENT) @JsonProperty("shortcut") private Optional shortcut; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private Optional error; @@ -50,9 +52,10 @@ public Optional error() { return (Optional) error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public GetShortcutResponse withShortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); @@ -60,6 +63,7 @@ public GetShortcutResponse withShortcut(Shortcut shortcut) { return this; } + public GetShortcutResponse withShortcut(Optional shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = shortcut; @@ -72,13 +76,13 @@ public GetShortcutResponse withError(ShortcutError error) { return this; } + public GetShortcutResponse withError(Optional error) { Utils.checkNotNull(error, "error"); this.error = error; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -96,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - shortcut, - error); + shortcut, error); } @Override @@ -106,17 +109,19 @@ public String toString() { "shortcut", shortcut, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional shortcut = Optional.empty(); - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder shortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = Optional.ofNullable(shortcut); @@ -129,6 +134,7 @@ public Builder shortcut(Optional shortcut) { return this; } + public Builder error(ShortcutError error) { Utils.checkNotNull(error, "error"); this.error = Optional.ofNullable(error); @@ -140,11 +146,12 @@ public Builder error(Optional error) { this.error = error; return this; } - + public GetShortcutResponse build() { + return new GetShortcutResponse( - shortcut, - error); + shortcut, error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetUserCountRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetUserCountRequest.java index a2a9e9c2..e03b4e19 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetUserCountRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetUserCountRequest.java @@ -16,7 +16,6 @@ *

Describes the request body of the /getusercount API call */ public class GetUserCountRequest { - /** * Datasource name for which user count is needed. */ @@ -38,9 +37,10 @@ public String datasource() { return datasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Datasource name for which user count is needed. @@ -51,7 +51,6 @@ public GetUserCountRequest withDatasource(String datasource) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -76,15 +75,17 @@ public String toString() { return Utils.toString(GetUserCountRequest.class, "datasource", datasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private Builder() { // force use of static builder() method } + /** * Datasource name for which user count is needed. */ @@ -93,10 +94,12 @@ public Builder datasource(String datasource) { this.datasource = datasource; return this; } - + public GetUserCountRequest build() { + return new GetUserCountRequest( datasource); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetUserCountResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetUserCountResponse.java index 933488da..a6d045f7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GetUserCountResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GetUserCountResponse.java @@ -20,7 +20,6 @@ *

Describes the response body of the /getusercount API call */ public class GetUserCountResponse { - /** * Number of users corresponding to the specified custom datasource. */ @@ -47,9 +46,10 @@ public Optional userCount() { return userCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Number of users corresponding to the specified custom datasource. @@ -60,6 +60,7 @@ public GetUserCountResponse withUserCount(long userCount) { return this; } + /** * Number of users corresponding to the specified custom datasource. */ @@ -69,7 +70,6 @@ public GetUserCountResponse withUserCount(Optional userCount) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -94,15 +94,17 @@ public String toString() { return Utils.toString(GetUserCountResponse.class, "userCount", userCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional userCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Number of users corresponding to the specified custom datasource. */ @@ -120,10 +122,12 @@ public Builder userCount(Optional userCount) { this.userCount = userCount; return this; } - + public GetUserCountResponse build() { + return new GetUserCountResponse( userCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GleanAssistInsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GleanAssistInsightsResponse.java index b4fbddef..fe3c22e4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GleanAssistInsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GleanAssistInsightsResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class GleanAssistInsightsResponse { +public class GleanAssistInsightsResponse { /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -73,7 +73,8 @@ public GleanAssistInsightsResponse( } public GleanAssistInsightsResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -119,9 +120,10 @@ public Optional> departments() { return (Optional>) departments; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). @@ -132,6 +134,7 @@ public GleanAssistInsightsResponse withLastLogTimestamp(long lastLogTimestamp) { return this; } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -150,6 +153,7 @@ public GleanAssistInsightsResponse withActivityInsights(List datasour return this; } + /** * List of datasource instances for which glean assist is enabled. */ @@ -204,6 +210,7 @@ public GleanAssistInsightsResponse withDepartments(List departments) { return this; } + /** * List of departments applicable for users tab. */ @@ -213,7 +220,6 @@ public GleanAssistInsightsResponse withDepartments(Optional lastLogTimestamp = Optional.empty(); - + private Optional> activityInsights = Optional.empty(); - + private Optional totalActiveUsers = Optional.empty(); - + private Optional> datasourceInstances = Optional.empty(); - + private Optional> departments = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -285,6 +290,7 @@ public Builder lastLogTimestamp(Optional lastLogTimestamp) { return this; } + /** * Insights for all active users with respect to set of actions. */ @@ -303,6 +309,7 @@ public Builder activityInsights(Optional> ac return this; } + /** * Total number of active users in the requested period. */ @@ -321,6 +328,7 @@ public Builder totalActiveUsers(Optional totalActiveUsers) { return this; } + /** * List of datasource instances for which glean assist is enabled. */ @@ -339,6 +347,7 @@ public Builder datasourceInstances(Optional> datasourceIn return this; } + /** * List of departments applicable for users tab. */ @@ -356,14 +365,13 @@ public Builder departments(Optional> departments) { this.departments = departments; return this; } - + public GleanAssistInsightsResponse build() { + return new GleanAssistInsightsResponse( - lastLogTimestamp, - activityInsights, - totalActiveUsers, - datasourceInstances, - departments); + lastLogTimestamp, activityInsights, totalActiveUsers, + datasourceInstances, departments); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GleanDataError.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GleanDataError.java index c7043a70..77b61ef1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GleanDataError.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GleanDataError.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class GleanDataError { +public class GleanDataError { /** * Indicates the gmail results could not be fetched due to bad token. */ @@ -39,6 +39,7 @@ public class GleanDataError { @JsonProperty("invalidOperators") private Optional> invalidOperators; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("errorMessages") private Optional> errorMessages; @@ -60,7 +61,8 @@ public GleanDataError( } public GleanDataError() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -94,9 +96,10 @@ public Optional> errorMessages() { return (Optional>) errorMessages; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Indicates the gmail results could not be fetched due to bad token. @@ -107,6 +110,7 @@ public GleanDataError withBadGmailToken(boolean badGmailToken) { return this; } + /** * Indicates the gmail results could not be fetched due to bad token. */ @@ -125,6 +129,7 @@ public GleanDataError withBadOutlookToken(boolean badOutlookToken) { return this; } + /** * Indicates the outlook results could not be fetched due to bad token. */ @@ -143,6 +148,7 @@ public GleanDataError withInvalidOperators(List inval return this; } + /** * Indicates results could not be fetched due to invalid operators in the query. */ @@ -158,13 +164,13 @@ public GleanDataError withErrorMessages(List errorMessages) { return this; } + public GleanDataError withErrorMessages(Optional> errorMessages) { Utils.checkNotNull(errorMessages, "errorMessages"); this.errorMessages = errorMessages; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -184,9 +190,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - badGmailToken, - badOutlookToken, - invalidOperators, + badGmailToken, badOutlookToken, invalidOperators, errorMessages); } @@ -198,21 +202,23 @@ public String toString() { "invalidOperators", invalidOperators, "errorMessages", errorMessages); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional badGmailToken = Optional.empty(); - + private Optional badOutlookToken = Optional.empty(); - + private Optional> invalidOperators = Optional.empty(); - + private Optional> errorMessages = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Indicates the gmail results could not be fetched due to bad token. */ @@ -231,6 +237,7 @@ public Builder badGmailToken(Optional badGmailToken) { return this; } + /** * Indicates the outlook results could not be fetched due to bad token. */ @@ -249,6 +256,7 @@ public Builder badOutlookToken(Optional badOutlookToken) { return this; } + /** * Indicates results could not be fetched due to invalid operators in the query. */ @@ -267,6 +275,7 @@ public Builder invalidOperators(Optional errorMessages) { Utils.checkNotNull(errorMessages, "errorMessages"); this.errorMessages = Optional.ofNullable(errorMessages); @@ -278,13 +287,13 @@ public Builder errorMessages(Optional> errorMessage this.errorMessages = errorMessages; return this; } - + public GleanDataError build() { + return new GleanDataError( - badGmailToken, - badOutlookToken, - invalidOperators, + badGmailToken, badOutlookToken, invalidOperators, errorMessages); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GrantPermission.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GrantPermission.java index 4f91e2ec..df51a788 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GrantPermission.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GrantPermission.java @@ -20,7 +20,6 @@ *

Describes the grant permission level that a user has for a specific feature */ public class GrantPermission { - /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object */ @@ -48,9 +47,10 @@ public Optional scopeType() { return (Optional) scopeType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object @@ -61,6 +61,7 @@ public GrantPermission withScopeType(ScopeType scopeType) { return this; } + /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object */ @@ -70,7 +71,6 @@ public GrantPermission withScopeType(Optional scopeType) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -95,15 +95,17 @@ public String toString() { return Utils.toString(GrantPermission.class, "scopeType", scopeType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional scopeType = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object */ @@ -121,10 +123,12 @@ public Builder scopeType(Optional scopeType) { this.scopeType = scopeType; return this; } - + public GrantPermission build() { + return new GrantPermission( scopeType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/GreenlistUsersRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/GreenlistUsersRequest.java index 05b5afe4..0353a997 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/GreenlistUsersRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/GreenlistUsersRequest.java @@ -17,7 +17,6 @@ *

Describes the request body of the /betausers API call */ public class GreenlistUsersRequest { - /** * Datasource which needs to be made visible to users specified in the `emails` field. */ @@ -56,9 +55,10 @@ public List emails() { return emails; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Datasource which needs to be made visible to users specified in the `emails` field. @@ -78,7 +78,6 @@ public GreenlistUsersRequest withEmails(List emails) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -96,8 +95,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasource, - emails); + datasource, emails); } @Override @@ -106,17 +104,19 @@ public String toString() { "datasource", datasource, "emails", emails); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private List emails; - + private Builder() { // force use of static builder() method } + /** * Datasource which needs to be made visible to users specified in the `emails` field. */ @@ -126,6 +126,7 @@ public Builder datasource(String datasource) { return this; } + /** * The emails of the beta users */ @@ -134,11 +135,12 @@ public Builder emails(List emails) { this.emails = emails; return this; } - + public GreenlistUsersRequest build() { + return new GreenlistUsersRequest( - datasource, - emails); + datasource, emails); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Group.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Group.java index 4bdf426f..132bdbfb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Group.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Group.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class Group { +public class Group { /** * The type of user group */ @@ -77,9 +77,10 @@ public Optional name() { return name; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The type of user group @@ -108,6 +109,7 @@ public Group withName(String name) { return this; } + /** * Name of the group. */ @@ -117,7 +119,6 @@ public Group withName(Optional name) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -136,9 +137,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - type, - id, - name); + type, id, name); } @Override @@ -148,19 +147,21 @@ public String toString() { "id", id, "name", name); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private GroupType type; - + private String id; - + private Optional name = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The type of user group */ @@ -170,6 +171,7 @@ public Builder type(GroupType type) { return this; } + /** * A unique identifier for the group. May be the same as name. */ @@ -179,6 +181,7 @@ public Builder id(String id) { return this; } + /** * Name of the group. */ @@ -196,12 +199,12 @@ public Builder name(Optional name) { this.name = name; return this; } - + public Group build() { + return new Group( - type, - id, - name); + type, id, name); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Hotword.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Hotword.java index 7dbd2b1e..2a9bb61f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Hotword.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Hotword.java @@ -14,12 +14,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class Hotword { @JsonInclude(Include.NON_ABSENT) @JsonProperty("regex") private Optional regex; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("proximity") private Optional proximity; @@ -49,9 +51,10 @@ public Optional proximity() { return (Optional) proximity; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public Hotword withRegex(String regex) { Utils.checkNotNull(regex, "regex"); @@ -59,6 +62,7 @@ public Hotword withRegex(String regex) { return this; } + public Hotword withRegex(Optional regex) { Utils.checkNotNull(regex, "regex"); this.regex = regex; @@ -71,13 +75,13 @@ public Hotword withProximity(HotwordProximity proximity) { return this; } + public Hotword withProximity(Optional proximity) { Utils.checkNotNull(proximity, "proximity"); this.proximity = proximity; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -95,8 +99,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - regex, - proximity); + regex, proximity); } @Override @@ -105,17 +108,19 @@ public String toString() { "regex", regex, "proximity", proximity); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional regex = Optional.empty(); - + private Optional proximity = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder regex(String regex) { Utils.checkNotNull(regex, "regex"); this.regex = Optional.ofNullable(regex); @@ -128,6 +133,7 @@ public Builder regex(Optional regex) { return this; } + public Builder proximity(HotwordProximity proximity) { Utils.checkNotNull(proximity, "proximity"); this.proximity = Optional.ofNullable(proximity); @@ -139,11 +145,12 @@ public Builder proximity(Optional proximity) { this.proximity = proximity; return this; } - + public Hotword build() { + return new Hotword( - regex, - proximity); + regex, proximity); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/HotwordProximity.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/HotwordProximity.java index 6e52fe53..9a1bb318 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/HotwordProximity.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/HotwordProximity.java @@ -14,12 +14,14 @@ import java.lang.String; import java.util.Optional; + public class HotwordProximity { @JsonInclude(Include.NON_ABSENT) @JsonProperty("windowBefore") private Optional windowBefore; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("windowAfter") private Optional windowAfter; @@ -48,9 +50,10 @@ public Optional windowAfter() { return windowAfter; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public HotwordProximity withWindowBefore(long windowBefore) { Utils.checkNotNull(windowBefore, "windowBefore"); @@ -58,6 +61,7 @@ public HotwordProximity withWindowBefore(long windowBefore) { return this; } + public HotwordProximity withWindowBefore(Optional windowBefore) { Utils.checkNotNull(windowBefore, "windowBefore"); this.windowBefore = windowBefore; @@ -70,13 +74,13 @@ public HotwordProximity withWindowAfter(long windowAfter) { return this; } + public HotwordProximity withWindowAfter(Optional windowAfter) { Utils.checkNotNull(windowAfter, "windowAfter"); this.windowAfter = windowAfter; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -94,8 +98,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - windowBefore, - windowAfter); + windowBefore, windowAfter); } @Override @@ -104,17 +107,19 @@ public String toString() { "windowBefore", windowBefore, "windowAfter", windowAfter); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional windowBefore = Optional.empty(); - + private Optional windowAfter = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder windowBefore(long windowBefore) { Utils.checkNotNull(windowBefore, "windowBefore"); this.windowBefore = Optional.ofNullable(windowBefore); @@ -127,6 +132,7 @@ public Builder windowBefore(Optional windowBefore) { return this; } + public Builder windowAfter(long windowAfter) { Utils.checkNotNull(windowAfter, "windowAfter"); this.windowAfter = Optional.ofNullable(windowAfter); @@ -138,11 +144,12 @@ public Builder windowAfter(Optional windowAfter) { this.windowAfter = windowAfter; return this; } - + public HotwordProximity build() { + return new HotwordProximity( - windowBefore, - windowAfter); + windowBefore, windowAfter); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/IconConfig.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/IconConfig.java index 85e83a19..abaff9b2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/IconConfig.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/IconConfig.java @@ -26,18 +26,22 @@ public class IconConfig { @JsonProperty("generatedBackgroundColorKey") private Optional generatedBackgroundColorKey; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("backgroundColor") private Optional backgroundColor; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("color") private Optional color; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("key") private Optional key; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("iconType") private Optional iconType; @@ -92,7 +96,9 @@ public IconConfig( } public IconConfig() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } @JsonIgnore @@ -145,9 +151,10 @@ public Optional url() { return url; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public IconConfig withGeneratedBackgroundColorKey(String generatedBackgroundColorKey) { Utils.checkNotNull(generatedBackgroundColorKey, "generatedBackgroundColorKey"); @@ -155,6 +162,7 @@ public IconConfig withGeneratedBackgroundColorKey(String generatedBackgroundColo return this; } + public IconConfig withGeneratedBackgroundColorKey(Optional generatedBackgroundColorKey) { Utils.checkNotNull(generatedBackgroundColorKey, "generatedBackgroundColorKey"); this.generatedBackgroundColorKey = generatedBackgroundColorKey; @@ -167,6 +175,7 @@ public IconConfig withBackgroundColor(String backgroundColor) { return this; } + public IconConfig withBackgroundColor(Optional backgroundColor) { Utils.checkNotNull(backgroundColor, "backgroundColor"); this.backgroundColor = backgroundColor; @@ -179,6 +188,7 @@ public IconConfig withColor(String color) { return this; } + public IconConfig withColor(Optional color) { Utils.checkNotNull(color, "color"); this.color = color; @@ -191,6 +201,7 @@ public IconConfig withKey(String key) { return this; } + public IconConfig withKey(Optional key) { Utils.checkNotNull(key, "key"); this.key = key; @@ -203,6 +214,7 @@ public IconConfig withIconType(IconType iconType) { return this; } + public IconConfig withIconType(Optional iconType) { Utils.checkNotNull(iconType, "iconType"); this.iconType = iconType; @@ -218,6 +230,7 @@ public IconConfig withMasked(boolean masked) { return this; } + /** * Whether the icon should be masked based on current theme. */ @@ -236,6 +249,7 @@ public IconConfig withName(String name) { return this; } + /** * The name of the icon if applicable, e.g. the glyph name for `IconType.GLYPH` icons. */ @@ -254,6 +268,7 @@ public IconConfig withUrl(String url) { return this; } + /** * The URL to an image to be displayed if applicable, e.g. the URL for `iconType.URL` icons. */ @@ -263,7 +278,6 @@ public IconConfig withUrl(Optional url) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -287,14 +301,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - generatedBackgroundColorKey, - backgroundColor, - color, - key, - iconType, - masked, - name, - url); + generatedBackgroundColorKey, backgroundColor, color, + key, iconType, masked, + name, url); } @Override @@ -309,29 +318,31 @@ public String toString() { "name", name, "url", url); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional generatedBackgroundColorKey = Optional.empty(); - + private Optional backgroundColor = Optional.empty(); - + private Optional color = Optional.empty(); - + private Optional key = Optional.empty(); - + private Optional iconType = Optional.empty(); - + private Optional masked = Optional.empty(); - + private Optional name = Optional.empty(); - + private Optional url = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder generatedBackgroundColorKey(String generatedBackgroundColorKey) { Utils.checkNotNull(generatedBackgroundColorKey, "generatedBackgroundColorKey"); this.generatedBackgroundColorKey = Optional.ofNullable(generatedBackgroundColorKey); @@ -344,6 +355,7 @@ public Builder generatedBackgroundColorKey(Optional generatedBackgroundC return this; } + public Builder backgroundColor(String backgroundColor) { Utils.checkNotNull(backgroundColor, "backgroundColor"); this.backgroundColor = Optional.ofNullable(backgroundColor); @@ -356,6 +368,7 @@ public Builder backgroundColor(Optional backgroundColor) { return this; } + public Builder color(String color) { Utils.checkNotNull(color, "color"); this.color = Optional.ofNullable(color); @@ -368,6 +381,7 @@ public Builder color(Optional color) { return this; } + public Builder key(String key) { Utils.checkNotNull(key, "key"); this.key = Optional.ofNullable(key); @@ -380,6 +394,7 @@ public Builder key(Optional key) { return this; } + public Builder iconType(IconType iconType) { Utils.checkNotNull(iconType, "iconType"); this.iconType = Optional.ofNullable(iconType); @@ -392,6 +407,7 @@ public Builder iconType(Optional iconType) { return this; } + /** * Whether the icon should be masked based on current theme. */ @@ -410,6 +426,7 @@ public Builder masked(Optional masked) { return this; } + /** * The name of the icon if applicable, e.g. the glyph name for `IconType.GLYPH` icons. */ @@ -428,6 +445,7 @@ public Builder name(Optional name) { return this; } + /** * The URL to an image to be displayed if applicable, e.g. the URL for `iconType.URL` icons. */ @@ -445,17 +463,14 @@ public Builder url(Optional url) { this.url = url; return this; } - + public IconConfig build() { + return new IconConfig( - generatedBackgroundColorKey, - backgroundColor, - color, - key, - iconType, - masked, - name, - url); + generatedBackgroundColorKey, backgroundColor, color, + key, iconType, masked, + name, url); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Identity.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Identity.java index 74baa0dd..114915c4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Identity.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Identity.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class Identity { +public class Identity { /** * Information about processing history for the datasource */ @@ -24,14 +24,17 @@ public class Identity { @JsonProperty("processingHistory") private Optional> processingHistory; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("users") private Optional users; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("groups") private Optional groups; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("memberships") private Optional memberships; @@ -53,7 +56,8 @@ public Identity( } public Identity() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -83,9 +87,10 @@ public Optional memberships() { return (Optional) memberships; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Information about processing history for the datasource @@ -96,6 +101,7 @@ public Identity withProcessingHistory(List processingHis return this; } + /** * Information about processing history for the datasource */ @@ -111,6 +117,7 @@ public Identity withUsers(DebugDatasourceStatusIdentityResponseComponent users) return this; } + public Identity withUsers(Optional users) { Utils.checkNotNull(users, "users"); this.users = users; @@ -123,6 +130,7 @@ public Identity withGroups(DebugDatasourceStatusIdentityResponseComponent groups return this; } + public Identity withGroups(Optional groups) { Utils.checkNotNull(groups, "groups"); this.groups = groups; @@ -135,13 +143,13 @@ public Identity withMemberships(DebugDatasourceStatusIdentityResponseComponent m return this; } + public Identity withMemberships(Optional memberships) { Utils.checkNotNull(memberships, "memberships"); this.memberships = memberships; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -161,9 +169,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - processingHistory, - users, - groups, + processingHistory, users, groups, memberships); } @@ -175,21 +181,23 @@ public String toString() { "groups", groups, "memberships", memberships); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> processingHistory = Optional.empty(); - + private Optional users = Optional.empty(); - + private Optional groups = Optional.empty(); - + private Optional memberships = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Information about processing history for the datasource */ @@ -208,6 +216,7 @@ public Builder processingHistory(Optional return this; } + public Builder users(DebugDatasourceStatusIdentityResponseComponent users) { Utils.checkNotNull(users, "users"); this.users = Optional.ofNullable(users); @@ -220,6 +229,7 @@ public Builder users(OptionalDescribes the request body of the /indexdocument API call */ public class IndexDocumentRequest { - /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -65,9 +64,10 @@ public DocumentDefinition document() { return document; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. @@ -78,6 +78,7 @@ public IndexDocumentRequest withVersion(long version) { return this; } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -96,7 +97,6 @@ public IndexDocumentRequest withDocument(DocumentDefinition document) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -114,8 +114,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - document); + version, document); } @Override @@ -124,17 +123,19 @@ public String toString() { "version", version, "document", document); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + private DocumentDefinition document; - + private Builder() { // force use of static builder() method } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -153,6 +154,7 @@ public Builder version(Optional version) { return this; } + /** * Indexable document structure */ @@ -161,11 +163,12 @@ public Builder document(DocumentDefinition document) { this.document = document; return this; } - + public IndexDocumentRequest build() { + return new IndexDocumentRequest( - version, - document); + version, document); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexDocumentsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexDocumentsRequest.java index 85688f3f..f6a68d52 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexDocumentsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexDocumentsRequest.java @@ -20,7 +20,6 @@ *

Describes the request body of the /indexdocuments API call */ public class IndexDocumentsRequest { - /** * Optional id parameter to identify and track a batch of documents. */ @@ -83,9 +82,10 @@ public List documents() { return documents; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Optional id parameter to identify and track a batch of documents. @@ -96,6 +96,7 @@ public IndexDocumentsRequest withUploadId(String uploadId) { return this; } + /** * Optional id parameter to identify and track a batch of documents. */ @@ -123,7 +124,6 @@ public IndexDocumentsRequest withDocuments(List documents) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -142,9 +142,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - uploadId, - datasource, - documents); + uploadId, datasource, documents); } @Override @@ -154,19 +152,21 @@ public String toString() { "datasource", datasource, "documents", documents); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional uploadId = Optional.empty(); - + private String datasource; - + private List documents; - + private Builder() { // force use of static builder() method } + /** * Optional id parameter to identify and track a batch of documents. */ @@ -185,6 +185,7 @@ public Builder uploadId(Optional uploadId) { return this; } + /** * Datasource of the documents */ @@ -194,6 +195,7 @@ public Builder datasource(String datasource) { return this; } + /** * Batch of documents being added/updated */ @@ -202,12 +204,12 @@ public Builder documents(List documents) { this.documents = documents; return this; } - + public IndexDocumentsRequest build() { + return new IndexDocumentsRequest( - uploadId, - datasource, - documents); + uploadId, datasource, documents); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexEmployeeRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexEmployeeRequest.java index 09932063..926097f3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexEmployeeRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexEmployeeRequest.java @@ -20,7 +20,6 @@ *

Info about an employee and optional version for that info */ public class IndexEmployeeRequest { - /** * Describes employee info */ @@ -65,9 +64,10 @@ public Optional version() { return version; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Describes employee info @@ -87,6 +87,7 @@ public IndexEmployeeRequest withVersion(long version) { return this; } + /** * Version number for the employee object. If absent or 0 then no version checks are done */ @@ -96,7 +97,6 @@ public IndexEmployeeRequest withVersion(Optional version) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -114,8 +114,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - employee, - version); + employee, version); } @Override @@ -124,17 +123,19 @@ public String toString() { "employee", employee, "version", version); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private EmployeeInfoDefinition employee; - + private Optional version = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Describes employee info */ @@ -144,6 +145,7 @@ public Builder employee(EmployeeInfoDefinition employee) { return this; } + /** * Version number for the employee object. If absent or 0 then no version checks are done */ @@ -161,11 +163,12 @@ public Builder version(Optional version) { this.version = version; return this; } - + public IndexEmployeeRequest build() { + return new IndexEmployeeRequest( - employee, - version); + employee, version); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexGroupRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexGroupRequest.java index 7eee00ae..4681ac32 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexGroupRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexGroupRequest.java @@ -20,7 +20,6 @@ *

Describes the request body of the /indexgroup API call */ public class IndexGroupRequest { - /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -83,9 +82,10 @@ public DatasourceGroupDefinition group() { return group; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. @@ -96,6 +96,7 @@ public IndexGroupRequest withVersion(long version) { return this; } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -123,7 +124,6 @@ public IndexGroupRequest withGroup(DatasourceGroupDefinition group) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -142,9 +142,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - datasource, - group); + version, datasource, group); } @Override @@ -154,19 +152,21 @@ public String toString() { "datasource", datasource, "group", group); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + private String datasource; - + private DatasourceGroupDefinition group; - + private Builder() { // force use of static builder() method } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -185,6 +185,7 @@ public Builder version(Optional version) { return this; } + /** * The datasource for which the group is added */ @@ -194,6 +195,7 @@ public Builder datasource(String datasource) { return this; } + /** * describes a group in the datasource */ @@ -202,12 +204,12 @@ public Builder group(DatasourceGroupDefinition group) { this.group = group; return this; } - + public IndexGroupRequest build() { + return new IndexGroupRequest( - version, - datasource, - group); + version, datasource, group); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexMembershipRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexMembershipRequest.java index 3510e1c6..d56a5677 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexMembershipRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexMembershipRequest.java @@ -20,7 +20,6 @@ *

Describes the request body of the /indexmembership API call */ public class IndexMembershipRequest { - /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -83,9 +82,10 @@ public DatasourceMembershipDefinition membership() { return membership; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. @@ -96,6 +96,7 @@ public IndexMembershipRequest withVersion(long version) { return this; } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -123,7 +124,6 @@ public IndexMembershipRequest withMembership(DatasourceMembershipDefinition memb return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -142,9 +142,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - datasource, - membership); + version, datasource, membership); } @Override @@ -154,19 +152,21 @@ public String toString() { "datasource", datasource, "membership", membership); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + private String datasource; - + private DatasourceMembershipDefinition membership; - + private Builder() { // force use of static builder() method } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -185,6 +185,7 @@ public Builder version(Optional version) { return this; } + /** * The datasource for which the membership is added */ @@ -194,6 +195,7 @@ public Builder datasource(String datasource) { return this; } + /** * describes the membership row of a group. Only one of memberUserId and memberGroupName can be specified. */ @@ -202,12 +204,12 @@ public Builder membership(DatasourceMembershipDefinition membership) { this.membership = membership; return this; } - + public IndexMembershipRequest build() { + return new IndexMembershipRequest( - version, - datasource, - membership); + version, datasource, membership); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexStatus.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexStatus.java index be2df076..aa7b667c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexStatus.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexStatus.java @@ -14,8 +14,8 @@ import java.time.OffsetDateTime; import java.util.Optional; -public class IndexStatus { +public class IndexStatus { /** * When the document was last crawled */ @@ -60,9 +60,10 @@ public Optional lastIndexedTime() { return lastIndexedTime; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * When the document was last crawled @@ -73,6 +74,7 @@ public IndexStatus withLastCrawledTime(OffsetDateTime lastCrawledTime) { return this; } + /** * When the document was last crawled */ @@ -91,6 +93,7 @@ public IndexStatus withLastIndexedTime(OffsetDateTime lastIndexedTime) { return this; } + /** * When the document was last indexed */ @@ -100,7 +103,6 @@ public IndexStatus withLastIndexedTime(Optional lastIndexedTime) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,8 +120,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - lastCrawledTime, - lastIndexedTime); + lastCrawledTime, lastIndexedTime); } @Override @@ -128,17 +129,19 @@ public String toString() { "lastCrawledTime", lastCrawledTime, "lastIndexedTime", lastIndexedTime); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional lastCrawledTime = Optional.empty(); - + private Optional lastIndexedTime = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * When the document was last crawled */ @@ -157,6 +160,7 @@ public Builder lastCrawledTime(Optional lastCrawledTime) { return this; } + /** * When the document was last indexed */ @@ -174,11 +178,12 @@ public Builder lastIndexedTime(Optional lastIndexedTime) { this.lastIndexedTime = lastIndexedTime; return this; } - + public IndexStatus build() { + return new IndexStatus( - lastCrawledTime, - lastIndexedTime); + lastCrawledTime, lastIndexedTime); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexTeamRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexTeamRequest.java index bab2ce4a..018fb3d3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexTeamRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexTeamRequest.java @@ -20,7 +20,6 @@ *

Info about a team and optional version for that info */ public class IndexTeamRequest { - /** * Information about an employee's team */ @@ -65,9 +64,10 @@ public Optional version() { return version; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Information about an employee's team @@ -87,6 +87,7 @@ public IndexTeamRequest withVersion(long version) { return this; } + /** * Version number for the team object. If absent or 0 then no version checks are done */ @@ -96,7 +97,6 @@ public IndexTeamRequest withVersion(Optional version) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -114,8 +114,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - team, - version); + team, version); } @Override @@ -124,17 +123,19 @@ public String toString() { "team", team, "version", version); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private TeamInfoDefinition team; - + private Optional version = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Information about an employee's team */ @@ -144,6 +145,7 @@ public Builder team(TeamInfoDefinition team) { return this; } + /** * Version number for the team object. If absent or 0 then no version checks are done */ @@ -161,11 +163,12 @@ public Builder version(Optional version) { this.version = version; return this; } - + public IndexTeamRequest build() { + return new IndexTeamRequest( - team, - version); + team, version); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexUserRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexUserRequest.java index ef4c9982..60bb37a2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexUserRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexUserRequest.java @@ -20,7 +20,6 @@ *

Describes the request body of the /indexuser API call */ public class IndexUserRequest { - /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -83,9 +82,10 @@ public DatasourceUserDefinition user() { return user; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. @@ -96,6 +96,7 @@ public IndexUserRequest withVersion(long version) { return this; } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -123,7 +124,6 @@ public IndexUserRequest withUser(DatasourceUserDefinition user) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -142,9 +142,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - version, - datasource, - user); + version, datasource, user); } @Override @@ -154,19 +152,21 @@ public String toString() { "datasource", datasource, "user", user); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional version = Optional.empty(); - + private String datasource; - + private DatasourceUserDefinition user; - + private Builder() { // force use of static builder() method } + /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ @@ -185,6 +185,7 @@ public Builder version(Optional version) { return this; } + /** * The datasource for which the user is added */ @@ -194,6 +195,7 @@ public Builder datasource(String datasource) { return this; } + /** * describes a user in the datasource */ @@ -202,12 +204,12 @@ public Builder user(DatasourceUserDefinition user) { this.user = user; return this; } - + public IndexUserRequest build() { + return new IndexUserRequest( - version, - datasource, - user); + version, datasource, user); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexingShortcut.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexingShortcut.java index ec1ff117..b110b33f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexingShortcut.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/IndexingShortcut.java @@ -15,8 +15,8 @@ import java.lang.String; import java.util.Optional; -public class IndexingShortcut { +public class IndexingShortcut { /** * link text following the viewPrefix as entered by the user. For example, if the view prefix is `go/` and the shortened URL is `go/abc`, then `abc` is the inputAlias. */ @@ -112,7 +112,9 @@ public IndexingShortcut( String inputAlias, String destinationUrl, String createdBy) { - this(inputAlias, Optional.empty(), destinationUrl, createdBy, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(inputAlias, Optional.empty(), destinationUrl, + createdBy, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -187,9 +189,10 @@ public Optional urlTemplate() { return urlTemplate; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * link text following the viewPrefix as entered by the user. For example, if the view prefix is `go/` and the shortened URL is `go/abc`, then `abc` is the inputAlias. @@ -209,6 +212,7 @@ public IndexingShortcut withDescription(String description) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -245,6 +249,7 @@ public IndexingShortcut withCreateTime(long createTime) { return this; } + /** * The time the shortcut was created in epoch seconds. */ @@ -263,6 +268,7 @@ public IndexingShortcut withUpdatedBy(String updatedBy) { return this; } + /** * Email of the user who last updated this shortcut. */ @@ -281,6 +287,7 @@ public IndexingShortcut withUpdateTime(long updateTime) { return this; } + /** * The time the shortcut was updated in epoch seconds. */ @@ -299,6 +306,7 @@ public IndexingShortcut withUnlisted(boolean unlisted) { return this; } + /** * Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author and admins only. */ @@ -317,6 +325,7 @@ public IndexingShortcut withUrlTemplate(String urlTemplate) { return this; } + /** * For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. */ @@ -326,7 +335,6 @@ public IndexingShortcut withUrlTemplate(Optional urlTemplate) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -351,15 +359,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - inputAlias, - description, - destinationUrl, - createdBy, - createTime, - updatedBy, - updateTime, - unlisted, - urlTemplate); + inputAlias, description, destinationUrl, + createdBy, createTime, updatedBy, + updateTime, unlisted, urlTemplate); } @Override @@ -375,31 +377,33 @@ public String toString() { "unlisted", unlisted, "urlTemplate", urlTemplate); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String inputAlias; - + private Optional description = Optional.empty(); - + private String destinationUrl; - + private String createdBy; - + private Optional createTime = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional unlisted = Optional.empty(); - + private Optional urlTemplate = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * link text following the viewPrefix as entered by the user. For example, if the view prefix is `go/` and the shortened URL is `go/abc`, then `abc` is the inputAlias. */ @@ -409,6 +413,7 @@ public Builder inputAlias(String inputAlias) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -427,6 +432,7 @@ public Builder description(Optional description) { return this; } + /** * destination URL for the shortcut. */ @@ -436,6 +442,7 @@ public Builder destinationUrl(String destinationUrl) { return this; } + /** * Email of the user who created this shortcut. */ @@ -445,6 +452,7 @@ public Builder createdBy(String createdBy) { return this; } + /** * The time the shortcut was created in epoch seconds. */ @@ -463,6 +471,7 @@ public Builder createTime(Optional createTime) { return this; } + /** * Email of the user who last updated this shortcut. */ @@ -481,6 +490,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + /** * The time the shortcut was updated in epoch seconds. */ @@ -499,6 +509,7 @@ public Builder updateTime(Optional updateTime) { return this; } + /** * Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author and admins only. */ @@ -517,6 +528,7 @@ public Builder unlisted(Optional unlisted) { return this; } + /** * For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. */ @@ -534,18 +546,14 @@ public Builder urlTemplate(Optional urlTemplate) { this.urlTemplate = urlTemplate; return this; } - + public IndexingShortcut build() { + return new IndexingShortcut( - inputAlias, - description, - destinationUrl, - createdBy, - createTime, - updatedBy, - updateTime, - unlisted, - urlTemplate); + inputAlias, description, destinationUrl, + createdBy, createTime, updatedBy, + updateTime, unlisted, urlTemplate); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InputOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InputOptions.java index fdeff4ac..c9d2073c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InputOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InputOptions.java @@ -22,7 +22,6 @@ *

Controls which data-sources and what time-range to include in scans. */ public class InputOptions { - /** * list of url regex matching documents excluded from report * @@ -64,6 +63,7 @@ public class InputOptions { @JsonProperty("timePeriodType") private Optional timePeriodType; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("customTimeRange") private Optional customTimeRange; @@ -91,7 +91,8 @@ public InputOptions( } public InputOptions() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -151,9 +152,10 @@ public Optional customTimeRange() { return (Optional) customTimeRange; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * list of url regex matching documents excluded from report @@ -167,6 +169,7 @@ public InputOptions withUrlGreenlist(List urlGreenlist) { return this; } + /** * list of url regex matching documents excluded from report * @@ -188,6 +191,7 @@ public InputOptions withDatasourcesType(DatasourcesType datasourcesType) { return this; } + /** * The types of datasource for which to run the report/policy. */ @@ -209,6 +213,7 @@ public InputOptions withDatasources(List datasources) { return this; } + /** * List of datasources to consider for report. DEPRECATED - use datasourceInstances instead. * @@ -230,6 +235,7 @@ public InputOptions withDatasourceInstances(List datasourceInstances) { return this; } + /** * List of datasource instances to consider for report/policy. */ @@ -248,6 +254,7 @@ public InputOptions withTimePeriodType(TimePeriodType timePeriodType) { return this; } + /** * Type of time period for which to run the report/policy. PAST_DAY is deprecated. */ @@ -263,13 +270,13 @@ public InputOptions withCustomTimeRange(TimeRange customTimeRange) { return this; } + public InputOptions withCustomTimeRange(Optional customTimeRange) { Utils.checkNotNull(customTimeRange, "customTimeRange"); this.customTimeRange = customTimeRange; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -291,12 +298,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - urlGreenlist, - datasourcesType, - datasources, - datasourceInstances, - timePeriodType, - customTimeRange); + urlGreenlist, datasourcesType, datasources, + datasourceInstances, timePeriodType, customTimeRange); } @Override @@ -309,27 +312,29 @@ public String toString() { "timePeriodType", timePeriodType, "customTimeRange", customTimeRange); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + @Deprecated private Optional> urlGreenlist = Optional.empty(); - + private Optional datasourcesType = Optional.empty(); - + @Deprecated private Optional> datasources = Optional.empty(); - + private Optional> datasourceInstances = Optional.empty(); - + private Optional timePeriodType = Optional.empty(); - + private Optional customTimeRange = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * list of url regex matching documents excluded from report * @@ -354,6 +359,7 @@ public Builder urlGreenlist(Optional> urlGreenlist) { return this; } + /** * The types of datasource for which to run the report/policy. */ @@ -372,6 +378,7 @@ public Builder datasourcesType(Optional datasourcesTy return this; } + /** * List of datasources to consider for report. DEPRECATED - use datasourceInstances instead. * @@ -396,6 +403,7 @@ public Builder datasources(Optional> datasources) { return this; } + /** * List of datasource instances to consider for report/policy. */ @@ -414,6 +422,7 @@ public Builder datasourceInstances(Optional> datasourceIn return this; } + /** * Type of time period for which to run the report/policy. PAST_DAY is deprecated. */ @@ -432,6 +441,7 @@ public Builder timePeriodType(Optional timePeriodType) return this; } + public Builder customTimeRange(TimeRange customTimeRange) { Utils.checkNotNull(customTimeRange, "customTimeRange"); this.customTimeRange = Optional.ofNullable(customTimeRange); @@ -443,15 +453,13 @@ public Builder customTimeRange(Optional customTimeRange) { this.customTimeRange = customTimeRange; return this; } - + public InputOptions build() { + return new InputOptions( - urlGreenlist, - datasourcesType, - datasources, - datasourceInstances, - timePeriodType, - customTimeRange); + urlGreenlist, datasourcesType, datasources, + datasourceInstances, timePeriodType, customTimeRange); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InputSchema.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InputSchema.java index f869106f..0f23a277 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InputSchema.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InputSchema.java @@ -14,18 +14,15 @@ *

The schema for the agent input. In JSON Schema format. */ public class InputSchema { - @JsonCreator public InputSchema() { - - } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -47,16 +44,19 @@ public int hashCode() { public String toString() { return Utils.toString(InputSchema.class); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Builder() { // force use of static builder() method } - + public InputSchema build() { + return new InputSchema( ); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsAgentsRequestOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsAgentsRequestOptions.java index 614c6710..3c364a89 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsAgentsRequestOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsAgentsRequestOptions.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class InsightsAgentsRequestOptions { +public class InsightsAgentsRequestOptions { /** * IDs of the Agents for which Insights should be returned. An empty array signifies all. */ @@ -44,9 +44,10 @@ public Optional> agentIds() { return (Optional>) agentIds; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * IDs of the Agents for which Insights should be returned. An empty array signifies all. @@ -57,6 +58,7 @@ public InsightsAgentsRequestOptions withAgentIds(List agentIds) { return this; } + /** * IDs of the Agents for which Insights should be returned. An empty array signifies all. */ @@ -66,7 +68,6 @@ public InsightsAgentsRequestOptions withAgentIds(Optional return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -91,15 +92,17 @@ public String toString() { return Utils.toString(InsightsAgentsRequestOptions.class, "agentIds", agentIds); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> agentIds = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * IDs of the Agents for which Insights should be returned. An empty array signifies all. */ @@ -117,10 +120,12 @@ public Builder agentIds(Optional> agentIds) { this.agentIds = agentIds; return this; } - + public InsightsAgentsRequestOptions build() { + return new InsightsAgentsRequestOptions( agentIds); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsAiAppRequestOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsAiAppRequestOptions.java index fd2748e8..b939d1b5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsAiAppRequestOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsAiAppRequestOptions.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class InsightsAiAppRequestOptions { +public class InsightsAiAppRequestOptions { /** * IDs of the AI Apps for which Insights should be returned. An empty array signifies all. */ @@ -44,9 +44,10 @@ public Optional> aiAppIds() { return (Optional>) aiAppIds; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * IDs of the AI Apps for which Insights should be returned. An empty array signifies all. @@ -57,6 +58,7 @@ public InsightsAiAppRequestOptions withAiAppIds(List aiAppIds) { return this; } + /** * IDs of the AI Apps for which Insights should be returned. An empty array signifies all. */ @@ -66,7 +68,6 @@ public InsightsAiAppRequestOptions withAiAppIds(Optional> return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -91,15 +92,17 @@ public String toString() { return Utils.toString(InsightsAiAppRequestOptions.class, "aiAppIds", aiAppIds); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> aiAppIds = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * IDs of the AI Apps for which Insights should be returned. An empty array signifies all. */ @@ -117,10 +120,12 @@ public Builder aiAppIds(Optional> aiAppIds) { this.aiAppIds = aiAppIds; return this; } - + public InsightsAiAppRequestOptions build() { + return new InsightsAiAppRequestOptions( aiAppIds); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java index bf71160d..9e09cb57 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsRequest.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class InsightsRequest { +public class InsightsRequest { /** * Categories of data requested. Request can include single or multiple types. */ @@ -31,14 +31,17 @@ public class InsightsRequest { @JsonProperty("departments") private Optional> departments; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("dayRange") private Optional dayRange; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("aiAppRequestOptions") private Optional aiAppRequestOptions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("agentsRequestOptions") private Optional agentsRequestOptions; @@ -84,7 +87,9 @@ public InsightsRequest( public InsightsRequest( List categories) { - this(categories, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(categories, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -139,9 +144,10 @@ public Optional disablePerUserInsights() { return disablePerUserInsights; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Categories of data requested. Request can include single or multiple types. @@ -161,6 +167,7 @@ public InsightsRequest withDepartments(List departments) { return this; } + /** * Departments that the data is requested for. If this is empty, corresponds to whole company. */ @@ -176,6 +183,7 @@ public InsightsRequest withDayRange(Period dayRange) { return this; } + public InsightsRequest withDayRange(Optional dayRange) { Utils.checkNotNull(dayRange, "dayRange"); this.dayRange = dayRange; @@ -188,6 +196,7 @@ public InsightsRequest withAiAppRequestOptions(InsightsAiAppRequestOptions aiApp return this; } + public InsightsRequest withAiAppRequestOptions(Optional aiAppRequestOptions) { Utils.checkNotNull(aiAppRequestOptions, "aiAppRequestOptions"); this.aiAppRequestOptions = aiAppRequestOptions; @@ -200,6 +209,7 @@ public InsightsRequest withAgentsRequestOptions(InsightsAgentsRequestOptions age return this; } + public InsightsRequest withAgentsRequestOptions(Optional agentsRequestOptions) { Utils.checkNotNull(agentsRequestOptions, "agentsRequestOptions"); this.agentsRequestOptions = agentsRequestOptions; @@ -215,6 +225,7 @@ public InsightsRequest withAssistantActivityTypes(List as return this; } + /** * Types of activity that should count in the definition of an Assistant Active User. Affects only insights for AI category. */ @@ -233,6 +244,7 @@ public InsightsRequest withDisablePerUserInsights(boolean disablePerUserInsights return this; } + /** * If true, suppresses the generation of per-user Insights in the response. Default is false. */ @@ -242,7 +254,6 @@ public InsightsRequest withDisablePerUserInsights(Optional disablePerUs return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -265,12 +276,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - categories, - departments, - dayRange, - aiAppRequestOptions, - agentsRequestOptions, - assistantActivityTypes, + categories, departments, dayRange, + aiAppRequestOptions, agentsRequestOptions, assistantActivityTypes, disablePerUserInsights); } @@ -285,27 +292,29 @@ public String toString() { "assistantActivityTypes", assistantActivityTypes, "disablePerUserInsights", disablePerUserInsights); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List categories; - + private Optional> departments = Optional.empty(); - + private Optional dayRange = Optional.empty(); - + private Optional aiAppRequestOptions = Optional.empty(); - + private Optional agentsRequestOptions = Optional.empty(); - + private Optional> assistantActivityTypes = Optional.empty(); - + private Optional disablePerUserInsights = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Categories of data requested. Request can include single or multiple types. */ @@ -315,6 +324,7 @@ public Builder categories(List categories) { return this; } + /** * Departments that the data is requested for. If this is empty, corresponds to whole company. */ @@ -333,6 +343,7 @@ public Builder departments(Optional> departments) { return this; } + public Builder dayRange(Period dayRange) { Utils.checkNotNull(dayRange, "dayRange"); this.dayRange = Optional.ofNullable(dayRange); @@ -345,6 +356,7 @@ public Builder dayRange(Optional dayRange) { return this; } + public Builder aiAppRequestOptions(InsightsAiAppRequestOptions aiAppRequestOptions) { Utils.checkNotNull(aiAppRequestOptions, "aiAppRequestOptions"); this.aiAppRequestOptions = Optional.ofNullable(aiAppRequestOptions); @@ -357,6 +369,7 @@ public Builder aiAppRequestOptions(Optional disablePerUserInsights) this.disablePerUserInsights = disablePerUserInsights; return this; } - + public InsightsRequest build() { + return new InsightsRequest( - categories, - departments, - dayRange, - aiAppRequestOptions, - agentsRequestOptions, - assistantActivityTypes, + categories, departments, dayRange, + aiAppRequestOptions, agentsRequestOptions, assistantActivityTypes, disablePerUserInsights); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsResponse.java index 569fb17e..ecc58ee6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InsightsResponse.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class InsightsResponse { +public class InsightsResponse { /** * List of timeseries to make charts (if applicable). */ @@ -24,46 +24,57 @@ public class InsightsResponse { @JsonProperty("timeseries") private Optional> timeseries; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("users") private Optional users; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("content") private Optional content; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("queries") private Optional queries; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("collections") private Optional collections; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("collectionsV2") private Optional collectionsV2; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("shortcuts") private Optional shortcuts; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("announcements") private Optional announcements; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("answers") private Optional answers; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("ai") private Optional ai; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("aiApps") private Optional aiApps; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("gleanAssist") private Optional gleanAssist; @@ -119,7 +130,11 @@ public InsightsResponse( } public InsightsResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -206,9 +221,10 @@ public Optional> departments() { return (Optional>) departments; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of timeseries to make charts (if applicable). @@ -219,6 +235,7 @@ public InsightsResponse withTimeseries(List timeseries) { return this; } + /** * List of timeseries to make charts (if applicable). */ @@ -234,6 +251,7 @@ public InsightsResponse withUsers(UserInsightsResponse users) { return this; } + public InsightsResponse withUsers(Optional users) { Utils.checkNotNull(users, "users"); this.users = users; @@ -246,6 +264,7 @@ public InsightsResponse withContent(ContentInsightsResponse content) { return this; } + public InsightsResponse withContent(Optional content) { Utils.checkNotNull(content, "content"); this.content = content; @@ -258,6 +277,7 @@ public InsightsResponse withQueries(QueryInsightsResponse queries) { return this; } + public InsightsResponse withQueries(Optional queries) { Utils.checkNotNull(queries, "queries"); this.queries = queries; @@ -270,6 +290,7 @@ public InsightsResponse withCollections(ContentInsightsResponse collections) { return this; } + public InsightsResponse withCollections(Optional collections) { Utils.checkNotNull(collections, "collections"); this.collections = collections; @@ -282,6 +303,7 @@ public InsightsResponse withCollectionsV2(ContentInsightsResponse collectionsV2) return this; } + public InsightsResponse withCollectionsV2(Optional collectionsV2) { Utils.checkNotNull(collectionsV2, "collectionsV2"); this.collectionsV2 = collectionsV2; @@ -294,6 +316,7 @@ public InsightsResponse withShortcuts(ShortcutInsightsResponse shortcuts) { return this; } + public InsightsResponse withShortcuts(Optional shortcuts) { Utils.checkNotNull(shortcuts, "shortcuts"); this.shortcuts = shortcuts; @@ -306,6 +329,7 @@ public InsightsResponse withAnnouncements(ContentInsightsResponse announcements) return this; } + public InsightsResponse withAnnouncements(Optional announcements) { Utils.checkNotNull(announcements, "announcements"); this.announcements = announcements; @@ -318,6 +342,7 @@ public InsightsResponse withAnswers(ContentInsightsResponse answers) { return this; } + public InsightsResponse withAnswers(Optional answers) { Utils.checkNotNull(answers, "answers"); this.answers = answers; @@ -330,6 +355,7 @@ public InsightsResponse withAi(AiInsightsResponse ai) { return this; } + public InsightsResponse withAi(Optional ai) { Utils.checkNotNull(ai, "ai"); this.ai = ai; @@ -342,6 +368,7 @@ public InsightsResponse withAiApps(AiAppsInsightsResponse aiApps) { return this; } + public InsightsResponse withAiApps(Optional aiApps) { Utils.checkNotNull(aiApps, "aiApps"); this.aiApps = aiApps; @@ -354,6 +381,7 @@ public InsightsResponse withGleanAssist(GleanAssistInsightsResponse gleanAssist) return this; } + public InsightsResponse withGleanAssist(Optional gleanAssist) { Utils.checkNotNull(gleanAssist, "gleanAssist"); this.gleanAssist = gleanAssist; @@ -369,6 +397,7 @@ public InsightsResponse withDepartments(List departments) { return this; } + /** * list of all departments. */ @@ -378,7 +407,6 @@ public InsightsResponse withDepartments(Optional> departm return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -407,18 +435,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timeseries, - users, - content, - queries, - collections, - collectionsV2, - shortcuts, - announcements, - answers, - ai, - aiApps, - gleanAssist, + timeseries, users, content, + queries, collections, collectionsV2, + shortcuts, announcements, answers, + ai, aiApps, gleanAssist, departments); } @@ -439,39 +459,41 @@ public String toString() { "gleanAssist", gleanAssist, "departments", departments); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> timeseries = Optional.empty(); - + private Optional users = Optional.empty(); - + private Optional content = Optional.empty(); - + private Optional queries = Optional.empty(); - + private Optional collections = Optional.empty(); - + private Optional collectionsV2 = Optional.empty(); - + private Optional shortcuts = Optional.empty(); - + private Optional announcements = Optional.empty(); - + private Optional answers = Optional.empty(); - + private Optional ai = Optional.empty(); - + private Optional aiApps = Optional.empty(); - + private Optional gleanAssist = Optional.empty(); - + private Optional> departments = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * List of timeseries to make charts (if applicable). */ @@ -490,6 +512,7 @@ public Builder timeseries(Optional> timeseries) return this; } + public Builder users(UserInsightsResponse users) { Utils.checkNotNull(users, "users"); this.users = Optional.ofNullable(users); @@ -502,6 +525,7 @@ public Builder users(Optional users) { return this; } + public Builder content(ContentInsightsResponse content) { Utils.checkNotNull(content, "content"); this.content = Optional.ofNullable(content); @@ -514,6 +538,7 @@ public Builder content(Optional content) { return this; } + public Builder queries(QueryInsightsResponse queries) { Utils.checkNotNull(queries, "queries"); this.queries = Optional.ofNullable(queries); @@ -526,6 +551,7 @@ public Builder queries(Optional queries) { return this; } + public Builder collections(ContentInsightsResponse collections) { Utils.checkNotNull(collections, "collections"); this.collections = Optional.ofNullable(collections); @@ -538,6 +564,7 @@ public Builder collections(Optional collectio return this; } + public Builder collectionsV2(ContentInsightsResponse collectionsV2) { Utils.checkNotNull(collectionsV2, "collectionsV2"); this.collectionsV2 = Optional.ofNullable(collectionsV2); @@ -550,6 +577,7 @@ public Builder collectionsV2(Optional collect return this; } + public Builder shortcuts(ShortcutInsightsResponse shortcuts) { Utils.checkNotNull(shortcuts, "shortcuts"); this.shortcuts = Optional.ofNullable(shortcuts); @@ -562,6 +590,7 @@ public Builder shortcuts(Optional shortcuts) return this; } + public Builder announcements(ContentInsightsResponse announcements) { Utils.checkNotNull(announcements, "announcements"); this.announcements = Optional.ofNullable(announcements); @@ -574,6 +603,7 @@ public Builder announcements(Optional announc return this; } + public Builder answers(ContentInsightsResponse answers) { Utils.checkNotNull(answers, "answers"); this.answers = Optional.ofNullable(answers); @@ -586,6 +616,7 @@ public Builder answers(Optional answers) { return this; } + public Builder ai(AiInsightsResponse ai) { Utils.checkNotNull(ai, "ai"); this.ai = Optional.ofNullable(ai); @@ -598,6 +629,7 @@ public Builder ai(Optional ai) { return this; } + public Builder aiApps(AiAppsInsightsResponse aiApps) { Utils.checkNotNull(aiApps, "aiApps"); this.aiApps = Optional.ofNullable(aiApps); @@ -610,6 +642,7 @@ public Builder aiApps(Optional aiApps) { return this; } + public Builder gleanAssist(GleanAssistInsightsResponse gleanAssist) { Utils.checkNotNull(gleanAssist, "gleanAssist"); this.gleanAssist = Optional.ofNullable(gleanAssist); @@ -622,6 +655,7 @@ public Builder gleanAssist(Optional glean return this; } + /** * list of all departments. */ @@ -639,22 +673,16 @@ public Builder departments(Optional> departments) { this.departments = departments; return this; } - + public InsightsResponse build() { + return new InsightsResponse( - timeseries, - users, - content, - queries, - collections, - collectionsV2, - shortcuts, - announcements, - answers, - ai, - aiApps, - gleanAssist, + timeseries, users, content, + queries, collections, collectionsV2, + shortcuts, announcements, answers, + ai, aiApps, gleanAssist, departments); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InvalidOperatorValueError.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InvalidOperatorValueError.java index baaf5299..751e349a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InvalidOperatorValueError.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InvalidOperatorValueError.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class InvalidOperatorValueError { +public class InvalidOperatorValueError { /** * The operator key that has an invalid value. */ @@ -59,9 +59,10 @@ public Optional value() { return value; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The operator key that has an invalid value. @@ -72,6 +73,7 @@ public InvalidOperatorValueError withKey(String key) { return this; } + /** * The operator key that has an invalid value. */ @@ -90,6 +92,7 @@ public InvalidOperatorValueError withValue(String value) { return this; } + /** * The invalid operator value. */ @@ -99,7 +102,6 @@ public InvalidOperatorValueError withValue(Optional value) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,8 +119,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - key, - value); + key, value); } @Override @@ -127,17 +128,19 @@ public String toString() { "key", key, "value", value); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional key = Optional.empty(); - + private Optional value = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The operator key that has an invalid value. */ @@ -156,6 +159,7 @@ public Builder key(Optional key) { return this; } + /** * The invalid operator value. */ @@ -173,11 +177,12 @@ public Builder value(Optional value) { this.value = value; return this; } - + public InvalidOperatorValueError build() { + return new InvalidOperatorValueError( - key, - value); + key, value); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/InviteInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/InviteInfo.java index 4d558a03..8cbcda1f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/InviteInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/InviteInfo.java @@ -23,7 +23,6 @@ *

Information regarding the invite status of a person. */ public class InviteInfo { - /** * The time this person signed up in ISO format (ISO 8601). */ @@ -38,6 +37,7 @@ public class InviteInfo { @JsonProperty("invites") private Optional> invites; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("inviter") private Optional inviter; @@ -82,7 +82,8 @@ public InviteInfo( } public InviteInfo() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -130,9 +131,10 @@ public Optional reminderTime() { return reminderTime; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The time this person signed up in ISO format (ISO 8601). @@ -143,6 +145,7 @@ public InviteInfo withSignUpTime(OffsetDateTime signUpTime) { return this; } + /** * The time this person signed up in ISO format (ISO 8601). */ @@ -161,6 +164,7 @@ public InviteInfo withInvites(List invites) { return this; } + /** * Latest invites received by the user for each channel */ @@ -176,6 +180,7 @@ public InviteInfo withInviter(Person inviter) { return this; } + public InviteInfo withInviter(Optional inviter) { Utils.checkNotNull(inviter, "inviter"); this.inviter = inviter; @@ -194,6 +199,7 @@ public InviteInfo withInviteTime(OffsetDateTime inviteTime) { return this; } + /** * The time this person was invited in ISO format (ISO 8601). * @@ -218,6 +224,7 @@ public InviteInfo withReminderTime(OffsetDateTime reminderTime) { return this; } + /** * The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. * @@ -230,7 +237,6 @@ public InviteInfo withReminderTime(Optional reminderTime) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -251,11 +257,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - signUpTime, - invites, - inviter, - inviteTime, - reminderTime); + signUpTime, invites, inviter, + inviteTime, reminderTime); } @Override @@ -267,25 +270,27 @@ public String toString() { "inviteTime", inviteTime, "reminderTime", reminderTime); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional signUpTime = Optional.empty(); - + private Optional> invites = Optional.empty(); - + private Optional inviter = Optional.empty(); - + @Deprecated private Optional inviteTime = Optional.empty(); - + @Deprecated private Optional reminderTime = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The time this person signed up in ISO format (ISO 8601). */ @@ -304,6 +309,7 @@ public Builder signUpTime(Optional signUpTime) { return this; } + /** * Latest invites received by the user for each channel */ @@ -322,6 +328,7 @@ public Builder invites(Optional> invites) { return this; } + public Builder inviter(Person inviter) { Utils.checkNotNull(inviter, "inviter"); this.inviter = Optional.ofNullable(inviter); @@ -334,6 +341,7 @@ public Builder inviter(Optional inviter) { return this; } + /** * The time this person was invited in ISO format (ISO 8601). * @@ -358,6 +366,7 @@ public Builder inviteTime(Optional inviteTime) { return this; } + /** * The time this person was reminded in ISO format (ISO 8601) if a reminder was sent. * @@ -381,14 +390,13 @@ public Builder reminderTime(Optional reminderTime) { this.reminderTime = reminderTime; return this; } - + public InviteInfo build() { + return new InviteInfo( - signUpTime, - invites, - inviter, - inviteTime, - reminderTime); + signUpTime, invites, inviter, + inviteTime, reminderTime); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/LabeledCountInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/LabeledCountInfo.java index 7e3bf70c..5df7379f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/LabeledCountInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/LabeledCountInfo.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class LabeledCountInfo { +public class LabeledCountInfo { /** * Label for the included count information. */ @@ -62,9 +62,10 @@ public Optional> countInfo() { return (Optional>) countInfo; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Label for the included count information. @@ -84,6 +85,7 @@ public LabeledCountInfo withCountInfo(List countInfo) { return this; } + /** * List of data points for counts for a given date period. */ @@ -93,7 +95,6 @@ public LabeledCountInfo withCountInfo(Optional> countI return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -111,8 +112,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - label, - countInfo); + label, countInfo); } @Override @@ -121,17 +121,19 @@ public String toString() { "label", label, "countInfo", countInfo); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String label; - + private Optional> countInfo = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Label for the included count information. */ @@ -141,6 +143,7 @@ public Builder label(String label) { return this; } + /** * List of data points for counts for a given date period. */ @@ -158,11 +161,12 @@ public Builder countInfo(Optional> countInfo) { this.countInfo = countInfo; return this; } - + public LabeledCountInfo build() { + return new LabeledCountInfo( - label, - countInfo); + label, countInfo); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListAnswersRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListAnswersRequest.java index 66894c29..8ac362b2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListAnswersRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListAnswersRequest.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class ListAnswersRequest { +public class ListAnswersRequest { /** * The Answer Board Id to list answers on. */ @@ -42,9 +42,10 @@ public Optional boardId() { return boardId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The Answer Board Id to list answers on. @@ -55,6 +56,7 @@ public ListAnswersRequest withBoardId(long boardId) { return this; } + /** * The Answer Board Id to list answers on. */ @@ -64,7 +66,6 @@ public ListAnswersRequest withBoardId(Optional boardId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -89,15 +90,17 @@ public String toString() { return Utils.toString(ListAnswersRequest.class, "boardId", boardId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional boardId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The Answer Board Id to list answers on. */ @@ -115,10 +118,12 @@ public Builder boardId(Optional boardId) { this.boardId = boardId; return this; } - + public ListAnswersRequest build() { + return new ListAnswersRequest( boardId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListAnswersResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListAnswersResponse.java index b9fdff4b..103635f4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListAnswersResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListAnswersResponse.java @@ -11,8 +11,8 @@ import java.lang.String; import java.util.List; -public class ListAnswersResponse { +public class ListAnswersResponse { /** * List of answers with tracking tokens. */ @@ -34,9 +34,10 @@ public List answerResults() { return answerResults; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of answers with tracking tokens. @@ -47,7 +48,6 @@ public ListAnswersResponse withAnswerResults(List answerResults) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,15 +72,17 @@ public String toString() { return Utils.toString(ListAnswersResponse.class, "answerResults", answerResults); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List answerResults; - + private Builder() { // force use of static builder() method } + /** * List of answers with tracking tokens. */ @@ -89,10 +91,12 @@ public Builder answerResults(List answerResults) { this.answerResults = answerResults; return this; } - + public ListAnswersResponse build() { + return new ListAnswersResponse( answerResults); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListChatsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListChatsResponse.java index d09a11b4..403e89b5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListChatsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListChatsResponse.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class ListChatsResponse { @JsonInclude(Include.NON_ABSENT) @@ -38,9 +39,10 @@ public Optional> chatResults() { return (Optional>) chatResults; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ListChatsResponse withChatResults(List chatResults) { Utils.checkNotNull(chatResults, "chatResults"); @@ -48,13 +50,13 @@ public ListChatsResponse withChatResults(List chatResults) { return this; } + public ListChatsResponse withChatResults(Optional> chatResults) { Utils.checkNotNull(chatResults, "chatResults"); this.chatResults = chatResults; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -79,15 +81,17 @@ public String toString() { return Utils.toString(ListChatsResponse.class, "chatResults", chatResults); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> chatResults = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder chatResults(List chatResults) { Utils.checkNotNull(chatResults, "chatResults"); this.chatResults = Optional.ofNullable(chatResults); @@ -99,10 +103,12 @@ public Builder chatResults(Optional> chatResu this.chatResults = chatResults; return this; } - + public ListChatsResponse build() { + return new ListChatsResponse( chatResults); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListCollectionsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListCollectionsRequest.java index 0132aece..1b12dd42 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListCollectionsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListCollectionsRequest.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class ListCollectionsRequest { +public class ListCollectionsRequest { /** * Whether to include the audience filters with the listed Collections. */ @@ -80,9 +80,10 @@ public Optional allowedDatasource() { return allowedDatasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Whether to include the audience filters with the listed Collections. @@ -93,6 +94,7 @@ public ListCollectionsRequest withIncludeAudience(boolean includeAudience) { return this; } + /** * Whether to include the audience filters with the listed Collections. */ @@ -111,6 +113,7 @@ public ListCollectionsRequest withIncludeRoles(boolean includeRoles) { return this; } + /** * Whether to include the editor roles with the listed Collections. */ @@ -130,6 +133,7 @@ public ListCollectionsRequest withAllowedDatasource(String allowedDatasource) { return this; } + /** * The datasource type this Collection can hold. * ANSWERS - for Collections representing answer boards @@ -140,7 +144,6 @@ public ListCollectionsRequest withAllowedDatasource(Optional allowedData return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -159,9 +162,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - includeAudience, - includeRoles, - allowedDatasource); + includeAudience, includeRoles, allowedDatasource); } @Override @@ -171,19 +172,21 @@ public String toString() { "includeRoles", includeRoles, "allowedDatasource", allowedDatasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional includeAudience = Optional.empty(); - + private Optional includeRoles = Optional.empty(); - + private Optional allowedDatasource = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Whether to include the audience filters with the listed Collections. */ @@ -202,6 +205,7 @@ public Builder includeAudience(Optional includeAudience) { return this; } + /** * Whether to include the editor roles with the listed Collections. */ @@ -220,6 +224,7 @@ public Builder includeRoles(Optional includeRoles) { return this; } + /** * The datasource type this Collection can hold. * ANSWERS - for Collections representing answer boards @@ -239,12 +244,12 @@ public Builder allowedDatasource(Optional allowedDatasource) { this.allowedDatasource = allowedDatasource; return this; } - + public ListCollectionsRequest build() { + return new ListCollectionsRequest( - includeAudience, - includeRoles, - allowedDatasource); + includeAudience, includeRoles, allowedDatasource); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListCollectionsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListCollectionsResponse.java index eb9ac884..8f3e72fb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListCollectionsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListCollectionsResponse.java @@ -11,8 +11,8 @@ import java.lang.String; import java.util.List; -public class ListCollectionsResponse { +public class ListCollectionsResponse { /** * List of all Collections, no Collection items are fetched. */ @@ -34,9 +34,10 @@ public List collections() { return collections; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of all Collections, no Collection items are fetched. @@ -47,7 +48,6 @@ public ListCollectionsResponse withCollections(List collections) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,15 +72,17 @@ public String toString() { return Utils.toString(ListCollectionsResponse.class, "collections", collections); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List collections; - + private Builder() { // force use of static builder() method } + /** * List of all Collections, no Collection items are fetched. */ @@ -89,10 +91,12 @@ public Builder collections(List collections) { this.collections = collections; return this; } - + public ListCollectionsResponse build() { + return new ListCollectionsResponse( collections); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListDlpReportsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListDlpReportsResponse.java index 2b6248cb..624ab441 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListDlpReportsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListDlpReportsResponse.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class ListDlpReportsResponse { @JsonInclude(Include.NON_ABSENT) @@ -38,9 +39,10 @@ public Optional> reports() { return (Optional>) reports; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ListDlpReportsResponse withReports(List reports) { Utils.checkNotNull(reports, "reports"); @@ -48,13 +50,13 @@ public ListDlpReportsResponse withReports(List reports) { return this; } + public ListDlpReportsResponse withReports(Optional> reports) { Utils.checkNotNull(reports, "reports"); this.reports = reports; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -79,15 +81,17 @@ public String toString() { return Utils.toString(ListDlpReportsResponse.class, "reports", reports); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> reports = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder reports(List reports) { Utils.checkNotNull(reports, "reports"); this.reports = Optional.ofNullable(reports); @@ -99,10 +103,12 @@ public Builder reports(Optional> reports) { this.reports = reports; return this; } - + public ListDlpReportsResponse build() { + return new ListDlpReportsResponse( reports); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListEntitiesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListEntitiesRequest.java index e61bc852..894e6227 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListEntitiesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListEntitiesRequest.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Optional; + public class ListEntitiesRequest { @JsonInclude(Include.NON_ABSENT) @@ -31,6 +32,7 @@ public class ListEntitiesRequest { @JsonProperty("sort") private Optional> sort; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("entityType") private Optional entityType; @@ -119,7 +121,10 @@ public ListEntitiesRequest( } public ListEntitiesRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @SuppressWarnings("unchecked") @@ -201,9 +206,10 @@ public Optional requestType() { return (Optional) requestType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ListEntitiesRequest withFilter(List filter) { Utils.checkNotNull(filter, "filter"); @@ -211,6 +217,7 @@ public ListEntitiesRequest withFilter(List filter) { return this; } + public ListEntitiesRequest withFilter(Optional> filter) { Utils.checkNotNull(filter, "filter"); this.filter = filter; @@ -226,6 +233,7 @@ public ListEntitiesRequest withSort(List sort) { return this; } + /** * Use EntitiesSortOrder enum for SortOptions.sortBy */ @@ -241,6 +249,7 @@ public ListEntitiesRequest withEntityType(ListEntitiesRequestEntityType entityTy return this; } + public ListEntitiesRequest withEntityType(Optional entityType) { Utils.checkNotNull(entityType, "entityType"); this.entityType = entityType; @@ -256,6 +265,7 @@ public ListEntitiesRequest withDatasource(String datasource) { return this; } + /** * The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES */ @@ -274,6 +284,7 @@ public ListEntitiesRequest withQuery(String query) { return this; } + /** * A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. */ @@ -292,6 +303,7 @@ public ListEntitiesRequest withIncludeFields(List reque return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -399,15 +414,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - filter, - sort, - entityType, - datasource, - query, - includeFields, - pageSize, - cursor, - source, + filter, sort, entityType, + datasource, query, includeFields, + pageSize, cursor, source, requestType); } @@ -425,33 +434,35 @@ public String toString() { "source", source, "requestType", requestType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> filter = Optional.empty(); - + private Optional> sort = Optional.empty(); - + private Optional entityType; - + private Optional datasource = Optional.empty(); - + private Optional query = Optional.empty(); - + private Optional> includeFields = Optional.empty(); - + private Optional pageSize = Optional.empty(); - + private Optional cursor = Optional.empty(); - + private Optional source = Optional.empty(); - + private Optional requestType; - + private Builder() { // force use of static builder() method } + public Builder filter(List filter) { Utils.checkNotNull(filter, "filter"); this.filter = Optional.ofNullable(filter); @@ -464,6 +475,7 @@ public Builder filter(Optional> filter) { return this; } + /** * Use EntitiesSortOrder enum for SortOptions.sortBy */ @@ -482,6 +494,7 @@ public Builder sort(Optional> sort) { return this; } + public Builder entityType(ListEntitiesRequestEntityType entityType) { Utils.checkNotNull(entityType, "entityType"); this.entityType = Optional.ofNullable(entityType); @@ -494,6 +507,7 @@ public Builder entityType(Optional enti return this; } + /** * The datasource associated with the entity type, most commonly used with CUSTOM_ENTITIES */ @@ -512,6 +526,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * A query string to search for entities that each entity in the response must conform to. An empty query does not filter any entities. */ @@ -530,6 +545,7 @@ public Builder query(Optional query) { return this; } + /** * List of entity fields to return (that aren't returned by default) */ @@ -548,6 +564,7 @@ public Builder includeFields(Optional pageSize) { return this; } + /** * Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. */ @@ -584,6 +602,7 @@ public Builder cursor(Optional cursor) { return this; } + /** * A string denoting the search surface from which the endpoint is called. */ @@ -602,6 +621,7 @@ public Builder source(Optional source) { return this; } + /** * The type of request being made. */ @@ -619,7 +639,7 @@ public Builder requestType(Optional requestType) { this.requestType = requestType; return this; } - + public ListEntitiesRequest build() { if (entityType == null) { entityType = _SINGLETON_VALUE_EntityType.value(); @@ -627,19 +647,15 @@ public ListEntitiesRequest build() { if (requestType == null) { requestType = _SINGLETON_VALUE_RequestType.value(); } + return new ListEntitiesRequest( - filter, - sort, - entityType, - datasource, - query, - includeFields, - pageSize, - cursor, - source, + filter, sort, entityType, + datasource, query, includeFields, + pageSize, cursor, source, requestType); } + private static final LazySingletonValue> _SINGLETON_VALUE_EntityType = new LazySingletonValue<>( "entityType", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListEntitiesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListEntitiesResponse.java index 4aa6d467..393501c5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListEntitiesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListEntitiesResponse.java @@ -17,20 +17,24 @@ import java.util.List; import java.util.Optional; + public class ListEntitiesResponse { @JsonInclude(Include.NON_ABSENT) @JsonProperty("results") private Optional> results; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("teamResults") private Optional> teamResults; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("customEntityResults") private Optional> customEntityResults; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("facetResults") private Optional> facetResults; @@ -102,7 +106,9 @@ public ListEntitiesResponse( } public ListEntitiesResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") @@ -171,9 +177,10 @@ public Optional> customFacetNames() { return (Optional>) customFacetNames; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ListEntitiesResponse withResults(List results) { Utils.checkNotNull(results, "results"); @@ -181,6 +188,7 @@ public ListEntitiesResponse withResults(List results) { return this; } + public ListEntitiesResponse withResults(Optional> results) { Utils.checkNotNull(results, "results"); this.results = results; @@ -193,6 +201,7 @@ public ListEntitiesResponse withTeamResults(List teamResults) { return this; } + public ListEntitiesResponse withTeamResults(Optional> teamResults) { Utils.checkNotNull(teamResults, "teamResults"); this.teamResults = teamResults; @@ -205,6 +214,7 @@ public ListEntitiesResponse withCustomEntityResults(List customEnt return this; } + public ListEntitiesResponse withCustomEntityResults(Optional> customEntityResults) { Utils.checkNotNull(customEntityResults, "customEntityResults"); this.customEntityResults = customEntityResults; @@ -217,6 +227,7 @@ public ListEntitiesResponse withFacetResults(List facetResults) { return this; } + public ListEntitiesResponse withFacetResults(Optional> facetResults) { Utils.checkNotNull(facetResults, "facetResults"); this.facetResults = facetResults; @@ -232,6 +243,7 @@ public ListEntitiesResponse withCursor(String cursor) { return this; } + /** * Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. */ @@ -250,6 +262,7 @@ public ListEntitiesResponse withTotalCount(long totalCount) { return this; } + /** * The total number of entities available */ @@ -268,6 +281,7 @@ public ListEntitiesResponse withHasMoreResults(boolean hasMoreResults) { return this; } + /** * Whether or not more entities can be fetched. */ @@ -286,6 +300,7 @@ public ListEntitiesResponse withSortOptions(List sortOptions) return this; } + /** * Sort options from EntitiesSortOrder supported for this response. Default is empty list. */ @@ -304,6 +319,7 @@ public ListEntitiesResponse withCustomFacetNames(List customFacetNames) return this; } + /** * list of Person attributes that are custom setup by deployment */ @@ -313,7 +329,6 @@ public ListEntitiesResponse withCustomFacetNames(Optional return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -338,15 +353,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - results, - teamResults, - customEntityResults, - facetResults, - cursor, - totalCount, - hasMoreResults, - sortOptions, - customFacetNames); + results, teamResults, customEntityResults, + facetResults, cursor, totalCount, + hasMoreResults, sortOptions, customFacetNames); } @Override @@ -362,31 +371,33 @@ public String toString() { "sortOptions", sortOptions, "customFacetNames", customFacetNames); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> results = Optional.empty(); - + private Optional> teamResults = Optional.empty(); - + private Optional> customEntityResults = Optional.empty(); - + private Optional> facetResults = Optional.empty(); - + private Optional cursor = Optional.empty(); - + private Optional totalCount = Optional.empty(); - + private Optional hasMoreResults = Optional.empty(); - + private Optional> sortOptions = Optional.empty(); - + private Optional> customFacetNames = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder results(List results) { Utils.checkNotNull(results, "results"); this.results = Optional.ofNullable(results); @@ -399,6 +410,7 @@ public Builder results(Optional> results) { return this; } + public Builder teamResults(List teamResults) { Utils.checkNotNull(teamResults, "teamResults"); this.teamResults = Optional.ofNullable(teamResults); @@ -411,6 +423,7 @@ public Builder teamResults(Optional> teamResults) { return this; } + public Builder customEntityResults(List customEntityResults) { Utils.checkNotNull(customEntityResults, "customEntityResults"); this.customEntityResults = Optional.ofNullable(customEntityResults); @@ -423,6 +436,7 @@ public Builder customEntityResults(Optional> custom return this; } + public Builder facetResults(List facetResults) { Utils.checkNotNull(facetResults, "facetResults"); this.facetResults = Optional.ofNullable(facetResults); @@ -435,6 +449,7 @@ public Builder facetResults(Optional> facetResults) return this; } + /** * Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. */ @@ -453,6 +468,7 @@ public Builder cursor(Optional cursor) { return this; } + /** * The total number of entities available */ @@ -471,6 +487,7 @@ public Builder totalCount(Optional totalCount) { return this; } + /** * Whether or not more entities can be fetched. */ @@ -489,6 +506,7 @@ public Builder hasMoreResults(Optional hasMoreResults) { return this; } + /** * Sort options from EntitiesSortOrder supported for this response. Default is empty list. */ @@ -507,6 +525,7 @@ public Builder sortOptions(Optional> sortOptio return this; } + /** * list of Person attributes that are custom setup by deployment */ @@ -524,18 +543,14 @@ public Builder customFacetNames(Optional> customFacetName this.customFacetNames = customFacetNames; return this; } - + public ListEntitiesResponse build() { + return new ListEntitiesResponse( - results, - teamResults, - customEntityResults, - facetResults, - cursor, - totalCount, - hasMoreResults, - sortOptions, - customFacetNames); + results, teamResults, customEntityResults, + facetResults, cursor, totalCount, + hasMoreResults, sortOptions, customFacetNames); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListPinsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListPinsResponse.java index 087754db..753482fd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListPinsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListPinsResponse.java @@ -11,8 +11,8 @@ import java.lang.String; import java.util.List; -public class ListPinsResponse { +public class ListPinsResponse { /** * List of pinned documents. */ @@ -34,9 +34,10 @@ public List pins() { return pins; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of pinned documents. @@ -47,7 +48,6 @@ public ListPinsResponse withPins(List pins) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,15 +72,17 @@ public String toString() { return Utils.toString(ListPinsResponse.class, "pins", pins); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List pins; - + private Builder() { // force use of static builder() method } + /** * List of pinned documents. */ @@ -89,10 +91,12 @@ public Builder pins(List pins) { this.pins = pins; return this; } - + public ListPinsResponse build() { + return new ListPinsResponse( pins); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListShortcutsPaginatedRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListShortcutsPaginatedRequest.java index 44498d06..ed0cca24 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListShortcutsPaginatedRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListShortcutsPaginatedRequest.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class ListShortcutsPaginatedRequest { +public class ListShortcutsPaginatedRequest { /** * Array of fields/data to be included in response that are not included by default */ @@ -25,6 +25,7 @@ public class ListShortcutsPaginatedRequest { @JsonProperty("includeFields") private Optional> includeFields; + @JsonProperty("pageSize") private long pageSize; @@ -42,6 +43,7 @@ public class ListShortcutsPaginatedRequest { @JsonProperty("filters") private Optional> filters; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sort") private Optional sort; @@ -77,7 +79,8 @@ public ListShortcutsPaginatedRequest( public ListShortcutsPaginatedRequest( long pageSize) { - this(Optional.empty(), pageSize, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), pageSize, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -125,9 +128,10 @@ public Optional query() { return query; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Array of fields/data to be included in response that are not included by default @@ -138,6 +142,7 @@ public ListShortcutsPaginatedRequest withIncludeFields(List filters) { return this; } + /** * A list of filters for the query. An AND is assumed between different filters. We support filters on Go Link name, author, department and type. */ @@ -195,6 +202,7 @@ public ListShortcutsPaginatedRequest withSort(SortOptions sort) { return this; } + public ListShortcutsPaginatedRequest withSort(Optional sort) { Utils.checkNotNull(sort, "sort"); this.sort = sort; @@ -210,6 +218,7 @@ public ListShortcutsPaginatedRequest withQuery(String query) { return this; } + /** * Search query that should be a substring in atleast one of the fields (alias , inputAlias, destinationUrl, description). Empty query does not filter shortcuts. */ @@ -219,7 +228,6 @@ public ListShortcutsPaginatedRequest withQuery(Optional query) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -241,12 +249,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - includeFields, - pageSize, - cursor, - filters, - sort, - query); + includeFields, pageSize, cursor, + filters, sort, query); } @Override @@ -259,25 +263,27 @@ public String toString() { "sort", sort, "query", query); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> includeFields = Optional.empty(); - + private Long pageSize; - + private Optional cursor = Optional.empty(); - + private Optional> filters = Optional.empty(); - + private Optional sort = Optional.empty(); - + private Optional query = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Array of fields/data to be included in response that are not included by default */ @@ -296,12 +302,14 @@ public Builder includeFields(Optional cursor) { return this; } + /** * A list of filters for the query. An AND is assumed between different filters. We support filters on Go Link name, author, department and type. */ @@ -338,6 +347,7 @@ public Builder filters(Optional> filters) { return this; } + public Builder sort(SortOptions sort) { Utils.checkNotNull(sort, "sort"); this.sort = Optional.ofNullable(sort); @@ -350,6 +360,7 @@ public Builder sort(Optional sort) { return this; } + /** * Search query that should be a substring in atleast one of the fields (alias , inputAlias, destinationUrl, description). Empty query does not filter shortcuts. */ @@ -367,15 +378,13 @@ public Builder query(Optional query) { this.query = query; return this; } - + public ListShortcutsPaginatedRequest build() { + return new ListShortcutsPaginatedRequest( - includeFields, - pageSize, - cursor, - filters, - sort, - query); + includeFields, pageSize, cursor, + filters, sort, query); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListShortcutsPaginatedResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListShortcutsPaginatedResponse.java index e7da0c5e..e86d90bf 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ListShortcutsPaginatedResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ListShortcutsPaginatedResponse.java @@ -15,18 +15,20 @@ import java.util.List; import java.util.Optional; -public class ListShortcutsPaginatedResponse { +public class ListShortcutsPaginatedResponse { /** * List of all shortcuts accessible to the user */ @JsonProperty("shortcuts") private List shortcuts; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("facetResults") private Optional> facetResults; + @JsonProperty("meta") private ShortcutsPaginationMetadata meta; @@ -68,9 +70,10 @@ public ShortcutsPaginationMetadata meta() { return meta; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of all shortcuts accessible to the user @@ -87,6 +90,7 @@ public ListShortcutsPaginatedResponse withFacetResults(List facetRe return this; } + public ListShortcutsPaginatedResponse withFacetResults(Optional> facetResults) { Utils.checkNotNull(facetResults, "facetResults"); this.facetResults = facetResults; @@ -99,7 +103,6 @@ public ListShortcutsPaginatedResponse withMeta(ShortcutsPaginationMetadata meta) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,9 +121,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - shortcuts, - facetResults, - meta); + shortcuts, facetResults, meta); } @Override @@ -130,19 +131,21 @@ public String toString() { "facetResults", facetResults, "meta", meta); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List shortcuts; - + private Optional> facetResults = Optional.empty(); - + private ShortcutsPaginationMetadata meta; - + private Builder() { // force use of static builder() method } + /** * List of all shortcuts accessible to the user */ @@ -152,6 +155,7 @@ public Builder shortcuts(List shortcuts) { return this; } + public Builder facetResults(List facetResults) { Utils.checkNotNull(facetResults, "facetResults"); this.facetResults = Optional.ofNullable(facetResults); @@ -164,17 +168,18 @@ public Builder facetResults(Optional> facetResults) return this; } + public Builder meta(ShortcutsPaginationMetadata meta) { Utils.checkNotNull(meta, "meta"); this.meta = meta; return this; } - + public ListShortcutsPaginatedResponse build() { + return new ListShortcutsPaginatedResponse( - shortcuts, - facetResults, - meta); + shortcuts, facetResults, meta); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ManualFeedbackInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ManualFeedbackInfo.java index 7c2f2c8e..2a2195b7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ManualFeedbackInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ManualFeedbackInfo.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class ManualFeedbackInfo { +public class ManualFeedbackInfo { /** * The email address of the user who submitted the Feedback.event.MANUAL_FEEDBACK event. */ @@ -197,7 +197,12 @@ public ManualFeedbackInfo( } public ManualFeedbackInfo() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -346,9 +351,10 @@ public Optional ratingScale() { return ratingScale; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The email address of the user who submitted the Feedback.event.MANUAL_FEEDBACK event. @@ -359,6 +365,7 @@ public ManualFeedbackInfo withEmail(String email) { return this; } + /** * The email address of the user who submitted the Feedback.event.MANUAL_FEEDBACK event. */ @@ -377,6 +384,7 @@ public ManualFeedbackInfo withSource(ManualFeedbackInfoSource source) { return this; } + /** * The source associated with the Feedback.event.MANUAL_FEEDBACK event. */ @@ -398,6 +406,7 @@ public ManualFeedbackInfo withIssue(String issue) { return this; } + /** * The issue the user indicated in the feedback. * @@ -419,6 +428,7 @@ public ManualFeedbackInfo withIssues(List issues) { return this; } + /** * The issue(s) the user indicated in the feedback. */ @@ -437,6 +447,7 @@ public ManualFeedbackInfo withImageUrls(List imageUrls) { return this; } + /** * URLs of images uploaded by user when providing feedback */ @@ -455,6 +466,7 @@ public ManualFeedbackInfo withQuery(String query) { return this; } + /** * The query associated with the Feedback.event.MANUAL_FEEDBACK event. */ @@ -473,6 +485,7 @@ public ManualFeedbackInfo withObscuredQuery(String obscuredQuery) { return this; } + /** * The query associated with the Feedback.event.MANUAL_FEEDBACK event, but obscured such that the vowels are replaced with special characters. For search feedback events only. */ @@ -491,6 +504,7 @@ public ManualFeedbackInfo withActiveTab(String activeTab) { return this; } + /** * Which tabs the user had chosen at the time of the Feedback.event.MANUAL_FEEDBACK event. For search feedback events only. */ @@ -509,6 +523,7 @@ public ManualFeedbackInfo withComments(String comments) { return this; } + /** * The comments users can optionally add to the Feedback.event.MANUAL_FEEDBACK events. */ @@ -527,6 +542,7 @@ public ManualFeedbackInfo withSearchResults(List searchResults) { return this; } + /** * The array of search result Glean Document IDs, ordered by top to bottom result. */ @@ -545,6 +561,7 @@ public ManualFeedbackInfo withPreviousMessages(List previousMessages) { return this; } + /** * The array of previous messages in a chat session, ordered by oldest to newest. */ @@ -563,6 +580,7 @@ public ManualFeedbackInfo withChatTranscript(List chatTran return this; } + /** * Array of previous request/response exchanges, ordered by oldest to newest. */ @@ -581,6 +599,7 @@ public ManualFeedbackInfo withNumQueriesFromFirstRun(long numQueriesFromFirstRun return this; } + /** * How many times this query has been run in the past. */ @@ -599,6 +618,7 @@ public ManualFeedbackInfo withVote(Vote vote) { return this; } + /** * The vote associated with the Feedback.event.MANUAL_FEEDBACK event. */ @@ -617,6 +637,7 @@ public ManualFeedbackInfo withRating(long rating) { return this; } + /** * A rating associated with the user feedback. The value will be between one and the maximum given by ratingScale, inclusive. */ @@ -635,6 +656,7 @@ public ManualFeedbackInfo withRatingKey(String ratingKey) { return this; } + /** * A description of the rating that contextualizes how it appeared to the user, e.g. "satisfied". */ @@ -653,6 +675,7 @@ public ManualFeedbackInfo withRatingScale(long ratingScale) { return this; } + /** * The scale of comparison for a rating associated with the feedback. Rating values start from one and go up to the maximum specified by ratingScale. For example, a five-option satisfaction rating will have a ratingScale of 5 and a thumbs-up/thumbs-down rating will have a ratingScale of 2. */ @@ -662,7 +685,6 @@ public ManualFeedbackInfo withRatingScale(Optional ratingScale) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -695,23 +717,12 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - email, - source, - issue, - issues, - imageUrls, - query, - obscuredQuery, - activeTab, - comments, - searchResults, - previousMessages, - chatTranscript, - numQueriesFromFirstRun, - vote, - rating, - ratingKey, - ratingScale); + email, source, issue, + issues, imageUrls, query, + obscuredQuery, activeTab, comments, + searchResults, previousMessages, chatTranscript, + numQueriesFromFirstRun, vote, rating, + ratingKey, ratingScale); } @Override @@ -735,48 +746,50 @@ public String toString() { "ratingKey", ratingKey, "ratingScale", ratingScale); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional email = Optional.empty(); - + private Optional source = Optional.empty(); - + @Deprecated private Optional issue = Optional.empty(); - + private Optional> issues = Optional.empty(); - + private Optional> imageUrls = Optional.empty(); - + private Optional query = Optional.empty(); - + private Optional obscuredQuery = Optional.empty(); - + private Optional activeTab = Optional.empty(); - + private Optional comments = Optional.empty(); - + private Optional> searchResults = Optional.empty(); - + private Optional> previousMessages = Optional.empty(); - + private Optional> chatTranscript = Optional.empty(); - + private Optional numQueriesFromFirstRun = Optional.empty(); - + private Optional vote = Optional.empty(); - + private Optional rating = Optional.empty(); - + private Optional ratingKey = Optional.empty(); - + private Optional ratingScale = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The email address of the user who submitted the Feedback.event.MANUAL_FEEDBACK event. */ @@ -795,6 +808,7 @@ public Builder email(Optional email) { return this; } + /** * The source associated with the Feedback.event.MANUAL_FEEDBACK event. */ @@ -813,6 +827,7 @@ public Builder source(Optional source) { return this; } + /** * The issue the user indicated in the feedback. * @@ -837,6 +852,7 @@ public Builder issue(Optional issue) { return this; } + /** * The issue(s) the user indicated in the feedback. */ @@ -855,6 +871,7 @@ public Builder issues(Optional> issues) { return this; } + /** * URLs of images uploaded by user when providing feedback */ @@ -873,6 +890,7 @@ public Builder imageUrls(Optional> imageUrls) { return this; } + /** * The query associated with the Feedback.event.MANUAL_FEEDBACK event. */ @@ -891,6 +909,7 @@ public Builder query(Optional query) { return this; } + /** * The query associated with the Feedback.event.MANUAL_FEEDBACK event, but obscured such that the vowels are replaced with special characters. For search feedback events only. */ @@ -909,6 +928,7 @@ public Builder obscuredQuery(Optional obscuredQuery) { return this; } + /** * Which tabs the user had chosen at the time of the Feedback.event.MANUAL_FEEDBACK event. For search feedback events only. */ @@ -927,6 +947,7 @@ public Builder activeTab(Optional activeTab) { return this; } + /** * The comments users can optionally add to the Feedback.event.MANUAL_FEEDBACK events. */ @@ -945,6 +966,7 @@ public Builder comments(Optional comments) { return this; } + /** * The array of search result Glean Document IDs, ordered by top to bottom result. */ @@ -963,6 +985,7 @@ public Builder searchResults(Optional> searchResults) { return this; } + /** * The array of previous messages in a chat session, ordered by oldest to newest. */ @@ -981,6 +1004,7 @@ public Builder previousMessages(Optional> previousMessage return this; } + /** * Array of previous request/response exchanges, ordered by oldest to newest. */ @@ -999,6 +1023,7 @@ public Builder chatTranscript(Optional> cha return this; } + /** * How many times this query has been run in the past. */ @@ -1017,6 +1042,7 @@ public Builder numQueriesFromFirstRun(Optional numQueriesFromFirstRun) { return this; } + /** * The vote associated with the Feedback.event.MANUAL_FEEDBACK event. */ @@ -1035,6 +1061,7 @@ public Builder vote(Optional vote) { return this; } + /** * A rating associated with the user feedback. The value will be between one and the maximum given by ratingScale, inclusive. */ @@ -1053,6 +1080,7 @@ public Builder rating(Optional rating) { return this; } + /** * A description of the rating that contextualizes how it appeared to the user, e.g. "satisfied". */ @@ -1071,6 +1099,7 @@ public Builder ratingKey(Optional ratingKey) { return this; } + /** * The scale of comparison for a rating associated with the feedback. Rating values start from one and go up to the maximum specified by ratingScale. For example, a five-option satisfaction rating will have a ratingScale of 5 and a thumbs-up/thumbs-down rating will have a ratingScale of 2. */ @@ -1088,26 +1117,17 @@ public Builder ratingScale(Optional ratingScale) { this.ratingScale = ratingScale; return this; } - + public ManualFeedbackInfo build() { + return new ManualFeedbackInfo( - email, - source, - issue, - issues, - imageUrls, - query, - obscuredQuery, - activeTab, - comments, - searchResults, - previousMessages, - chatTranscript, - numQueriesFromFirstRun, - vote, - rating, - ratingKey, - ratingScale); + email, source, issue, + issues, imageUrls, query, + obscuredQuery, activeTab, comments, + searchResults, previousMessages, chatTranscript, + numQueriesFromFirstRun, vote, rating, + ratingKey, ratingScale); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java index 4b0a7765..38ebe38e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Meeting.java @@ -15,32 +15,39 @@ import java.time.OffsetDateTime; import java.util.Optional; + public class Meeting { @JsonInclude(Include.NON_ABSENT) @JsonProperty("id") private Optional id; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("title") private Optional title; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("description") private Optional description; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("url") private Optional url; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("startTime") private Optional startTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("endTime") private Optional endTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("attendees") private Optional attendees; @@ -71,7 +78,9 @@ public Meeting( } public Meeting() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @JsonIgnore @@ -110,9 +119,10 @@ public Optional attendees() { return (Optional) attendees; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public Meeting withId(String id) { Utils.checkNotNull(id, "id"); @@ -120,6 +130,7 @@ public Meeting withId(String id) { return this; } + public Meeting withId(Optional id) { Utils.checkNotNull(id, "id"); this.id = id; @@ -132,6 +143,7 @@ public Meeting withTitle(String title) { return this; } + public Meeting withTitle(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; @@ -144,6 +156,7 @@ public Meeting withDescription(String description) { return this; } + public Meeting withDescription(Optional description) { Utils.checkNotNull(description, "description"); this.description = description; @@ -156,6 +169,7 @@ public Meeting withUrl(String url) { return this; } + public Meeting withUrl(Optional url) { Utils.checkNotNull(url, "url"); this.url = url; @@ -168,6 +182,7 @@ public Meeting withStartTime(OffsetDateTime startTime) { return this; } + public Meeting withStartTime(Optional startTime) { Utils.checkNotNull(startTime, "startTime"); this.startTime = startTime; @@ -180,6 +195,7 @@ public Meeting withEndTime(OffsetDateTime endTime) { return this; } + public Meeting withEndTime(Optional endTime) { Utils.checkNotNull(endTime, "endTime"); this.endTime = endTime; @@ -192,13 +208,13 @@ public Meeting withAttendees(CalendarAttendees attendees) { return this; } + public Meeting withAttendees(Optional attendees) { Utils.checkNotNull(attendees, "attendees"); this.attendees = attendees; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -221,12 +237,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - title, - description, - url, - startTime, - endTime, + id, title, description, + url, startTime, endTime, attendees); } @@ -241,27 +253,29 @@ public String toString() { "endTime", endTime, "attendees", attendees); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional title = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional startTime = Optional.empty(); - + private Optional endTime = Optional.empty(); - + private Optional attendees = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder id(String id) { Utils.checkNotNull(id, "id"); this.id = Optional.ofNullable(id); @@ -274,6 +288,7 @@ public Builder id(Optional id) { return this; } + public Builder title(String title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); @@ -286,6 +301,7 @@ public Builder title(Optional title) { return this; } + public Builder description(String description) { Utils.checkNotNull(description, "description"); this.description = Optional.ofNullable(description); @@ -298,6 +314,7 @@ public Builder description(Optional description) { return this; } + public Builder url(String url) { Utils.checkNotNull(url, "url"); this.url = Optional.ofNullable(url); @@ -310,6 +327,7 @@ public Builder url(Optional url) { return this; } + public Builder startTime(OffsetDateTime startTime) { Utils.checkNotNull(startTime, "startTime"); this.startTime = Optional.ofNullable(startTime); @@ -322,6 +340,7 @@ public Builder startTime(Optional startTime) { return this; } + public Builder endTime(OffsetDateTime endTime) { Utils.checkNotNull(endTime, "endTime"); this.endTime = Optional.ofNullable(endTime); @@ -334,6 +353,7 @@ public Builder endTime(Optional endTime) { return this; } + public Builder attendees(CalendarAttendees attendees) { Utils.checkNotNull(attendees, "attendees"); this.attendees = Optional.ofNullable(attendees); @@ -345,16 +365,14 @@ public Builder attendees(Optional attendees) { this.attendees = attendees; return this; } - + public Meeting build() { + return new Meeting( - id, - title, - description, - url, - startTime, - endTime, + id, title, description, + url, startTime, endTime, attendees); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Message.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Message.java index 9ecfffe9..7163066d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Message.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Message.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class Message { +public class Message { /** * The role of the message. */ @@ -62,9 +62,10 @@ public Optional> content() { return (Optional>) content; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The role of the message. @@ -75,6 +76,7 @@ public Message withRole(String role) { return this; } + /** * The role of the message. */ @@ -93,6 +95,7 @@ public Message withContent(List content) { return this; } + /** * The content of the message. */ @@ -102,7 +105,6 @@ public Message withContent(Optional> content) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -120,8 +122,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - role, - content); + role, content); } @Override @@ -130,17 +131,19 @@ public String toString() { "role", role, "content", content); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional role = Optional.empty(); - + private Optional> content = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The role of the message. */ @@ -159,6 +162,7 @@ public Builder role(Optional role) { return this; } + /** * The content of the message. */ @@ -176,11 +180,12 @@ public Builder content(Optional> content) { this.content = content; return this; } - + public Message build() { + return new Message( - role, - content); + role, content); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/MessageTextBlock.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/MessageTextBlock.java index b6da7ecc..60ecdaa7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/MessageTextBlock.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/MessageTextBlock.java @@ -10,11 +10,13 @@ import java.lang.Override; import java.lang.String; + public class MessageTextBlock { @JsonProperty("text") private String text; + @JsonProperty("type") private ContentType type; @@ -38,9 +40,10 @@ public ContentType type() { return type; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public MessageTextBlock withText(String text) { Utils.checkNotNull(text, "text"); @@ -54,7 +57,6 @@ public MessageTextBlock withType(ContentType type) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,8 +74,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - text, - type); + text, type); } @Override @@ -82,33 +83,37 @@ public String toString() { "text", text, "type", type); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String text; - + private ContentType type; - + private Builder() { // force use of static builder() method } + public Builder text(String text) { Utils.checkNotNull(text, "text"); this.text = text; return this; } + public Builder type(ContentType type) { Utils.checkNotNull(type, "type"); this.type = type; return this; } - + public MessageTextBlock build() { + return new MessageTextBlock( - text, - type); + text, type); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/MessagesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/MessagesRequest.java index b6e82a96..a76ee0c8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/MessagesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/MessagesRequest.java @@ -16,8 +16,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class MessagesRequest { +public class MessagesRequest { /** * Type of the id in the incoming request. */ @@ -103,7 +103,9 @@ public MessagesRequest( public MessagesRequest( IdType idType, String id) { - this(idType, id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(idType, id, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -172,9 +174,10 @@ public Optional datasourceInstanceDisplayName() { return datasourceInstanceDisplayName; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Type of the id in the incoming request. @@ -203,6 +206,7 @@ public MessagesRequest withWorkspaceId(String workspaceId) { return this; } + /** * Id for the for the workspace in case of multiple workspaces. */ @@ -221,6 +225,7 @@ public MessagesRequest withDirection(Direction direction) { return this; } + /** * The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. */ @@ -239,6 +244,7 @@ public MessagesRequest withTimestampMillis(long timestampMillis) { return this; } + /** * Timestamp in millis of the reference message. Only applicable when using a message_id. */ @@ -257,6 +263,7 @@ public MessagesRequest withIncludeRootMessage(boolean includeRootMessage) { return this; } + /** * Whether to include root message in response. */ @@ -275,6 +282,7 @@ public MessagesRequest withDatasource(Datasource datasource) { return this; } + /** * The type of the data source. Missing field defaults to SLACK. */ @@ -293,6 +301,7 @@ public MessagesRequest withDatasourceInstanceDisplayName(String datasourceInstan return this; } + /** * The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. */ @@ -302,7 +311,6 @@ public MessagesRequest withDatasourceInstanceDisplayName(Optional dataso return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -326,14 +334,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - idType, - id, - workspaceId, - direction, - timestampMillis, - includeRootMessage, - datasource, - datasourceInstanceDisplayName); + idType, id, workspaceId, + direction, timestampMillis, includeRootMessage, + datasource, datasourceInstanceDisplayName); } @Override @@ -348,29 +351,31 @@ public String toString() { "datasource", datasource, "datasourceInstanceDisplayName", datasourceInstanceDisplayName); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private IdType idType; - + private String id; - + private Optional workspaceId = Optional.empty(); - + private Optional direction = Optional.empty(); - + private Optional timestampMillis = Optional.empty(); - + private Optional includeRootMessage = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional datasourceInstanceDisplayName = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Type of the id in the incoming request. */ @@ -380,6 +385,7 @@ public Builder idType(IdType idType) { return this; } + /** * ID corresponding to the requested idType. Note that channel and threads are represented by the underlying datasource's ID and conversations are represented by their document's ID. */ @@ -389,6 +395,7 @@ public Builder id(String id) { return this; } + /** * Id for the for the workspace in case of multiple workspaces. */ @@ -407,6 +414,7 @@ public Builder workspaceId(Optional workspaceId) { return this; } + /** * The direction of the results asked with respect to the reference timestamp. Missing field defaults to OLDER. Only applicable when using a message_id. */ @@ -425,6 +433,7 @@ public Builder direction(Optional direction) { return this; } + /** * Timestamp in millis of the reference message. Only applicable when using a message_id. */ @@ -443,6 +452,7 @@ public Builder timestampMillis(Optional timestampMillis) { return this; } + /** * Whether to include root message in response. */ @@ -461,6 +471,7 @@ public Builder includeRootMessage(Optional includeRootMessage) { return this; } + /** * The type of the data source. Missing field defaults to SLACK. */ @@ -479,6 +490,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * The datasource instance display name from which the document was extracted. This is used for appinstance facet filter for datasources that support multiple instances. */ @@ -496,17 +508,14 @@ public Builder datasourceInstanceDisplayName(Optional datasourceInstance this.datasourceInstanceDisplayName = datasourceInstanceDisplayName; return this; } - + public MessagesRequest build() { + return new MessagesRequest( - idType, - id, - workspaceId, - direction, - timestampMillis, - includeRootMessage, - datasource, - datasourceInstanceDisplayName); + idType, id, workspaceId, + direction, timestampMillis, includeRootMessage, + datasource, datasourceInstanceDisplayName); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/MessagesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/MessagesResponse.java index e2e10976..2c61f7d3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/MessagesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/MessagesResponse.java @@ -15,18 +15,20 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class MessagesResponse { +public class MessagesResponse { /** * Whether there are more results for client to continue requesting. */ @JsonProperty("hasMore") private boolean hasMore; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("searchResponse") private Optional searchResponse; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("rootMessage") private Optional rootMessage; @@ -69,9 +71,10 @@ public Optional rootMessage() { return (Optional) rootMessage; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Whether there are more results for client to continue requesting. @@ -88,6 +91,7 @@ public MessagesResponse withSearchResponse(SearchResponse searchResponse) { return this; } + public MessagesResponse withSearchResponse(Optional searchResponse) { Utils.checkNotNull(searchResponse, "searchResponse"); this.searchResponse = searchResponse; @@ -100,13 +104,13 @@ public MessagesResponse withRootMessage(SearchResult rootMessage) { return this; } + public MessagesResponse withRootMessage(Optional rootMessage) { Utils.checkNotNull(rootMessage, "rootMessage"); this.rootMessage = rootMessage; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -125,9 +129,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - hasMore, - searchResponse, - rootMessage); + hasMore, searchResponse, rootMessage); } @Override @@ -137,19 +139,21 @@ public String toString() { "searchResponse", searchResponse, "rootMessage", rootMessage); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Boolean hasMore; - + private Optional searchResponse = Optional.empty(); - + private Optional rootMessage = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Whether there are more results for client to continue requesting. */ @@ -159,6 +163,7 @@ public Builder hasMore(boolean hasMore) { return this; } + public Builder searchResponse(SearchResponse searchResponse) { Utils.checkNotNull(searchResponse, "searchResponse"); this.searchResponse = Optional.ofNullable(searchResponse); @@ -171,6 +176,7 @@ public Builder searchResponse(Optional searchResponse) return this; } + public Builder rootMessage(SearchResult rootMessage) { Utils.checkNotNull(rootMessage, "rootMessage"); this.rootMessage = Optional.ofNullable(rootMessage); @@ -182,12 +188,12 @@ public Builder rootMessage(Optional rootMessage) { this.rootMessage = rootMessage; return this; } - + public MessagesResponse build() { + return new MessagesResponse( - hasMore, - searchResponse, - rootMessage); + hasMore, searchResponse, rootMessage); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ObjectDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ObjectDefinition.java index c76a9fd2..26c337f2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ObjectDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ObjectDefinition.java @@ -22,7 +22,6 @@ *

The definition for an `DocumentMetadata.objectType` within a datasource. */ public class ObjectDefinition { - /** * Unique identifier for this `DocumentMetadata.objectType`. If omitted, this definition is used as a default for all unmatched `DocumentMetadata.objectType`s in this datasource. */ @@ -44,6 +43,7 @@ public class ObjectDefinition { @JsonProperty("docCategory") private Optional docCategory; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("propertyDefinitions") private Optional> propertyDefinitions; @@ -85,7 +85,8 @@ public ObjectDefinition( } public ObjectDefinition() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -136,9 +137,10 @@ public Optional summarizable() { return summarizable; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique identifier for this `DocumentMetadata.objectType`. If omitted, this definition is used as a default for all unmatched `DocumentMetadata.objectType`s in this datasource. @@ -149,6 +151,7 @@ public ObjectDefinition withName(String name) { return this; } + /** * Unique identifier for this `DocumentMetadata.objectType`. If omitted, this definition is used as a default for all unmatched `DocumentMetadata.objectType`s in this datasource. */ @@ -167,6 +170,7 @@ public ObjectDefinition withDisplayLabel(String displayLabel) { return this; } + /** * The user-friendly name of the object for display. */ @@ -185,6 +189,7 @@ public ObjectDefinition withDocCategory(DocCategory docCategory) { return this; } + /** * The document category of this object type. */ @@ -200,6 +205,7 @@ public ObjectDefinition withPropertyDefinitions(List propert return this; } + public ObjectDefinition withPropertyDefinitions(Optional> propertyDefinitions) { Utils.checkNotNull(propertyDefinitions, "propertyDefinitions"); this.propertyDefinitions = propertyDefinitions; @@ -215,6 +221,7 @@ public ObjectDefinition withPropertyGroups(List propertyGroups) { return this; } + /** * A list of `PropertyGroup`s belonging to this object type, which will group properties to be displayed together in the UI. */ @@ -233,6 +240,7 @@ public ObjectDefinition withSummarizable(boolean summarizable) { return this; } + /** * Whether or not the object is summarizable */ @@ -242,7 +250,6 @@ public ObjectDefinition withSummarizable(Optional summarizable) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -264,12 +271,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - displayLabel, - docCategory, - propertyDefinitions, - propertyGroups, - summarizable); + name, displayLabel, docCategory, + propertyDefinitions, propertyGroups, summarizable); } @Override @@ -282,25 +285,27 @@ public String toString() { "propertyGroups", propertyGroups, "summarizable", summarizable); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional displayLabel = Optional.empty(); - + private Optional docCategory = Optional.empty(); - + private Optional> propertyDefinitions = Optional.empty(); - + private Optional> propertyGroups = Optional.empty(); - + private Optional summarizable = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique identifier for this `DocumentMetadata.objectType`. If omitted, this definition is used as a default for all unmatched `DocumentMetadata.objectType`s in this datasource. */ @@ -319,6 +324,7 @@ public Builder name(Optional name) { return this; } + /** * The user-friendly name of the object for display. */ @@ -337,6 +343,7 @@ public Builder displayLabel(Optional displayLabel) { return this; } + /** * The document category of this object type. */ @@ -355,6 +362,7 @@ public Builder docCategory(Optional docCategory) { return this; } + public Builder propertyDefinitions(List propertyDefinitions) { Utils.checkNotNull(propertyDefinitions, "propertyDefinitions"); this.propertyDefinitions = Optional.ofNullable(propertyDefinitions); @@ -367,6 +375,7 @@ public Builder propertyDefinitions(Optional> return this; } + /** * A list of `PropertyGroup`s belonging to this object type, which will group properties to be displayed together in the UI. */ @@ -385,6 +394,7 @@ public Builder propertyGroups(Optional> propertyGr return this; } + /** * Whether or not the object is summarizable */ @@ -402,15 +412,13 @@ public Builder summarizable(Optional summarizable) { this.summarizable = summarizable; return this; } - + public ObjectDefinition build() { + return new ObjectDefinition( - name, - displayLabel, - docCategory, - propertyDefinitions, - propertyGroups, - summarizable); + name, displayLabel, docCategory, + propertyDefinitions, propertyGroups, summarizable); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ObjectPermissions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ObjectPermissions.java index dcb619c4..345b1e9c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ObjectPermissions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ObjectPermissions.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class ObjectPermissions { +public class ObjectPermissions { /** * Describes the write permissions levels that a user has for a specific feature */ @@ -43,9 +43,10 @@ public Optional write() { return (Optional) write; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Describes the write permissions levels that a user has for a specific feature @@ -56,6 +57,7 @@ public ObjectPermissions withWrite(WritePermission write) { return this; } + /** * Describes the write permissions levels that a user has for a specific feature */ @@ -65,7 +67,6 @@ public ObjectPermissions withWrite(Optional write) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -90,15 +91,17 @@ public String toString() { return Utils.toString(ObjectPermissions.class, "write", write); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional write = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Describes the write permissions levels that a user has for a specific feature */ @@ -116,10 +119,12 @@ public Builder write(Optional write) { this.write = write; return this; } - + public ObjectPermissions build() { + return new ObjectPermissions( write); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/OperatorMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/OperatorMetadata.java index 25e81b39..2ad9816e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/OperatorMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/OperatorMetadata.java @@ -16,6 +16,7 @@ import java.util.List; import java.util.Optional; + public class OperatorMetadata { @JsonProperty("name") @@ -28,14 +29,17 @@ public class OperatorMetadata { @JsonProperty("isCustom") private Optional isCustom; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("operatorType") private Optional operatorType; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("helpText") private Optional helpText; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("scopes") private Optional> scopes; @@ -81,7 +85,9 @@ public OperatorMetadata( public OperatorMetadata( String name) { - this(name, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(name, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @JsonIgnore @@ -130,9 +136,10 @@ public Optional displayValue() { return displayValue; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public OperatorMetadata withName(String name) { Utils.checkNotNull(name, "name"); @@ -149,6 +156,7 @@ public OperatorMetadata withIsCustom(boolean isCustom) { return this; } + /** * Whether this operator is supported by default or something that was created within a workplace app (e.g. custom jira field). */ @@ -164,6 +172,7 @@ public OperatorMetadata withOperatorType(OperatorType operatorType) { return this; } + public OperatorMetadata withOperatorType(Optional operatorType) { Utils.checkNotNull(operatorType, "operatorType"); this.operatorType = operatorType; @@ -176,6 +185,7 @@ public OperatorMetadata withHelpText(String helpText) { return this; } + public OperatorMetadata withHelpText(Optional helpText) { Utils.checkNotNull(helpText, "helpText"); this.helpText = helpText; @@ -188,6 +198,7 @@ public OperatorMetadata withScopes(List scopes) { return this; } + public OperatorMetadata withScopes(Optional> scopes) { Utils.checkNotNull(scopes, "scopes"); this.scopes = scopes; @@ -203,6 +214,7 @@ public OperatorMetadata withValue(String value) { return this; } + /** * Raw/canonical value of the operator. Only applies when result is an operator value. */ @@ -221,6 +233,7 @@ public OperatorMetadata withDisplayValue(String displayValue) { return this; } + /** * Human readable value of the operator that can be shown to the user. Only applies when result is an operator value. */ @@ -230,7 +243,6 @@ public OperatorMetadata withDisplayValue(Optional displayValue) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -253,12 +265,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - isCustom, - operatorType, - helpText, - scopes, - value, + name, isCustom, operatorType, + helpText, scopes, value, displayValue); } @@ -273,33 +281,36 @@ public String toString() { "value", value, "displayValue", displayValue); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private Optional isCustom = Optional.empty(); - + private Optional operatorType = Optional.empty(); - + private Optional helpText = Optional.empty(); - + private Optional> scopes = Optional.empty(); - + private Optional value = Optional.empty(); - + private Optional displayValue = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder name(String name) { Utils.checkNotNull(name, "name"); this.name = name; return this; } + /** * Whether this operator is supported by default or something that was created within a workplace app (e.g. custom jira field). */ @@ -318,6 +329,7 @@ public Builder isCustom(Optional isCustom) { return this; } + public Builder operatorType(OperatorType operatorType) { Utils.checkNotNull(operatorType, "operatorType"); this.operatorType = Optional.ofNullable(operatorType); @@ -330,6 +342,7 @@ public Builder operatorType(Optional operatorType) { return this; } + public Builder helpText(String helpText) { Utils.checkNotNull(helpText, "helpText"); this.helpText = Optional.ofNullable(helpText); @@ -342,6 +355,7 @@ public Builder helpText(Optional helpText) { return this; } + public Builder scopes(List scopes) { Utils.checkNotNull(scopes, "scopes"); this.scopes = Optional.ofNullable(scopes); @@ -354,6 +368,7 @@ public Builder scopes(Optional> scopes) { return this; } + /** * Raw/canonical value of the operator. Only applies when result is an operator value. */ @@ -372,6 +387,7 @@ public Builder value(Optional value) { return this; } + /** * Human readable value of the operator that can be shown to the user. Only applies when result is an operator value. */ @@ -389,16 +405,14 @@ public Builder displayValue(Optional displayValue) { this.displayValue = displayValue; return this; } - + public OperatorMetadata build() { + return new OperatorMetadata( - name, - isCustom, - operatorType, - helpText, - scopes, - value, + name, isCustom, operatorType, + helpText, scopes, value, displayValue); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/OperatorScope.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/OperatorScope.java index b52f3210..49ef1228 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/OperatorScope.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/OperatorScope.java @@ -13,12 +13,14 @@ import java.lang.String; import java.util.Optional; + public class OperatorScope { @JsonInclude(Include.NON_ABSENT) @JsonProperty("datasource") private Optional datasource; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("docType") private Optional docType; @@ -47,9 +49,10 @@ public Optional docType() { return docType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public OperatorScope withDatasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); @@ -57,6 +60,7 @@ public OperatorScope withDatasource(String datasource) { return this; } + public OperatorScope withDatasource(Optional datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = datasource; @@ -69,13 +73,13 @@ public OperatorScope withDocType(String docType) { return this; } + public OperatorScope withDocType(Optional docType) { Utils.checkNotNull(docType, "docType"); this.docType = docType; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -93,8 +97,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasource, - docType); + datasource, docType); } @Override @@ -103,17 +106,19 @@ public String toString() { "datasource", datasource, "docType", docType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional datasource = Optional.empty(); - + private Optional docType = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder datasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = Optional.ofNullable(datasource); @@ -126,6 +131,7 @@ public Builder datasource(Optional datasource) { return this; } + public Builder docType(String docType) { Utils.checkNotNull(docType, "docType"); this.docType = Optional.ofNullable(docType); @@ -137,11 +143,12 @@ public Builder docType(Optional docType) { this.docType = docType; return this; } - + public OperatorScope build() { + return new OperatorScope( - datasource, - docType); + datasource, docType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/OutputSchema.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/OutputSchema.java index 06451b4e..dc6df600 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/OutputSchema.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/OutputSchema.java @@ -14,18 +14,15 @@ *

The schema for the agent output. In JSON Schema format. */ public class OutputSchema { - @JsonCreator public OutputSchema() { - - } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -47,16 +44,19 @@ public int hashCode() { public String toString() { return Utils.toString(OutputSchema.class); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Builder() { // force use of static builder() method } - + public OutputSchema build() { + return new OutputSchema( ); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PeopleRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PeopleRequest.java index 047e788f..e4c922b1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PeopleRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PeopleRequest.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class PeopleRequest { +public class PeopleRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -83,7 +83,8 @@ public PeopleRequest( } public PeopleRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -138,9 +139,10 @@ public Optional source() { return source; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -151,6 +153,7 @@ public PeopleRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -169,6 +172,7 @@ public PeopleRequest withObfuscatedIds(List obfuscatedIds) { return this; } + /** * The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. */ @@ -187,6 +191,7 @@ public PeopleRequest withEmailIds(List emailIds) { return this; } + /** * The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. */ @@ -205,6 +210,7 @@ public PeopleRequest withIncludeFields(List includeFi return this; } + /** * List of PersonMetadata fields to return (that aren't returned by default) */ @@ -223,6 +229,7 @@ public PeopleRequest withIncludeTypes(List includeTypes) { return this; } + /** * The types of people entities to include in the response in addition to those returned by default. */ @@ -241,6 +248,7 @@ public PeopleRequest withSource(String source) { return this; } + /** * A string denoting the search surface from which the endpoint is called. */ @@ -250,7 +258,6 @@ public PeopleRequest withSource(Optional source) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -272,12 +279,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timezoneOffset, - obfuscatedIds, - emailIds, - includeFields, - includeTypes, - source); + timezoneOffset, obfuscatedIds, emailIds, + includeFields, includeTypes, source); } @Override @@ -290,25 +293,27 @@ public String toString() { "includeTypes", includeTypes, "source", source); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private Optional> obfuscatedIds = Optional.empty(); - + private Optional> emailIds = Optional.empty(); - + private Optional> includeFields = Optional.empty(); - + private Optional> includeTypes = Optional.empty(); - + private Optional source = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -327,6 +332,7 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + /** * The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. */ @@ -345,6 +351,7 @@ public Builder obfuscatedIds(Optional> obfuscatedIds) { return this; } + /** * The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. */ @@ -363,6 +370,7 @@ public Builder emailIds(Optional> emailIds) { return this; } + /** * List of PersonMetadata fields to return (that aren't returned by default) */ @@ -381,6 +389,7 @@ public Builder includeFields(Optional> return this; } + /** * The types of people entities to include in the response in addition to those returned by default. */ @@ -399,6 +408,7 @@ public Builder includeTypes(Optional> includeTypes) return this; } + /** * A string denoting the search surface from which the endpoint is called. */ @@ -416,15 +426,13 @@ public Builder source(Optional source) { this.source = source; return this; } - + public PeopleRequest build() { + return new PeopleRequest( - timezoneOffset, - obfuscatedIds, - emailIds, - includeFields, - includeTypes, - source); + timezoneOffset, obfuscatedIds, emailIds, + includeFields, includeTypes, source); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PeopleResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PeopleResponse.java index 4f9d4a8f..f0f66dd0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PeopleResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PeopleResponse.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class PeopleResponse { +public class PeopleResponse { /** * A Person for each ID in the request, each with PersonMetadata populated. */ @@ -82,9 +82,10 @@ public Optional> errors() { return (Optional>) errors; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A Person for each ID in the request, each with PersonMetadata populated. @@ -95,6 +96,7 @@ public PeopleResponse withResults(List results) { return this; } + /** * A Person for each ID in the request, each with PersonMetadata populated. */ @@ -113,6 +115,7 @@ public PeopleResponse withRelatedDocuments(List relatedDocumen return this; } + /** * A list of documents related to this people response. This is only included if DOCUMENT_ACTIVITY is requested and only 1 person is included in the request. */ @@ -131,6 +134,7 @@ public PeopleResponse withErrors(List errors) { return this; } + /** * A list of IDs that could not be found. */ @@ -140,7 +144,6 @@ public PeopleResponse withErrors(Optional> errors) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -159,9 +162,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - results, - relatedDocuments, - errors); + results, relatedDocuments, errors); } @Override @@ -171,19 +172,21 @@ public String toString() { "relatedDocuments", relatedDocuments, "errors", errors); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> results = Optional.empty(); - + private Optional> relatedDocuments = Optional.empty(); - + private Optional> errors = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A Person for each ID in the request, each with PersonMetadata populated. */ @@ -202,6 +205,7 @@ public Builder results(Optional> results) { return this; } + /** * A list of documents related to this people response. This is only included if DOCUMENT_ACTIVITY is requested and only 1 person is included in the request. */ @@ -220,6 +224,7 @@ public Builder relatedDocuments(Optional> relat return this; } + /** * A list of IDs that could not be found. */ @@ -237,12 +242,12 @@ public Builder errors(Optional> errors) { this.errors = errors; return this; } - + public PeopleResponse build() { + return new PeopleResponse( - results, - relatedDocuments, - errors); + results, relatedDocuments, errors); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Period.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Period.java index 294c3518..d8134138 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Period.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Period.java @@ -16,8 +16,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class Period { +public class Period { /** * DEPRECATED - The number of days from now in the past to define upper boundary of time period. * @@ -38,10 +38,12 @@ public class Period { @Deprecated private Optional maxDaysFromNow; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("start") private Optional start; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("end") private Optional end; @@ -63,7 +65,8 @@ public Period( } public Period() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -100,9 +103,10 @@ public Optional end() { return (Optional) end; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * DEPRECATED - The number of days from now in the past to define upper boundary of time period. @@ -116,6 +120,7 @@ public Period withMinDaysFromNow(long minDaysFromNow) { return this; } + /** * DEPRECATED - The number of days from now in the past to define upper boundary of time period. * @@ -140,6 +145,7 @@ public Period withMaxDaysFromNow(long maxDaysFromNow) { return this; } + /** * DEPRECATED - The number of days from now in the past to define lower boundary of time period. * @@ -158,6 +164,7 @@ public Period withStart(TimePoint start) { return this; } + public Period withStart(Optional start) { Utils.checkNotNull(start, "start"); this.start = start; @@ -170,13 +177,13 @@ public Period withEnd(TimePoint end) { return this; } + public Period withEnd(Optional end) { Utils.checkNotNull(end, "end"); this.end = end; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -196,9 +203,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - minDaysFromNow, - maxDaysFromNow, - start, + minDaysFromNow, maxDaysFromNow, start, end); } @@ -210,23 +215,25 @@ public String toString() { "start", start, "end", end); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + @Deprecated private Optional minDaysFromNow = Optional.empty(); - + @Deprecated private Optional maxDaysFromNow = Optional.empty(); - + private Optional start = Optional.empty(); - + private Optional end = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * DEPRECATED - The number of days from now in the past to define upper boundary of time period. * @@ -251,6 +258,7 @@ public Builder minDaysFromNow(Optional minDaysFromNow) { return this; } + /** * DEPRECATED - The number of days from now in the past to define lower boundary of time period. * @@ -275,6 +283,7 @@ public Builder maxDaysFromNow(Optional maxDaysFromNow) { return this; } + public Builder start(TimePoint start) { Utils.checkNotNull(start, "start"); this.start = Optional.ofNullable(start); @@ -287,6 +296,7 @@ public Builder start(Optional start) { return this; } + public Builder end(TimePoint end) { Utils.checkNotNull(end, "end"); this.end = Optional.ofNullable(end); @@ -298,13 +308,13 @@ public Builder end(Optional end) { this.end = end; return this; } - + public Period build() { + return new Period( - minDaysFromNow, - maxDaysFromNow, - start, + minDaysFromNow, maxDaysFromNow, start, end); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Permissions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Permissions.java index 87a1b09f..54888ed7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Permissions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Permissions.java @@ -24,7 +24,6 @@ * When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes. */ public class Permissions { - /** * TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch */ @@ -110,7 +109,9 @@ public Permissions( } public Permissions() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -181,9 +182,10 @@ public Optional> roles() { return (Optional>) roles; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch @@ -194,6 +196,7 @@ public Permissions withCanAdminSearch(boolean canAdminSearch) { return this; } + /** * TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch */ @@ -212,6 +215,7 @@ public Permissions withCanAdminClientApiGlobalTokens(boolean canAdminClientApiGl return this; } + /** * TODO--deprecate in favor of the read and write properties. True if the user can administrate client API tokens with global scope */ @@ -230,6 +234,7 @@ public Permissions withCanDlp(boolean canDlp) { return this; } + /** * TODO--deprecate in favor of the read and write properties. True if the user has access to data loss prevention (DLP) features */ @@ -248,6 +253,7 @@ public Permissions withRead(Map> read) { return this; } + /** * Describes the read permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject */ @@ -266,6 +272,7 @@ public Permissions withWrite(Map> write) { return this; } + /** * Describes the write permissions levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject */ @@ -284,6 +291,7 @@ public Permissions withGrant(Map> grant) { return this; } + /** * Describes the grant permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject */ @@ -302,6 +310,7 @@ public Permissions withRole(String role) { return this; } + /** * The roleId of the canonical role a user has. The displayName is equal to the roleId. */ @@ -320,6 +329,7 @@ public Permissions withRoles(List roles) { return this; } + /** * The roleIds of the roles a user has. */ @@ -329,7 +339,6 @@ public Permissions withRoles(Optional> roles) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -353,14 +362,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - canAdminSearch, - canAdminClientApiGlobalTokens, - canDlp, - read, - write, - grant, - role, - roles); + canAdminSearch, canAdminClientApiGlobalTokens, canDlp, + read, write, grant, + role, roles); } @Override @@ -375,29 +379,31 @@ public String toString() { "role", role, "roles", roles); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional canAdminSearch = Optional.empty(); - + private Optional canAdminClientApiGlobalTokens = Optional.empty(); - + private Optional canDlp = Optional.empty(); - + private Optional>> read = Optional.empty(); - + private Optional>> write = Optional.empty(); - + private Optional>> grant = Optional.empty(); - + private Optional role = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * TODO--deprecate in favor of the read and write properties. True if the user has access to /adminsearch */ @@ -416,6 +422,7 @@ public Builder canAdminSearch(Optional canAdminSearch) { return this; } + /** * TODO--deprecate in favor of the read and write properties. True if the user can administrate client API tokens with global scope */ @@ -434,6 +441,7 @@ public Builder canAdminClientApiGlobalTokens(Optional canAdminClientApi return this; } + /** * TODO--deprecate in favor of the read and write properties. True if the user has access to data loss prevention (DLP) features */ @@ -452,6 +460,7 @@ public Builder canDlp(Optional canDlp) { return this; } + /** * Describes the read permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject */ @@ -470,6 +479,7 @@ public Builder read(Optional>> read) return this; } + /** * Describes the write permissions levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject */ @@ -488,6 +498,7 @@ public Builder write(Optional>> writ return this; } + /** * Describes the grant permission levels that a user has for permissioned features. Key must be PermissionedFeatureOrObject */ @@ -506,6 +517,7 @@ public Builder grant(Optional>> gran return this; } + /** * The roleId of the canonical role a user has. The displayName is equal to the roleId. */ @@ -524,6 +536,7 @@ public Builder role(Optional role) { return this; } + /** * The roleIds of the roles a user has. */ @@ -541,17 +554,14 @@ public Builder roles(Optional> roles) { this.roles = roles; return this; } - + public Permissions build() { + return new Permissions( - canAdminSearch, - canAdminClientApiGlobalTokens, - canDlp, - read, - write, - grant, - role, - roles); + canAdminSearch, canAdminClientApiGlobalTokens, canDlp, + read, write, grant, + role, roles); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PermissionsGroupIntersectionDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PermissionsGroupIntersectionDefinition.java index c96ab815..8bfb4ea6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PermissionsGroupIntersectionDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PermissionsGroupIntersectionDefinition.java @@ -43,9 +43,10 @@ public Optional> requiredGroups() { return (Optional>) requiredGroups; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public PermissionsGroupIntersectionDefinition withRequiredGroups(List requiredGroups) { Utils.checkNotNull(requiredGroups, "requiredGroups"); @@ -53,13 +54,13 @@ public PermissionsGroupIntersectionDefinition withRequiredGroups(List re return this; } + public PermissionsGroupIntersectionDefinition withRequiredGroups(Optional> requiredGroups) { Utils.checkNotNull(requiredGroups, "requiredGroups"); this.requiredGroups = requiredGroups; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -84,15 +85,17 @@ public String toString() { return Utils.toString(PermissionsGroupIntersectionDefinition.class, "requiredGroups", requiredGroups); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> requiredGroups = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder requiredGroups(List requiredGroups) { Utils.checkNotNull(requiredGroups, "requiredGroups"); this.requiredGroups = Optional.ofNullable(requiredGroups); @@ -104,10 +107,12 @@ public Builder requiredGroups(Optional> requiredGroups) { this.requiredGroups = requiredGroups; return this; } - + public PermissionsGroupIntersectionDefinition build() { + return new PermissionsGroupIntersectionDefinition( requiredGroups); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Person.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Person.java index d27d7380..994bf79e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Person.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Person.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class Person { +public class Person { /** * The display name. */ @@ -36,6 +36,7 @@ public class Person { @JsonProperty("relatedDocuments") private Optional> relatedDocuments; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("metadata") private Optional metadata; @@ -59,7 +60,8 @@ public Person( public Person( String name, String obfuscatedId) { - this(name, obfuscatedId, Optional.empty(), Optional.empty()); + this(name, obfuscatedId, Optional.empty(), + Optional.empty()); } /** @@ -93,9 +95,10 @@ public Optional metadata() { return (Optional) metadata; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The display name. @@ -124,6 +127,7 @@ public Person withRelatedDocuments(List relatedDocuments) { return this; } + /** * A list of documents related to this person. */ @@ -139,13 +143,13 @@ public Person withMetadata(PersonMetadata metadata) { return this; } + public Person withMetadata(Optional metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -165,9 +169,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - obfuscatedId, - relatedDocuments, + name, obfuscatedId, relatedDocuments, metadata); } @@ -179,21 +181,23 @@ public String toString() { "relatedDocuments", relatedDocuments, "metadata", metadata); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private String obfuscatedId; - + private Optional> relatedDocuments = Optional.empty(); - + private Optional metadata = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The display name. */ @@ -203,6 +207,7 @@ public Builder name(String name) { return this; } + /** * An opaque identifier that can be used to request metadata for a Person. */ @@ -212,6 +217,7 @@ public Builder obfuscatedId(String obfuscatedId) { return this; } + /** * A list of documents related to this person. */ @@ -230,6 +236,7 @@ public Builder relatedDocuments(Optional> relat return this; } + public Builder metadata(PersonMetadata metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = Optional.ofNullable(metadata); @@ -241,13 +248,13 @@ public Builder metadata(Optional metadata) { this.metadata = metadata; return this; } - + public Person build() { + return new Person( - name, - obfuscatedId, - relatedDocuments, + name, obfuscatedId, relatedDocuments, metadata); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonDistance.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonDistance.java index 8c879ceb..c46d5439 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonDistance.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonDistance.java @@ -11,8 +11,8 @@ import java.lang.Override; import java.lang.String; -public class PersonDistance { +public class PersonDistance { /** * The display name. */ @@ -68,9 +68,10 @@ public float distance() { return distance; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The display name. @@ -99,7 +100,6 @@ public PersonDistance withDistance(float distance) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,9 +118,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - obfuscatedId, - distance); + name, obfuscatedId, distance); } @Override @@ -130,19 +128,21 @@ public String toString() { "obfuscatedId", obfuscatedId, "distance", distance); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private String obfuscatedId; - + private Float distance; - + private Builder() { // force use of static builder() method } + /** * The display name. */ @@ -152,6 +152,7 @@ public Builder name(String name) { return this; } + /** * An opaque identifier that can be used to request metadata for a Person. */ @@ -161,6 +162,7 @@ public Builder obfuscatedId(String obfuscatedId) { return this; } + /** * Distance to person, refer to PeopleDistance pipeline on interpretation of the value. */ @@ -169,12 +171,12 @@ public Builder distance(float distance) { this.distance = distance; return this; } - + public PersonDistance build() { + return new PersonDistance( - name, - obfuscatedId, - distance); + name, obfuscatedId, distance); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonMetadata.java index 2c26583e..00922c86 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonMetadata.java @@ -21,6 +21,7 @@ import java.util.Map; import java.util.Optional; + public class PersonMetadata { @JsonInclude(Include.NON_ABSENT) @@ -111,6 +112,7 @@ public class PersonMetadata { @JsonProperty("externalProfileLink") private Optional externalProfileLink; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("manager") private Optional manager; @@ -164,6 +166,7 @@ public class PersonMetadata { @JsonProperty("bannerUrl") private Optional bannerUrl; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("reports") private Optional> reports; @@ -231,6 +234,7 @@ public class PersonMetadata { @JsonProperty("datasourceProfile") private Optional> datasourceProfile; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("querySuggestions") private Optional querySuggestions; @@ -457,7 +461,21 @@ public PersonMetadata( } public PersonMetadata() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") @@ -818,9 +836,10 @@ public Optional isOrgRoot() { return isOrgRoot; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public PersonMetadata withType(PersonMetadataType type) { Utils.checkNotNull(type, "type"); @@ -828,6 +847,7 @@ public PersonMetadata withType(PersonMetadataType type) { return this; } + public PersonMetadata withType(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; @@ -843,6 +863,7 @@ public PersonMetadata withFirstName(String firstName) { return this; } + /** * The first name of the person */ @@ -861,6 +882,7 @@ public PersonMetadata withLastName(String lastName) { return this; } + /** * The last name of the person */ @@ -879,6 +901,7 @@ public PersonMetadata withTitle(String title) { return this; } + /** * Job title. */ @@ -897,6 +920,7 @@ public PersonMetadata withBusinessUnit(String businessUnit) { return this; } + /** * Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. */ @@ -915,6 +939,7 @@ public PersonMetadata withDepartment(String department) { return this; } + /** * An organizational unit where everyone has a similar task, e.g. `Engineering`. */ @@ -933,6 +958,7 @@ public PersonMetadata withTeams(List teams) { return this; } + /** * Info about the employee's team(s). */ @@ -951,6 +977,7 @@ public PersonMetadata withDepartmentCount(long departmentCount) { return this; } + /** * The number of people in this person's department. */ @@ -969,6 +996,7 @@ public PersonMetadata withEmail(String email) { return this; } + /** * The user's primary email address */ @@ -987,6 +1015,7 @@ public PersonMetadata withAliasEmails(List aliasEmails) { return this; } + /** * Additional email addresses of this user beyond the primary, if any. */ @@ -1005,6 +1034,7 @@ public PersonMetadata withLocation(String location) { return this; } + /** * User facing string representing the person's location. */ @@ -1023,6 +1053,7 @@ public PersonMetadata withStructuredLocation(StructuredLocation structuredLocati return this; } + /** * Detailed location with information about country, state, city etc. */ @@ -1041,6 +1072,7 @@ public PersonMetadata withExternalProfileLink(String externalProfileLink) { return this; } + /** * Link to a customer's internal profile page. This is set to '#' when no link is desired. */ @@ -1056,6 +1088,7 @@ public PersonMetadata withManager(Person manager) { return this; } + public PersonMetadata withManager(Optional manager) { Utils.checkNotNull(manager, "manager"); this.manager = manager; @@ -1071,6 +1104,7 @@ public PersonMetadata withManagementChain(List managementChain) { return this; } + /** * The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager. */ @@ -1089,6 +1123,7 @@ public PersonMetadata withPhone(String phone) { return this; } + /** * Phone number as a number string. */ @@ -1107,6 +1142,7 @@ public PersonMetadata withTimezone(String timezone) { return this; } + /** * The timezone of the person. E.g. "Pacific Daylight Time". */ @@ -1125,6 +1161,7 @@ public PersonMetadata withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the person's timezone in seconds from UTC. */ @@ -1143,6 +1180,7 @@ public PersonMetadata withPhotoUrl(String photoUrl) { return this; } + /** * The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). */ @@ -1161,6 +1199,7 @@ public PersonMetadata withUneditedPhotoUrl(String uneditedPhotoUrl) { return this; } + /** * The original photo URL of the person's avatar before any edits they made are applied */ @@ -1179,6 +1218,7 @@ public PersonMetadata withBannerUrl(String bannerUrl) { return this; } + /** * The URL of the person's banner photo. */ @@ -1194,6 +1234,7 @@ public PersonMetadata withReports(List reports) { return this; } + public PersonMetadata withReports(Optional> reports) { Utils.checkNotNull(reports, "reports"); this.reports = reports; @@ -1209,6 +1250,7 @@ public PersonMetadata withStartDate(LocalDate startDate) { return this; } + /** * The date when the employee started. */ @@ -1227,6 +1269,7 @@ public PersonMetadata withEndDate(LocalDate endDate) { return this; } + /** * If a former employee, the last date of employment. */ @@ -1245,6 +1288,7 @@ public PersonMetadata withBio(String bio) { return this; } + /** * Short biography or mission statement of the employee. */ @@ -1263,6 +1307,7 @@ public PersonMetadata withPronoun(String pronoun) { return this; } + /** * She/her, He/his or other pronoun. */ @@ -1281,6 +1326,7 @@ public PersonMetadata withOrgSizeCount(long orgSizeCount) { return this; } + /** * The total recursive size of the people reporting to this person, or 1 */ @@ -1299,6 +1345,7 @@ public PersonMetadata withDirectReportsCount(long directReportsCount) { return this; } + /** * The total number of people who directly report to this person, or 0 */ @@ -1317,6 +1364,7 @@ public PersonMetadata withPreferredName(String preferredName) { return this; } + /** * The preferred name of the person, or a nickname. */ @@ -1335,6 +1383,7 @@ public PersonMetadata withSocialNetwork(List socialNetwork) { return this; } + /** * List of social network profiles. */ @@ -1353,6 +1402,7 @@ public PersonMetadata withDatasourceProfile(List datasourcePr return this; } + /** * List of profiles this user has in different datasources / tools that they use. */ @@ -1368,6 +1418,7 @@ public PersonMetadata withQuerySuggestions(QuerySuggestionList querySuggestions) return this; } + public PersonMetadata withQuerySuggestions(Optional querySuggestions) { Utils.checkNotNull(querySuggestions, "querySuggestions"); this.querySuggestions = querySuggestions; @@ -1383,6 +1434,7 @@ public PersonMetadata withPeopleDistance(List peopleDistance) { return this; } + /** * List of people and distances to those people from this person. Optionally with metadata. */ @@ -1401,6 +1453,7 @@ public PersonMetadata withInviteInfo(InviteInfo inviteInfo) { return this; } + /** * Information regarding the invite status of a person. */ @@ -1419,6 +1472,7 @@ public PersonMetadata withIsSignedUp(boolean isSignedUp) { return this; } + /** * Whether the user has signed into Glean at least once. */ @@ -1437,6 +1491,7 @@ public PersonMetadata withLastExtensionUse(OffsetDateTime lastExtensionUse) { return this; } + /** * The last time the user has used the Glean extension in ISO 8601 format. */ @@ -1456,6 +1511,7 @@ public PersonMetadata withPermissions(Permissions permissions) { return this; } + /** * Describes the permissions levels that a user has for permissioned features. When the client sends this, Permissions.read and Permissions.write are the additional permissions granted to a user on top of what they have via their roles. * When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes. @@ -1475,6 +1531,7 @@ public PersonMetadata withCustomFields(List customFields) { return this; } + /** * User customizable fields for additional people information. */ @@ -1493,6 +1550,7 @@ public PersonMetadata withLoggingId(String loggingId) { return this; } + /** * The logging id of the person used in scrubbed logs, tracking GA metrics. */ @@ -1511,6 +1569,7 @@ public PersonMetadata withStartDatePercentile(float startDatePercentile) { return this; } + /** * Percentage of the company that started strictly after this person. Between [0,100). */ @@ -1529,6 +1588,7 @@ public PersonMetadata withBusyEvents(List busyEvents) { return this; } + /** * Intervals of busy time for this person, along with the type of event they're busy with. */ @@ -1547,6 +1607,7 @@ public PersonMetadata withProfileBoolSettings(Map profileBoolSe return this; } + /** * flag settings to indicate user profile settings for certain items */ @@ -1565,6 +1626,7 @@ public PersonMetadata withBadges(List badges) { return this; } + /** * The badges that a user has earned over their lifetime. */ @@ -1583,6 +1645,7 @@ public PersonMetadata withIsOrgRoot(boolean isOrgRoot) { return this; } + /** * Whether this person is a "root" node in their organization's hierarchy. */ @@ -1592,7 +1655,6 @@ public PersonMetadata withIsOrgRoot(Optional isOrgRoot) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -1652,50 +1714,21 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - type, - firstName, - lastName, - title, - businessUnit, - department, - teams, - departmentCount, - email, - aliasEmails, - location, - structuredLocation, - externalProfileLink, - manager, - managementChain, - phone, - timezone, - timezoneOffset, - photoUrl, - uneditedPhotoUrl, - bannerUrl, - reports, - startDate, - endDate, - bio, - pronoun, - orgSizeCount, - directReportsCount, - preferredName, - socialNetwork, - datasourceProfile, - querySuggestions, - peopleDistance, - inviteInfo, - isSignedUp, - lastExtensionUse, - permissions, - customFields, - loggingId, - startDatePercentile, - busyEvents, - profileBoolSettings, - badges, - isOrgRoot); + type, firstName, lastName, + title, businessUnit, department, + teams, departmentCount, email, + aliasEmails, location, structuredLocation, + externalProfileLink, manager, managementChain, + phone, timezone, timezoneOffset, + photoUrl, uneditedPhotoUrl, bannerUrl, + reports, startDate, endDate, + bio, pronoun, orgSizeCount, + directReportsCount, preferredName, socialNetwork, + datasourceProfile, querySuggestions, peopleDistance, + inviteInfo, isSignedUp, lastExtensionUse, + permissions, customFields, loggingId, + startDatePercentile, busyEvents, profileBoolSettings, + badges, isOrgRoot); } @Override @@ -1746,101 +1779,103 @@ public String toString() { "badges", badges, "isOrgRoot", isOrgRoot); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional type = Optional.empty(); - + private Optional firstName = Optional.empty(); - + private Optional lastName = Optional.empty(); - + private Optional title = Optional.empty(); - + private Optional businessUnit = Optional.empty(); - + private Optional department = Optional.empty(); - + private Optional> teams = Optional.empty(); - + private Optional departmentCount = Optional.empty(); - + private Optional email = Optional.empty(); - + private Optional> aliasEmails = Optional.empty(); - + private Optional location = Optional.empty(); - + private Optional structuredLocation = Optional.empty(); - + private Optional externalProfileLink = Optional.empty(); - + private Optional manager = Optional.empty(); - + private Optional> managementChain = Optional.empty(); - + private Optional phone = Optional.empty(); - + private Optional timezone = Optional.empty(); - + private Optional timezoneOffset = Optional.empty(); - + private Optional photoUrl = Optional.empty(); - + private Optional uneditedPhotoUrl = Optional.empty(); - + private Optional bannerUrl = Optional.empty(); - + private Optional> reports = Optional.empty(); - + private Optional startDate = Optional.empty(); - + private Optional endDate = Optional.empty(); - + private Optional bio = Optional.empty(); - + private Optional pronoun = Optional.empty(); - + private Optional orgSizeCount = Optional.empty(); - + private Optional directReportsCount = Optional.empty(); - + private Optional preferredName = Optional.empty(); - + private Optional> socialNetwork = Optional.empty(); - + private Optional> datasourceProfile = Optional.empty(); - + private Optional querySuggestions = Optional.empty(); - + private Optional> peopleDistance = Optional.empty(); - + private Optional inviteInfo = Optional.empty(); - + private Optional isSignedUp = Optional.empty(); - + private Optional lastExtensionUse = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Optional> customFields = Optional.empty(); - + private Optional loggingId = Optional.empty(); - + private Optional startDatePercentile = Optional.empty(); - + private Optional> busyEvents = Optional.empty(); - + private Optional> profileBoolSettings = Optional.empty(); - + private Optional> badges = Optional.empty(); - + private Optional isOrgRoot = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder type(PersonMetadataType type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); @@ -1853,6 +1888,7 @@ public Builder type(Optional type) { return this; } + /** * The first name of the person */ @@ -1871,6 +1907,7 @@ public Builder firstName(Optional firstName) { return this; } + /** * The last name of the person */ @@ -1889,6 +1926,7 @@ public Builder lastName(Optional lastName) { return this; } + /** * Job title. */ @@ -1907,6 +1945,7 @@ public Builder title(Optional title) { return this; } + /** * Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. */ @@ -1925,6 +1964,7 @@ public Builder businessUnit(Optional businessUnit) { return this; } + /** * An organizational unit where everyone has a similar task, e.g. `Engineering`. */ @@ -1943,6 +1983,7 @@ public Builder department(Optional department) { return this; } + /** * Info about the employee's team(s). */ @@ -1961,6 +2002,7 @@ public Builder teams(Optional> teams) { return this; } + /** * The number of people in this person's department. */ @@ -1979,6 +2021,7 @@ public Builder departmentCount(Optional departmentCount) { return this; } + /** * The user's primary email address */ @@ -1997,6 +2040,7 @@ public Builder email(Optional email) { return this; } + /** * Additional email addresses of this user beyond the primary, if any. */ @@ -2015,6 +2059,7 @@ public Builder aliasEmails(Optional> aliasEmails) { return this; } + /** * User facing string representing the person's location. */ @@ -2033,6 +2078,7 @@ public Builder location(Optional location) { return this; } + /** * Detailed location with information about country, state, city etc. */ @@ -2051,6 +2097,7 @@ public Builder structuredLocation(Optional structu return this; } + /** * Link to a customer's internal profile page. This is set to '#' when no link is desired. */ @@ -2069,6 +2116,7 @@ public Builder externalProfileLink(Optional externalProfileLink) { return this; } + public Builder manager(Person manager) { Utils.checkNotNull(manager, "manager"); this.manager = Optional.ofNullable(manager); @@ -2081,6 +2129,7 @@ public Builder manager(Optional manager) { return this; } + /** * The chain of reporting in the company as far up as it goes. The last entry is this person's direct manager. */ @@ -2099,6 +2148,7 @@ public Builder managementChain(Optional> managementChain) return this; } + /** * Phone number as a number string. */ @@ -2117,6 +2167,7 @@ public Builder phone(Optional phone) { return this; } + /** * The timezone of the person. E.g. "Pacific Daylight Time". */ @@ -2135,6 +2186,7 @@ public Builder timezone(Optional timezone) { return this; } + /** * The offset of the person's timezone in seconds from UTC. */ @@ -2153,6 +2205,7 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + /** * The URL of the person's avatar. Public, glean-authenticated and Base64 encoded data URLs are all valid (but not third-party-authenticated URLs). */ @@ -2171,6 +2224,7 @@ public Builder photoUrl(Optional photoUrl) { return this; } + /** * The original photo URL of the person's avatar before any edits they made are applied */ @@ -2189,6 +2243,7 @@ public Builder uneditedPhotoUrl(Optional uneditedPhotoUrl) { return this; } + /** * The URL of the person's banner photo. */ @@ -2207,6 +2262,7 @@ public Builder bannerUrl(Optional bannerUrl) { return this; } + public Builder reports(List reports) { Utils.checkNotNull(reports, "reports"); this.reports = Optional.ofNullable(reports); @@ -2219,6 +2275,7 @@ public Builder reports(Optional> reports) { return this; } + /** * The date when the employee started. */ @@ -2237,6 +2294,7 @@ public Builder startDate(Optional startDate) { return this; } + /** * If a former employee, the last date of employment. */ @@ -2255,6 +2313,7 @@ public Builder endDate(Optional endDate) { return this; } + /** * Short biography or mission statement of the employee. */ @@ -2273,6 +2332,7 @@ public Builder bio(Optional bio) { return this; } + /** * She/her, He/his or other pronoun. */ @@ -2291,6 +2351,7 @@ public Builder pronoun(Optional pronoun) { return this; } + /** * The total recursive size of the people reporting to this person, or 1 */ @@ -2309,6 +2370,7 @@ public Builder orgSizeCount(Optional orgSizeCount) { return this; } + /** * The total number of people who directly report to this person, or 0 */ @@ -2327,6 +2389,7 @@ public Builder directReportsCount(Optional directReportsCount) { return this; } + /** * The preferred name of the person, or a nickname. */ @@ -2345,6 +2408,7 @@ public Builder preferredName(Optional preferredName) { return this; } + /** * List of social network profiles. */ @@ -2363,6 +2427,7 @@ public Builder socialNetwork(Optional> socialNetwo return this; } + /** * List of profiles this user has in different datasources / tools that they use. */ @@ -2381,6 +2446,7 @@ public Builder datasourceProfile(Optional> dat return this; } + public Builder querySuggestions(QuerySuggestionList querySuggestions) { Utils.checkNotNull(querySuggestions, "querySuggestions"); this.querySuggestions = Optional.ofNullable(querySuggestions); @@ -2393,6 +2459,7 @@ public Builder querySuggestions(Optional querySug return this; } + /** * List of people and distances to those people from this person. Optionally with metadata. */ @@ -2411,6 +2478,7 @@ public Builder peopleDistance(Optional> peopleDis return this; } + /** * Information regarding the invite status of a person. */ @@ -2429,6 +2497,7 @@ public Builder inviteInfo(Optional inviteInfo) { return this; } + /** * Whether the user has signed into Glean at least once. */ @@ -2447,6 +2516,7 @@ public Builder isSignedUp(Optional isSignedUp) { return this; } + /** * The last time the user has used the Glean extension in ISO 8601 format. */ @@ -2465,6 +2535,7 @@ public Builder lastExtensionUse(Optional lastExtensionUse) { return this; } + /** * Describes the permissions levels that a user has for permissioned features. When the client sends this, Permissions.read and Permissions.write are the additional permissions granted to a user on top of what they have via their roles. * When the server sends this, Permissions.read and Permissions.write are the complete (merged) set of permissions the user has, and Permissions.roles is just for display purposes. @@ -2485,6 +2556,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * User customizable fields for additional people information. */ @@ -2503,6 +2575,7 @@ public Builder customFields(Optional> customFiel return this; } + /** * The logging id of the person used in scrubbed logs, tracking GA metrics. */ @@ -2521,6 +2594,7 @@ public Builder loggingId(Optional loggingId) { return this; } + /** * Percentage of the company that started strictly after this person. Between [0,100). */ @@ -2539,6 +2613,7 @@ public Builder startDatePercentile(Optional startDatePercentile) { return this; } + /** * Intervals of busy time for this person, along with the type of event they're busy with. */ @@ -2557,6 +2632,7 @@ public Builder busyEvents(Optional> busyEvents) { return this; } + /** * flag settings to indicate user profile settings for certain items */ @@ -2575,6 +2651,7 @@ public Builder profileBoolSettings(Optional> prof return this; } + /** * The badges that a user has earned over their lifetime. */ @@ -2593,6 +2670,7 @@ public Builder badges(Optional> badges) { return this; } + /** * Whether this person is a "root" node in their organization's hierarchy. */ @@ -2610,53 +2688,26 @@ public Builder isOrgRoot(Optional isOrgRoot) { this.isOrgRoot = isOrgRoot; return this; } - + public PersonMetadata build() { + return new PersonMetadata( - type, - firstName, - lastName, - title, - businessUnit, - department, - teams, - departmentCount, - email, - aliasEmails, - location, - structuredLocation, - externalProfileLink, - manager, - managementChain, - phone, - timezone, - timezoneOffset, - photoUrl, - uneditedPhotoUrl, - bannerUrl, - reports, - startDate, - endDate, - bio, - pronoun, - orgSizeCount, - directReportsCount, - preferredName, - socialNetwork, - datasourceProfile, - querySuggestions, - peopleDistance, - inviteInfo, - isSignedUp, - lastExtensionUse, - permissions, - customFields, - loggingId, - startDatePercentile, - busyEvents, - profileBoolSettings, - badges, - isOrgRoot); + type, firstName, lastName, + title, businessUnit, department, + teams, departmentCount, email, + aliasEmails, location, structuredLocation, + externalProfileLink, manager, managementChain, + phone, timezone, timezoneOffset, + photoUrl, uneditedPhotoUrl, bannerUrl, + reports, startDate, endDate, + bio, pronoun, orgSizeCount, + directReportsCount, preferredName, socialNetwork, + datasourceProfile, querySuggestions, peopleDistance, + inviteInfo, isSignedUp, lastExtensionUse, + permissions, customFields, loggingId, + startDatePercentile, busyEvents, profileBoolSettings, + badges, isOrgRoot); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonObject.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonObject.java index 7bcb2478..afa7d0ef 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonObject.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonObject.java @@ -10,8 +10,8 @@ import java.lang.Override; import java.lang.String; -public class PersonObject { +public class PersonObject { /** * The display name. */ @@ -50,9 +50,10 @@ public String obfuscatedId() { return obfuscatedId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The display name. @@ -72,7 +73,6 @@ public PersonObject withObfuscatedId(String obfuscatedId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -90,8 +90,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - obfuscatedId); + name, obfuscatedId); } @Override @@ -100,17 +99,19 @@ public String toString() { "name", name, "obfuscatedId", obfuscatedId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private String obfuscatedId; - + private Builder() { // force use of static builder() method } + /** * The display name. */ @@ -120,6 +121,7 @@ public Builder name(String name) { return this; } + /** * An opaque identifier that can be used to request metadata for a Person. */ @@ -128,11 +130,12 @@ public Builder obfuscatedId(String obfuscatedId) { this.obfuscatedId = obfuscatedId; return this; } - + public PersonObject build() { + return new PersonObject( - name, - obfuscatedId); + name, obfuscatedId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonTeam.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonTeam.java index d8001bd2..8b87e084 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonTeam.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonTeam.java @@ -23,7 +23,6 @@ *

Use `id` if you index teams via Glean, and use `name` and `externalLink` if you want to use your own team pages */ public class PersonTeam { - /** * Unique identifier */ @@ -79,7 +78,8 @@ public PersonTeam( } public PersonTeam() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -123,9 +123,10 @@ public Optional joinDate() { return joinDate; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique identifier @@ -136,6 +137,7 @@ public PersonTeam withId(String id) { return this; } + /** * Unique identifier */ @@ -154,6 +156,7 @@ public PersonTeam withName(String name) { return this; } + /** * Team name */ @@ -172,6 +175,7 @@ public PersonTeam withExternalLink(String externalLink) { return this; } + /** * Link to a team page on the internet or your company's intranet */ @@ -190,6 +194,7 @@ public PersonTeam withRelationship(PersonTeamRelationship relationship) { return this; } + /** * The team member's relationship to the team. This defaults to MEMBER if not set. */ @@ -208,6 +213,7 @@ public PersonTeam withJoinDate(OffsetDateTime joinDate) { return this; } + /** * The team member's start date */ @@ -217,7 +223,6 @@ public PersonTeam withJoinDate(Optional joinDate) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -238,11 +243,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - name, - externalLink, - relationship, - joinDate); + id, name, externalLink, + relationship, joinDate); } @Override @@ -254,23 +256,25 @@ public String toString() { "relationship", relationship, "joinDate", joinDate); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional name = Optional.empty(); - + private Optional externalLink = Optional.empty(); - + private Optional relationship; - + private Optional joinDate = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique identifier */ @@ -289,6 +293,7 @@ public Builder id(Optional id) { return this; } + /** * Team name */ @@ -307,6 +312,7 @@ public Builder name(Optional name) { return this; } + /** * Link to a team page on the internet or your company's intranet */ @@ -325,6 +331,7 @@ public Builder externalLink(Optional externalLink) { return this; } + /** * The team member's relationship to the team. This defaults to MEMBER if not set. */ @@ -343,6 +350,7 @@ public Builder relationship(Optional relations return this; } + /** * The team member's start date */ @@ -360,19 +368,18 @@ public Builder joinDate(Optional joinDate) { this.joinDate = joinDate; return this; } - + public PersonTeam build() { if (relationship == null) { relationship = _SINGLETON_VALUE_Relationship.value(); } + return new PersonTeam( - id, - name, - externalLink, - relationship, - joinDate); + id, name, externalLink, + relationship, joinDate); } + private static final LazySingletonValue> _SINGLETON_VALUE_Relationship = new LazySingletonValue<>( "relationship", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonToTeamRelationship.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonToTeamRelationship.java index 6144679f..9ec84bfb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonToTeamRelationship.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PersonToTeamRelationship.java @@ -66,7 +66,8 @@ public PersonToTeamRelationship( public PersonToTeamRelationship( Person person) { - this(person, Optional.empty(), Optional.empty(), Optional.empty()); + this(person, Optional.empty(), Optional.empty(), + Optional.empty()); } @JsonIgnore @@ -99,9 +100,10 @@ public Optional joinDate() { return joinDate; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public PersonToTeamRelationship withPerson(Person person) { Utils.checkNotNull(person, "person"); @@ -118,6 +120,7 @@ public PersonToTeamRelationship withRelationship(PersonToTeamRelationshipRelatio return this; } + /** * The team member's relationship to the team. This defaults to MEMBER if not set. */ @@ -136,6 +139,7 @@ public PersonToTeamRelationship withCustomRelationshipStr(String customRelations return this; } + /** * Displayed name for the relationship if relationship is set to `OTHER`. */ @@ -154,6 +158,7 @@ public PersonToTeamRelationship withJoinDate(OffsetDateTime joinDate) { return this; } + /** * The team member's start date */ @@ -163,7 +168,6 @@ public PersonToTeamRelationship withJoinDate(Optional joinDate) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -183,9 +187,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - person, - relationship, - customRelationshipStr, + person, relationship, customRelationshipStr, joinDate); } @@ -197,27 +199,30 @@ public String toString() { "customRelationshipStr", customRelationshipStr, "joinDate", joinDate); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Person person; - + private Optional relationship; - + private Optional customRelationshipStr = Optional.empty(); - + private Optional joinDate = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder person(Person person) { Utils.checkNotNull(person, "person"); this.person = person; return this; } + /** * The team member's relationship to the team. This defaults to MEMBER if not set. */ @@ -236,6 +241,7 @@ public Builder relationship(Optional customRelationshipStr) { return this; } + /** * The team member's start date */ @@ -271,18 +278,18 @@ public Builder joinDate(Optional joinDate) { this.joinDate = joinDate; return this; } - + public PersonToTeamRelationship build() { if (relationship == null) { relationship = _SINGLETON_VALUE_Relationship.value(); } + return new PersonToTeamRelationship( - person, - relationship, - customRelationshipStr, + person, relationship, customRelationshipStr, joinDate); } + private static final LazySingletonValue> _SINGLETON_VALUE_Relationship = new LazySingletonValue<>( "relationship", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PinDocument.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PinDocument.java index 0fa1993b..df4ddc3f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PinDocument.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PinDocument.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class PinDocument { +public class PinDocument { /** * The query strings for which the pinned result will show. */ @@ -45,18 +45,22 @@ public class PinDocument { @JsonProperty("documentId") private String documentId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("attribution") private Optional attribution; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedBy") private Optional updatedBy; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createTime") private Optional createTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updateTime") private Optional updateTime; @@ -91,7 +95,9 @@ public PinDocument( public PinDocument( String documentId) { - this(Optional.empty(), Optional.empty(), Optional.empty(), documentId, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + documentId, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -150,9 +156,10 @@ public Optional updateTime() { return updateTime; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The query strings for which the pinned result will show. @@ -163,6 +170,7 @@ public PinDocument withQueries(List queries) { return this; } + /** * The query strings for which the pinned result will show. */ @@ -181,6 +189,7 @@ public PinDocument withAudienceFilters(List audienceFilters) { return this; } + /** * Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. */ @@ -199,6 +208,7 @@ public PinDocument withId(String id) { return this; } + /** * The opaque id of the pin. */ @@ -223,6 +233,7 @@ public PinDocument withAttribution(Person attribution) { return this; } + public PinDocument withAttribution(Optional attribution) { Utils.checkNotNull(attribution, "attribution"); this.attribution = attribution; @@ -235,6 +246,7 @@ public PinDocument withUpdatedBy(Person updatedBy) { return this; } + public PinDocument withUpdatedBy(Optional updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = updatedBy; @@ -247,6 +259,7 @@ public PinDocument withCreateTime(OffsetDateTime createTime) { return this; } + public PinDocument withCreateTime(Optional createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = createTime; @@ -259,13 +272,13 @@ public PinDocument withUpdateTime(OffsetDateTime updateTime) { return this; } + public PinDocument withUpdateTime(Optional updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = updateTime; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -289,14 +302,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - queries, - audienceFilters, - id, - documentId, - attribution, - updatedBy, - createTime, - updateTime); + queries, audienceFilters, id, + documentId, attribution, updatedBy, + createTime, updateTime); } @Override @@ -311,29 +319,31 @@ public String toString() { "createTime", createTime, "updateTime", updateTime); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> queries = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional id = Optional.empty(); - + private String documentId; - + private Optional attribution = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional createTime = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The query strings for which the pinned result will show. */ @@ -352,6 +362,7 @@ public Builder queries(Optional> queries) { return this; } + /** * Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. */ @@ -370,6 +381,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The opaque id of the pin. */ @@ -388,6 +400,7 @@ public Builder id(Optional id) { return this; } + /** * The document which should be a pinned result. */ @@ -397,6 +410,7 @@ public Builder documentId(String documentId) { return this; } + public Builder attribution(Person attribution) { Utils.checkNotNull(attribution, "attribution"); this.attribution = Optional.ofNullable(attribution); @@ -409,6 +423,7 @@ public Builder attribution(Optional attribution) { return this; } + public Builder updatedBy(Person updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = Optional.ofNullable(updatedBy); @@ -421,6 +436,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + public Builder createTime(OffsetDateTime createTime) { Utils.checkNotNull(createTime, "createTime"); this.createTime = Optional.ofNullable(createTime); @@ -433,6 +449,7 @@ public Builder createTime(Optional createTime) { return this; } + public Builder updateTime(OffsetDateTime updateTime) { Utils.checkNotNull(updateTime, "updateTime"); this.updateTime = Optional.ofNullable(updateTime); @@ -444,17 +461,14 @@ public Builder updateTime(Optional updateTime) { this.updateTime = updateTime; return this; } - + public PinDocument build() { + return new PinDocument( - queries, - audienceFilters, - id, - documentId, - attribution, - updatedBy, - createTime, - updateTime); + queries, audienceFilters, id, + documentId, attribution, updatedBy, + createTime, updateTime); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PinRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PinRequest.java index 87d6ca96..4effb87d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PinRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PinRequest.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class PinRequest { +public class PinRequest { /** * The query strings for which the pinned result will show. */ @@ -81,9 +81,10 @@ public Optional documentId() { return documentId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The query strings for which the pinned result will show. @@ -94,6 +95,7 @@ public PinRequest withQueries(List queries) { return this; } + /** * The query strings for which the pinned result will show. */ @@ -112,6 +114,7 @@ public PinRequest withAudienceFilters(List audienceFilters) { return this; } + /** * Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. */ @@ -130,6 +133,7 @@ public PinRequest withDocumentId(String documentId) { return this; } + /** * The document to be pinned. */ @@ -139,7 +143,6 @@ public PinRequest withDocumentId(Optional documentId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -158,9 +161,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - queries, - audienceFilters, - documentId); + queries, audienceFilters, documentId); } @Override @@ -170,19 +171,21 @@ public String toString() { "audienceFilters", audienceFilters, "documentId", documentId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> queries = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional documentId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The query strings for which the pinned result will show. */ @@ -201,6 +204,7 @@ public Builder queries(Optional> queries) { return this; } + /** * Filters which restrict who should see the pinned document. Values are taken from the corresponding filters in people search. */ @@ -219,6 +223,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The document to be pinned. */ @@ -236,12 +241,12 @@ public Builder documentId(Optional documentId) { this.documentId = documentId; return this; } - + public PinRequest build() { + return new PinRequest( - queries, - audienceFilters, - documentId); + queries, audienceFilters, documentId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PossibleValue.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PossibleValue.java index b771279b..85d17443 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PossibleValue.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PossibleValue.java @@ -19,7 +19,6 @@ *

Possible value of a specific parameter */ public class PossibleValue { - /** * Possible value */ @@ -64,9 +63,10 @@ public Optional label() { return label; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Possible value @@ -77,6 +77,7 @@ public PossibleValue withValue(String value) { return this; } + /** * Possible value */ @@ -95,6 +96,7 @@ public PossibleValue withLabel(String label) { return this; } + /** * User-friendly label associated with the value */ @@ -104,7 +106,6 @@ public PossibleValue withLabel(Optional label) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -122,8 +123,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - value, - label); + value, label); } @Override @@ -132,17 +132,19 @@ public String toString() { "value", value, "label", label); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional value = Optional.empty(); - + private Optional label = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Possible value */ @@ -161,6 +163,7 @@ public Builder value(Optional value) { return this; } + /** * User-friendly label associated with the value */ @@ -178,11 +181,12 @@ public Builder label(Optional label) { this.label = label; return this; } - + public PossibleValue build() { + return new PossibleValue( - value, - label); + value, label); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessAllDocumentsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessAllDocumentsRequest.java index 85857c4e..2e6a50e4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessAllDocumentsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessAllDocumentsRequest.java @@ -19,7 +19,6 @@ *

Describes the request body of the /processalldocuments API call */ public class ProcessAllDocumentsRequest { - /** * If provided, process documents only for this custom datasource. Otherwise all uploaded documents are processed. */ @@ -46,9 +45,10 @@ public Optional datasource() { return datasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * If provided, process documents only for this custom datasource. Otherwise all uploaded documents are processed. @@ -59,6 +59,7 @@ public ProcessAllDocumentsRequest withDatasource(String datasource) { return this; } + /** * If provided, process documents only for this custom datasource. Otherwise all uploaded documents are processed. */ @@ -68,7 +69,6 @@ public ProcessAllDocumentsRequest withDatasource(Optional datasource) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -93,15 +93,17 @@ public String toString() { return Utils.toString(ProcessAllDocumentsRequest.class, "datasource", datasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional datasource = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * If provided, process documents only for this custom datasource. Otherwise all uploaded documents are processed. */ @@ -119,10 +121,12 @@ public Builder datasource(Optional datasource) { this.datasource = datasource; return this; } - + public ProcessAllDocumentsRequest build() { + return new ProcessAllDocumentsRequest( datasource); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessAllMembershipsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessAllMembershipsRequest.java index df544209..fca221e7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessAllMembershipsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessAllMembershipsRequest.java @@ -19,7 +19,6 @@ *

Describes the request body of the /processallmemberships API call */ public class ProcessAllMembershipsRequest { - /** * If provided, process group memberships only for this custom datasource. Otherwise all uploaded memberships are processed. */ @@ -46,9 +45,10 @@ public Optional datasource() { return datasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * If provided, process group memberships only for this custom datasource. Otherwise all uploaded memberships are processed. @@ -59,6 +59,7 @@ public ProcessAllMembershipsRequest withDatasource(String datasource) { return this; } + /** * If provided, process group memberships only for this custom datasource. Otherwise all uploaded memberships are processed. */ @@ -68,7 +69,6 @@ public ProcessAllMembershipsRequest withDatasource(Optional datasource) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -93,15 +93,17 @@ public String toString() { return Utils.toString(ProcessAllMembershipsRequest.class, "datasource", datasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional datasource = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * If provided, process group memberships only for this custom datasource. Otherwise all uploaded memberships are processed. */ @@ -119,10 +121,12 @@ public Builder datasource(Optional datasource) { this.datasource = datasource; return this; } - + public ProcessAllMembershipsRequest build() { + return new ProcessAllMembershipsRequest( datasource); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessingHistoryEvent.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessingHistoryEvent.java index 09959724..2bb9464f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessingHistoryEvent.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ProcessingHistoryEvent.java @@ -19,7 +19,6 @@ *

Processing history event for a datasource */ public class ProcessingHistoryEvent { - /** * The start time of the processing in ISO 8601 format */ @@ -64,9 +63,10 @@ public Optional endTime() { return endTime; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The start time of the processing in ISO 8601 format @@ -77,6 +77,7 @@ public ProcessingHistoryEvent withStartTime(String startTime) { return this; } + /** * The start time of the processing in ISO 8601 format */ @@ -95,6 +96,7 @@ public ProcessingHistoryEvent withEndTime(String endTime) { return this; } + /** * The end time of the processing in ISO 8601 format, 'NA' if still in progress */ @@ -104,7 +106,6 @@ public ProcessingHistoryEvent withEndTime(Optional endTime) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -122,8 +123,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - startTime, - endTime); + startTime, endTime); } @Override @@ -132,17 +132,19 @@ public String toString() { "startTime", startTime, "endTime", endTime); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional startTime = Optional.empty(); - + private Optional endTime = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The start time of the processing in ISO 8601 format */ @@ -161,6 +163,7 @@ public Builder startTime(Optional startTime) { return this; } + /** * The end time of the processing in ISO 8601 format, 'NA' if still in progress */ @@ -178,11 +181,12 @@ public Builder endTime(Optional endTime) { this.endTime = endTime; return this; } - + public ProcessingHistoryEvent build() { + return new ProcessingHistoryEvent( - startTime, - endTime); + startTime, endTime); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PromptTemplate.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PromptTemplate.java index a5479b86..dc7dfcf5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PromptTemplate.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PromptTemplate.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class PromptTemplate { +public class PromptTemplate { /** * The user-given identifier for this prompt template. */ @@ -38,6 +38,7 @@ public class PromptTemplate { @JsonProperty("applicationId") private Optional applicationId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("inclusions") private Optional inclusions; @@ -56,6 +57,7 @@ public class PromptTemplate { @JsonProperty("removedRoles") private Optional> removedRoles; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; @@ -67,6 +69,7 @@ public class PromptTemplate { @JsonProperty("id") private Optional id; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("author") private Optional author; @@ -85,6 +88,7 @@ public class PromptTemplate { @JsonProperty("lastUpdateTimestamp") private Optional lastUpdateTimestamp; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("lastUpdatedBy") private Optional lastUpdatedBy; @@ -141,7 +145,11 @@ public PromptTemplate( public PromptTemplate( String template) { - this(Optional.empty(), template, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), template, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -243,9 +251,10 @@ public Optional> roles() { return (Optional>) roles; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The user-given identifier for this prompt template. @@ -256,6 +265,7 @@ public PromptTemplate withName(String name) { return this; } + /** * The user-given identifier for this prompt template. */ @@ -283,6 +293,7 @@ public PromptTemplate withApplicationId(String applicationId) { return this; } + /** * The Application Id the prompt template should be created under. Empty for default assistant. */ @@ -298,6 +309,7 @@ public PromptTemplate withInclusions(ChatRestrictionFilters inclusions) { return this; } + public PromptTemplate withInclusions(Optional inclusions) { Utils.checkNotNull(inclusions, "inclusions"); this.inclusions = inclusions; @@ -313,6 +325,7 @@ public PromptTemplate withAddedRoles(List addedRoles) { return this; } + /** * A list of added user roles for the Workflow. */ @@ -331,6 +344,7 @@ public PromptTemplate withRemovedRoles(List removedRoles) return this; } + /** * A list of removed user roles for the Workflow. */ @@ -346,6 +360,7 @@ public PromptTemplate withPermissions(ObjectPermissions permissions) { return this; } + public PromptTemplate withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -361,6 +376,7 @@ public PromptTemplate withId(String id) { return this; } + /** * Opaque id for this prompt template */ @@ -376,6 +392,7 @@ public PromptTemplate withAuthor(Person author) { return this; } + public PromptTemplate withAuthor(Optional author) { Utils.checkNotNull(author, "author"); this.author = author; @@ -391,6 +408,7 @@ public PromptTemplate withCreateTimestamp(long createTimestamp) { return this; } + /** * Server Unix timestamp of the creation time. */ @@ -409,6 +427,7 @@ public PromptTemplate withLastUpdateTimestamp(long lastUpdateTimestamp) { return this; } + /** * Server Unix timestamp of the last update time. */ @@ -424,6 +443,7 @@ public PromptTemplate withLastUpdatedBy(Person lastUpdatedBy) { return this; } + public PromptTemplate withLastUpdatedBy(Optional lastUpdatedBy) { Utils.checkNotNull(lastUpdatedBy, "lastUpdatedBy"); this.lastUpdatedBy = lastUpdatedBy; @@ -439,6 +459,7 @@ public PromptTemplate withRoles(List roles) { return this; } + /** * A list of roles for this prompt template explicitly granted. */ @@ -448,7 +469,6 @@ public PromptTemplate withRoles(Optional> return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -477,18 +497,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - template, - applicationId, - inclusions, - addedRoles, - removedRoles, - permissions, - id, - author, - createTimestamp, - lastUpdateTimestamp, - lastUpdatedBy, + name, template, applicationId, + inclusions, addedRoles, removedRoles, + permissions, id, author, + createTimestamp, lastUpdateTimestamp, lastUpdatedBy, roles); } @@ -509,39 +521,41 @@ public String toString() { "lastUpdatedBy", lastUpdatedBy, "roles", roles); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private String template; - + private Optional applicationId = Optional.empty(); - + private Optional inclusions = Optional.empty(); - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Optional id = Optional.empty(); - + private Optional author = Optional.empty(); - + private Optional createTimestamp = Optional.empty(); - + private Optional lastUpdateTimestamp = Optional.empty(); - + private Optional lastUpdatedBy = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The user-given identifier for this prompt template. */ @@ -560,6 +574,7 @@ public Builder name(Optional name) { return this; } + /** * The actual template string. */ @@ -569,6 +584,7 @@ public Builder template(String template) { return this; } + /** * The Application Id the prompt template should be created under. Empty for default assistant. */ @@ -587,6 +603,7 @@ public Builder applicationId(Optional applicationId) { return this; } + public Builder inclusions(ChatRestrictionFilters inclusions) { Utils.checkNotNull(inclusions, "inclusions"); this.inclusions = Optional.ofNullable(inclusions); @@ -599,6 +616,7 @@ public Builder inclusions(Optional inclusions) return this; } + /** * A list of added user roles for the Workflow. */ @@ -617,6 +635,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of removed user roles for the Workflow. */ @@ -635,6 +654,7 @@ public Builder removedRoles(Optional> remo return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -647,6 +667,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * Opaque id for this prompt template */ @@ -665,6 +686,7 @@ public Builder id(Optional id) { return this; } + public Builder author(Person author) { Utils.checkNotNull(author, "author"); this.author = Optional.ofNullable(author); @@ -677,6 +699,7 @@ public Builder author(Optional author) { return this; } + /** * Server Unix timestamp of the creation time. */ @@ -695,6 +718,7 @@ public Builder createTimestamp(Optional createTimestamp) { return this; } + /** * Server Unix timestamp of the last update time. */ @@ -713,6 +737,7 @@ public Builder lastUpdateTimestamp(Optional lastUpdateTimestamp) { return this; } + public Builder lastUpdatedBy(Person lastUpdatedBy) { Utils.checkNotNull(lastUpdatedBy, "lastUpdatedBy"); this.lastUpdatedBy = Optional.ofNullable(lastUpdatedBy); @@ -725,6 +750,7 @@ public Builder lastUpdatedBy(Optional lastUpdatedBy) { return this; } + /** * A list of roles for this prompt template explicitly granted. */ @@ -742,22 +768,16 @@ public Builder roles(Optional> roles) { this.roles = roles; return this; } - + public PromptTemplate build() { + return new PromptTemplate( - name, - template, - applicationId, - inclusions, - addedRoles, - removedRoles, - permissions, - id, - author, - createTimestamp, - lastUpdateTimestamp, - lastUpdatedBy, + name, template, applicationId, + inclusions, addedRoles, removedRoles, + permissions, id, author, + createTimestamp, lastUpdateTimestamp, lastUpdatedBy, roles); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PromptTemplateResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PromptTemplateResult.java index bb9106b8..c030b861 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PromptTemplateResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PromptTemplateResult.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class PromptTemplateResult { @JsonInclude(Include.NON_ABSENT) @@ -27,10 +28,12 @@ public class PromptTemplateResult { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("favoriteInfo") private Optional favoriteInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("runCount") private Optional runCount; @@ -52,7 +55,8 @@ public PromptTemplateResult( } public PromptTemplateResult() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @SuppressWarnings("unchecked") @@ -81,9 +85,10 @@ public Optional runCount() { return (Optional) runCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public PromptTemplateResult withPromptTemplate(PromptTemplate promptTemplate) { Utils.checkNotNull(promptTemplate, "promptTemplate"); @@ -91,6 +96,7 @@ public PromptTemplateResult withPromptTemplate(PromptTemplate promptTemplate) { return this; } + public PromptTemplateResult withPromptTemplate(Optional promptTemplate) { Utils.checkNotNull(promptTemplate, "promptTemplate"); this.promptTemplate = promptTemplate; @@ -106,6 +112,7 @@ public PromptTemplateResult withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this prompt template */ @@ -121,6 +128,7 @@ public PromptTemplateResult withFavoriteInfo(FavoriteInfo favoriteInfo) { return this; } + public PromptTemplateResult withFavoriteInfo(Optional favoriteInfo) { Utils.checkNotNull(favoriteInfo, "favoriteInfo"); this.favoriteInfo = favoriteInfo; @@ -133,13 +141,13 @@ public PromptTemplateResult withRunCount(CountInfo runCount) { return this; } + public PromptTemplateResult withRunCount(Optional runCount) { Utils.checkNotNull(runCount, "runCount"); this.runCount = runCount; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -159,9 +167,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - promptTemplate, - trackingToken, - favoriteInfo, + promptTemplate, trackingToken, favoriteInfo, runCount); } @@ -173,21 +179,23 @@ public String toString() { "favoriteInfo", favoriteInfo, "runCount", runCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional promptTemplate = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional favoriteInfo = Optional.empty(); - + private Optional runCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder promptTemplate(PromptTemplate promptTemplate) { Utils.checkNotNull(promptTemplate, "promptTemplate"); this.promptTemplate = Optional.ofNullable(promptTemplate); @@ -200,6 +208,7 @@ public Builder promptTemplate(Optional promptTemplate) return this; } + /** * An opaque token that represents this prompt template */ @@ -218,6 +227,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder favoriteInfo(FavoriteInfo favoriteInfo) { Utils.checkNotNull(favoriteInfo, "favoriteInfo"); this.favoriteInfo = Optional.ofNullable(favoriteInfo); @@ -230,6 +240,7 @@ public Builder favoriteInfo(Optional favoriteInfo) { return this; } + public Builder runCount(CountInfo runCount) { Utils.checkNotNull(runCount, "runCount"); this.runCount = Optional.ofNullable(runCount); @@ -241,13 +252,13 @@ public Builder runCount(Optional runCount) { this.runCount = runCount; return this; } - + public PromptTemplateResult build() { + return new PromptTemplateResult( - promptTemplate, - trackingToken, - favoriteInfo, + promptTemplate, trackingToken, favoriteInfo, runCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PropertyDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PropertyDefinition.java index 750776b2..9463e4bb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PropertyDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PropertyDefinition.java @@ -16,8 +16,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class PropertyDefinition { +public class PropertyDefinition { /** * The name of the property in the `DocumentMetadata` (e.g. 'createTime', 'updateTime', 'author', 'container'). In the future, this will support custom properties too. */ @@ -46,6 +46,7 @@ public class PropertyDefinition { @JsonProperty("propertyType") private Optional propertyType; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("uiOptions") private Optional uiOptions; @@ -110,7 +111,9 @@ public PropertyDefinition( } public PropertyDefinition() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -184,9 +187,10 @@ public Optional group() { return group; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The name of the property in the `DocumentMetadata` (e.g. 'createTime', 'updateTime', 'author', 'container'). In the future, this will support custom properties too. @@ -197,6 +201,7 @@ public PropertyDefinition withName(String name) { return this; } + /** * The name of the property in the `DocumentMetadata` (e.g. 'createTime', 'updateTime', 'author', 'container'). In the future, this will support custom properties too. */ @@ -215,6 +220,7 @@ public PropertyDefinition withDisplayLabel(String displayLabel) { return this; } + /** * The user friendly label for the property. */ @@ -233,6 +239,7 @@ public PropertyDefinition withDisplayLabelPlural(String displayLabelPlural) { return this; } + /** * The user friendly label for the property that will be used if a plural context. */ @@ -251,6 +258,7 @@ public PropertyDefinition withPropertyType(PropertyType propertyType) { return this; } + /** * The type of custom property - this governs the search and faceting behavior. Note that MULTIPICKLIST is not yet supported. */ @@ -266,6 +274,7 @@ public PropertyDefinition withUiOptions(UiOptions uiOptions) { return this; } + public PropertyDefinition withUiOptions(Optional uiOptions) { Utils.checkNotNull(uiOptions, "uiOptions"); this.uiOptions = uiOptions; @@ -281,6 +290,7 @@ public PropertyDefinition withHideUiFacet(boolean hideUiFacet) { return this; } + /** * If true then the property will not show up as a facet in the UI. */ @@ -299,6 +309,7 @@ public PropertyDefinition withUiFacetOrder(long uiFacetOrder) { return this; } + /** * Will be used to set the order of facets in the UI, if present. If set for one facet, must be set for all non-hidden UI facets. Must take on an integer value from 1 (shown at the top) to N (shown last), where N is the number of non-hidden UI facets. These facets will be ordered below the built-in "Type" and "Tag" operators. */ @@ -317,6 +328,7 @@ public PropertyDefinition withSkipIndexing(boolean skipIndexing) { return this; } + /** * If true then the property will not be indexed for retrieval and ranking. */ @@ -335,6 +347,7 @@ public PropertyDefinition withGroup(String group) { return this; } + /** * The unique identifier of the `PropertyGroup` to which this property belongs. */ @@ -344,7 +357,6 @@ public PropertyDefinition withGroup(Optional group) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -369,15 +381,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - displayLabel, - displayLabelPlural, - propertyType, - uiOptions, - hideUiFacet, - uiFacetOrder, - skipIndexing, - group); + name, displayLabel, displayLabelPlural, + propertyType, uiOptions, hideUiFacet, + uiFacetOrder, skipIndexing, group); } @Override @@ -393,31 +399,33 @@ public String toString() { "skipIndexing", skipIndexing, "group", group); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional displayLabel = Optional.empty(); - + private Optional displayLabelPlural = Optional.empty(); - + private Optional propertyType = Optional.empty(); - + private Optional uiOptions = Optional.empty(); - + private Optional hideUiFacet = Optional.empty(); - + private Optional uiFacetOrder = Optional.empty(); - + private Optional skipIndexing = Optional.empty(); - + private Optional group = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The name of the property in the `DocumentMetadata` (e.g. 'createTime', 'updateTime', 'author', 'container'). In the future, this will support custom properties too. */ @@ -436,6 +444,7 @@ public Builder name(Optional name) { return this; } + /** * The user friendly label for the property. */ @@ -454,6 +463,7 @@ public Builder displayLabel(Optional displayLabel) { return this; } + /** * The user friendly label for the property that will be used if a plural context. */ @@ -472,6 +482,7 @@ public Builder displayLabelPlural(Optional displayLabelPlural) { return this; } + /** * The type of custom property - this governs the search and faceting behavior. Note that MULTIPICKLIST is not yet supported. */ @@ -490,6 +501,7 @@ public Builder propertyType(Optional propertyType) { return this; } + public Builder uiOptions(UiOptions uiOptions) { Utils.checkNotNull(uiOptions, "uiOptions"); this.uiOptions = Optional.ofNullable(uiOptions); @@ -502,6 +514,7 @@ public Builder uiOptions(Optional uiOptions) { return this; } + /** * If true then the property will not show up as a facet in the UI. */ @@ -520,6 +533,7 @@ public Builder hideUiFacet(Optional hideUiFacet) { return this; } + /** * Will be used to set the order of facets in the UI, if present. If set for one facet, must be set for all non-hidden UI facets. Must take on an integer value from 1 (shown at the top) to N (shown last), where N is the number of non-hidden UI facets. These facets will be ordered below the built-in "Type" and "Tag" operators. */ @@ -538,6 +552,7 @@ public Builder uiFacetOrder(Optional uiFacetOrder) { return this; } + /** * If true then the property will not be indexed for retrieval and ranking. */ @@ -556,6 +571,7 @@ public Builder skipIndexing(Optional skipIndexing) { return this; } + /** * The unique identifier of the `PropertyGroup` to which this property belongs. */ @@ -573,18 +589,14 @@ public Builder group(Optional group) { this.group = group; return this; } - + public PropertyDefinition build() { + return new PropertyDefinition( - name, - displayLabel, - displayLabelPlural, - propertyType, - uiOptions, - hideUiFacet, - uiFacetOrder, - skipIndexing, - group); + name, displayLabel, displayLabelPlural, + propertyType, uiOptions, hideUiFacet, + uiFacetOrder, skipIndexing, group); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/PropertyGroup.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/PropertyGroup.java index 5bbc6df3..e12fe940 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/PropertyGroup.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/PropertyGroup.java @@ -19,7 +19,6 @@ *

A grouping for multiple PropertyDefinition. Grouped properties will be displayed together in the UI. */ public class PropertyGroup { - /** * The unique identifier of the group. */ @@ -64,9 +63,10 @@ public Optional displayLabel() { return displayLabel; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique identifier of the group. @@ -77,6 +77,7 @@ public PropertyGroup withName(String name) { return this; } + /** * The unique identifier of the group. */ @@ -95,6 +96,7 @@ public PropertyGroup withDisplayLabel(String displayLabel) { return this; } + /** * The user-friendly group label to display. */ @@ -104,7 +106,6 @@ public PropertyGroup withDisplayLabel(Optional displayLabel) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -122,8 +123,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - displayLabel); + name, displayLabel); } @Override @@ -132,17 +132,19 @@ public String toString() { "name", name, "displayLabel", displayLabel); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional displayLabel = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The unique identifier of the group. */ @@ -161,6 +163,7 @@ public Builder name(Optional name) { return this; } + /** * The user-friendly group label to display. */ @@ -178,11 +181,12 @@ public Builder displayLabel(Optional displayLabel) { this.displayLabel = displayLabel; return this; } - + public PropertyGroup build() { + return new PropertyGroup( - name, - displayLabel); + name, displayLabel); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/QueryInsight.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/QueryInsight.java index cbcc8a3f..d4aa9eef 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/QueryInsight.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/QueryInsight.java @@ -15,26 +15,30 @@ import java.util.List; import java.util.Optional; -public class QueryInsight { +public class QueryInsight { /** * The query string the information is about. */ @JsonProperty("query") private String query; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("searchCount") private Optional searchCount; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("searchorCount") private Optional searchorCount; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("searchWithClickCount") private Optional searchWithClickCount; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("clickCount") private Optional clickCount; @@ -70,7 +74,8 @@ public QueryInsight( public QueryInsight( String query) { - this(query, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(query, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -114,9 +119,10 @@ public Optional> similarQueries() { return (Optional>) similarQueries; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The query string the information is about. @@ -133,6 +139,7 @@ public QueryInsight withSearchCount(CountInfo searchCount) { return this; } + public QueryInsight withSearchCount(Optional searchCount) { Utils.checkNotNull(searchCount, "searchCount"); this.searchCount = searchCount; @@ -145,6 +152,7 @@ public QueryInsight withSearchorCount(CountInfo searchorCount) { return this; } + public QueryInsight withSearchorCount(Optional searchorCount) { Utils.checkNotNull(searchorCount, "searchorCount"); this.searchorCount = searchorCount; @@ -157,6 +165,7 @@ public QueryInsight withSearchWithClickCount(CountInfo searchWithClickCount) { return this; } + public QueryInsight withSearchWithClickCount(Optional searchWithClickCount) { Utils.checkNotNull(searchWithClickCount, "searchWithClickCount"); this.searchWithClickCount = searchWithClickCount; @@ -169,6 +178,7 @@ public QueryInsight withClickCount(CountInfo clickCount) { return this; } + public QueryInsight withClickCount(Optional clickCount) { Utils.checkNotNull(clickCount, "clickCount"); this.clickCount = clickCount; @@ -184,6 +194,7 @@ public QueryInsight withSimilarQueries(List similarQueries) { return this; } + /** * list of similar queries to current one. */ @@ -193,7 +204,6 @@ public QueryInsight withSimilarQueries(Optional> si return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -215,12 +225,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - query, - searchCount, - searchorCount, - searchWithClickCount, - clickCount, - similarQueries); + query, searchCount, searchorCount, + searchWithClickCount, clickCount, similarQueries); } @Override @@ -233,25 +239,27 @@ public String toString() { "clickCount", clickCount, "similarQueries", similarQueries); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String query; - + private Optional searchCount = Optional.empty(); - + private Optional searchorCount = Optional.empty(); - + private Optional searchWithClickCount = Optional.empty(); - + private Optional clickCount = Optional.empty(); - + private Optional> similarQueries = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The query string the information is about. */ @@ -261,6 +269,7 @@ public Builder query(String query) { return this; } + public Builder searchCount(CountInfo searchCount) { Utils.checkNotNull(searchCount, "searchCount"); this.searchCount = Optional.ofNullable(searchCount); @@ -273,6 +282,7 @@ public Builder searchCount(Optional searchCount) { return this; } + public Builder searchorCount(CountInfo searchorCount) { Utils.checkNotNull(searchorCount, "searchorCount"); this.searchorCount = Optional.ofNullable(searchorCount); @@ -285,6 +295,7 @@ public Builder searchorCount(Optional searchorCount) { return this; } + public Builder searchWithClickCount(CountInfo searchWithClickCount) { Utils.checkNotNull(searchWithClickCount, "searchWithClickCount"); this.searchWithClickCount = Optional.ofNullable(searchWithClickCount); @@ -297,6 +308,7 @@ public Builder searchWithClickCount(Optional searchWithClic return this; } + public Builder clickCount(CountInfo clickCount) { Utils.checkNotNull(clickCount, "clickCount"); this.clickCount = Optional.ofNullable(clickCount); @@ -309,6 +321,7 @@ public Builder clickCount(Optional clickCount) { return this; } + /** * list of similar queries to current one. */ @@ -326,15 +339,13 @@ public Builder similarQueries(Optional> similarQuer this.similarQueries = similarQueries; return this; } - + public QueryInsight build() { + return new QueryInsight( - query, - searchCount, - searchorCount, - searchWithClickCount, - clickCount, - similarQueries); + query, searchCount, searchorCount, + searchWithClickCount, clickCount, similarQueries); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/QueryInsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/QueryInsightsResponse.java index 42437c7e..4e1f7421 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/QueryInsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/QueryInsightsResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class QueryInsightsResponse { +public class QueryInsightsResponse { /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -73,7 +73,8 @@ public QueryInsightsResponse( } public QueryInsightsResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -119,9 +120,10 @@ public Optional minVisitorThreshold() { return minVisitorThreshold; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). @@ -132,6 +134,7 @@ public QueryInsightsResponse withLastLogTimestamp(long lastLogTimestamp) { return this; } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -150,6 +153,7 @@ public QueryInsightsResponse withQueryInsights(List queryInsights) return this; } + /** * Insights for queries. */ @@ -168,6 +172,7 @@ public QueryInsightsResponse withLowPerformingQueryInsights(List l return this; } + /** * Insights for low performing queries without good results. */ @@ -186,6 +191,7 @@ public QueryInsightsResponse withDepartments(List departments) { return this; } + /** * list of departments applicable for queries tab. */ @@ -204,6 +210,7 @@ public QueryInsightsResponse withMinVisitorThreshold(long minVisitorThreshold) { return this; } + /** * Min threshold in number of visitors while populating results, otherwise 0. */ @@ -213,7 +220,6 @@ public QueryInsightsResponse withMinVisitorThreshold(Optional minVisitorTh return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -234,11 +240,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - lastLogTimestamp, - queryInsights, - lowPerformingQueryInsights, - departments, - minVisitorThreshold); + lastLogTimestamp, queryInsights, lowPerformingQueryInsights, + departments, minVisitorThreshold); } @Override @@ -250,23 +253,25 @@ public String toString() { "departments", departments, "minVisitorThreshold", minVisitorThreshold); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional lastLogTimestamp = Optional.empty(); - + private Optional> queryInsights = Optional.empty(); - + private Optional> lowPerformingQueryInsights = Optional.empty(); - + private Optional> departments = Optional.empty(); - + private Optional minVisitorThreshold = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -285,6 +290,7 @@ public Builder lastLogTimestamp(Optional lastLogTimestamp) { return this; } + /** * Insights for queries. */ @@ -303,6 +309,7 @@ public Builder queryInsights(Optional> queryInsight return this; } + /** * Insights for low performing queries without good results. */ @@ -321,6 +328,7 @@ public Builder lowPerformingQueryInsights(Optional> return this; } + /** * list of departments applicable for queries tab. */ @@ -339,6 +347,7 @@ public Builder departments(Optional> departments) { return this; } + /** * Min threshold in number of visitors while populating results, otherwise 0. */ @@ -356,14 +365,13 @@ public Builder minVisitorThreshold(Optional minVisitorThreshold) { this.minVisitorThreshold = minVisitorThreshold; return this; } - + public QueryInsightsResponse build() { + return new QueryInsightsResponse( - lastLogTimestamp, - queryInsights, - lowPerformingQueryInsights, - departments, - minVisitorThreshold); + lastLogTimestamp, queryInsights, lowPerformingQueryInsights, + departments, minVisitorThreshold); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/QuerySuggestion.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/QuerySuggestion.java index 9efee6b7..2a122320 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/QuerySuggestion.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/QuerySuggestion.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class QuerySuggestion { +public class QuerySuggestion { /** * A query term missing from the original query on which this suggestion is based. */ @@ -30,6 +30,7 @@ public class QuerySuggestion { @JsonProperty("query") private String query; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("searchProviderInfo") private Optional searchProviderInfo; @@ -48,6 +49,7 @@ public class QuerySuggestion { @JsonProperty("datasource") private Optional datasource; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("requestOptions") private Optional requestOptions; @@ -59,6 +61,7 @@ public class QuerySuggestion { @JsonProperty("ranges") private Optional> ranges; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("inputDetails") private Optional inputDetails; @@ -93,7 +96,9 @@ public QuerySuggestion( public QuerySuggestion( String query) { - this(Optional.empty(), query, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), query, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -155,9 +160,10 @@ public Optional inputDetails() { return (Optional) inputDetails; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A query term missing from the original query on which this suggestion is based. @@ -168,6 +174,7 @@ public QuerySuggestion withMissingTerm(String missingTerm) { return this; } + /** * A query term missing from the original query on which this suggestion is based. */ @@ -192,6 +199,7 @@ public QuerySuggestion withSearchProviderInfo(SearchProviderInfo searchProviderI return this; } + public QuerySuggestion withSearchProviderInfo(Optional searchProviderInfo) { Utils.checkNotNull(searchProviderInfo, "searchProviderInfo"); this.searchProviderInfo = searchProviderInfo; @@ -207,6 +215,7 @@ public QuerySuggestion withLabel(String label) { return this; } + /** * A user-facing description to display for the suggestion. */ @@ -225,6 +234,7 @@ public QuerySuggestion withDatasource(String datasource) { return this; } + /** * The datasource associated with the suggestion. */ @@ -240,6 +250,7 @@ public QuerySuggestion withRequestOptions(SearchRequestOptions requestOptions) { return this; } + public QuerySuggestion withRequestOptions(Optional requestOptions) { Utils.checkNotNull(requestOptions, "requestOptions"); this.requestOptions = requestOptions; @@ -255,6 +266,7 @@ public QuerySuggestion withRanges(List ranges) { return this; } + /** * The bolded ranges within the query of the QuerySuggestion. */ @@ -270,13 +282,13 @@ public QuerySuggestion withInputDetails(SearchRequestInputDetails inputDetails) return this; } + public QuerySuggestion withInputDetails(Optional inputDetails) { Utils.checkNotNull(inputDetails, "inputDetails"); this.inputDetails = inputDetails; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -300,14 +312,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - missingTerm, - query, - searchProviderInfo, - label, - datasource, - requestOptions, - ranges, - inputDetails); + missingTerm, query, searchProviderInfo, + label, datasource, requestOptions, + ranges, inputDetails); } @Override @@ -322,29 +329,31 @@ public String toString() { "ranges", ranges, "inputDetails", inputDetails); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional missingTerm = Optional.empty(); - + private String query; - + private Optional searchProviderInfo = Optional.empty(); - + private Optional label = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional requestOptions = Optional.empty(); - + private Optional> ranges = Optional.empty(); - + private Optional inputDetails = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A query term missing from the original query on which this suggestion is based. */ @@ -363,6 +372,7 @@ public Builder missingTerm(Optional missingTerm) { return this; } + /** * The query being suggested (e.g. enforcing the missing term from the original query). */ @@ -372,6 +382,7 @@ public Builder query(String query) { return this; } + public Builder searchProviderInfo(SearchProviderInfo searchProviderInfo) { Utils.checkNotNull(searchProviderInfo, "searchProviderInfo"); this.searchProviderInfo = Optional.ofNullable(searchProviderInfo); @@ -384,6 +395,7 @@ public Builder searchProviderInfo(Optional searchP return this; } + /** * A user-facing description to display for the suggestion. */ @@ -402,6 +414,7 @@ public Builder label(Optional label) { return this; } + /** * The datasource associated with the suggestion. */ @@ -420,6 +433,7 @@ public Builder datasource(Optional datasource) { return this; } + public Builder requestOptions(SearchRequestOptions requestOptions) { Utils.checkNotNull(requestOptions, "requestOptions"); this.requestOptions = Optional.ofNullable(requestOptions); @@ -432,6 +446,7 @@ public Builder requestOptions(Optional requestOp return this; } + /** * The bolded ranges within the query of the QuerySuggestion. */ @@ -450,6 +465,7 @@ public Builder ranges(Optional> ranges) { return this; } + public Builder inputDetails(SearchRequestInputDetails inputDetails) { Utils.checkNotNull(inputDetails, "inputDetails"); this.inputDetails = Optional.ofNullable(inputDetails); @@ -461,17 +477,14 @@ public Builder inputDetails(Optional inputD this.inputDetails = inputDetails; return this; } - + public QuerySuggestion build() { + return new QuerySuggestion( - missingTerm, - query, - searchProviderInfo, - label, - datasource, - requestOptions, - ranges, - inputDetails); + missingTerm, query, searchProviderInfo, + label, datasource, requestOptions, + ranges, inputDetails); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/QuerySuggestionList.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/QuerySuggestionList.java index ff4a0984..a9e587bb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/QuerySuggestionList.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/QuerySuggestionList.java @@ -15,12 +15,14 @@ import java.util.List; import java.util.Optional; + public class QuerySuggestionList { @JsonInclude(Include.NON_ABSENT) @JsonProperty("suggestions") private Optional> suggestions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("person") private Optional person; @@ -51,9 +53,10 @@ public Optional person() { return (Optional) person; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public QuerySuggestionList withSuggestions(List suggestions) { Utils.checkNotNull(suggestions, "suggestions"); @@ -61,6 +64,7 @@ public QuerySuggestionList withSuggestions(List suggestions) { return this; } + public QuerySuggestionList withSuggestions(Optional> suggestions) { Utils.checkNotNull(suggestions, "suggestions"); this.suggestions = suggestions; @@ -73,13 +77,13 @@ public QuerySuggestionList withPerson(Person person) { return this; } + public QuerySuggestionList withPerson(Optional person) { Utils.checkNotNull(person, "person"); this.person = person; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -97,8 +101,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - suggestions, - person); + suggestions, person); } @Override @@ -107,17 +110,19 @@ public String toString() { "suggestions", suggestions, "person", person); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> suggestions = Optional.empty(); - + private Optional person = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder suggestions(List suggestions) { Utils.checkNotNull(suggestions, "suggestions"); this.suggestions = Optional.ofNullable(suggestions); @@ -130,6 +135,7 @@ public Builder suggestions(Optional> suggestions return this; } + public Builder person(Person person) { Utils.checkNotNull(person, "person"); this.person = Optional.ofNullable(person); @@ -141,11 +147,12 @@ public Builder person(Optional person) { this.person = person; return this; } - + public QuerySuggestionList build() { + return new QuerySuggestionList( - suggestions, - person); + suggestions, person); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Quicklink.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Quicklink.java index de175647..8aca02b6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Quicklink.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Quicklink.java @@ -21,7 +21,6 @@ *

An action for a specific datasource that will show up in autocomplete and app card, e.g. "Create new issue" for jira. */ public class Quicklink { - /** * Full action name. Used in autocomplete. */ @@ -87,7 +86,8 @@ public Quicklink( } public Quicklink() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -140,9 +140,10 @@ public Optional> scopes() { return (Optional>) scopes; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Full action name. Used in autocomplete. @@ -153,6 +154,7 @@ public Quicklink withName(String name) { return this; } + /** * Full action name. Used in autocomplete. */ @@ -171,6 +173,7 @@ public Quicklink withShortName(String shortName) { return this; } + /** * Shortened name. Used in app cards. */ @@ -189,6 +192,7 @@ public Quicklink withUrl(String url) { return this; } + /** * The URL of the action. */ @@ -207,6 +211,7 @@ public Quicklink withIconConfig(IconConfig iconConfig) { return this; } + /** * Defines how to render an icon */ @@ -225,6 +230,7 @@ public Quicklink withId(String id) { return this; } + /** * Unique identifier of this quicklink */ @@ -243,6 +249,7 @@ public Quicklink withScopes(List scopes) { return this; } + /** * The scopes for which this quicklink is applicable */ @@ -252,7 +259,6 @@ public Quicklink withScopes(Optional> scopes) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -274,12 +280,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - shortName, - url, - iconConfig, - id, - scopes); + name, shortName, url, + iconConfig, id, scopes); } @Override @@ -292,25 +294,27 @@ public String toString() { "id", id, "scopes", scopes); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional shortName = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional iconConfig = Optional.empty(); - + private Optional id = Optional.empty(); - + private Optional> scopes = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Full action name. Used in autocomplete. */ @@ -329,6 +333,7 @@ public Builder name(Optional name) { return this; } + /** * Shortened name. Used in app cards. */ @@ -347,6 +352,7 @@ public Builder shortName(Optional shortName) { return this; } + /** * The URL of the action. */ @@ -365,6 +371,7 @@ public Builder url(Optional url) { return this; } + /** * Defines how to render an icon */ @@ -383,6 +390,7 @@ public Builder iconConfig(Optional iconConfig) { return this; } + /** * Unique identifier of this quicklink */ @@ -401,6 +409,7 @@ public Builder id(Optional id) { return this; } + /** * The scopes for which this quicklink is applicable */ @@ -418,15 +427,13 @@ public Builder scopes(Optional> scopes) { this.scopes = scopes; return this; } - + public Quicklink build() { + return new Quicklink( - name, - shortName, - url, - iconConfig, - id, - scopes); + name, shortName, url, + iconConfig, id, scopes); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Reaction.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Reaction.java index 57b5bb6d..472759b3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Reaction.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Reaction.java @@ -17,6 +17,7 @@ import java.util.List; import java.util.Optional; + public class Reaction { @JsonInclude(Include.NON_ABSENT) @@ -30,6 +31,7 @@ public class Reaction { @JsonProperty("count") private Optional count; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("reactors") private Optional> reactors; @@ -58,7 +60,8 @@ public Reaction( } public Reaction() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @JsonIgnore @@ -88,9 +91,10 @@ public Optional reactedByViewer() { return reactedByViewer; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public Reaction withType(String type) { Utils.checkNotNull(type, "type"); @@ -98,6 +102,7 @@ public Reaction withType(String type) { return this; } + public Reaction withType(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; @@ -113,6 +118,7 @@ public Reaction withCount(long count) { return this; } + /** * The count of the reaction type on the document. */ @@ -128,6 +134,7 @@ public Reaction withReactors(List reactors) { return this; } + public Reaction withReactors(Optional> reactors) { Utils.checkNotNull(reactors, "reactors"); this.reactors = reactors; @@ -143,6 +150,7 @@ public Reaction withReactedByViewer(boolean reactedByViewer) { return this; } + /** * Whether the user in context reacted with this type to the document. */ @@ -152,7 +160,6 @@ public Reaction withReactedByViewer(Optional reactedByViewer) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -172,9 +179,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - type, - count, - reactors, + type, count, reactors, reactedByViewer); } @@ -186,21 +191,23 @@ public String toString() { "reactors", reactors, "reactedByViewer", reactedByViewer); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional type = Optional.empty(); - + private Optional count = Optional.empty(); - + private Optional> reactors = Optional.empty(); - + private Optional reactedByViewer = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder type(String type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); @@ -213,6 +220,7 @@ public Builder type(Optional type) { return this; } + /** * The count of the reaction type on the document. */ @@ -231,6 +239,7 @@ public Builder count(Optional count) { return this; } + public Builder reactors(List reactors) { Utils.checkNotNull(reactors, "reactors"); this.reactors = Optional.ofNullable(reactors); @@ -243,6 +252,7 @@ public Builder reactors(Optional> reactors) { return this; } + /** * Whether the user in context reacted with this type to the document. */ @@ -260,13 +270,13 @@ public Builder reactedByViewer(Optional reactedByViewer) { this.reactedByViewer = reactedByViewer; return this; } - + public Reaction build() { + return new Reaction( - type, - count, - reactors, + type, count, reactors, reactedByViewer); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ReadPermission.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ReadPermission.java index 1e3e85e9..e3339d17 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ReadPermission.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ReadPermission.java @@ -20,7 +20,6 @@ *

Describes the read permission level that a user has for a specific feature */ public class ReadPermission { - /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object */ @@ -48,9 +47,10 @@ public Optional scopeType() { return (Optional) scopeType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object @@ -61,6 +61,7 @@ public ReadPermission withScopeType(ScopeType scopeType) { return this; } + /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object */ @@ -70,7 +71,6 @@ public ReadPermission withScopeType(Optional scopeType) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -95,15 +95,17 @@ public String toString() { return Utils.toString(ReadPermission.class, "scopeType", scopeType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional scopeType = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object */ @@ -121,10 +123,12 @@ public Builder scopeType(Optional scopeType) { this.scopeType = scopeType; return this; } - + public ReadPermission build() { + return new ReadPermission( scopeType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RecommendationsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RecommendationsRequest.java index 276bd405..fd3b3171 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/RecommendationsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RecommendationsRequest.java @@ -16,8 +16,8 @@ import java.time.OffsetDateTime; import java.util.Optional; -public class RecommendationsRequest { +public class RecommendationsRequest { /** * The ISO 8601 timestamp associated with the client request. */ @@ -32,10 +32,12 @@ public class RecommendationsRequest { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sessionInfo") private Optional sessionInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceDocument") private Optional sourceDocument; @@ -54,10 +56,12 @@ public class RecommendationsRequest { @JsonProperty("maxSnippetSize") private Optional maxSnippetSize; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("recommendationDocumentSpec") private Optional recommendationDocumentSpec; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("requestOptions") private Optional requestOptions; @@ -91,7 +95,9 @@ public RecommendationsRequest( } public RecommendationsRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -150,9 +156,10 @@ public Optional requestOptions() { return (Optional) requestOptions; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ISO 8601 timestamp associated with the client request. @@ -163,6 +170,7 @@ public RecommendationsRequest withTimestamp(OffsetDateTime timestamp) { return this; } + /** * The ISO 8601 timestamp associated with the client request. */ @@ -181,6 +189,7 @@ public RecommendationsRequest withTrackingToken(String trackingToken) { return this; } + /** * A previously received trackingToken for a search associated with the same query. Useful for more requests and requests for other tabs. */ @@ -196,6 +205,7 @@ public RecommendationsRequest withSessionInfo(SessionInfo sessionInfo) { return this; } + public RecommendationsRequest withSessionInfo(Optional sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = sessionInfo; @@ -208,6 +218,7 @@ public RecommendationsRequest withSourceDocument(Document sourceDocument) { return this; } + public RecommendationsRequest withSourceDocument(Optional sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = sourceDocument; @@ -223,6 +234,7 @@ public RecommendationsRequest withPageSize(long pageSize) { return this; } + /** * Hint to the server about how many results to send back. Server may return less or more. Structured results and clustered results don't count towards pageSize. */ @@ -241,6 +253,7 @@ public RecommendationsRequest withMaxSnippetSize(long maxSnippetSize) { return this; } + /** * Hint to the server about how many characters long a snippet may be. Server may return less or more. */ @@ -256,6 +269,7 @@ public RecommendationsRequest withRecommendationDocumentSpec(DocumentSpecUnion r return this; } + public RecommendationsRequest withRecommendationDocumentSpec(Optional recommendationDocumentSpec) { Utils.checkNotNull(recommendationDocumentSpec, "recommendationDocumentSpec"); this.recommendationDocumentSpec = recommendationDocumentSpec; @@ -268,13 +282,13 @@ public RecommendationsRequest withRequestOptions(RecommendationsRequestOptions r return this; } + public RecommendationsRequest withRequestOptions(Optional requestOptions) { Utils.checkNotNull(requestOptions, "requestOptions"); this.requestOptions = requestOptions; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -298,14 +312,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timestamp, - trackingToken, - sessionInfo, - sourceDocument, - pageSize, - maxSnippetSize, - recommendationDocumentSpec, - requestOptions); + timestamp, trackingToken, sessionInfo, + sourceDocument, pageSize, maxSnippetSize, + recommendationDocumentSpec, requestOptions); } @Override @@ -320,29 +329,31 @@ public String toString() { "recommendationDocumentSpec", recommendationDocumentSpec, "requestOptions", requestOptions); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timestamp = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional sessionInfo = Optional.empty(); - + private Optional sourceDocument = Optional.empty(); - + private Optional pageSize = Optional.empty(); - + private Optional maxSnippetSize = Optional.empty(); - + private Optional recommendationDocumentSpec = Optional.empty(); - + private Optional requestOptions = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ISO 8601 timestamp associated with the client request. */ @@ -361,6 +372,7 @@ public Builder timestamp(Optional timestamp) { return this; } + /** * A previously received trackingToken for a search associated with the same query. Useful for more requests and requests for other tabs. */ @@ -379,6 +391,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder sessionInfo(SessionInfo sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = Optional.ofNullable(sessionInfo); @@ -391,6 +404,7 @@ public Builder sessionInfo(Optional sessionInfo) { return this; } + public Builder sourceDocument(Document sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = Optional.ofNullable(sourceDocument); @@ -403,6 +417,7 @@ public Builder sourceDocument(Optional sourceDocument) { return this; } + /** * Hint to the server about how many results to send back. Server may return less or more. Structured results and clustered results don't count towards pageSize. */ @@ -421,6 +436,7 @@ public Builder pageSize(Optional pageSize) { return this; } + /** * Hint to the server about how many characters long a snippet may be. Server may return less or more. */ @@ -439,6 +455,7 @@ public Builder maxSnippetSize(Optional maxSnippetSize) { return this; } + public Builder recommendationDocumentSpec(DocumentSpecUnion recommendationDocumentSpec) { Utils.checkNotNull(recommendationDocumentSpec, "recommendationDocumentSpec"); this.recommendationDocumentSpec = Optional.ofNullable(recommendationDocumentSpec); @@ -451,6 +468,7 @@ public Builder recommendationDocumentSpec(Optional return this; } + public Builder requestOptions(RecommendationsRequestOptions requestOptions) { Utils.checkNotNull(requestOptions, "requestOptions"); this.requestOptions = Optional.ofNullable(requestOptions); @@ -462,17 +480,14 @@ public Builder requestOptions(Optional this.requestOptions = requestOptions; return this; } - + public RecommendationsRequest build() { + return new RecommendationsRequest( - timestamp, - trackingToken, - sessionInfo, - sourceDocument, - pageSize, - maxSnippetSize, - recommendationDocumentSpec, - requestOptions); + timestamp, trackingToken, sessionInfo, + sourceDocument, pageSize, maxSnippetSize, + recommendationDocumentSpec, requestOptions); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RecommendationsRequestOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RecommendationsRequestOptions.java index 8055bf02..435745d9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/RecommendationsRequestOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RecommendationsRequestOptions.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class RecommendationsRequestOptions { +public class RecommendationsRequestOptions { /** * Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. */ @@ -38,6 +38,7 @@ public class RecommendationsRequestOptions { @JsonProperty("facetFilterSets") private Optional> facetFilterSets; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("context") private Optional context; @@ -69,7 +70,8 @@ public RecommendationsRequestOptions( } public RecommendationsRequestOptions() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -113,9 +115,10 @@ public Optional> resultProminence() { return (Optional>) resultProminence; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. @@ -126,6 +129,7 @@ public RecommendationsRequestOptions withDatasourceFilter(String datasourceFilte return this; } + /** * Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. */ @@ -144,6 +148,7 @@ public RecommendationsRequestOptions withDatasourcesFilter(List datasour return this; } + /** * Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). All results are returned if missing. */ @@ -162,6 +167,7 @@ public RecommendationsRequestOptions withFacetFilterSets(List fa return this; } + /** * A list of facet filter sets that will be OR'ed together. */ @@ -177,6 +183,7 @@ public RecommendationsRequestOptions withContext(Document context) { return this; } + public RecommendationsRequestOptions withContext(Optional context) { Utils.checkNotNull(context, "context"); this.context = context; @@ -192,6 +199,7 @@ public RecommendationsRequestOptions withResultProminence(List datasourceFilter = Optional.empty(); - + private Optional> datasourcesFilter = Optional.empty(); - + private Optional> facetFilterSets = Optional.empty(); - + private Optional context = Optional.empty(); - + private Optional> resultProminence = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. */ @@ -273,6 +279,7 @@ public Builder datasourceFilter(Optional datasourceFilter) { return this; } + /** * Filter results to only those relevant to one or more datasources (e.g. jira, gdrive). All results are returned if missing. */ @@ -291,6 +298,7 @@ public Builder datasourcesFilter(Optional> datasourcesFil return this; } + /** * A list of facet filter sets that will be OR'ed together. */ @@ -309,6 +317,7 @@ public Builder facetFilterSets(Optional> facetFil return this; } + public Builder context(Document context) { Utils.checkNotNull(context, "context"); this.context = Optional.ofNullable(context); @@ -321,6 +330,7 @@ public Builder context(Optional context) { return this; } + /** * The types of prominence wanted in results returned. Default is any type. */ @@ -338,14 +348,13 @@ public Builder resultProminence(OptionalEach text range from the response can correspond to an array of snippets from the citation source. */ public class ReferenceRange { - /** * A subsection of a given string to which some special formatting should be applied. */ @@ -29,6 +28,7 @@ public class ReferenceRange { @JsonProperty("textRange") private Optional textRange; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("snippets") private Optional> snippets; @@ -62,9 +62,10 @@ public Optional> snippets() { return (Optional>) snippets; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A subsection of a given string to which some special formatting should be applied. @@ -75,6 +76,7 @@ public ReferenceRange withTextRange(TextRange textRange) { return this; } + /** * A subsection of a given string to which some special formatting should be applied. */ @@ -90,13 +92,13 @@ public ReferenceRange withSnippets(List snippets) { return this; } + public ReferenceRange withSnippets(Optional> snippets) { Utils.checkNotNull(snippets, "snippets"); this.snippets = snippets; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -114,8 +116,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - textRange, - snippets); + textRange, snippets); } @Override @@ -124,17 +125,19 @@ public String toString() { "textRange", textRange, "snippets", snippets); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional textRange = Optional.empty(); - + private Optional> snippets = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A subsection of a given string to which some special formatting should be applied. */ @@ -153,6 +156,7 @@ public Builder textRange(Optional textRange) { return this; } + public Builder snippets(List snippets) { Utils.checkNotNull(snippets, "snippets"); this.snippets = Optional.ofNullable(snippets); @@ -164,11 +168,12 @@ public Builder snippets(Optional> snippets) this.snippets = snippets; return this; } - + public ReferenceRange build() { + return new ReferenceRange( - textRange, - snippets); + textRange, snippets); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedDocuments.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedDocuments.java index f8eae565..ca345b13 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedDocuments.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedDocuments.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class RelatedDocuments { +public class RelatedDocuments { /** * How this document relates to the including entity. */ @@ -32,6 +32,7 @@ public class RelatedDocuments { @JsonProperty("associatedEntityId") private Optional associatedEntityId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("querySuggestion") private Optional querySuggestion; @@ -73,7 +74,8 @@ public RelatedDocuments( } public RelatedDocuments() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -120,9 +122,10 @@ public Optional> results() { return (Optional>) results; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * How this document relates to the including entity. @@ -133,6 +136,7 @@ public RelatedDocuments withRelation(Relation relation) { return this; } + /** * How this document relates to the including entity. */ @@ -151,6 +155,7 @@ public RelatedDocuments withAssociatedEntityId(String associatedEntityId) { return this; } + /** * Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers) */ @@ -166,6 +171,7 @@ public RelatedDocuments withQuerySuggestion(QuerySuggestion querySuggestion) { return this; } + public RelatedDocuments withQuerySuggestion(Optional querySuggestion) { Utils.checkNotNull(querySuggestion, "querySuggestion"); this.querySuggestion = querySuggestion; @@ -184,6 +190,7 @@ public RelatedDocuments withDocuments(List documents) { return this; } + /** * A truncated list of documents with this relation. TO BE DEPRECATED. * @@ -205,6 +212,7 @@ public RelatedDocuments withResults(List results) { return this; } + /** * A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken. */ @@ -214,7 +222,6 @@ public RelatedDocuments withResults(Optional> resul return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -235,11 +242,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - relation, - associatedEntityId, - querySuggestion, - documents, - results); + relation, associatedEntityId, querySuggestion, + documents, results); } @Override @@ -251,24 +255,26 @@ public String toString() { "documents", documents, "results", results); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional relation = Optional.empty(); - + private Optional associatedEntityId = Optional.empty(); - + private Optional querySuggestion = Optional.empty(); - + @Deprecated private Optional> documents = Optional.empty(); - + private Optional> results = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * How this document relates to the including entity. */ @@ -287,6 +293,7 @@ public Builder relation(Optional relation) { return this; } + /** * Which entity in the response that this entity relates to. Relevant when there are multiple entities associated with the response (such as merged customers) */ @@ -305,6 +312,7 @@ public Builder associatedEntityId(Optional associatedEntityId) { return this; } + public Builder querySuggestion(QuerySuggestion querySuggestion) { Utils.checkNotNull(querySuggestion, "querySuggestion"); this.querySuggestion = Optional.ofNullable(querySuggestion); @@ -317,6 +325,7 @@ public Builder querySuggestion(Optional querySuggesti return this; } + /** * A truncated list of documents with this relation. TO BE DEPRECATED. * @@ -341,6 +350,7 @@ public Builder documents(Optional> documents) { return this; } + /** * A truncated list of documents associated with this relation. To be used in favor of `documents` because it contains a trackingToken. */ @@ -358,14 +368,13 @@ public Builder results(Optional> results) { this.results = results; return this; } - + public RelatedDocuments build() { + return new RelatedDocuments( - relation, - associatedEntityId, - querySuggestion, - documents, - results); + relation, associatedEntityId, querySuggestion, + documents, results); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObject.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObject.java index 7d8a6096..a2f7cc10 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObject.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObject.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class RelatedObject { +public class RelatedObject { /** * The ID of the related object */ @@ -61,9 +61,10 @@ public Optional metadata() { return (Optional) metadata; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ID of the related object @@ -83,6 +84,7 @@ public RelatedObject withMetadata(RelatedObjectMetadata metadata) { return this; } + /** * Some metadata of the object which can be displayed, while not having the actual object. */ @@ -92,7 +94,6 @@ public RelatedObject withMetadata(Optional meta return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -110,8 +111,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - metadata); + id, metadata); } @Override @@ -120,17 +120,19 @@ public String toString() { "id", id, "metadata", metadata); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private Optional metadata = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ID of the related object */ @@ -140,6 +142,7 @@ public Builder id(String id) { return this; } + /** * Some metadata of the object which can be displayed, while not having the actual object. */ @@ -157,11 +160,12 @@ public Builder metadata(Optional metadata) { this.metadata = metadata; return this; } - + public RelatedObject build() { + return new RelatedObject( - id, - metadata); + id, metadata); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObjectEdge.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObjectEdge.java index 8027513b..c56a034c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObjectEdge.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObjectEdge.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class RelatedObjectEdge { @JsonInclude(Include.NON_ABSENT) @@ -38,9 +39,10 @@ public Optional> objects() { return (Optional>) objects; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public RelatedObjectEdge withObjects(List objects) { Utils.checkNotNull(objects, "objects"); @@ -48,13 +50,13 @@ public RelatedObjectEdge withObjects(List objects) { return this; } + public RelatedObjectEdge withObjects(Optional> objects) { Utils.checkNotNull(objects, "objects"); this.objects = objects; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -79,15 +81,17 @@ public String toString() { return Utils.toString(RelatedObjectEdge.class, "objects", objects); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> objects = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder objects(List objects) { Utils.checkNotNull(objects, "objects"); this.objects = Optional.ofNullable(objects); @@ -99,10 +103,12 @@ public Builder objects(Optional> objects) { this.objects = objects; return this; } - + public RelatedObjectEdge build() { + return new RelatedObjectEdge( objects); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObjectMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObjectMetadata.java index 0c3a63b2..2f6ed9e1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObjectMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedObjectMetadata.java @@ -19,7 +19,6 @@ *

Some metadata of the object which can be displayed, while not having the actual object. */ public class RelatedObjectMetadata { - /** * Placeholder name of the object, not the relationship. */ @@ -46,9 +45,10 @@ public Optional name() { return name; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Placeholder name of the object, not the relationship. @@ -59,6 +59,7 @@ public RelatedObjectMetadata withName(String name) { return this; } + /** * Placeholder name of the object, not the relationship. */ @@ -68,7 +69,6 @@ public RelatedObjectMetadata withName(Optional name) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -93,15 +93,17 @@ public String toString() { return Utils.toString(RelatedObjectMetadata.class, "name", name); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Placeholder name of the object, not the relationship. */ @@ -119,10 +121,12 @@ public Builder name(Optional name) { this.name = name; return this; } - + public RelatedObjectMetadata build() { + return new RelatedObjectMetadata( name); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedQuestion.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedQuestion.java index 042234af..4bc211d7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedQuestion.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RelatedQuestion.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class RelatedQuestion { +public class RelatedQuestion { /** * The text of the related question */ @@ -80,9 +80,10 @@ public Optional> ranges() { return (Optional>) ranges; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The text of the related question @@ -93,6 +94,7 @@ public RelatedQuestion withQuestion(String question) { return this; } + /** * The text of the related question */ @@ -111,6 +113,7 @@ public RelatedQuestion withAnswer(String answer) { return this; } + /** * The answer for the related question */ @@ -129,6 +132,7 @@ public RelatedQuestion withRanges(List ranges) { return this; } + /** * Subsections of the answer string to which some special formatting should be applied (eg. bold) */ @@ -138,7 +142,6 @@ public RelatedQuestion withRanges(Optional> ranges) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -157,9 +160,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - question, - answer, - ranges); + question, answer, ranges); } @Override @@ -169,19 +170,21 @@ public String toString() { "answer", answer, "ranges", ranges); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional question = Optional.empty(); - + private Optional answer = Optional.empty(); - + private Optional> ranges = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The text of the related question */ @@ -200,6 +203,7 @@ public Builder question(Optional question) { return this; } + /** * The answer for the related question */ @@ -218,6 +222,7 @@ public Builder answer(Optional answer) { return this; } + /** * Subsections of the answer string to which some special formatting should be applied (eg. bold) */ @@ -235,12 +240,12 @@ public Builder ranges(Optional> ranges) { this.ranges = ranges; return this; } - + public RelatedQuestion build() { + return new RelatedQuestion( - question, - answer, - ranges); + question, answer, ranges); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Reminder.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Reminder.java index b7a4583b..15e1c9c4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Reminder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Reminder.java @@ -15,11 +15,13 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class Reminder { @JsonProperty("assignee") private Person assignee; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("requestor") private Optional requestor; @@ -66,7 +68,8 @@ public Reminder( public Reminder( Person assignee, long remindAt) { - this(assignee, Optional.empty(), remindAt, Optional.empty(), Optional.empty()); + this(assignee, Optional.empty(), remindAt, + Optional.empty(), Optional.empty()); } @JsonIgnore @@ -104,9 +107,10 @@ public Optional reason() { return reason; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public Reminder withAssignee(Person assignee) { Utils.checkNotNull(assignee, "assignee"); @@ -120,6 +124,7 @@ public Reminder withRequestor(Person requestor) { return this; } + public Reminder withRequestor(Optional requestor) { Utils.checkNotNull(requestor, "requestor"); this.requestor = requestor; @@ -144,6 +149,7 @@ public Reminder withCreatedAt(long createdAt) { return this; } + /** * Unix timestamp for when the reminder was first created (in seconds since epoch UTC). */ @@ -162,6 +168,7 @@ public Reminder withReason(String reason) { return this; } + /** * An optional free-text reason for the reminder. This is particularly useful when a reminder is used to ask for verification from another user (for example, "Duplicate", "Incomplete", "Incorrect"). */ @@ -171,7 +178,6 @@ public Reminder withReason(Optional reason) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -192,11 +198,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - assignee, - requestor, - remindAt, - createdAt, - reason); + assignee, requestor, remindAt, + createdAt, reason); } @Override @@ -208,29 +211,32 @@ public String toString() { "createdAt", createdAt, "reason", reason); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Person assignee; - + private Optional requestor = Optional.empty(); - + private Long remindAt; - + private Optional createdAt = Optional.empty(); - + private Optional reason = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder assignee(Person assignee) { Utils.checkNotNull(assignee, "assignee"); this.assignee = assignee; return this; } + public Builder requestor(Person requestor) { Utils.checkNotNull(requestor, "requestor"); this.requestor = Optional.ofNullable(requestor); @@ -243,6 +249,7 @@ public Builder requestor(Optional requestor) { return this; } + /** * Unix timestamp for when the reminder should trigger (in seconds since epoch UTC). */ @@ -252,6 +259,7 @@ public Builder remindAt(long remindAt) { return this; } + /** * Unix timestamp for when the reminder was first created (in seconds since epoch UTC). */ @@ -270,6 +278,7 @@ public Builder createdAt(Optional createdAt) { return this; } + /** * An optional free-text reason for the reminder. This is particularly useful when a reminder is used to ask for verification from another user (for example, "Duplicate", "Incomplete", "Incorrect"). */ @@ -287,14 +296,13 @@ public Builder reason(Optional reason) { this.reason = reason; return this; } - + public Reminder build() { + return new Reminder( - assignee, - requestor, - remindAt, - createdAt, - reason); + assignee, requestor, remindAt, + createdAt, reason); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ReminderRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ReminderRequest.java index f059133b..cc6f8e47 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ReminderRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ReminderRequest.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class ReminderRequest { +public class ReminderRequest { /** * The document which the verification is for new reminders and/or update. */ @@ -61,7 +61,8 @@ public ReminderRequest( public ReminderRequest( String documentId) { - this(documentId, Optional.empty(), Optional.empty(), Optional.empty()); + this(documentId, Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -96,9 +97,10 @@ public Optional reason() { return reason; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The document which the verification is for new reminders and/or update. @@ -118,6 +120,7 @@ public ReminderRequest withAssignee(String assignee) { return this; } + /** * The obfuscated id of the person this verification is assigned to. */ @@ -136,6 +139,7 @@ public ReminderRequest withRemindInDays(long remindInDays) { return this; } + /** * Reminder for the next verifications in terms of days. For deletion, this will be omitted. */ @@ -154,6 +158,7 @@ public ReminderRequest withReason(String reason) { return this; } + /** * An optional free-text reason for the reminder. This is particularly useful when a reminder is used to ask for verification from another user (for example, "Duplicate", "Incomplete", "Incorrect"). */ @@ -163,7 +168,6 @@ public ReminderRequest withReason(Optional reason) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -183,9 +187,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - documentId, - assignee, - remindInDays, + documentId, assignee, remindInDays, reason); } @@ -197,21 +199,23 @@ public String toString() { "remindInDays", remindInDays, "reason", reason); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String documentId; - + private Optional assignee = Optional.empty(); - + private Optional remindInDays = Optional.empty(); - + private Optional reason = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The document which the verification is for new reminders and/or update. */ @@ -221,6 +225,7 @@ public Builder documentId(String documentId) { return this; } + /** * The obfuscated id of the person this verification is assigned to. */ @@ -239,6 +244,7 @@ public Builder assignee(Optional assignee) { return this; } + /** * Reminder for the next verifications in terms of days. For deletion, this will be omitted. */ @@ -257,6 +263,7 @@ public Builder remindInDays(Optional remindInDays) { return this; } + /** * An optional free-text reason for the reminder. This is particularly useful when a reminder is used to ask for verification from another user (for example, "Duplicate", "Incomplete", "Incorrect"). */ @@ -274,13 +281,13 @@ public Builder reason(Optional reason) { this.reason = reason; return this; } - + public ReminderRequest build() { + return new ReminderRequest( - documentId, - assignee, - remindInDays, + documentId, assignee, remindInDays, reason); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ReportStatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ReportStatusResponse.java index 0d921edd..58932206 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ReportStatusResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ReportStatusResponse.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class ReportStatusResponse { @JsonInclude(Include.NON_ABSENT) @@ -55,9 +56,10 @@ public Optional startTime() { return startTime; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ReportStatusResponse withStatus(ReportStatusResponseStatus status) { Utils.checkNotNull(status, "status"); @@ -65,6 +67,7 @@ public ReportStatusResponse withStatus(ReportStatusResponseStatus status) { return this; } + public ReportStatusResponse withStatus(Optional status) { Utils.checkNotNull(status, "status"); this.status = status; @@ -80,6 +83,7 @@ public ReportStatusResponse withStartTime(String startTime) { return this; } + /** * The timestamp at which the report's run/scan began. */ @@ -89,7 +93,6 @@ public ReportStatusResponse withStartTime(Optional startTime) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -107,8 +110,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - status, - startTime); + status, startTime); } @Override @@ -117,17 +119,19 @@ public String toString() { "status", status, "startTime", startTime); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional status = Optional.empty(); - + private Optional startTime = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder status(ReportStatusResponseStatus status) { Utils.checkNotNull(status, "status"); this.status = Optional.ofNullable(status); @@ -140,6 +144,7 @@ public Builder status(Optional status) { return this; } + /** * The timestamp at which the report's run/scan began. */ @@ -157,11 +162,12 @@ public Builder startTime(Optional startTime) { this.startTime = startTime; return this; } - + public ReportStatusResponse build() { + return new ReportStatusResponse( - status, - startTime); + status, startTime); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RestrictionFilters.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RestrictionFilters.java index b851e4c7..8a19e9ca 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/RestrictionFilters.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RestrictionFilters.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class RestrictionFilters { +public class RestrictionFilters { /** * Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections. */ @@ -44,9 +44,10 @@ public Optional> containerSpecs() { return (Optional>) containerSpecs; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections. @@ -57,6 +58,7 @@ public RestrictionFilters withContainerSpecs(List containerSp return this; } + /** * Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections. */ @@ -66,7 +68,6 @@ public RestrictionFilters withContainerSpecs(Optional> containerSpecs = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Specifications for containers that should be used as part of the restriction (include/exclude). Memberships are recursively defined for a subset of datasources (currently: SharePoint, OneDrive, Google Drive, and Confluence). Please contact the Glean team to enable this for more datasources. Recursive memberships do not apply for Collections. */ @@ -117,10 +120,12 @@ public Builder containerSpecs(Optional> contai this.containerSpecs = containerSpecs; return this; } - + public RestrictionFilters build() { + return new RestrictionFilters( containerSpecs); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultDocument.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultDocument.java index 0aa6aca2..af00d877 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultDocument.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultDocument.java @@ -13,12 +13,14 @@ import java.lang.String; import java.util.Optional; + public class ResultDocument { @JsonInclude(Include.NON_ABSENT) @JsonProperty("title") private Optional title; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("url") private Optional url; @@ -47,9 +49,10 @@ public Optional url() { return url; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ResultDocument withTitle(String title) { Utils.checkNotNull(title, "title"); @@ -57,6 +60,7 @@ public ResultDocument withTitle(String title) { return this; } + public ResultDocument withTitle(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; @@ -69,13 +73,13 @@ public ResultDocument withUrl(String url) { return this; } + public ResultDocument withUrl(Optional url) { Utils.checkNotNull(url, "url"); this.url = url; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -93,8 +97,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - title, - url); + title, url); } @Override @@ -103,17 +106,19 @@ public String toString() { "title", title, "url", url); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional title = Optional.empty(); - + private Optional url = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder title(String title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); @@ -126,6 +131,7 @@ public Builder title(Optional title) { return this; } + public Builder url(String url) { Utils.checkNotNull(url, "url"); this.url = Optional.ofNullable(url); @@ -137,11 +143,12 @@ public Builder url(Optional url) { this.url = url; return this; } - + public ResultDocument build() { + return new ResultDocument( - title, - url); + title, url); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultTab.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultTab.java index 9800a279..70e5a476 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultTab.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultTab.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class ResultTab { +public class ResultTab { /** * The unique ID of the tab. Can be passed in a search request to get results for that tab. */ @@ -61,7 +61,8 @@ public ResultTab( } public ResultTab() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -96,9 +97,10 @@ public Optional datasourceInstance() { return datasourceInstance; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique ID of the tab. Can be passed in a search request to get results for that tab. @@ -109,6 +111,7 @@ public ResultTab withId(String id) { return this; } + /** * The unique ID of the tab. Can be passed in a search request to get results for that tab. */ @@ -127,6 +130,7 @@ public ResultTab withCount(long count) { return this; } + /** * The number of results in this tab for the current query. */ @@ -145,6 +149,7 @@ public ResultTab withDatasource(String datasource) { return this; } + /** * The datasource associated with the tab, if any. */ @@ -163,6 +168,7 @@ public ResultTab withDatasourceInstance(String datasourceInstance) { return this; } + /** * The datasource instance associated with the tab, if any. */ @@ -172,7 +178,6 @@ public ResultTab withDatasourceInstance(Optional datasourceInstance) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -192,9 +197,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - count, - datasource, + id, count, datasource, datasourceInstance); } @@ -206,21 +209,23 @@ public String toString() { "datasource", datasource, "datasourceInstance", datasourceInstance); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Optional count = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional datasourceInstance = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The unique ID of the tab. Can be passed in a search request to get results for that tab. */ @@ -239,6 +244,7 @@ public Builder id(Optional id) { return this; } + /** * The number of results in this tab for the current query. */ @@ -257,6 +263,7 @@ public Builder count(Optional count) { return this; } + /** * The datasource associated with the tab, if any. */ @@ -275,6 +282,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * The datasource instance associated with the tab, if any. */ @@ -292,13 +300,13 @@ public Builder datasourceInstance(Optional datasourceInstance) { this.datasourceInstance = datasourceInstance; return this; } - + public ResultTab build() { + return new ResultTab( - id, - count, - datasource, + id, count, datasource, datasourceInstance); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultsDescription.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultsDescription.java index d67af31a..fe937fae 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultsDescription.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultsDescription.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class ResultsDescription { +public class ResultsDescription { /** * Textual description of the results. Can be shown at the top of SERP, e.g. 'People who write about this topic' for experts in people tab. */ @@ -61,9 +61,10 @@ public Optional iconConfig() { return (Optional) iconConfig; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Textual description of the results. Can be shown at the top of SERP, e.g. 'People who write about this topic' for experts in people tab. @@ -74,6 +75,7 @@ public ResultsDescription withText(String text) { return this; } + /** * Textual description of the results. Can be shown at the top of SERP, e.g. 'People who write about this topic' for experts in people tab. */ @@ -92,6 +94,7 @@ public ResultsDescription withIconConfig(IconConfig iconConfig) { return this; } + /** * Defines how to render an icon */ @@ -101,7 +104,6 @@ public ResultsDescription withIconConfig(Optional iconConf return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -119,8 +121,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - text, - iconConfig); + text, iconConfig); } @Override @@ -129,17 +130,19 @@ public String toString() { "text", text, "iconConfig", iconConfig); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional text = Optional.empty(); - + private Optional iconConfig = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Textual description of the results. Can be shown at the top of SERP, e.g. 'People who write about this topic' for experts in people tab. */ @@ -158,6 +161,7 @@ public Builder text(Optional text) { return this; } + /** * Defines how to render an icon */ @@ -175,11 +179,12 @@ public Builder iconConfig(Optional iconConfig) { this.iconConfig = iconConfig; return this; } - + public ResultsDescription build() { + return new ResultsDescription( - text, - iconConfig); + text, iconConfig); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultsResponse.java index 9de9798b..386b7b4c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ResultsResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class ResultsResponse { +public class ResultsResponse { /** * A token that should be passed for additional requests related to this request (such as more results requests). */ @@ -25,22 +25,27 @@ public class ResultsResponse { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sessionInfo") private Optional sessionInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("results") private Optional> results; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("structuredResults") private Optional> structuredResults; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("generatedQnaResult") private Optional generatedQnaResult; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("errorInfo") private Optional gleanDataError; @@ -88,7 +93,9 @@ public ResultsResponse( } public ResultsResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -145,9 +152,10 @@ public Optional backendTimeMillis() { return backendTimeMillis; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A token that should be passed for additional requests related to this request (such as more results requests). @@ -158,6 +166,7 @@ public ResultsResponse withTrackingToken(String trackingToken) { return this; } + /** * A token that should be passed for additional requests related to this request (such as more results requests). */ @@ -173,6 +182,7 @@ public ResultsResponse withSessionInfo(SessionInfo sessionInfo) { return this; } + public ResultsResponse withSessionInfo(Optional sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = sessionInfo; @@ -185,6 +195,7 @@ public ResultsResponse withResults(List results) { return this; } + public ResultsResponse withResults(Optional> results) { Utils.checkNotNull(results, "results"); this.results = results; @@ -197,6 +208,7 @@ public ResultsResponse withStructuredResults(List structuredRe return this; } + public ResultsResponse withStructuredResults(Optional> structuredResults) { Utils.checkNotNull(structuredResults, "structuredResults"); this.structuredResults = structuredResults; @@ -209,6 +221,7 @@ public ResultsResponse withGeneratedQnaResult(GeneratedQna generatedQnaResult) { return this; } + public ResultsResponse withGeneratedQnaResult(Optional generatedQnaResult) { Utils.checkNotNull(generatedQnaResult, "generatedQnaResult"); this.generatedQnaResult = generatedQnaResult; @@ -221,6 +234,7 @@ public ResultsResponse withGleanDataError(GleanDataError gleanDataError) { return this; } + public ResultsResponse withGleanDataError(Optional gleanDataError) { Utils.checkNotNull(gleanDataError, "gleanDataError"); this.gleanDataError = gleanDataError; @@ -236,6 +250,7 @@ public ResultsResponse withRequestID(String requestID) { return this; } + /** * A platform-generated request ID to correlate backend logs. */ @@ -254,6 +269,7 @@ public ResultsResponse withBackendTimeMillis(long backendTimeMillis) { return this; } + /** * Time in milliseconds the backend took to respond to the request. */ @@ -263,7 +279,6 @@ public ResultsResponse withBackendTimeMillis(Optional backendTimeMillis) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -287,14 +302,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - trackingToken, - sessionInfo, - results, - structuredResults, - generatedQnaResult, - gleanDataError, - requestID, - backendTimeMillis); + trackingToken, sessionInfo, results, + structuredResults, generatedQnaResult, gleanDataError, + requestID, backendTimeMillis); } @Override @@ -309,29 +319,31 @@ public String toString() { "requestID", requestID, "backendTimeMillis", backendTimeMillis); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional trackingToken = Optional.empty(); - + private Optional sessionInfo = Optional.empty(); - + private Optional> results = Optional.empty(); - + private Optional> structuredResults = Optional.empty(); - + private Optional generatedQnaResult = Optional.empty(); - + private Optional gleanDataError = Optional.empty(); - + private Optional requestID = Optional.empty(); - + private Optional backendTimeMillis = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A token that should be passed for additional requests related to this request (such as more results requests). */ @@ -350,6 +362,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder sessionInfo(SessionInfo sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = Optional.ofNullable(sessionInfo); @@ -362,6 +375,7 @@ public Builder sessionInfo(Optional sessionInfo) { return this; } + public Builder results(List results) { Utils.checkNotNull(results, "results"); this.results = Optional.ofNullable(results); @@ -374,6 +388,7 @@ public Builder results(Optional> results) { return this; } + public Builder structuredResults(List structuredResults) { Utils.checkNotNull(structuredResults, "structuredResults"); this.structuredResults = Optional.ofNullable(structuredResults); @@ -386,6 +401,7 @@ public Builder structuredResults(Optional> stru return this; } + public Builder generatedQnaResult(GeneratedQna generatedQnaResult) { Utils.checkNotNull(generatedQnaResult, "generatedQnaResult"); this.generatedQnaResult = Optional.ofNullable(generatedQnaResult); @@ -398,6 +414,7 @@ public Builder generatedQnaResult(Optional generatedQnaR return this; } + public Builder gleanDataError(GleanDataError gleanDataError) { Utils.checkNotNull(gleanDataError, "gleanDataError"); this.gleanDataError = Optional.ofNullable(gleanDataError); @@ -410,6 +427,7 @@ public Builder gleanDataError(Optional gleanDataError) return this; } + /** * A platform-generated request ID to correlate backend logs. */ @@ -428,6 +446,7 @@ public Builder requestID(Optional requestID) { return this; } + /** * Time in milliseconds the backend took to respond to the request. */ @@ -445,17 +464,14 @@ public Builder backendTimeMillis(Optional backendTimeMillis) { this.backendTimeMillis = backendTimeMillis; return this; } - + public ResultsResponse build() { + return new ResultsResponse( - trackingToken, - sessionInfo, - results, - structuredResults, - generatedQnaResult, - gleanDataError, - requestID, - backendTimeMillis); + trackingToken, sessionInfo, results, + structuredResults, generatedQnaResult, gleanDataError, + requestID, backendTimeMillis); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/RotateTokenResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/RotateTokenResponse.java index 1a26c6e2..28b4e171 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/RotateTokenResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/RotateTokenResponse.java @@ -20,7 +20,6 @@ *

Describes the response body of the /rotatetoken API call */ public class RotateTokenResponse { - /** * New raw secret */ @@ -83,9 +82,10 @@ public Optional rotationPeriodMinutes() { return rotationPeriodMinutes; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * New raw secret @@ -96,6 +96,7 @@ public RotateTokenResponse withRawSecret(String rawSecret) { return this; } + /** * New raw secret */ @@ -114,6 +115,7 @@ public RotateTokenResponse withCreatedAt(long createdAt) { return this; } + /** * Unix timestamp in seconds when the new secret value is assigned to the token. The token needs to be rotated before `rotationPeriodMinutes` past the createdAt timestamp otherwise it would be rendered unusable. */ @@ -132,6 +134,7 @@ public RotateTokenResponse withRotationPeriodMinutes(long rotationPeriodMinutes) return this; } + /** * Refers to the time period in minutes before which this token needs to be rotated. It is required to rotate the token within the specified `rotationPeriodMinutes` after each `/rotatetoken` call, otherwise the tokens would expire. Note that the token would still expire at `expiresAt` timestamp provided during token creation even if the token is being regularly rotated. `rotationPeriodMinutes` property is inherited from the parent token being rotated */ @@ -141,7 +144,6 @@ public RotateTokenResponse withRotationPeriodMinutes(Optional rotationPeri return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -160,9 +162,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - rawSecret, - createdAt, - rotationPeriodMinutes); + rawSecret, createdAt, rotationPeriodMinutes); } @Override @@ -172,19 +172,21 @@ public String toString() { "createdAt", createdAt, "rotationPeriodMinutes", rotationPeriodMinutes); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional rawSecret = Optional.empty(); - + private Optional createdAt = Optional.empty(); - + private Optional rotationPeriodMinutes = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * New raw secret */ @@ -203,6 +205,7 @@ public Builder rawSecret(Optional rawSecret) { return this; } + /** * Unix timestamp in seconds when the new secret value is assigned to the token. The token needs to be rotated before `rotationPeriodMinutes` past the createdAt timestamp otherwise it would be rendered unusable. */ @@ -221,6 +224,7 @@ public Builder createdAt(Optional createdAt) { return this; } + /** * Refers to the time period in minutes before which this token needs to be rotated. It is required to rotate the token within the specified `rotationPeriodMinutes` after each `/rotatetoken` call, otherwise the tokens would expire. Note that the token would still expire at `expiresAt` timestamp provided during token creation even if the token is being regularly rotated. `rotationPeriodMinutes` property is inherited from the parent token being rotated */ @@ -238,12 +242,12 @@ public Builder rotationPeriodMinutes(Optional rotationPeriodMinutes) { this.rotationPeriodMinutes = rotationPeriodMinutes; return this; } - + public RotateTokenResponse build() { + return new RotateTokenResponse( - rawSecret, - createdAt, - rotationPeriodMinutes); + rawSecret, createdAt, rotationPeriodMinutes); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchAgentsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchAgentsRequest.java index a33daf2f..da317b7b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchAgentsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchAgentsRequest.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class SearchAgentsRequest { +public class SearchAgentsRequest { /** * Filters on the name of the agent. The keyword search is case-insensitive. If search string is ommited or empty, acts as no filter. */ @@ -41,9 +41,10 @@ public Optional name() { return name; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Filters on the name of the agent. The keyword search is case-insensitive. If search string is ommited or empty, acts as no filter. @@ -54,6 +55,7 @@ public SearchAgentsRequest withName(String name) { return this; } + /** * Filters on the name of the agent. The keyword search is case-insensitive. If search string is ommited or empty, acts as no filter. */ @@ -63,7 +65,6 @@ public SearchAgentsRequest withName(Optional name) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(SearchAgentsRequest.class, "name", name); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Filters on the name of the agent. The keyword search is case-insensitive. If search string is ommited or empty, acts as no filter. */ @@ -114,10 +117,12 @@ public Builder name(Optional name) { this.name = name; return this; } - + public SearchAgentsRequest build() { + return new SearchAgentsRequest( name); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchAgentsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchAgentsResponse.java index b1893f24..f8e1aad1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchAgentsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchAgentsResponse.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class SearchAgentsResponse { @JsonInclude(Include.NON_ABSENT) @@ -38,9 +39,10 @@ public Optional> agents() { return (Optional>) agents; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public SearchAgentsResponse withAgents(List agents) { Utils.checkNotNull(agents, "agents"); @@ -48,13 +50,13 @@ public SearchAgentsResponse withAgents(List agents) { return this; } + public SearchAgentsResponse withAgents(Optional> agents) { Utils.checkNotNull(agents, "agents"); this.agents = agents; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -79,15 +81,17 @@ public String toString() { return Utils.toString(SearchAgentsResponse.class, "agents", agents); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> agents = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder agents(List agents) { Utils.checkNotNull(agents, "agents"); this.agents = Optional.ofNullable(agents); @@ -99,10 +103,12 @@ public Builder agents(Optional> agents) { this.agents = agents; return this; } - + public SearchAgentsResponse build() { + return new SearchAgentsResponse( agents); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchProviderInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchProviderInfo.java index 723e2a28..2f963067 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchProviderInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchProviderInfo.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class SearchProviderInfo { +public class SearchProviderInfo { /** * Name of the search provider. */ @@ -77,9 +77,10 @@ public Optional searchLinkUrlTemplate() { return searchLinkUrlTemplate; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Name of the search provider. @@ -90,6 +91,7 @@ public SearchProviderInfo withName(String name) { return this; } + /** * Name of the search provider. */ @@ -108,6 +110,7 @@ public SearchProviderInfo withLogoUrl(String logoUrl) { return this; } + /** * URL to the provider's logo. */ @@ -126,6 +129,7 @@ public SearchProviderInfo withSearchLinkUrlTemplate(String searchLinkUrlTemplate return this; } + /** * URL template that can be used to perform the suggested search by replacing the {query} placeholder with the query suggestion. */ @@ -135,7 +139,6 @@ public SearchProviderInfo withSearchLinkUrlTemplate(Optional searchLinkU return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -154,9 +157,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - logoUrl, - searchLinkUrlTemplate); + name, logoUrl, searchLinkUrlTemplate); } @Override @@ -166,19 +167,21 @@ public String toString() { "logoUrl", logoUrl, "searchLinkUrlTemplate", searchLinkUrlTemplate); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional logoUrl = Optional.empty(); - + private Optional searchLinkUrlTemplate = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Name of the search provider. */ @@ -197,6 +200,7 @@ public Builder name(Optional name) { return this; } + /** * URL to the provider's logo. */ @@ -215,6 +219,7 @@ public Builder logoUrl(Optional logoUrl) { return this; } + /** * URL template that can be used to perform the suggested search by replacing the {query} placeholder with the query suggestion. */ @@ -232,12 +237,12 @@ public Builder searchLinkUrlTemplate(Optional searchLinkUrlTemplate) { this.searchLinkUrlTemplate = searchLinkUrlTemplate; return this; } - + public SearchProviderInfo build() { + return new SearchProviderInfo( - name, - logoUrl, - searchLinkUrlTemplate); + name, logoUrl, searchLinkUrlTemplate); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequest.java index 40021ca2..f3fbbc50 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequest.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Optional; -public class SearchRequest { +public class SearchRequest { /** * The ISO 8601 timestamp associated with the client request. */ @@ -34,10 +34,12 @@ public class SearchRequest { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sessionInfo") private Optional sessionInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceDocument") private Optional sourceDocument; @@ -76,10 +78,12 @@ public class SearchRequest { @JsonProperty("resultTabIds") private Optional> resultTabIds; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("inputDetails") private Optional inputDetails; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("requestOptions") private Optional requestOptions; @@ -153,7 +157,11 @@ public SearchRequest( public SearchRequest( String query) { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), query, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + query, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -262,9 +270,10 @@ public Optional disableSpellcheck() { return disableSpellcheck; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ISO 8601 timestamp associated with the client request. @@ -275,6 +284,7 @@ public SearchRequest withTimestamp(OffsetDateTime timestamp) { return this; } + /** * The ISO 8601 timestamp associated with the client request. */ @@ -293,6 +303,7 @@ public SearchRequest withTrackingToken(String trackingToken) { return this; } + /** * A previously received trackingToken for a search associated with the same query. Useful for more requests and requests for other tabs. */ @@ -308,6 +319,7 @@ public SearchRequest withSessionInfo(SessionInfo sessionInfo) { return this; } + public SearchRequest withSessionInfo(Optional sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = sessionInfo; @@ -320,6 +332,7 @@ public SearchRequest withSourceDocument(Document sourceDocument) { return this; } + public SearchRequest withSourceDocument(Optional sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = sourceDocument; @@ -335,6 +348,7 @@ public SearchRequest withPageSize(long pageSize) { return this; } + /** * Hint to the server about how many results to send back. Server may return less or more. Structured results and clustered results don't count towards pageSize. */ @@ -353,6 +367,7 @@ public SearchRequest withMaxSnippetSize(long maxSnippetSize) { return this; } + /** * Hint to the server about how many characters long a snippet may be. Server may return less or more. */ @@ -380,6 +395,7 @@ public SearchRequest withCursor(String cursor) { return this; } + /** * Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. */ @@ -398,6 +414,7 @@ public SearchRequest withResultTabIds(List resultTabIds) { return this; } + /** * The unique IDs of the result tabs for which to fetch results. This will have precedence over datasource filters if both are specified and in conflict. */ @@ -413,6 +430,7 @@ public SearchRequest withInputDetails(SearchRequestInputDetails inputDetails) { return this; } + public SearchRequest withInputDetails(Optional inputDetails) { Utils.checkNotNull(inputDetails, "inputDetails"); this.inputDetails = inputDetails; @@ -425,6 +443,7 @@ public SearchRequest withRequestOptions(SearchRequestOptions requestOptions) { return this; } + public SearchRequest withRequestOptions(Optional requestOptions) { Utils.checkNotNull(requestOptions, "requestOptions"); this.requestOptions = requestOptions; @@ -440,6 +459,7 @@ public SearchRequest withTimeoutMillis(long timeoutMillis) { return this; } + /** * Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. */ @@ -458,6 +478,7 @@ public SearchRequest withPeople(List people) { return this; } + /** * People associated with the search request. Hints to the server to fetch additional information for these people. Note that in this request, an email may be used as a person's obfuscatedId value. */ @@ -476,6 +497,7 @@ public SearchRequest withDisableSpellcheck(boolean disableSpellcheck) { return this; } + /** * Whether or not to disable spellcheck. */ @@ -485,7 +507,6 @@ public SearchRequest withDisableSpellcheck(Optional disableSpellcheck) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -515,20 +536,11 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timestamp, - trackingToken, - sessionInfo, - sourceDocument, - pageSize, - maxSnippetSize, - query, - cursor, - resultTabIds, - inputDetails, - requestOptions, - timeoutMillis, - people, - disableSpellcheck); + timestamp, trackingToken, sessionInfo, + sourceDocument, pageSize, maxSnippetSize, + query, cursor, resultTabIds, + inputDetails, requestOptions, timeoutMillis, + people, disableSpellcheck); } @Override @@ -549,41 +561,43 @@ public String toString() { "people", people, "disableSpellcheck", disableSpellcheck); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timestamp = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional sessionInfo = Optional.empty(); - + private Optional sourceDocument = Optional.empty(); - + private Optional pageSize = Optional.empty(); - + private Optional maxSnippetSize = Optional.empty(); - + private String query; - + private Optional cursor = Optional.empty(); - + private Optional> resultTabIds = Optional.empty(); - + private Optional inputDetails = Optional.empty(); - + private Optional requestOptions = Optional.empty(); - + private Optional timeoutMillis = Optional.empty(); - + private Optional> people = Optional.empty(); - + private Optional disableSpellcheck = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ISO 8601 timestamp associated with the client request. */ @@ -602,6 +616,7 @@ public Builder timestamp(Optional timestamp) { return this; } + /** * A previously received trackingToken for a search associated with the same query. Useful for more requests and requests for other tabs. */ @@ -620,6 +635,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder sessionInfo(SessionInfo sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = Optional.ofNullable(sessionInfo); @@ -632,6 +648,7 @@ public Builder sessionInfo(Optional sessionInfo) { return this; } + public Builder sourceDocument(Document sourceDocument) { Utils.checkNotNull(sourceDocument, "sourceDocument"); this.sourceDocument = Optional.ofNullable(sourceDocument); @@ -644,6 +661,7 @@ public Builder sourceDocument(Optional sourceDocument) { return this; } + /** * Hint to the server about how many results to send back. Server may return less or more. Structured results and clustered results don't count towards pageSize. */ @@ -662,6 +680,7 @@ public Builder pageSize(Optional pageSize) { return this; } + /** * Hint to the server about how many characters long a snippet may be. Server may return less or more. */ @@ -680,6 +699,7 @@ public Builder maxSnippetSize(Optional maxSnippetSize) { return this; } + /** * The search terms. */ @@ -689,6 +709,7 @@ public Builder query(String query) { return this; } + /** * Pagination cursor. A previously received opaque token representing the position in the overall results at which to start. */ @@ -707,6 +728,7 @@ public Builder cursor(Optional cursor) { return this; } + /** * The unique IDs of the result tabs for which to fetch results. This will have precedence over datasource filters if both are specified and in conflict. */ @@ -725,6 +747,7 @@ public Builder resultTabIds(Optional> resultTabIds) { return this; } + public Builder inputDetails(SearchRequestInputDetails inputDetails) { Utils.checkNotNull(inputDetails, "inputDetails"); this.inputDetails = Optional.ofNullable(inputDetails); @@ -737,6 +760,7 @@ public Builder inputDetails(Optional inputD return this; } + public Builder requestOptions(SearchRequestOptions requestOptions) { Utils.checkNotNull(requestOptions, "requestOptions"); this.requestOptions = Optional.ofNullable(requestOptions); @@ -749,6 +773,7 @@ public Builder requestOptions(Optional requestOp return this; } + /** * Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. */ @@ -767,6 +792,7 @@ public Builder timeoutMillis(Optional timeoutMillis) { return this; } + /** * People associated with the search request. Hints to the server to fetch additional information for these people. Note that in this request, an email may be used as a person's obfuscatedId value. */ @@ -785,6 +811,7 @@ public Builder people(Optional> people) { return this; } + /** * Whether or not to disable spellcheck. */ @@ -802,23 +829,16 @@ public Builder disableSpellcheck(Optional disableSpellcheck) { this.disableSpellcheck = disableSpellcheck; return this; } - + public SearchRequest build() { + return new SearchRequest( - timestamp, - trackingToken, - sessionInfo, - sourceDocument, - pageSize, - maxSnippetSize, - query, - cursor, - resultTabIds, - inputDetails, - requestOptions, - timeoutMillis, - people, - disableSpellcheck); + timestamp, trackingToken, sessionInfo, + sourceDocument, pageSize, maxSnippetSize, + query, cursor, resultTabIds, + inputDetails, requestOptions, timeoutMillis, + people, disableSpellcheck); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequestInputDetails.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequestInputDetails.java index dcc16ed3..49cd74d5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequestInputDetails.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequestInputDetails.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class SearchRequestInputDetails { +public class SearchRequestInputDetails { /** * Whether the associated query was at least partially copy-pasted. If subsequent requests are issued after a copy-pasted query is constructed (e.g. with facet modifications), this bit should continue to be set for those requests. */ @@ -42,9 +42,10 @@ public Optional hasCopyPaste() { return hasCopyPaste; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Whether the associated query was at least partially copy-pasted. If subsequent requests are issued after a copy-pasted query is constructed (e.g. with facet modifications), this bit should continue to be set for those requests. @@ -55,6 +56,7 @@ public SearchRequestInputDetails withHasCopyPaste(boolean hasCopyPaste) { return this; } + /** * Whether the associated query was at least partially copy-pasted. If subsequent requests are issued after a copy-pasted query is constructed (e.g. with facet modifications), this bit should continue to be set for those requests. */ @@ -64,7 +66,6 @@ public SearchRequestInputDetails withHasCopyPaste(Optional hasCopyPaste return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -89,15 +90,17 @@ public String toString() { return Utils.toString(SearchRequestInputDetails.class, "hasCopyPaste", hasCopyPaste); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional hasCopyPaste = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Whether the associated query was at least partially copy-pasted. If subsequent requests are issued after a copy-pasted query is constructed (e.g. with facet modifications), this bit should continue to be set for those requests. */ @@ -115,10 +118,12 @@ public Builder hasCopyPaste(Optional hasCopyPaste) { this.hasCopyPaste = hasCopyPaste; return this; } - + public SearchRequestInputDetails build() { + return new SearchRequestInputDetails( hasCopyPaste); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequestOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequestOptions.java index e05d9ce6..e2a1867b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequestOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchRequestOptions.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class SearchRequestOptions { +public class SearchRequestOptions { /** * Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. */ @@ -54,6 +54,7 @@ public class SearchRequestOptions { @JsonProperty("facetFilterSets") private Optional> facetFilterSets; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("facetBucketFilter") private Optional facetBucketFilter; @@ -120,10 +121,12 @@ public class SearchRequestOptions { @JsonProperty("returnLlmContentOverSnippets") private Optional returnLlmContentOverSnippets; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("inclusions") private Optional inclusions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("exclusions") private Optional exclusions; @@ -185,7 +188,12 @@ public SearchRequestOptions( public SearchRequestOptions( long facetBucketSize) { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), facetBucketSize, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + facetBucketSize, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -324,9 +332,10 @@ public Optional exclusions() { return (Optional) exclusions; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. @@ -337,6 +346,7 @@ public SearchRequestOptions withDatasourceFilter(String datasourceFilter) { return this; } + /** * Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. */ @@ -355,6 +365,7 @@ public SearchRequestOptions withDatasourcesFilter(List datasourcesFilter return this; } + /** * Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. */ @@ -373,6 +384,7 @@ public SearchRequestOptions withQueryOverridesFacetFilters(boolean queryOverride return this; } + /** * If true, the operators in the query are taken to override any operators in facetFilters in the case of conflict. This is used to correctly set rewrittenFacetFilters and rewrittenQuery. */ @@ -391,6 +403,7 @@ public SearchRequestOptions withFacetFilters(List facetFilters) { return this; } + /** * A list of filters for the query. An AND is assumed between different facetFilters. For example, owner Sumeet and type Spreadsheet shows documents that are by Sumeet AND are Spreadsheets. */ @@ -409,6 +422,7 @@ public SearchRequestOptions withFacetFilterSets(List facetFilter return this; } + /** * A list of facet filter sets that will be OR'ed together. SearchRequestOptions where both facetFilterSets and facetFilters set are considered as bad request. Callers should set only one of these fields. */ @@ -424,6 +438,7 @@ public SearchRequestOptions withFacetBucketFilter(FacetBucketFilter facetBucketF return this; } + public SearchRequestOptions withFacetBucketFilter(Optional facetBucketFilter) { Utils.checkNotNull(facetBucketFilter, "facetBucketFilter"); this.facetBucketFilter = facetBucketFilter; @@ -448,6 +463,7 @@ public SearchRequestOptions withDefaultFacets(List defaultFacets) { return this; } + /** * Facets for which FacetResults should be fetched and that don't apply to a particular datasource. If specified, these values will replace the standard default facets (last_updated_at, from, etc.). The requested facets will be returned alongside datasource-specific facets if searching a single datasource. */ @@ -466,6 +482,7 @@ public SearchRequestOptions withAuthTokens(List authTokens) { return this; } + /** * Auth tokens which may be used for non-indexed, federated results (e.g. Gmail). */ @@ -484,6 +501,7 @@ public SearchRequestOptions withFetchAllDatasourceCounts(boolean fetchAllDatasou return this; } + /** * Hints that the QE should return result counts (via the datasource facet result) for all supported datasources, rather than just those specified in the datasource[s]Filter */ @@ -502,6 +520,7 @@ public SearchRequestOptions withResponseHints(List responseHints) return this; } + /** * Array of hints containing which fields should be populated in the response. */ @@ -520,6 +539,7 @@ public SearchRequestOptions withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -538,6 +558,7 @@ public SearchRequestOptions withDisableSpellcheck(boolean disableSpellcheck) { return this; } + /** * Whether or not to disable spellcheck. */ @@ -556,6 +577,7 @@ public SearchRequestOptions withDisableQueryAutocorrect(boolean disableQueryAuto return this; } + /** * Disables automatic adjustment of the input query for spelling corrections or other reasons. */ @@ -574,6 +596,7 @@ public SearchRequestOptions withReturnLlmContentOverSnippets(boolean returnLlmCo return this; } + /** * [beta] Enables expanded content to be returned for LLM usage. The size of content per result returned should be modified using maxSnippetSize. Server may return less or more than what is specified in maxSnippetSize. For more details, https://docs.google.com/document/d/1CTOLSxWWT9WDEnHVLoCUaxbGYyXYP8kctPRF-RluSQY/edit. Requires sufficient permissions. */ @@ -589,6 +612,7 @@ public SearchRequestOptions withInclusions(RestrictionFilters inclusions) { return this; } + public SearchRequestOptions withInclusions(Optional inclusions) { Utils.checkNotNull(inclusions, "inclusions"); this.inclusions = inclusions; @@ -601,13 +625,13 @@ public SearchRequestOptions withExclusions(RestrictionFilters exclusions) { return this; } + public SearchRequestOptions withExclusions(Optional exclusions) { Utils.checkNotNull(exclusions, "exclusions"); this.exclusions = exclusions; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -640,23 +664,12 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasourceFilter, - datasourcesFilter, - queryOverridesFacetFilters, - facetFilters, - facetFilterSets, - facetBucketFilter, - facetBucketSize, - defaultFacets, - authTokens, - fetchAllDatasourceCounts, - responseHints, - timezoneOffset, - disableSpellcheck, - disableQueryAutocorrect, - returnLlmContentOverSnippets, - inclusions, - exclusions); + datasourceFilter, datasourcesFilter, queryOverridesFacetFilters, + facetFilters, facetFilterSets, facetBucketFilter, + facetBucketSize, defaultFacets, authTokens, + fetchAllDatasourceCounts, responseHints, timezoneOffset, + disableSpellcheck, disableQueryAutocorrect, returnLlmContentOverSnippets, + inclusions, exclusions); } @Override @@ -680,47 +693,49 @@ public String toString() { "inclusions", inclusions, "exclusions", exclusions); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional datasourceFilter = Optional.empty(); - + private Optional> datasourcesFilter = Optional.empty(); - + private Optional queryOverridesFacetFilters = Optional.empty(); - + private Optional> facetFilters = Optional.empty(); - + private Optional> facetFilterSets = Optional.empty(); - + private Optional facetBucketFilter = Optional.empty(); - + private Long facetBucketSize; - + private Optional> defaultFacets = Optional.empty(); - + private Optional> authTokens = Optional.empty(); - + private Optional fetchAllDatasourceCounts = Optional.empty(); - + private Optional> responseHints = Optional.empty(); - + private Optional timezoneOffset = Optional.empty(); - + private Optional disableSpellcheck = Optional.empty(); - + private Optional disableQueryAutocorrect = Optional.empty(); - + private Optional returnLlmContentOverSnippets = Optional.empty(); - + private Optional inclusions = Optional.empty(); - + private Optional exclusions = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Filter results to a single datasource name (e.g. gmail, slack). All results are returned if missing. */ @@ -739,6 +754,7 @@ public Builder datasourceFilter(Optional datasourceFilter) { return this; } + /** * Filter results to one or more datasources (e.g. gmail, slack). All results are returned if missing. */ @@ -757,6 +773,7 @@ public Builder datasourcesFilter(Optional> datasourcesFil return this; } + /** * If true, the operators in the query are taken to override any operators in facetFilters in the case of conflict. This is used to correctly set rewrittenFacetFilters and rewrittenQuery. */ @@ -775,6 +792,7 @@ public Builder queryOverridesFacetFilters(Optional queryOverridesFacetF return this; } + /** * A list of filters for the query. An AND is assumed between different facetFilters. For example, owner Sumeet and type Spreadsheet shows documents that are by Sumeet AND are Spreadsheets. */ @@ -793,6 +811,7 @@ public Builder facetFilters(Optional> facetFilters) return this; } + /** * A list of facet filter sets that will be OR'ed together. SearchRequestOptions where both facetFilterSets and facetFilters set are considered as bad request. Callers should set only one of these fields. */ @@ -811,6 +830,7 @@ public Builder facetFilterSets(Optional> facetFil return this; } + public Builder facetBucketFilter(FacetBucketFilter facetBucketFilter) { Utils.checkNotNull(facetBucketFilter, "facetBucketFilter"); this.facetBucketFilter = Optional.ofNullable(facetBucketFilter); @@ -823,6 +843,7 @@ public Builder facetBucketFilter(Optional facetBuck return this; } + /** * The maximum number of FacetBuckets to return in each FacetResult. */ @@ -832,6 +853,7 @@ public Builder facetBucketSize(long facetBucketSize) { return this; } + /** * Facets for which FacetResults should be fetched and that don't apply to a particular datasource. If specified, these values will replace the standard default facets (last_updated_at, from, etc.). The requested facets will be returned alongside datasource-specific facets if searching a single datasource. */ @@ -850,6 +872,7 @@ public Builder defaultFacets(Optional> defaultFacets) { return this; } + /** * Auth tokens which may be used for non-indexed, federated results (e.g. Gmail). */ @@ -868,6 +891,7 @@ public Builder authTokens(Optional> authTokens) { return this; } + /** * Hints that the QE should return result counts (via the datasource facet result) for all supported datasources, rather than just those specified in the datasource[s]Filter */ @@ -886,6 +910,7 @@ public Builder fetchAllDatasourceCounts(Optional fetchAllDatasourceCoun return this; } + /** * Array of hints containing which fields should be populated in the response. */ @@ -904,6 +929,7 @@ public Builder responseHints(Optional> responseHint return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -922,6 +948,7 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + /** * Whether or not to disable spellcheck. */ @@ -940,6 +967,7 @@ public Builder disableSpellcheck(Optional disableSpellcheck) { return this; } + /** * Disables automatic adjustment of the input query for spelling corrections or other reasons. */ @@ -958,6 +986,7 @@ public Builder disableQueryAutocorrect(Optional disableQueryAutocorrect return this; } + /** * [beta] Enables expanded content to be returned for LLM usage. The size of content per result returned should be modified using maxSnippetSize. Server may return less or more than what is specified in maxSnippetSize. For more details, https://docs.google.com/document/d/1CTOLSxWWT9WDEnHVLoCUaxbGYyXYP8kctPRF-RluSQY/edit. Requires sufficient permissions. */ @@ -976,6 +1005,7 @@ public Builder returnLlmContentOverSnippets(Optional returnLlmContentOv return this; } + public Builder inclusions(RestrictionFilters inclusions) { Utils.checkNotNull(inclusions, "inclusions"); this.inclusions = Optional.ofNullable(inclusions); @@ -988,6 +1018,7 @@ public Builder inclusions(Optional inclusions) { return this; } + public Builder exclusions(RestrictionFilters exclusions) { Utils.checkNotNull(exclusions, "exclusions"); this.exclusions = Optional.ofNullable(exclusions); @@ -999,26 +1030,17 @@ public Builder exclusions(Optional exclusions) { this.exclusions = exclusions; return this; } - + public SearchRequestOptions build() { + return new SearchRequestOptions( - datasourceFilter, - datasourcesFilter, - queryOverridesFacetFilters, - facetFilters, - facetFilterSets, - facetBucketFilter, - facetBucketSize, - defaultFacets, - authTokens, - fetchAllDatasourceCounts, - responseHints, - timezoneOffset, - disableSpellcheck, - disableQueryAutocorrect, - returnLlmContentOverSnippets, - inclusions, - exclusions); + datasourceFilter, datasourcesFilter, queryOverridesFacetFilters, + facetFilters, facetFilterSets, facetBucketFilter, + facetBucketSize, defaultFacets, authTokens, + fetchAllDatasourceCounts, responseHints, timezoneOffset, + disableSpellcheck, disableQueryAutocorrect, returnLlmContentOverSnippets, + inclusions, exclusions); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResponse.java index 4571eb84..968d4890 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResponse.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class SearchResponse { +public class SearchResponse { /** * A token that should be passed for additional requests related to this request (such as more results requests). */ @@ -26,22 +26,27 @@ public class SearchResponse { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sessionInfo") private Optional sessionInfo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("results") private Optional> results; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("structuredResults") private Optional> structuredResults; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("generatedQnaResult") private Optional generatedQnaResult; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("errorInfo") private Optional gleanDataError; @@ -67,10 +72,12 @@ public class SearchResponse { @JsonProperty("experimentIds") private Optional> experimentIds; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("metadata") private Optional metadata; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("facetResults") private Optional> facetResults; @@ -89,6 +96,7 @@ public class SearchResponse { @JsonProperty("resultTabIds") private Optional> resultTabIds; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("resultsDescription") private Optional resultsDescription; @@ -170,7 +178,12 @@ public SearchResponse( } public SearchResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -297,9 +310,10 @@ public Optional hasMoreResults() { return hasMoreResults; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A token that should be passed for additional requests related to this request (such as more results requests). @@ -310,6 +324,7 @@ public SearchResponse withTrackingToken(String trackingToken) { return this; } + /** * A token that should be passed for additional requests related to this request (such as more results requests). */ @@ -325,6 +340,7 @@ public SearchResponse withSessionInfo(SessionInfo sessionInfo) { return this; } + public SearchResponse withSessionInfo(Optional sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = sessionInfo; @@ -337,6 +353,7 @@ public SearchResponse withResults(List results) { return this; } + public SearchResponse withResults(Optional> results) { Utils.checkNotNull(results, "results"); this.results = results; @@ -349,6 +366,7 @@ public SearchResponse withStructuredResults(List structuredRes return this; } + public SearchResponse withStructuredResults(Optional> structuredResults) { Utils.checkNotNull(structuredResults, "structuredResults"); this.structuredResults = structuredResults; @@ -361,6 +379,7 @@ public SearchResponse withGeneratedQnaResult(GeneratedQna generatedQnaResult) { return this; } + public SearchResponse withGeneratedQnaResult(Optional generatedQnaResult) { Utils.checkNotNull(generatedQnaResult, "generatedQnaResult"); this.generatedQnaResult = generatedQnaResult; @@ -373,6 +392,7 @@ public SearchResponse withGleanDataError(GleanDataError gleanDataError) { return this; } + public SearchResponse withGleanDataError(Optional gleanDataError) { Utils.checkNotNull(gleanDataError, "gleanDataError"); this.gleanDataError = gleanDataError; @@ -388,6 +408,7 @@ public SearchResponse withRequestID(String requestID) { return this; } + /** * A platform-generated request ID to correlate backend logs. */ @@ -406,6 +427,7 @@ public SearchResponse withBackendTimeMillis(long backendTimeMillis) { return this; } + /** * Time in milliseconds the backend took to respond to the request. */ @@ -424,6 +446,7 @@ public SearchResponse withExperimentIds(List experimentIds) { return this; } + /** * List of experiment ids for the corresponding request. */ @@ -439,6 +462,7 @@ public SearchResponse withMetadata(SearchResponseMetadata metadata) { return this; } + public SearchResponse withMetadata(Optional metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; @@ -451,6 +475,7 @@ public SearchResponse withFacetResults(List facetResults) { return this; } + public SearchResponse withFacetResults(Optional> facetResults) { Utils.checkNotNull(facetResults, "facetResults"); this.facetResults = facetResults; @@ -466,6 +491,7 @@ public SearchResponse withResultTabs(List resultTabs) { return this; } + /** * All result tabs available for the current query. Populated if QUERY_METADATA is specified in the request. */ @@ -484,6 +510,7 @@ public SearchResponse withResultTabIds(List resultTabIds) { return this; } + /** * The unique IDs of the result tabs to which this response belongs. */ @@ -499,6 +526,7 @@ public SearchResponse withResultsDescription(ResultsDescription resultsDescripti return this; } + public SearchResponse withResultsDescription(Optional resultsDescription) { Utils.checkNotNull(resultsDescription, "resultsDescription"); this.resultsDescription = resultsDescription; @@ -514,6 +542,7 @@ public SearchResponse withRewrittenFacetFilters(List rewrittenFacet return this; } + /** * The actual applied facet filters based on the operators and facetFilters in the query. Useful for mapping typed operators to visual facets. */ @@ -532,6 +561,7 @@ public SearchResponse withCursor(String cursor) { return this; } + /** * Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. */ @@ -550,6 +580,7 @@ public SearchResponse withHasMoreResults(boolean hasMoreResults) { return this; } + /** * Whether more results are available. Use cursor to retrieve them. */ @@ -559,7 +590,6 @@ public SearchResponse withHasMoreResults(Optional hasMoreResults) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -592,23 +622,12 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - trackingToken, - sessionInfo, - results, - structuredResults, - generatedQnaResult, - gleanDataError, - requestID, - backendTimeMillis, - experimentIds, - metadata, - facetResults, - resultTabs, - resultTabIds, - resultsDescription, - rewrittenFacetFilters, - cursor, - hasMoreResults); + trackingToken, sessionInfo, results, + structuredResults, generatedQnaResult, gleanDataError, + requestID, backendTimeMillis, experimentIds, + metadata, facetResults, resultTabs, + resultTabIds, resultsDescription, rewrittenFacetFilters, + cursor, hasMoreResults); } @Override @@ -632,47 +651,49 @@ public String toString() { "cursor", cursor, "hasMoreResults", hasMoreResults); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional trackingToken = Optional.empty(); - + private Optional sessionInfo = Optional.empty(); - + private Optional> results = Optional.empty(); - + private Optional> structuredResults = Optional.empty(); - + private Optional generatedQnaResult = Optional.empty(); - + private Optional gleanDataError = Optional.empty(); - + private Optional requestID = Optional.empty(); - + private Optional backendTimeMillis = Optional.empty(); - + private Optional> experimentIds = Optional.empty(); - + private Optional metadata = Optional.empty(); - + private Optional> facetResults = Optional.empty(); - + private Optional> resultTabs = Optional.empty(); - + private Optional> resultTabIds = Optional.empty(); - + private Optional resultsDescription = Optional.empty(); - + private Optional> rewrittenFacetFilters = Optional.empty(); - + private Optional cursor = Optional.empty(); - + private Optional hasMoreResults = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A token that should be passed for additional requests related to this request (such as more results requests). */ @@ -691,6 +712,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder sessionInfo(SessionInfo sessionInfo) { Utils.checkNotNull(sessionInfo, "sessionInfo"); this.sessionInfo = Optional.ofNullable(sessionInfo); @@ -703,6 +725,7 @@ public Builder sessionInfo(Optional sessionInfo) { return this; } + public Builder results(List results) { Utils.checkNotNull(results, "results"); this.results = Optional.ofNullable(results); @@ -715,6 +738,7 @@ public Builder results(Optional> results) { return this; } + public Builder structuredResults(List structuredResults) { Utils.checkNotNull(structuredResults, "structuredResults"); this.structuredResults = Optional.ofNullable(structuredResults); @@ -727,6 +751,7 @@ public Builder structuredResults(Optional> stru return this; } + public Builder generatedQnaResult(GeneratedQna generatedQnaResult) { Utils.checkNotNull(generatedQnaResult, "generatedQnaResult"); this.generatedQnaResult = Optional.ofNullable(generatedQnaResult); @@ -739,6 +764,7 @@ public Builder generatedQnaResult(Optional generatedQnaR return this; } + public Builder gleanDataError(GleanDataError gleanDataError) { Utils.checkNotNull(gleanDataError, "gleanDataError"); this.gleanDataError = Optional.ofNullable(gleanDataError); @@ -751,6 +777,7 @@ public Builder gleanDataError(Optional gleanDataError) return this; } + /** * A platform-generated request ID to correlate backend logs. */ @@ -769,6 +796,7 @@ public Builder requestID(Optional requestID) { return this; } + /** * Time in milliseconds the backend took to respond to the request. */ @@ -787,6 +815,7 @@ public Builder backendTimeMillis(Optional backendTimeMillis) { return this; } + /** * List of experiment ids for the corresponding request. */ @@ -805,6 +834,7 @@ public Builder experimentIds(Optional> experimentIds) { return this; } + public Builder metadata(SearchResponseMetadata metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = Optional.ofNullable(metadata); @@ -817,6 +847,7 @@ public Builder metadata(Optional metadata) { return this; } + public Builder facetResults(List facetResults) { Utils.checkNotNull(facetResults, "facetResults"); this.facetResults = Optional.ofNullable(facetResults); @@ -829,6 +860,7 @@ public Builder facetResults(Optional> facetResults) return this; } + /** * All result tabs available for the current query. Populated if QUERY_METADATA is specified in the request. */ @@ -847,6 +879,7 @@ public Builder resultTabs(Optional> resultTabs) { return this; } + /** * The unique IDs of the result tabs to which this response belongs. */ @@ -865,6 +898,7 @@ public Builder resultTabIds(Optional> resultTabIds) { return this; } + public Builder resultsDescription(ResultsDescription resultsDescription) { Utils.checkNotNull(resultsDescription, "resultsDescription"); this.resultsDescription = Optional.ofNullable(resultsDescription); @@ -877,6 +911,7 @@ public Builder resultsDescription(Optional results return this; } + /** * The actual applied facet filters based on the operators and facetFilters in the query. Useful for mapping typed operators to visual facets. */ @@ -895,6 +930,7 @@ public Builder rewrittenFacetFilters(Optional> rewri return this; } + /** * Cursor that indicates the start of the next page of results. To be passed in "more" requests for this query. */ @@ -913,6 +949,7 @@ public Builder cursor(Optional cursor) { return this; } + /** * Whether more results are available. Use cursor to retrieve them. */ @@ -930,26 +967,17 @@ public Builder hasMoreResults(Optional hasMoreResults) { this.hasMoreResults = hasMoreResults; return this; } - + public SearchResponse build() { + return new SearchResponse( - trackingToken, - sessionInfo, - results, - structuredResults, - generatedQnaResult, - gleanDataError, - requestID, - backendTimeMillis, - experimentIds, - metadata, - facetResults, - resultTabs, - resultTabIds, - resultsDescription, - rewrittenFacetFilters, - cursor, - hasMoreResults); + trackingToken, sessionInfo, results, + structuredResults, generatedQnaResult, gleanDataError, + requestID, backendTimeMillis, experimentIds, + metadata, facetResults, resultTabs, + resultTabIds, resultsDescription, rewrittenFacetFilters, + cursor, hasMoreResults); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResponseMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResponseMetadata.java index fbabe1e3..cbdd739e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResponseMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResponseMetadata.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class SearchResponseMetadata { +public class SearchResponseMetadata { /** * A cleaned up or updated version of the query to be displayed in the query box. Useful for mapping visual facets to search operators. */ @@ -46,10 +46,12 @@ public class SearchResponseMetadata { @JsonProperty("originalQuery") private Optional originalQuery; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("querySuggestion") private Optional querySuggestion; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("additionalQuerySuggestions") private Optional additionalQuerySuggestions; @@ -75,6 +77,7 @@ public class SearchResponseMetadata { @JsonProperty("originalQueryHadNoResults") private Optional originalQueryHadNoResults; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("searchWarning") private Optional searchWarning; @@ -134,7 +137,10 @@ public SearchResponseMetadata( } public SearchResponseMetadata() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -229,9 +235,10 @@ public Optional isNoQuotesSuggestion() { return isNoQuotesSuggestion; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A cleaned up or updated version of the query to be displayed in the query box. Useful for mapping visual facets to search operators. @@ -242,6 +249,7 @@ public SearchResponseMetadata withRewrittenQuery(String rewrittenQuery) { return this; } + /** * A cleaned up or updated version of the query to be displayed in the query box. Useful for mapping visual facets to search operators. */ @@ -260,6 +268,7 @@ public SearchResponseMetadata withSearchedQuery(String searchedQuery) { return this; } + /** * The actual query used to perform search and return results. */ @@ -278,6 +287,7 @@ public SearchResponseMetadata withSearchedQueryRanges(List searchedQu return this; } + /** * The bolded ranges within the searched query. */ @@ -296,6 +306,7 @@ public SearchResponseMetadata withOriginalQuery(String originalQuery) { return this; } + /** * The query text sent by the client in the request. */ @@ -311,6 +322,7 @@ public SearchResponseMetadata withQuerySuggestion(QuerySuggestion querySuggestio return this; } + public SearchResponseMetadata withQuerySuggestion(Optional querySuggestion) { Utils.checkNotNull(querySuggestion, "querySuggestion"); this.querySuggestion = querySuggestion; @@ -323,6 +335,7 @@ public SearchResponseMetadata withAdditionalQuerySuggestions(QuerySuggestionList return this; } + public SearchResponseMetadata withAdditionalQuerySuggestions(Optional additionalQuerySuggestions) { Utils.checkNotNull(additionalQuerySuggestions, "additionalQuerySuggestions"); this.additionalQuerySuggestions = additionalQuerySuggestions; @@ -338,6 +351,7 @@ public SearchResponseMetadata withNegatedTerms(List negatedTerms) { return this; } + /** * A list of terms that were negated when processing the query. */ @@ -356,6 +370,7 @@ public SearchResponseMetadata withModifiedQueryWasUsed(boolean modifiedQueryWasU return this; } + /** * A different query was performed than the one requested. */ @@ -374,6 +389,7 @@ public SearchResponseMetadata withOriginalQueryHadNoResults(boolean originalQuer return this; } + /** * No results were found for the original query. The usage of this bit in conjunction with modifiedQueryWasUsed will dictate whether the full page replacement is 0-result or few-result based. */ @@ -389,6 +405,7 @@ public SearchResponseMetadata withSearchWarning(SearchWarning searchWarning) { return this; } + public SearchResponseMetadata withSearchWarning(Optional searchWarning) { Utils.checkNotNull(searchWarning, "searchWarning"); this.searchWarning = searchWarning; @@ -404,6 +421,7 @@ public SearchResponseMetadata withTriggeredExpertDetection(boolean triggeredExpe return this; } + /** * Whether the query triggered expert detection results in the People tab. */ @@ -422,6 +440,7 @@ public SearchResponseMetadata withIsNoQuotesSuggestion(boolean isNoQuotesSuggest return this; } + /** * Whether the query was modified to remove quotes */ @@ -431,7 +450,6 @@ public SearchResponseMetadata withIsNoQuotesSuggestion(Optional isNoQuo return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -459,18 +477,10 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - rewrittenQuery, - searchedQuery, - searchedQueryRanges, - originalQuery, - querySuggestion, - additionalQuerySuggestions, - negatedTerms, - modifiedQueryWasUsed, - originalQueryHadNoResults, - searchWarning, - triggeredExpertDetection, - isNoQuotesSuggestion); + rewrittenQuery, searchedQuery, searchedQueryRanges, + originalQuery, querySuggestion, additionalQuerySuggestions, + negatedTerms, modifiedQueryWasUsed, originalQueryHadNoResults, + searchWarning, triggeredExpertDetection, isNoQuotesSuggestion); } @Override @@ -489,37 +499,39 @@ public String toString() { "triggeredExpertDetection", triggeredExpertDetection, "isNoQuotesSuggestion", isNoQuotesSuggestion); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional rewrittenQuery = Optional.empty(); - + private Optional searchedQuery = Optional.empty(); - + private Optional> searchedQueryRanges = Optional.empty(); - + private Optional originalQuery = Optional.empty(); - + private Optional querySuggestion = Optional.empty(); - + private Optional additionalQuerySuggestions = Optional.empty(); - + private Optional> negatedTerms = Optional.empty(); - + private Optional modifiedQueryWasUsed = Optional.empty(); - + private Optional originalQueryHadNoResults = Optional.empty(); - + private Optional searchWarning = Optional.empty(); - + private Optional triggeredExpertDetection = Optional.empty(); - + private Optional isNoQuotesSuggestion = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A cleaned up or updated version of the query to be displayed in the query box. Useful for mapping visual facets to search operators. */ @@ -538,6 +550,7 @@ public Builder rewrittenQuery(Optional rewrittenQuery) { return this; } + /** * The actual query used to perform search and return results. */ @@ -556,6 +569,7 @@ public Builder searchedQuery(Optional searchedQuery) { return this; } + /** * The bolded ranges within the searched query. */ @@ -574,6 +588,7 @@ public Builder searchedQueryRanges(Optional> searchedQ return this; } + /** * The query text sent by the client in the request. */ @@ -592,6 +607,7 @@ public Builder originalQuery(Optional originalQuery) { return this; } + public Builder querySuggestion(QuerySuggestion querySuggestion) { Utils.checkNotNull(querySuggestion, "querySuggestion"); this.querySuggestion = Optional.ofNullable(querySuggestion); @@ -604,6 +620,7 @@ public Builder querySuggestion(Optional querySuggesti return this; } + public Builder additionalQuerySuggestions(QuerySuggestionList additionalQuerySuggestions) { Utils.checkNotNull(additionalQuerySuggestions, "additionalQuerySuggestions"); this.additionalQuerySuggestions = Optional.ofNullable(additionalQuerySuggestions); @@ -616,6 +633,7 @@ public Builder additionalQuerySuggestions(Optional> negatedTerms) { return this; } + /** * A different query was performed than the one requested. */ @@ -652,6 +671,7 @@ public Builder modifiedQueryWasUsed(Optional modifiedQueryWasUsed) { return this; } + /** * No results were found for the original query. The usage of this bit in conjunction with modifiedQueryWasUsed will dictate whether the full page replacement is 0-result or few-result based. */ @@ -670,6 +690,7 @@ public Builder originalQueryHadNoResults(Optional originalQueryHadNoRes return this; } + public Builder searchWarning(SearchWarning searchWarning) { Utils.checkNotNull(searchWarning, "searchWarning"); this.searchWarning = Optional.ofNullable(searchWarning); @@ -682,6 +703,7 @@ public Builder searchWarning(Optional searchWarning) { return this; } + /** * Whether the query triggered expert detection results in the People tab. */ @@ -700,6 +722,7 @@ public Builder triggeredExpertDetection(Optional triggeredExpertDetecti return this; } + /** * Whether the query was modified to remove quotes */ @@ -717,21 +740,15 @@ public Builder isNoQuotesSuggestion(Optional isNoQuotesSuggestion) { this.isNoQuotesSuggestion = isNoQuotesSuggestion; return this; } - + public SearchResponseMetadata build() { + return new SearchResponseMetadata( - rewrittenQuery, - searchedQuery, - searchedQueryRanges, - originalQuery, - querySuggestion, - additionalQuerySuggestions, - negatedTerms, - modifiedQueryWasUsed, - originalQueryHadNoResults, - searchWarning, - triggeredExpertDetection, - isNoQuotesSuggestion); + rewrittenQuery, searchedQuery, searchedQueryRanges, + originalQuery, querySuggestion, additionalQuerySuggestions, + negatedTerms, modifiedQueryWasUsed, originalQueryHadNoResults, + searchWarning, triggeredExpertDetection, isNoQuotesSuggestion); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResult.java index e02d502c..26537556 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResult.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class SearchResult { +public class SearchResult { /** * An array of entities in the work graph retrieved via a data request. */ @@ -32,14 +32,17 @@ public class SearchResult { @JsonProperty("trackingToken") private Optional trackingToken; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("document") private Optional document; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("title") private Optional title; + @JsonProperty("url") private String url; @@ -120,10 +123,12 @@ public class SearchResult { @JsonProperty("clusterType") private Optional clusterType; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("mustIncludeSuggestions") private Optional mustIncludeSuggestions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("querySuggestion") private Optional querySuggestion; @@ -218,7 +223,13 @@ public SearchResult( public SearchResult( String url) { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), url, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), url, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -388,9 +399,10 @@ public Optional> pins() { return (Optional>) pins; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * An array of entities in the work graph retrieved via a data request. @@ -401,6 +413,7 @@ public SearchResult withStructuredResults(List structuredResul return this; } + /** * An array of entities in the work graph retrieved via a data request. */ @@ -419,6 +432,7 @@ public SearchResult withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. */ @@ -434,6 +448,7 @@ public SearchResult withDocument(Document document) { return this; } + public SearchResult withDocument(Optional document) { Utils.checkNotNull(document, "document"); this.document = document; @@ -446,6 +461,7 @@ public SearchResult withTitle(String title) { return this; } + public SearchResult withTitle(Optional title) { Utils.checkNotNull(title, "title"); this.title = title; @@ -467,6 +483,7 @@ public SearchResult withNativeAppUrl(String nativeAppUrl) { return this; } + /** * A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://...). */ @@ -485,6 +502,7 @@ public SearchResult withSnippets(List snippets) { return this; } + /** * Text content from the result document which contains search query terms, if available. */ @@ -503,6 +521,7 @@ public SearchResult withFullText(String fullText) { return this; } + /** * The full body text of the result if not already contained in the snippets. Only populated for conversation results (e.g. results from a messaging app such as Slack). */ @@ -521,6 +540,7 @@ public SearchResult withFullTextList(List fullTextList) { return this; } + /** * The full body text of the result if not already contained in the snippets; each item in the array represents a separate line in the original text. Only populated for conversation results (e.g. results from a messaging app such as Slack). */ @@ -539,6 +559,7 @@ public SearchResult withRelatedResults(List relatedResults) { return this; } + /** * A list of results related to this search result. Eg. for conversation results it contains individual messages from the conversation document which will be shown on SERP. */ @@ -557,6 +578,7 @@ public SearchResult withClusteredResults(List clusteredResults) { return this; } + /** * A list of results that should be displayed as associated with this result. */ @@ -575,6 +597,7 @@ public SearchResult withAllClusteredResults(List allClusteredResul return this; } + /** * A list of results that should be displayed as associated with this result. */ @@ -593,6 +616,7 @@ public SearchResult withAttachmentCount(long attachmentCount) { return this; } + /** * The total number of attachments. */ @@ -611,6 +635,7 @@ public SearchResult withAttachments(List attachments) { return this; } + /** * A (potentially partial) list of results representing documents attached to the main result document. */ @@ -629,6 +654,7 @@ public SearchResult withBacklinkResults(List backlinkResults) { return this; } + /** * A list of results that should be displayed as backlinks of this result in reverse chronological order. */ @@ -647,6 +673,7 @@ public SearchResult withClusterType(ClusterTypeEnum clusterType) { return this; } + /** * The reason for inclusion of clusteredResults. */ @@ -662,6 +689,7 @@ public SearchResult withMustIncludeSuggestions(QuerySuggestionList mustIncludeSu return this; } + public SearchResult withMustIncludeSuggestions(Optional mustIncludeSuggestions) { Utils.checkNotNull(mustIncludeSuggestions, "mustIncludeSuggestions"); this.mustIncludeSuggestions = mustIncludeSuggestions; @@ -674,6 +702,7 @@ public SearchResult withQuerySuggestion(QuerySuggestion querySuggestion) { return this; } + public SearchResult withQuerySuggestion(Optional querySuggestion) { Utils.checkNotNull(querySuggestion, "querySuggestion"); this.querySuggestion = querySuggestion; @@ -689,6 +718,7 @@ public SearchResult withProminence(SearchResultProminenceEnum prominence) { return this; } + /** * The level of visual distinction that should be given to a result. */ @@ -707,6 +737,7 @@ public SearchResult withAttachmentContext(String attachmentContext) { return this; } + /** * Additional context for the relationship between the result and the document it's attached to. */ @@ -725,6 +756,7 @@ public SearchResult withPins(List pins) { return this; } + /** * A list of pins associated with this search result. */ @@ -734,7 +766,6 @@ public SearchResult withPins(Optional> pins) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -771,27 +802,13 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - structuredResults, - trackingToken, - document, - title, - url, - nativeAppUrl, - snippets, - fullText, - fullTextList, - relatedResults, - clusteredResults, - allClusteredResults, - attachmentCount, - attachments, - backlinkResults, - clusterType, - mustIncludeSuggestions, - querySuggestion, - prominence, - attachmentContext, - pins); + structuredResults, trackingToken, document, + title, url, nativeAppUrl, + snippets, fullText, fullTextList, + relatedResults, clusteredResults, allClusteredResults, + attachmentCount, attachments, backlinkResults, + clusterType, mustIncludeSuggestions, querySuggestion, + prominence, attachmentContext, pins); } @Override @@ -819,55 +836,57 @@ public String toString() { "attachmentContext", attachmentContext, "pins", pins); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> structuredResults = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional document = Optional.empty(); - + private Optional title = Optional.empty(); - + private String url; - + private Optional nativeAppUrl = Optional.empty(); - + private Optional> snippets = Optional.empty(); - + private Optional fullText = Optional.empty(); - + private Optional> fullTextList = Optional.empty(); - + private Optional> relatedResults = Optional.empty(); - + private Optional> clusteredResults = Optional.empty(); - + private Optional> allClusteredResults = Optional.empty(); - + private Optional attachmentCount = Optional.empty(); - + private Optional> attachments = Optional.empty(); - + private Optional> backlinkResults = Optional.empty(); - + private Optional clusterType = Optional.empty(); - + private Optional mustIncludeSuggestions = Optional.empty(); - + private Optional querySuggestion = Optional.empty(); - + private Optional prominence = Optional.empty(); - + private Optional attachmentContext = Optional.empty(); - + private Optional> pins = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * An array of entities in the work graph retrieved via a data request. */ @@ -886,6 +905,7 @@ public Builder structuredResults(Optional> stru return this; } + /** * An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. */ @@ -904,6 +924,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + public Builder document(Document document) { Utils.checkNotNull(document, "document"); this.document = Optional.ofNullable(document); @@ -916,6 +937,7 @@ public Builder document(Optional document) { return this; } + public Builder title(String title) { Utils.checkNotNull(title, "title"); this.title = Optional.ofNullable(title); @@ -928,12 +950,14 @@ public Builder title(Optional title) { return this; } + public Builder url(String url) { Utils.checkNotNull(url, "url"); this.url = url; return this; } + /** * A deep link, if available, into the datasource's native application for the user's platform (e.g. slack://...). */ @@ -952,6 +976,7 @@ public Builder nativeAppUrl(Optional nativeAppUrl) { return this; } + /** * Text content from the result document which contains search query terms, if available. */ @@ -970,6 +995,7 @@ public Builder snippets(Optional> snippets) return this; } + /** * The full body text of the result if not already contained in the snippets. Only populated for conversation results (e.g. results from a messaging app such as Slack). */ @@ -988,6 +1014,7 @@ public Builder fullText(Optional fullText) { return this; } + /** * The full body text of the result if not already contained in the snippets; each item in the array represents a separate line in the original text. Only populated for conversation results (e.g. results from a messaging app such as Slack). */ @@ -1006,6 +1033,7 @@ public Builder fullTextList(Optional> fullTextList) { return this; } + /** * A list of results related to this search result. Eg. for conversation results it contains individual messages from the conversation document which will be shown on SERP. */ @@ -1024,6 +1052,7 @@ public Builder relatedResults(Optional> related return this; } + /** * A list of results that should be displayed as associated with this result. */ @@ -1042,6 +1071,7 @@ public Builder clusteredResults(Optional> clustered return this; } + /** * A list of results that should be displayed as associated with this result. */ @@ -1060,6 +1090,7 @@ public Builder allClusteredResults(Optional> allClu return this; } + /** * The total number of attachments. */ @@ -1078,6 +1109,7 @@ public Builder attachmentCount(Optional attachmentCount) { return this; } + /** * A (potentially partial) list of results representing documents attached to the main result document. */ @@ -1096,6 +1128,7 @@ public Builder attachments(Optional> attachments) { return this; } + /** * A list of results that should be displayed as backlinks of this result in reverse chronological order. */ @@ -1114,6 +1147,7 @@ public Builder backlinkResults(Optional> backlinkRe return this; } + /** * The reason for inclusion of clusteredResults. */ @@ -1132,6 +1166,7 @@ public Builder clusterType(Optional clusterType) { return this; } + public Builder mustIncludeSuggestions(QuerySuggestionList mustIncludeSuggestions) { Utils.checkNotNull(mustIncludeSuggestions, "mustIncludeSuggestions"); this.mustIncludeSuggestions = Optional.ofNullable(mustIncludeSuggestions); @@ -1144,6 +1179,7 @@ public Builder mustIncludeSuggestions(Optional mu return this; } + public Builder querySuggestion(QuerySuggestion querySuggestion) { Utils.checkNotNull(querySuggestion, "querySuggestion"); this.querySuggestion = Optional.ofNullable(querySuggestion); @@ -1156,6 +1192,7 @@ public Builder querySuggestion(Optional querySuggesti return this; } + /** * The level of visual distinction that should be given to a result. */ @@ -1174,6 +1211,7 @@ public Builder prominence(Optional promine return this; } + /** * Additional context for the relationship between the result and the document it's attached to. */ @@ -1192,6 +1230,7 @@ public Builder attachmentContext(Optional attachmentContext) { return this; } + /** * A list of pins associated with this search result. */ @@ -1209,30 +1248,18 @@ public Builder pins(Optional> pins) { this.pins = pins; return this; } - + public SearchResult build() { + return new SearchResult( - structuredResults, - trackingToken, - document, - title, - url, - nativeAppUrl, - snippets, - fullText, - fullTextList, - relatedResults, - clusteredResults, - allClusteredResults, - attachmentCount, - attachments, - backlinkResults, - clusterType, - mustIncludeSuggestions, - querySuggestion, - prominence, - attachmentContext, - pins); + structuredResults, trackingToken, document, + title, url, nativeAppUrl, + snippets, fullText, fullTextList, + relatedResults, clusteredResults, allClusteredResults, + attachmentCount, attachments, backlinkResults, + clusterType, mustIncludeSuggestions, querySuggestion, + prominence, attachmentContext, pins); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResultSnippet.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResultSnippet.java index dbb9cd14..5baeb92f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResultSnippet.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchResultSnippet.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class SearchResultSnippet { +public class SearchResultSnippet { /** * A matching snippet from the document. Query term matches are marked by the unicode characters uE006 and uE007. */ @@ -83,7 +83,8 @@ public SearchResultSnippet( public SearchResultSnippet( String snippet) { - this(snippet, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(snippet, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -135,9 +136,10 @@ public Optional url() { return url; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A matching snippet from the document. Query term matches are marked by the unicode characters uE006 and uE007. @@ -157,6 +159,7 @@ public SearchResultSnippet withMimeType(String mimeType) { return this; } + /** * The mime type of the snippets, currently either text/plain or text/html. */ @@ -175,6 +178,7 @@ public SearchResultSnippet withText(String text) { return this; } + /** * A matching snippet from the document with no highlights. */ @@ -193,6 +197,7 @@ public SearchResultSnippet withSnippetTextOrdering(long snippetTextOrdering) { return this; } + /** * Used for sorting based off the snippet's location within all_snippetable_text */ @@ -211,6 +216,7 @@ public SearchResultSnippet withRanges(List ranges) { return this; } + /** * The bolded ranges within text. */ @@ -229,6 +235,7 @@ public SearchResultSnippet withUrl(String url) { return this; } + /** * A URL, generated based on availability, that links to the position of the snippet text or to the nearest header above the snippet text. */ @@ -238,7 +245,6 @@ public SearchResultSnippet withUrl(Optional url) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -260,12 +266,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - snippet, - mimeType, - text, - snippetTextOrdering, - ranges, - url); + snippet, mimeType, text, + snippetTextOrdering, ranges, url); } @Override @@ -278,25 +280,27 @@ public String toString() { "ranges", ranges, "url", url); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String snippet; - + private Optional mimeType = Optional.empty(); - + private Optional text = Optional.empty(); - + private Optional snippetTextOrdering = Optional.empty(); - + private Optional> ranges = Optional.empty(); - + private Optional url = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A matching snippet from the document. Query term matches are marked by the unicode characters uE006 and uE007. */ @@ -306,6 +310,7 @@ public Builder snippet(String snippet) { return this; } + /** * The mime type of the snippets, currently either text/plain or text/html. */ @@ -324,6 +329,7 @@ public Builder mimeType(Optional mimeType) { return this; } + /** * A matching snippet from the document with no highlights. */ @@ -342,6 +348,7 @@ public Builder text(Optional text) { return this; } + /** * Used for sorting based off the snippet's location within all_snippetable_text */ @@ -360,6 +367,7 @@ public Builder snippetTextOrdering(Optional snippetTextOrdering) { return this; } + /** * The bolded ranges within text. */ @@ -378,6 +386,7 @@ public Builder ranges(Optional> ranges) { return this; } + /** * A URL, generated based on availability, that links to the position of the snippet text or to the nearest header above the snippet text. */ @@ -395,15 +404,13 @@ public Builder url(Optional url) { this.url = url; return this; } - + public SearchResultSnippet build() { + return new SearchResultSnippet( - snippet, - mimeType, - text, - snippetTextOrdering, - ranges, - url); + snippet, mimeType, text, + snippetTextOrdering, ranges, url); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchWarning.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchWarning.java index 31581857..7e9d3cbf 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchWarning.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SearchWarning.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class SearchWarning { +public class SearchWarning { /** * The type of the warning. */ @@ -62,7 +62,8 @@ public SearchWarning( public SearchWarning( WarningType warningType) { - this(warningType, Optional.empty(), Optional.empty(), Optional.empty()); + this(warningType, Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -98,9 +99,10 @@ public Optional> ignoredTerms() { return (Optional>) ignoredTerms; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The type of the warning. @@ -120,6 +122,7 @@ public SearchWarning withLastUsedTerm(String lastUsedTerm) { return this; } + /** * The last term we considered in the user's long query. */ @@ -138,6 +141,7 @@ public SearchWarning withQuotesIgnoredQuery(String quotesIgnoredQuery) { return this; } + /** * The query after ignoring/removing quotes. */ @@ -156,6 +160,7 @@ public SearchWarning withIgnoredTerms(List ignoredTerms) { return this; } + /** * A list of query terms that were ignored when generating search results, if any. For example, terms containing invalid filters such as "updated:invalid_date" will be ignored. */ @@ -165,7 +170,6 @@ public SearchWarning withIgnoredTerms(Optional> ignoredTe return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -185,9 +189,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - warningType, - lastUsedTerm, - quotesIgnoredQuery, + warningType, lastUsedTerm, quotesIgnoredQuery, ignoredTerms); } @@ -199,21 +201,23 @@ public String toString() { "quotesIgnoredQuery", quotesIgnoredQuery, "ignoredTerms", ignoredTerms); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private WarningType warningType; - + private Optional lastUsedTerm = Optional.empty(); - + private Optional quotesIgnoredQuery = Optional.empty(); - + private Optional> ignoredTerms = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The type of the warning. */ @@ -223,6 +227,7 @@ public Builder warningType(WarningType warningType) { return this; } + /** * The last term we considered in the user's long query. */ @@ -241,6 +246,7 @@ public Builder lastUsedTerm(Optional lastUsedTerm) { return this; } + /** * The query after ignoring/removing quotes. */ @@ -259,6 +265,7 @@ public Builder quotesIgnoredQuery(Optional quotesIgnoredQuery) { return this; } + /** * A list of query terms that were ignored when generating search results, if any. For example, terms containing invalid filters such as "updated:invalid_date" will be ignored. */ @@ -276,13 +283,13 @@ public Builder ignoredTerms(Optional> ignoredTerms) { this.ignoredTerms = ignoredTerms; return this; } - + public SearchWarning build() { + return new SearchWarning( - warningType, - lastUsedTerm, - quotesIgnoredQuery, + warningType, lastUsedTerm, quotesIgnoredQuery, ignoredTerms); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Security.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Security.java index 595b36b9..55780eda 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Security.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Security.java @@ -11,6 +11,7 @@ import java.lang.Override; import java.lang.String; + public class Security implements HasSecurity { @SpeakeasyMetadata("security:scheme=true,type=http,subtype=bearer,name=Authorization") @@ -28,9 +29,10 @@ public String apiToken() { return apiToken; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public Security withAPIToken(String apiToken) { Utils.checkNotNull(apiToken, "apiToken"); @@ -38,7 +40,6 @@ public Security withAPIToken(String apiToken) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -63,24 +64,28 @@ public String toString() { return Utils.toString(Security.class, "apiToken", apiToken); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String apiToken; - + private Builder() { // force use of static builder() method } + public Builder apiToken(String apiToken) { Utils.checkNotNull(apiToken, "apiToken"); this.apiToken = apiToken; return this; } - + public Security build() { + return new Security( apiToken); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SeenFeedbackInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SeenFeedbackInfo.java index 6b2a8404..fdce4d7e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SeenFeedbackInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SeenFeedbackInfo.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class SeenFeedbackInfo { +public class SeenFeedbackInfo { /** * The confidence of the user seeing the object is high because they explicitly interacted with it e.g. answer impression in SERP with additional user interaction. */ @@ -42,9 +42,10 @@ public Optional isExplicit() { return isExplicit; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The confidence of the user seeing the object is high because they explicitly interacted with it e.g. answer impression in SERP with additional user interaction. @@ -55,6 +56,7 @@ public SeenFeedbackInfo withIsExplicit(boolean isExplicit) { return this; } + /** * The confidence of the user seeing the object is high because they explicitly interacted with it e.g. answer impression in SERP with additional user interaction. */ @@ -64,7 +66,6 @@ public SeenFeedbackInfo withIsExplicit(Optional isExplicit) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -89,15 +90,17 @@ public String toString() { return Utils.toString(SeenFeedbackInfo.class, "isExplicit", isExplicit); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional isExplicit = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The confidence of the user seeing the object is high because they explicitly interacted with it e.g. answer impression in SERP with additional user interaction. */ @@ -115,10 +118,12 @@ public Builder isExplicit(Optional isExplicit) { this.isExplicit = isExplicit; return this; } - + public SeenFeedbackInfo build() { + return new SeenFeedbackInfo( isExplicit); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveContentOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveContentOptions.java index 33e3ca42..0daaa4da 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveContentOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveContentOptions.java @@ -21,7 +21,6 @@ *

Options for defining sensitive content within scanned documents. */ public class SensitiveContentOptions { - /** * Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types. */ @@ -87,9 +86,10 @@ public Optional> sensitiveRegexes() { return (Optional>) sensitiveRegexes; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types. @@ -100,6 +100,7 @@ public SensitiveContentOptions withSensitiveInfoTypes(List se return this; } + /** * Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types. */ @@ -118,6 +119,7 @@ public SensitiveContentOptions withSensitiveTerms(List sens return this; } + /** * list of words and phrases to consider as sensitive content */ @@ -136,6 +138,7 @@ public SensitiveContentOptions withSensitiveRegexes(List se return this; } + /** * list of regular expressions to consider as sensitive content */ @@ -145,7 +148,6 @@ public SensitiveContentOptions withSensitiveRegexes(Optional> sensitiveInfoTypes = Optional.empty(); - + private Optional> sensitiveTerms = Optional.empty(); - + private Optional> sensitiveRegexes = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Predefined categories of terms to consider as sensitive content. See https://cloud.google.com/dlp/docs/infotypes-reference for available types. */ @@ -207,6 +209,7 @@ public Builder sensitiveInfoTypes(Optional> se return this; } + /** * list of words and phrases to consider as sensitive content */ @@ -225,6 +228,7 @@ public Builder sensitiveTerms(Optional> sens return this; } + /** * list of regular expressions to consider as sensitive content */ @@ -242,12 +246,12 @@ public Builder sensitiveRegexes(Optional> se this.sensitiveRegexes = sensitiveRegexes; return this; } - + public SensitiveContentOptions build() { + return new SensitiveContentOptions( - sensitiveInfoTypes, - sensitiveTerms, - sensitiveRegexes); + sensitiveInfoTypes, sensitiveTerms, sensitiveRegexes); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveExpression.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveExpression.java index dd05f12d..1fb538fd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveExpression.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveExpression.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class SensitiveExpression { +public class SensitiveExpression { /** * Sensitive word, phrase, or regular expression. */ @@ -62,9 +62,10 @@ public Optional> hotwords() { return (Optional>) hotwords; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Sensitive word, phrase, or regular expression. @@ -75,6 +76,7 @@ public SensitiveExpression withExpression(String expression) { return this; } + /** * Sensitive word, phrase, or regular expression. */ @@ -93,6 +95,7 @@ public SensitiveExpression withHotwords(List hotwords) { return this; } + /** * Zero to three proximate regular expressions necessary to consider an expression as sensitive content. */ @@ -102,7 +105,6 @@ public SensitiveExpression withHotwords(Optional> hotwor return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -120,8 +122,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - expression, - hotwords); + expression, hotwords); } @Override @@ -130,17 +131,19 @@ public String toString() { "expression", expression, "hotwords", hotwords); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional expression = Optional.empty(); - + private Optional> hotwords = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Sensitive word, phrase, or regular expression. */ @@ -159,6 +162,7 @@ public Builder expression(Optional expression) { return this; } + /** * Zero to three proximate regular expressions necessary to consider an expression as sensitive content. */ @@ -176,11 +180,12 @@ public Builder hotwords(Optional> hotwords) { this.hotwords = hotwords; return this; } - + public SensitiveExpression build() { + return new SensitiveExpression( - expression, - hotwords); + expression, hotwords); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveInfoType.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveInfoType.java index f04d39ec..2c4f1305 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveInfoType.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SensitiveInfoType.java @@ -15,8 +15,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class SensitiveInfoType { +public class SensitiveInfoType { /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -66,9 +66,10 @@ public Optional infoType() { return infoType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * @@ -81,6 +82,7 @@ public SensitiveInfoType withLikelihoodThreshold(LikelihoodThreshold likelihoodT return this; } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -101,6 +103,7 @@ public SensitiveInfoType withInfoType(String infoType) { return this; } + /** * Text representation of an info-type to scan for. */ @@ -110,7 +113,6 @@ public SensitiveInfoType withInfoType(Optional infoType) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -128,8 +130,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - likelihoodThreshold, - infoType); + likelihoodThreshold, infoType); } @Override @@ -138,18 +139,20 @@ public String toString() { "likelihoodThreshold", likelihoodThreshold, "infoType", infoType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + @Deprecated private Optional likelihoodThreshold = Optional.empty(); - + private Optional infoType = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -172,6 +175,7 @@ public Builder likelihoodThreshold(Optional likel return this; } + /** * Text representation of an info-type to scan for. */ @@ -189,11 +193,12 @@ public Builder infoType(Optional infoType) { this.infoType = infoType; return this; } - + public SensitiveInfoType build() { + return new SensitiveInfoType( - likelihoodThreshold, - infoType); + likelihoodThreshold, infoType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SessionInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SessionInfo.java index ef040970..156af337 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SessionInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SessionInfo.java @@ -14,8 +14,8 @@ import java.time.OffsetDateTime; import java.util.Optional; -public class SessionInfo { +public class SessionInfo { /** * A unique token for this session. A new session (and token) is created when the user issues a request from a new tab or when our server hasn't seen activity for more than 10 minutes from a tab. */ @@ -61,7 +61,8 @@ public SessionInfo( } public SessionInfo() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -96,9 +97,10 @@ public Optional lastQuery() { return lastQuery; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A unique token for this session. A new session (and token) is created when the user issues a request from a new tab or when our server hasn't seen activity for more than 10 minutes from a tab. @@ -109,6 +111,7 @@ public SessionInfo withSessionTrackingToken(String sessionTrackingToken) { return this; } + /** * A unique token for this session. A new session (and token) is created when the user issues a request from a new tab or when our server hasn't seen activity for more than 10 minutes from a tab. */ @@ -127,6 +130,7 @@ public SessionInfo withTabId(String tabId) { return this; } + /** * A unique id for all requests a user makes from a given tab, no matter how far apart. A new tab id is only generated when a user issues a request from a new tab. */ @@ -145,6 +149,7 @@ public SessionInfo withLastSeen(OffsetDateTime lastSeen) { return this; } + /** * The last time the server saw this token. */ @@ -163,6 +168,7 @@ public SessionInfo withLastQuery(String lastQuery) { return this; } + /** * The last query seen by the server. */ @@ -172,7 +178,6 @@ public SessionInfo withLastQuery(Optional lastQuery) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -192,9 +197,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - sessionTrackingToken, - tabId, - lastSeen, + sessionTrackingToken, tabId, lastSeen, lastQuery); } @@ -206,21 +209,23 @@ public String toString() { "lastSeen", lastSeen, "lastQuery", lastQuery); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional sessionTrackingToken = Optional.empty(); - + private Optional tabId = Optional.empty(); - + private Optional lastSeen = Optional.empty(); - + private Optional lastQuery = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A unique token for this session. A new session (and token) is created when the user issues a request from a new tab or when our server hasn't seen activity for more than 10 minutes from a tab. */ @@ -239,6 +244,7 @@ public Builder sessionTrackingToken(Optional sessionTrackingToken) { return this; } + /** * A unique id for all requests a user makes from a given tab, no matter how far apart. A new tab id is only generated when a user issues a request from a new tab. */ @@ -257,6 +263,7 @@ public Builder tabId(Optional tabId) { return this; } + /** * The last time the server saw this token. */ @@ -275,6 +282,7 @@ public Builder lastSeen(Optional lastSeen) { return this; } + /** * The last query seen by the server. */ @@ -292,13 +300,13 @@ public Builder lastQuery(Optional lastQuery) { this.lastQuery = lastQuery; return this; } - + public SessionInfo build() { + return new SessionInfo( - sessionTrackingToken, - tabId, - lastSeen, + sessionTrackingToken, tabId, lastSeen, lastQuery); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Share.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Share.java index fd7d8143..de23c1ac 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Share.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Share.java @@ -21,17 +21,18 @@ *

Search endpoint will only fill out numDays ago since that's all we need to display shared badge; docmetadata endpoint will fill out all the fields so that we can display shared badge tooltip */ public class Share { - /** * The number of days that has passed since the share happened */ @JsonProperty("numDaysAgo") private long numDaysAgo; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sharer") private Optional sharer; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sharingDocument") private Optional sharingDocument; @@ -74,9 +75,10 @@ public Optional sharingDocument() { return (Optional) sharingDocument; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The number of days that has passed since the share happened @@ -93,6 +95,7 @@ public Share withSharer(Person sharer) { return this; } + public Share withSharer(Optional sharer) { Utils.checkNotNull(sharer, "sharer"); this.sharer = sharer; @@ -105,13 +108,13 @@ public Share withSharingDocument(Document sharingDocument) { return this; } + public Share withSharingDocument(Optional sharingDocument) { Utils.checkNotNull(sharingDocument, "sharingDocument"); this.sharingDocument = sharingDocument; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -130,9 +133,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - numDaysAgo, - sharer, - sharingDocument); + numDaysAgo, sharer, sharingDocument); } @Override @@ -142,19 +143,21 @@ public String toString() { "sharer", sharer, "sharingDocument", sharingDocument); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long numDaysAgo; - + private Optional sharer = Optional.empty(); - + private Optional sharingDocument = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The number of days that has passed since the share happened */ @@ -164,6 +167,7 @@ public Builder numDaysAgo(long numDaysAgo) { return this; } + public Builder sharer(Person sharer) { Utils.checkNotNull(sharer, "sharer"); this.sharer = Optional.ofNullable(sharer); @@ -176,6 +180,7 @@ public Builder sharer(Optional sharer) { return this; } + public Builder sharingDocument(Document sharingDocument) { Utils.checkNotNull(sharingDocument, "sharingDocument"); this.sharingDocument = Optional.ofNullable(sharingDocument); @@ -187,12 +192,12 @@ public Builder sharingDocument(Optional sharingDocument) { this.sharingDocument = sharingDocument; return this; } - + public Share build() { + return new Share( - numDaysAgo, - sharer, - sharingDocument); + numDaysAgo, sharer, sharingDocument); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SharingOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SharingOptions.java index 026b82f6..34461a56 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SharingOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SharingOptions.java @@ -24,7 +24,6 @@ *

Controls how "shared" a document must be to get picked for scans. */ public class SharingOptions { - /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -114,7 +113,9 @@ public SharingOptions( } public SharingOptions() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -186,9 +187,10 @@ public Optional> userIds() { return (Optional>) userIds; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * @@ -201,6 +203,7 @@ public SharingOptions withEnabled(boolean enabled) { return this; } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -221,6 +224,7 @@ public SharingOptions withThreshold(long threshold) { return this; } + /** * The minimum number of users the document is shared with. */ @@ -239,6 +243,7 @@ public SharingOptions withThresholdEnabled(boolean thresholdEnabled) { return this; } + /** * Documents will be filtered based on how many people have access to it. */ @@ -259,6 +264,7 @@ public SharingOptions withAnyoneWithLinkEnabled(boolean anyoneWithLinkEnabled) { return this; } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -279,6 +285,7 @@ public SharingOptions withAnyoneInternalEnabled(boolean anyoneInternalEnabled) { return this; } + /** * Only users within the organization can access the document. */ @@ -297,6 +304,7 @@ public SharingOptions withAnonymousAccessEnabled(boolean anonymousAccessEnabled) return this; } + /** * Anyone on the internet can access the document. */ @@ -315,6 +323,7 @@ public SharingOptions withUserAccessEnabled(boolean userAccessEnabled) { return this; } + /** * Enable user access check */ @@ -333,6 +342,7 @@ public SharingOptions withUserIds(List userIds) { return this; } + /** * Any one of the specified users can access the document. */ @@ -342,7 +352,6 @@ public SharingOptions withUserIds(Optional> userIds) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -366,14 +375,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - enabled, - threshold, - thresholdEnabled, - anyoneWithLinkEnabled, - anyoneInternalEnabled, - anonymousAccessEnabled, - userAccessEnabled, - userIds); + enabled, threshold, thresholdEnabled, + anyoneWithLinkEnabled, anyoneInternalEnabled, anonymousAccessEnabled, + userAccessEnabled, userIds); } @Override @@ -388,31 +392,33 @@ public String toString() { "userAccessEnabled", userAccessEnabled, "userIds", userIds); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + @Deprecated private Optional enabled = Optional.empty(); - + private Optional threshold = Optional.empty(); - + private Optional thresholdEnabled = Optional.empty(); - + @Deprecated private Optional anyoneWithLinkEnabled = Optional.empty(); - + private Optional anyoneInternalEnabled = Optional.empty(); - + private Optional anonymousAccessEnabled = Optional.empty(); - + private Optional userAccessEnabled = Optional.empty(); - + private Optional> userIds = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -435,6 +441,7 @@ public Builder enabled(Optional enabled) { return this; } + /** * The minimum number of users the document is shared with. */ @@ -453,6 +460,7 @@ public Builder threshold(Optional threshold) { return this; } + /** * Documents will be filtered based on how many people have access to it. */ @@ -471,6 +479,7 @@ public Builder thresholdEnabled(Optional thresholdEnabled) { return this; } + /** * * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. @@ -493,6 +502,7 @@ public Builder anyoneWithLinkEnabled(Optional anyoneWithLinkEnabled) { return this; } + /** * Only users within the organization can access the document. */ @@ -511,6 +521,7 @@ public Builder anyoneInternalEnabled(Optional anyoneInternalEnabled) { return this; } + /** * Anyone on the internet can access the document. */ @@ -529,6 +540,7 @@ public Builder anonymousAccessEnabled(Optional anonymousAccessEnabled) return this; } + /** * Enable user access check */ @@ -547,6 +559,7 @@ public Builder userAccessEnabled(Optional userAccessEnabled) { return this; } + /** * Any one of the specified users can access the document. */ @@ -564,17 +577,14 @@ public Builder userIds(Optional> userIds) { this.userIds = userIds; return this; } - + public SharingOptions build() { + return new SharingOptions( - enabled, - threshold, - thresholdEnabled, - anyoneWithLinkEnabled, - anyoneInternalEnabled, - anonymousAccessEnabled, - userAccessEnabled, - userIds); + enabled, threshold, thresholdEnabled, + anyoneWithLinkEnabled, anyoneInternalEnabled, anonymousAccessEnabled, + userAccessEnabled, userIds); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Shortcut.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Shortcut.java index d8808a91..b2f014d8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Shortcut.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Shortcut.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Optional; -public class Shortcut { +public class Shortcut { /** * The opaque id of the user generated content. */ @@ -82,10 +82,12 @@ public class Shortcut { @JsonProperty("removedRoles") private Optional> removedRoles; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createdBy") private Optional createdBy; @@ -97,6 +99,7 @@ public class Shortcut { @JsonProperty("createTime") private Optional createTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("updatedBy") private Optional updatedBy; @@ -108,6 +111,7 @@ public class Shortcut { @JsonProperty("updateTime") private Optional updateTime; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("destinationDocument") private Optional destinationDocument; @@ -233,7 +237,14 @@ public Shortcut( public Shortcut( String inputAlias) { - this(Optional.empty(), inputAlias, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), inputAlias, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -407,9 +418,10 @@ public Optional> roles() { return (Optional>) roles; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque id of the user generated content. @@ -420,6 +432,7 @@ public Shortcut withId(long id) { return this; } + /** * The opaque id of the user generated content. */ @@ -447,6 +460,7 @@ public Shortcut withDestinationUrl(String destinationUrl) { return this; } + /** * Destination URL for the shortcut. */ @@ -465,6 +479,7 @@ public Shortcut withDestinationDocumentId(String destinationDocumentId) { return this; } + /** * Glean Document ID for the URL, if known. */ @@ -483,6 +498,7 @@ public Shortcut withDescription(String description) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -501,6 +517,7 @@ public Shortcut withUnlisted(boolean unlisted) { return this; } + /** * Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. */ @@ -519,6 +536,7 @@ public Shortcut withUrlTemplate(String urlTemplate) { return this; } + /** * For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. */ @@ -537,6 +555,7 @@ public Shortcut withAddedRoles(List addedRoles) { return this; } + /** * A list of user roles added for the Shortcut. */ @@ -555,6 +574,7 @@ public Shortcut withRemovedRoles(List removedRoles) { return this; } + /** * A list of user roles removed for the Shortcut. */ @@ -570,6 +590,7 @@ public Shortcut withPermissions(ObjectPermissions permissions) { return this; } + public Shortcut withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -582,6 +603,7 @@ public Shortcut withCreatedBy(Person createdBy) { return this; } + public Shortcut withCreatedBy(Optional createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; @@ -597,6 +619,7 @@ public Shortcut withCreateTime(OffsetDateTime createTime) { return this; } + /** * The time the shortcut was created in ISO format (ISO 8601). */ @@ -612,6 +635,7 @@ public Shortcut withUpdatedBy(Person updatedBy) { return this; } + public Shortcut withUpdatedBy(Optional updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = updatedBy; @@ -627,6 +651,7 @@ public Shortcut withUpdateTime(OffsetDateTime updateTime) { return this; } + /** * The time the shortcut was updated in ISO format (ISO 8601). */ @@ -642,6 +667,7 @@ public Shortcut withDestinationDocument(Document destinationDocument) { return this; } + public Shortcut withDestinationDocument(Optional destinationDocument) { Utils.checkNotNull(destinationDocument, "destinationDocument"); this.destinationDocument = destinationDocument; @@ -657,6 +683,7 @@ public Shortcut withIntermediateUrl(String intermediateUrl) { return this; } + /** * The URL from which the user is then redirected to the destination URL. Full replacement for https://go/<inputAlias>. */ @@ -675,6 +702,7 @@ public Shortcut withViewPrefix(String viewPrefix) { return this; } + /** * The part of the shortcut preceding the input alias when used for showing shortcuts to users. Should end with "/". e.g. "go/" for native shortcuts. */ @@ -693,6 +721,7 @@ public Shortcut withIsExternal(boolean isExternal) { return this; } + /** * Indicates whether a shortcut is native or external. */ @@ -711,6 +740,7 @@ public Shortcut withEditUrl(String editUrl) { return this; } + /** * The URL using which the user can access the edit page of the shortcut. */ @@ -729,6 +759,7 @@ public Shortcut withAlias(String alias) { return this; } + /** * canonical link text following go/ prefix where hyphen/underscore is removed. */ @@ -747,6 +778,7 @@ public Shortcut withTitle(String title) { return this; } + /** * Title for the Go Link */ @@ -765,6 +797,7 @@ public Shortcut withRoles(List roles) { return this; } + /** * A list of user roles for the Go Link. */ @@ -774,7 +807,6 @@ public Shortcut withRoles(Optional> roles) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -812,27 +844,13 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - inputAlias, - destinationUrl, - destinationDocumentId, - description, - unlisted, - urlTemplate, - addedRoles, - removedRoles, - permissions, - createdBy, - createTime, - updatedBy, - updateTime, - destinationDocument, - intermediateUrl, - viewPrefix, - isExternal, - editUrl, - alias, - title, + id, inputAlias, destinationUrl, + destinationDocumentId, description, unlisted, + urlTemplate, addedRoles, removedRoles, + permissions, createdBy, createTime, + updatedBy, updateTime, destinationDocument, + intermediateUrl, viewPrefix, isExternal, + editUrl, alias, title, roles); } @@ -862,57 +880,59 @@ public String toString() { "title", title, "roles", roles); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private String inputAlias; - + private Optional destinationUrl = Optional.empty(); - + private Optional destinationDocumentId = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional unlisted = Optional.empty(); - + private Optional urlTemplate = Optional.empty(); - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Optional createdBy = Optional.empty(); - + private Optional createTime = Optional.empty(); - + private Optional updatedBy = Optional.empty(); - + private Optional updateTime = Optional.empty(); - + private Optional destinationDocument = Optional.empty(); - + private Optional intermediateUrl = Optional.empty(); - + private Optional viewPrefix = Optional.empty(); - + private Optional isExternal = Optional.empty(); - + private Optional editUrl = Optional.empty(); - + private Optional alias = Optional.empty(); - + private Optional title = Optional.empty(); - + private Optional> roles = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque id of the user generated content. */ @@ -931,6 +951,7 @@ public Builder id(Optional id) { return this; } + /** * Link text following go/ prefix as entered by the user. */ @@ -940,6 +961,7 @@ public Builder inputAlias(String inputAlias) { return this; } + /** * Destination URL for the shortcut. */ @@ -958,6 +980,7 @@ public Builder destinationUrl(Optional destinationUrl) { return this; } + /** * Glean Document ID for the URL, if known. */ @@ -976,6 +999,7 @@ public Builder destinationDocumentId(Optional destinationDocumentId) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -994,6 +1018,7 @@ public Builder description(Optional description) { return this; } + /** * Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. */ @@ -1012,6 +1037,7 @@ public Builder unlisted(Optional unlisted) { return this; } + /** * For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. */ @@ -1030,6 +1056,7 @@ public Builder urlTemplate(Optional urlTemplate) { return this; } + /** * A list of user roles added for the Shortcut. */ @@ -1048,6 +1075,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of user roles removed for the Shortcut. */ @@ -1066,6 +1094,7 @@ public Builder removedRoles(Optional> remo return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -1078,6 +1107,7 @@ public Builder permissions(Optional permissions) { return this; } + public Builder createdBy(Person createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = Optional.ofNullable(createdBy); @@ -1090,6 +1120,7 @@ public Builder createdBy(Optional createdBy) { return this; } + /** * The time the shortcut was created in ISO format (ISO 8601). */ @@ -1108,6 +1139,7 @@ public Builder createTime(Optional createTime) { return this; } + public Builder updatedBy(Person updatedBy) { Utils.checkNotNull(updatedBy, "updatedBy"); this.updatedBy = Optional.ofNullable(updatedBy); @@ -1120,6 +1152,7 @@ public Builder updatedBy(Optional updatedBy) { return this; } + /** * The time the shortcut was updated in ISO format (ISO 8601). */ @@ -1138,6 +1171,7 @@ public Builder updateTime(Optional updateTime) { return this; } + public Builder destinationDocument(Document destinationDocument) { Utils.checkNotNull(destinationDocument, "destinationDocument"); this.destinationDocument = Optional.ofNullable(destinationDocument); @@ -1150,6 +1184,7 @@ public Builder destinationDocument(Optional destinationDocum return this; } + /** * The URL from which the user is then redirected to the destination URL. Full replacement for https://go/<inputAlias>. */ @@ -1168,6 +1203,7 @@ public Builder intermediateUrl(Optional intermediateUrl) { return this; } + /** * The part of the shortcut preceding the input alias when used for showing shortcuts to users. Should end with "/". e.g. "go/" for native shortcuts. */ @@ -1186,6 +1222,7 @@ public Builder viewPrefix(Optional viewPrefix) { return this; } + /** * Indicates whether a shortcut is native or external. */ @@ -1204,6 +1241,7 @@ public Builder isExternal(Optional isExternal) { return this; } + /** * The URL using which the user can access the edit page of the shortcut. */ @@ -1222,6 +1260,7 @@ public Builder editUrl(Optional editUrl) { return this; } + /** * canonical link text following go/ prefix where hyphen/underscore is removed. */ @@ -1240,6 +1279,7 @@ public Builder alias(Optional alias) { return this; } + /** * Title for the Go Link */ @@ -1258,6 +1298,7 @@ public Builder title(Optional title) { return this; } + /** * A list of user roles for the Go Link. */ @@ -1275,31 +1316,19 @@ public Builder roles(Optional> roles) { this.roles = roles; return this; } - + public Shortcut build() { + return new Shortcut( - id, - inputAlias, - destinationUrl, - destinationDocumentId, - description, - unlisted, - urlTemplate, - addedRoles, - removedRoles, - permissions, - createdBy, - createTime, - updatedBy, - updateTime, - destinationDocument, - intermediateUrl, - viewPrefix, - isExternal, - editUrl, - alias, - title, + id, inputAlias, destinationUrl, + destinationDocumentId, description, unlisted, + urlTemplate, addedRoles, removedRoles, + permissions, createdBy, createTime, + updatedBy, updateTime, destinationDocument, + intermediateUrl, viewPrefix, isExternal, + editUrl, alias, title, roles); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutError.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutError.java index 41d2ca43..c6d5776d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutError.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutError.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class ShortcutError { @JsonInclude(Include.NON_ABSENT) @@ -37,9 +38,10 @@ public Optional errorType() { return (Optional) errorType; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ShortcutError withErrorType(ShortcutErrorErrorType errorType) { Utils.checkNotNull(errorType, "errorType"); @@ -47,13 +49,13 @@ public ShortcutError withErrorType(ShortcutErrorErrorType errorType) { return this; } + public ShortcutError withErrorType(Optional errorType) { Utils.checkNotNull(errorType, "errorType"); this.errorType = errorType; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -78,15 +80,17 @@ public String toString() { return Utils.toString(ShortcutError.class, "errorType", errorType); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional errorType = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder errorType(ShortcutErrorErrorType errorType) { Utils.checkNotNull(errorType, "errorType"); this.errorType = Optional.ofNullable(errorType); @@ -98,10 +102,12 @@ public Builder errorType(Optional errorType) { this.errorType = errorType; return this; } - + public ShortcutError build() { + return new ShortcutError( errorType); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutInsight.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutInsight.java index 40a7580a..3582296f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutInsight.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutInsight.java @@ -14,15 +14,18 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class ShortcutInsight { @JsonProperty("shortcut") private Shortcut shortcut; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("visitCount") private Optional visitCount; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("visitorCount") private Optional visitorCount; @@ -62,9 +65,10 @@ public Optional visitorCount() { return (Optional) visitorCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ShortcutInsight withShortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); @@ -78,6 +82,7 @@ public ShortcutInsight withVisitCount(CountInfo visitCount) { return this; } + public ShortcutInsight withVisitCount(Optional visitCount) { Utils.checkNotNull(visitCount, "visitCount"); this.visitCount = visitCount; @@ -90,13 +95,13 @@ public ShortcutInsight withVisitorCount(CountInfo visitorCount) { return this; } + public ShortcutInsight withVisitorCount(Optional visitorCount) { Utils.checkNotNull(visitorCount, "visitorCount"); this.visitorCount = visitorCount; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -115,9 +120,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - shortcut, - visitCount, - visitorCount); + shortcut, visitCount, visitorCount); } @Override @@ -127,25 +130,28 @@ public String toString() { "visitCount", visitCount, "visitorCount", visitorCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Shortcut shortcut; - + private Optional visitCount = Optional.empty(); - + private Optional visitorCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder shortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = shortcut; return this; } + public Builder visitCount(CountInfo visitCount) { Utils.checkNotNull(visitCount, "visitCount"); this.visitCount = Optional.ofNullable(visitCount); @@ -158,6 +164,7 @@ public Builder visitCount(Optional visitCount) { return this; } + public Builder visitorCount(CountInfo visitorCount) { Utils.checkNotNull(visitorCount, "visitorCount"); this.visitorCount = Optional.ofNullable(visitorCount); @@ -169,12 +176,12 @@ public Builder visitorCount(Optional visitorCount) { this.visitorCount = visitorCount; return this; } - + public ShortcutInsight build() { + return new ShortcutInsight( - shortcut, - visitCount, - visitorCount); + shortcut, visitCount, visitorCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutInsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutInsightsResponse.java index 07f7e114..30254b20 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutInsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutInsightsResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class ShortcutInsightsResponse { +public class ShortcutInsightsResponse { /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -63,7 +63,8 @@ public ShortcutInsightsResponse( } public ShortcutInsightsResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -100,9 +101,10 @@ public Optional minVisitorThreshold() { return minVisitorThreshold; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). @@ -113,6 +115,7 @@ public ShortcutInsightsResponse withLastLogTimestamp(long lastLogTimestamp) { return this; } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -131,6 +134,7 @@ public ShortcutInsightsResponse withShortcutInsights(List short return this; } + /** * Insights for shortcuts. */ @@ -149,6 +153,7 @@ public ShortcutInsightsResponse withDepartments(List departments) { return this; } + /** * list of departments applicable for shortcuts tab. */ @@ -167,6 +172,7 @@ public ShortcutInsightsResponse withMinVisitorThreshold(long minVisitorThreshold return this; } + /** * Min threshold in number of visitors while populating results, otherwise 0. */ @@ -176,7 +182,6 @@ public ShortcutInsightsResponse withMinVisitorThreshold(Optional minVisito return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -196,9 +201,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - lastLogTimestamp, - shortcutInsights, - departments, + lastLogTimestamp, shortcutInsights, departments, minVisitorThreshold); } @@ -210,21 +213,23 @@ public String toString() { "departments", departments, "minVisitorThreshold", minVisitorThreshold); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional lastLogTimestamp = Optional.empty(); - + private Optional> shortcutInsights = Optional.empty(); - + private Optional> departments = Optional.empty(); - + private Optional minVisitorThreshold = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -243,6 +248,7 @@ public Builder lastLogTimestamp(Optional lastLogTimestamp) { return this; } + /** * Insights for shortcuts. */ @@ -261,6 +267,7 @@ public Builder shortcutInsights(Optional> shortc return this; } + /** * list of departments applicable for shortcuts tab. */ @@ -279,6 +286,7 @@ public Builder departments(Optional> departments) { return this; } + /** * Min threshold in number of visitors while populating results, otherwise 0. */ @@ -296,13 +304,13 @@ public Builder minVisitorThreshold(Optional minVisitorThreshold) { this.minVisitorThreshold = minVisitorThreshold; return this; } - + public ShortcutInsightsResponse build() { + return new ShortcutInsightsResponse( - lastLogTimestamp, - shortcutInsights, - departments, + lastLogTimestamp, shortcutInsights, departments, minVisitorThreshold); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutMutableProperties.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutMutableProperties.java index 17ac41ad..0bc3bf8c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutMutableProperties.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutMutableProperties.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class ShortcutMutableProperties { +public class ShortcutMutableProperties { /** * Link text following go/ prefix as entered by the user. */ @@ -103,7 +103,9 @@ public ShortcutMutableProperties( } public ShortcutMutableProperties() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -172,9 +174,10 @@ public Optional> removedRoles() { return (Optional>) removedRoles; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Link text following go/ prefix as entered by the user. @@ -185,6 +188,7 @@ public ShortcutMutableProperties withInputAlias(String inputAlias) { return this; } + /** * Link text following go/ prefix as entered by the user. */ @@ -203,6 +207,7 @@ public ShortcutMutableProperties withDestinationUrl(String destinationUrl) { return this; } + /** * Destination URL for the shortcut. */ @@ -221,6 +226,7 @@ public ShortcutMutableProperties withDestinationDocumentId(String destinationDoc return this; } + /** * Glean Document ID for the URL, if known. */ @@ -239,6 +245,7 @@ public ShortcutMutableProperties withDescription(String description) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -257,6 +264,7 @@ public ShortcutMutableProperties withUnlisted(boolean unlisted) { return this; } + /** * Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. */ @@ -275,6 +283,7 @@ public ShortcutMutableProperties withUrlTemplate(String urlTemplate) { return this; } + /** * For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. */ @@ -293,6 +302,7 @@ public ShortcutMutableProperties withAddedRoles(List adde return this; } + /** * A list of user roles added for the Shortcut. */ @@ -311,6 +321,7 @@ public ShortcutMutableProperties withRemovedRoles(List re return this; } + /** * A list of user roles removed for the Shortcut. */ @@ -320,7 +331,6 @@ public ShortcutMutableProperties withRemovedRoles(Optional inputAlias = Optional.empty(); - + private Optional destinationUrl = Optional.empty(); - + private Optional destinationDocumentId = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional unlisted = Optional.empty(); - + private Optional urlTemplate = Optional.empty(); - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Link text following go/ prefix as entered by the user. */ @@ -407,6 +414,7 @@ public Builder inputAlias(Optional inputAlias) { return this; } + /** * Destination URL for the shortcut. */ @@ -425,6 +433,7 @@ public Builder destinationUrl(Optional destinationUrl) { return this; } + /** * Glean Document ID for the URL, if known. */ @@ -443,6 +452,7 @@ public Builder destinationDocumentId(Optional destinationDocumentId) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -461,6 +471,7 @@ public Builder description(Optional description) { return this; } + /** * Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. */ @@ -479,6 +490,7 @@ public Builder unlisted(Optional unlisted) { return this; } + /** * For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. */ @@ -497,6 +509,7 @@ public Builder urlTemplate(Optional urlTemplate) { return this; } + /** * A list of user roles added for the Shortcut. */ @@ -515,6 +528,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of user roles removed for the Shortcut. */ @@ -532,17 +546,14 @@ public Builder removedRoles(Optional> remo this.removedRoles = removedRoles; return this; } - + public ShortcutMutableProperties build() { + return new ShortcutMutableProperties( - inputAlias, - destinationUrl, - destinationDocumentId, - description, - unlisted, - urlTemplate, - addedRoles, - removedRoles); + inputAlias, destinationUrl, destinationDocumentId, + description, unlisted, urlTemplate, + addedRoles, removedRoles); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutsPaginationMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutsPaginationMetadata.java index 51014f12..6b87a7ca 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutsPaginationMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ShortcutsPaginationMetadata.java @@ -15,8 +15,8 @@ import java.lang.String; import java.util.Optional; -public class ShortcutsPaginationMetadata { +public class ShortcutsPaginationMetadata { /** * Cursor indicates the start of the next page of results */ @@ -24,10 +24,12 @@ public class ShortcutsPaginationMetadata { @JsonProperty("cursor") private Optional cursor; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("hasNextPage") private Optional hasNextPage; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("totalItemCount") private Optional totalItemCount; @@ -67,9 +69,10 @@ public Optional totalItemCount() { return totalItemCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Cursor indicates the start of the next page of results @@ -80,6 +83,7 @@ public ShortcutsPaginationMetadata withCursor(String cursor) { return this; } + /** * Cursor indicates the start of the next page of results */ @@ -95,6 +99,7 @@ public ShortcutsPaginationMetadata withHasNextPage(boolean hasNextPage) { return this; } + public ShortcutsPaginationMetadata withHasNextPage(Optional hasNextPage) { Utils.checkNotNull(hasNextPage, "hasNextPage"); this.hasNextPage = hasNextPage; @@ -107,13 +112,13 @@ public ShortcutsPaginationMetadata withTotalItemCount(long totalItemCount) { return this; } + public ShortcutsPaginationMetadata withTotalItemCount(Optional totalItemCount) { Utils.checkNotNull(totalItemCount, "totalItemCount"); this.totalItemCount = totalItemCount; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -132,9 +137,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - cursor, - hasNextPage, - totalItemCount); + cursor, hasNextPage, totalItemCount); } @Override @@ -144,19 +147,21 @@ public String toString() { "hasNextPage", hasNextPage, "totalItemCount", totalItemCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional cursor = Optional.empty(); - + private Optional hasNextPage = Optional.empty(); - + private Optional totalItemCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Cursor indicates the start of the next page of results */ @@ -175,6 +180,7 @@ public Builder cursor(Optional cursor) { return this; } + public Builder hasNextPage(boolean hasNextPage) { Utils.checkNotNull(hasNextPage, "hasNextPage"); this.hasNextPage = Optional.ofNullable(hasNextPage); @@ -187,6 +193,7 @@ public Builder hasNextPage(Optional hasNextPage) { return this; } + public Builder totalItemCount(long totalItemCount) { Utils.checkNotNull(totalItemCount, "totalItemCount"); this.totalItemCount = Optional.ofNullable(totalItemCount); @@ -198,12 +205,12 @@ public Builder totalItemCount(Optional totalItemCount) { this.totalItemCount = totalItemCount; return this; } - + public ShortcutsPaginationMetadata build() { + return new ShortcutsPaginationMetadata( - cursor, - hasNextPage, - totalItemCount); + cursor, hasNextPage, totalItemCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SocialNetwork.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SocialNetwork.java index 6c2816e3..1e530baf 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SocialNetwork.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SocialNetwork.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class SocialNetwork { +public class SocialNetwork { /** * Possible values are "twitter", "linkedin". */ @@ -77,9 +77,10 @@ public String profileUrl() { return profileUrl; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Possible values are "twitter", "linkedin". @@ -99,6 +100,7 @@ public SocialNetwork withProfileName(String profileName) { return this; } + /** * Human-readable profile name. */ @@ -117,7 +119,6 @@ public SocialNetwork withProfileUrl(String profileUrl) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -136,9 +137,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - profileName, - profileUrl); + name, profileName, profileUrl); } @Override @@ -148,19 +147,21 @@ public String toString() { "profileName", profileName, "profileUrl", profileUrl); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private Optional profileName = Optional.empty(); - + private String profileUrl; - + private Builder() { // force use of static builder() method } + /** * Possible values are "twitter", "linkedin". */ @@ -170,6 +171,7 @@ public Builder name(String name) { return this; } + /** * Human-readable profile name. */ @@ -188,6 +190,7 @@ public Builder profileName(Optional profileName) { return this; } + /** * Link to profile. */ @@ -196,12 +199,12 @@ public Builder profileUrl(String profileUrl) { this.profileUrl = profileUrl; return this; } - + public SocialNetwork build() { + return new SocialNetwork( - name, - profileName, - profileUrl); + name, profileName, profileUrl); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SocialNetworkDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SocialNetworkDefinition.java index 847ecd20..fc10b675 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SocialNetworkDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SocialNetworkDefinition.java @@ -19,7 +19,6 @@ *

Employee's social network profile */ public class SocialNetworkDefinition { - /** * Possible values are "twitter", "linkedin". */ @@ -82,9 +81,10 @@ public Optional profileUrl() { return profileUrl; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Possible values are "twitter", "linkedin". @@ -95,6 +95,7 @@ public SocialNetworkDefinition withName(String name) { return this; } + /** * Possible values are "twitter", "linkedin". */ @@ -113,6 +114,7 @@ public SocialNetworkDefinition withProfileName(String profileName) { return this; } + /** * Human-readable profile name. */ @@ -131,6 +133,7 @@ public SocialNetworkDefinition withProfileUrl(String profileUrl) { return this; } + /** * Link to profile. */ @@ -140,7 +143,6 @@ public SocialNetworkDefinition withProfileUrl(Optional profileUrl) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -159,9 +161,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - profileName, - profileUrl); + name, profileName, profileUrl); } @Override @@ -171,19 +171,21 @@ public String toString() { "profileName", profileName, "profileUrl", profileUrl); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional profileName = Optional.empty(); - + private Optional profileUrl = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Possible values are "twitter", "linkedin". */ @@ -202,6 +204,7 @@ public Builder name(Optional name) { return this; } + /** * Human-readable profile name. */ @@ -220,6 +223,7 @@ public Builder profileName(Optional profileName) { return this; } + /** * Link to profile. */ @@ -237,12 +241,12 @@ public Builder profileUrl(Optional profileUrl) { this.profileUrl = profileUrl; return this; } - + public SocialNetworkDefinition build() { + return new SocialNetworkDefinition( - name, - profileName, - profileUrl); + name, profileName, profileUrl); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SortOptions.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SortOptions.java index 312a18a5..16c63af2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SortOptions.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SortOptions.java @@ -14,12 +14,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class SortOptions { @JsonInclude(Include.NON_ABSENT) @JsonProperty("orderBy") private Optional orderBy; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("sortBy") private Optional sortBy; @@ -49,9 +51,10 @@ public Optional sortBy() { return sortBy; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public SortOptions withOrderBy(OrderBy orderBy) { Utils.checkNotNull(orderBy, "orderBy"); @@ -59,6 +62,7 @@ public SortOptions withOrderBy(OrderBy orderBy) { return this; } + public SortOptions withOrderBy(Optional orderBy) { Utils.checkNotNull(orderBy, "orderBy"); this.orderBy = orderBy; @@ -71,13 +75,13 @@ public SortOptions withSortBy(String sortBy) { return this; } + public SortOptions withSortBy(Optional sortBy) { Utils.checkNotNull(sortBy, "sortBy"); this.sortBy = sortBy; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -95,8 +99,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - orderBy, - sortBy); + orderBy, sortBy); } @Override @@ -105,17 +108,19 @@ public String toString() { "orderBy", orderBy, "sortBy", sortBy); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional orderBy = Optional.empty(); - + private Optional sortBy = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder orderBy(OrderBy orderBy) { Utils.checkNotNull(orderBy, "orderBy"); this.orderBy = Optional.ofNullable(orderBy); @@ -128,6 +133,7 @@ public Builder orderBy(Optional orderBy) { return this; } + public Builder sortBy(String sortBy) { Utils.checkNotNull(sortBy, "sortBy"); this.sortBy = Optional.ofNullable(sortBy); @@ -139,11 +145,12 @@ public Builder sortBy(Optional sortBy) { this.sortBy = sortBy; return this; } - + public SortOptions build() { + return new SortOptions( - orderBy, - sortBy); + orderBy, sortBy); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredLink.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredLink.java index f98421e0..a027300c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredLink.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredLink.java @@ -20,7 +20,6 @@ *

The display configuration for a link. */ public class StructuredLink { - /** * The display name for the link */ @@ -84,9 +83,10 @@ public Optional iconConfig() { return (Optional) iconConfig; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The display name for the link @@ -97,6 +97,7 @@ public StructuredLink withName(String name) { return this; } + /** * The display name for the link */ @@ -115,6 +116,7 @@ public StructuredLink withUrl(String url) { return this; } + /** * The URL for the link. */ @@ -133,6 +135,7 @@ public StructuredLink withIconConfig(IconConfig iconConfig) { return this; } + /** * Defines how to render an icon */ @@ -142,7 +145,6 @@ public StructuredLink withIconConfig(Optional iconConfig) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -161,9 +163,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - url, - iconConfig); + name, url, iconConfig); } @Override @@ -173,19 +173,21 @@ public String toString() { "url", url, "iconConfig", iconConfig); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional iconConfig = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The display name for the link */ @@ -204,6 +206,7 @@ public Builder name(Optional name) { return this; } + /** * The URL for the link. */ @@ -222,6 +225,7 @@ public Builder url(Optional url) { return this; } + /** * Defines how to render an icon */ @@ -239,12 +243,12 @@ public Builder iconConfig(Optional iconConfig) { this.iconConfig = iconConfig; return this; } - + public StructuredLink build() { + return new StructuredLink( - name, - url, - iconConfig); + name, url, iconConfig); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredLocation.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredLocation.java index f087fcef..466c5ece 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredLocation.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredLocation.java @@ -19,7 +19,6 @@ *

Detailed location with information about country, state, city etc. */ public class StructuredLocation { - /** * Desk number. */ @@ -115,7 +114,9 @@ public StructuredLocation( } public StructuredLocation() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -190,9 +191,10 @@ public Optional countryCode() { return countryCode; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Desk number. @@ -203,6 +205,7 @@ public StructuredLocation withDeskLocation(String deskLocation) { return this; } + /** * Desk number. */ @@ -221,6 +224,7 @@ public StructuredLocation withTimezone(String timezone) { return this; } + /** * Location's timezone, e.g. UTC, PST. */ @@ -239,6 +243,7 @@ public StructuredLocation withAddress(String address) { return this; } + /** * Office address or name. */ @@ -257,6 +262,7 @@ public StructuredLocation withCity(String city) { return this; } + /** * Name of the city. */ @@ -275,6 +281,7 @@ public StructuredLocation withState(String state) { return this; } + /** * State code. */ @@ -293,6 +300,7 @@ public StructuredLocation withRegion(String region) { return this; } + /** * Region information, e.g. NORAM, APAC. */ @@ -311,6 +319,7 @@ public StructuredLocation withZipCode(String zipCode) { return this; } + /** * ZIP Code for the address. */ @@ -329,6 +338,7 @@ public StructuredLocation withCountry(String country) { return this; } + /** * Country name. */ @@ -347,6 +357,7 @@ public StructuredLocation withCountryCode(String countryCode) { return this; } + /** * Alpha-2 or Alpha-3 ISO 3166 country code, e.g. US or USA. */ @@ -356,7 +367,6 @@ public StructuredLocation withCountryCode(Optional countryCode) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -381,15 +391,9 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - deskLocation, - timezone, - address, - city, - state, - region, - zipCode, - country, - countryCode); + deskLocation, timezone, address, + city, state, region, + zipCode, country, countryCode); } @Override @@ -405,31 +409,33 @@ public String toString() { "country", country, "countryCode", countryCode); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional deskLocation = Optional.empty(); - + private Optional timezone = Optional.empty(); - + private Optional address = Optional.empty(); - + private Optional city = Optional.empty(); - + private Optional state = Optional.empty(); - + private Optional region = Optional.empty(); - + private Optional zipCode = Optional.empty(); - + private Optional country = Optional.empty(); - + private Optional countryCode = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Desk number. */ @@ -448,6 +454,7 @@ public Builder deskLocation(Optional deskLocation) { return this; } + /** * Location's timezone, e.g. UTC, PST. */ @@ -466,6 +473,7 @@ public Builder timezone(Optional timezone) { return this; } + /** * Office address or name. */ @@ -484,6 +492,7 @@ public Builder address(Optional address) { return this; } + /** * Name of the city. */ @@ -502,6 +511,7 @@ public Builder city(Optional city) { return this; } + /** * State code. */ @@ -520,6 +530,7 @@ public Builder state(Optional state) { return this; } + /** * Region information, e.g. NORAM, APAC. */ @@ -538,6 +549,7 @@ public Builder region(Optional region) { return this; } + /** * ZIP Code for the address. */ @@ -556,6 +568,7 @@ public Builder zipCode(Optional zipCode) { return this; } + /** * Country name. */ @@ -574,6 +587,7 @@ public Builder country(Optional country) { return this; } + /** * Alpha-2 or Alpha-3 ISO 3166 country code, e.g. US or USA. */ @@ -591,18 +605,14 @@ public Builder countryCode(Optional countryCode) { this.countryCode = countryCode; return this; } - + public StructuredLocation build() { + return new StructuredLocation( - deskLocation, - timezone, - address, - city, - state, - region, - zipCode, - country, - countryCode); + deskLocation, timezone, address, + city, state, region, + zipCode, country, countryCode); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredResult.java index d0c175e6..06bfd7fd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredResult.java @@ -26,54 +26,67 @@ public class StructuredResult { @JsonProperty("document") private Optional document; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("person") private Optional person; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("customer") private Optional customer; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("team") private Optional team; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("customEntity") private Optional customEntity; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("answer") private Optional answer; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("extractedQnA") private Optional extractedQnA; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("meeting") private Optional meeting; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("app") private Optional app; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("collection") private Optional collection; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("answerBoard") private Optional answerBoard; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("code") private Optional code; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("shortcut") private Optional shortcut; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("querySuggestions") private Optional querySuggestions; @@ -85,6 +98,7 @@ public class StructuredResult { @JsonProperty("relatedDocuments") private Optional> relatedDocuments; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("relatedQuestion") private Optional relatedQuestion; @@ -192,7 +206,13 @@ public StructuredResult( } public StructuredResult() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") @@ -338,9 +358,10 @@ public Optional source() { return (Optional) source; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public StructuredResult withDocument(Document document) { Utils.checkNotNull(document, "document"); @@ -348,6 +369,7 @@ public StructuredResult withDocument(Document document) { return this; } + public StructuredResult withDocument(Optional document) { Utils.checkNotNull(document, "document"); this.document = document; @@ -360,6 +382,7 @@ public StructuredResult withPerson(Person person) { return this; } + public StructuredResult withPerson(Optional person) { Utils.checkNotNull(person, "person"); this.person = person; @@ -372,6 +395,7 @@ public StructuredResult withCustomer(Customer customer) { return this; } + public StructuredResult withCustomer(Optional customer) { Utils.checkNotNull(customer, "customer"); this.customer = customer; @@ -384,6 +408,7 @@ public StructuredResult withTeam(Team team) { return this; } + public StructuredResult withTeam(Optional team) { Utils.checkNotNull(team, "team"); this.team = team; @@ -396,6 +421,7 @@ public StructuredResult withCustomEntity(CustomEntity customEntity) { return this; } + public StructuredResult withCustomEntity(Optional customEntity) { Utils.checkNotNull(customEntity, "customEntity"); this.customEntity = customEntity; @@ -408,6 +434,7 @@ public StructuredResult withAnswer(Answer answer) { return this; } + public StructuredResult withAnswer(Optional answer) { Utils.checkNotNull(answer, "answer"); this.answer = answer; @@ -420,6 +447,7 @@ public StructuredResult withExtractedQnA(ExtractedQnA extractedQnA) { return this; } + public StructuredResult withExtractedQnA(Optional extractedQnA) { Utils.checkNotNull(extractedQnA, "extractedQnA"); this.extractedQnA = extractedQnA; @@ -432,6 +460,7 @@ public StructuredResult withMeeting(Meeting meeting) { return this; } + public StructuredResult withMeeting(Optional meeting) { Utils.checkNotNull(meeting, "meeting"); this.meeting = meeting; @@ -444,6 +473,7 @@ public StructuredResult withApp(AppResult app) { return this; } + public StructuredResult withApp(Optional app) { Utils.checkNotNull(app, "app"); this.app = app; @@ -456,6 +486,7 @@ public StructuredResult withCollection(Collection collection) { return this; } + public StructuredResult withCollection(Optional collection) { Utils.checkNotNull(collection, "collection"); this.collection = collection; @@ -468,6 +499,7 @@ public StructuredResult withAnswerBoard(AnswerBoard answerBoard) { return this; } + public StructuredResult withAnswerBoard(Optional answerBoard) { Utils.checkNotNull(answerBoard, "answerBoard"); this.answerBoard = answerBoard; @@ -480,6 +512,7 @@ public StructuredResult withCode(Code code) { return this; } + public StructuredResult withCode(Optional code) { Utils.checkNotNull(code, "code"); this.code = code; @@ -492,6 +525,7 @@ public StructuredResult withShortcut(Shortcut shortcut) { return this; } + public StructuredResult withShortcut(Optional shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = shortcut; @@ -504,6 +538,7 @@ public StructuredResult withQuerySuggestions(QuerySuggestionList querySuggestion return this; } + public StructuredResult withQuerySuggestions(Optional querySuggestions) { Utils.checkNotNull(querySuggestions, "querySuggestions"); this.querySuggestions = querySuggestions; @@ -519,6 +554,7 @@ public StructuredResult withRelatedDocuments(List relatedDocum return this; } + /** * A list of documents related to this structured result. */ @@ -534,6 +570,7 @@ public StructuredResult withRelatedQuestion(RelatedQuestion relatedQuestion) { return this; } + public StructuredResult withRelatedQuestion(Optional relatedQuestion) { Utils.checkNotNull(relatedQuestion, "relatedQuestion"); this.relatedQuestion = relatedQuestion; @@ -549,6 +586,7 @@ public StructuredResult withDisambiguation(Disambiguation disambiguation) { return this; } + /** * A disambiguation between multiple entities with the same name */ @@ -567,6 +605,7 @@ public StructuredResult withSnippets(List snippets) { return this; } + /** * Any snippets associated to the populated object. */ @@ -585,6 +624,7 @@ public StructuredResult withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. */ @@ -603,6 +643,7 @@ public StructuredResult withProminence(Prominence prominence) { return this; } + /** * The level of visual distinction that should be given to a result. */ @@ -621,6 +662,7 @@ public StructuredResult withSource(StructuredResultSource source) { return this; } + /** * Source context for this result. Possible values depend on the result type. */ @@ -630,7 +672,6 @@ public StructuredResult withSource(Optional so return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -667,27 +708,13 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - document, - person, - customer, - team, - customEntity, - answer, - extractedQnA, - meeting, - app, - collection, - answerBoard, - code, - shortcut, - querySuggestions, - relatedDocuments, - relatedQuestion, - disambiguation, - snippets, - trackingToken, - prominence, - source); + document, person, customer, + team, customEntity, answer, + extractedQnA, meeting, app, + collection, answerBoard, code, + shortcut, querySuggestions, relatedDocuments, + relatedQuestion, disambiguation, snippets, + trackingToken, prominence, source); } @Override @@ -715,55 +742,57 @@ public String toString() { "prominence", prominence, "source", source); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional document = Optional.empty(); - + private Optional person = Optional.empty(); - + private Optional customer = Optional.empty(); - + private Optional team = Optional.empty(); - + private Optional customEntity = Optional.empty(); - + private Optional answer = Optional.empty(); - + private Optional extractedQnA = Optional.empty(); - + private Optional meeting = Optional.empty(); - + private Optional app = Optional.empty(); - + private Optional collection = Optional.empty(); - + private Optional answerBoard = Optional.empty(); - + private Optional code = Optional.empty(); - + private Optional shortcut = Optional.empty(); - + private Optional querySuggestions = Optional.empty(); - + private Optional> relatedDocuments = Optional.empty(); - + private Optional relatedQuestion = Optional.empty(); - + private Optional disambiguation = Optional.empty(); - + private Optional> snippets = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Optional prominence = Optional.empty(); - + private Optional source = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder document(Document document) { Utils.checkNotNull(document, "document"); this.document = Optional.ofNullable(document); @@ -776,6 +805,7 @@ public Builder document(Optional document) { return this; } + public Builder person(Person person) { Utils.checkNotNull(person, "person"); this.person = Optional.ofNullable(person); @@ -788,6 +818,7 @@ public Builder person(Optional person) { return this; } + public Builder customer(Customer customer) { Utils.checkNotNull(customer, "customer"); this.customer = Optional.ofNullable(customer); @@ -800,6 +831,7 @@ public Builder customer(Optional customer) { return this; } + public Builder team(Team team) { Utils.checkNotNull(team, "team"); this.team = Optional.ofNullable(team); @@ -812,6 +844,7 @@ public Builder team(Optional team) { return this; } + public Builder customEntity(CustomEntity customEntity) { Utils.checkNotNull(customEntity, "customEntity"); this.customEntity = Optional.ofNullable(customEntity); @@ -824,6 +857,7 @@ public Builder customEntity(Optional customEntity) { return this; } + public Builder answer(Answer answer) { Utils.checkNotNull(answer, "answer"); this.answer = Optional.ofNullable(answer); @@ -836,6 +870,7 @@ public Builder answer(Optional answer) { return this; } + public Builder extractedQnA(ExtractedQnA extractedQnA) { Utils.checkNotNull(extractedQnA, "extractedQnA"); this.extractedQnA = Optional.ofNullable(extractedQnA); @@ -848,6 +883,7 @@ public Builder extractedQnA(Optional extractedQnA) { return this; } + public Builder meeting(Meeting meeting) { Utils.checkNotNull(meeting, "meeting"); this.meeting = Optional.ofNullable(meeting); @@ -860,6 +896,7 @@ public Builder meeting(Optional meeting) { return this; } + public Builder app(AppResult app) { Utils.checkNotNull(app, "app"); this.app = Optional.ofNullable(app); @@ -872,6 +909,7 @@ public Builder app(Optional app) { return this; } + public Builder collection(Collection collection) { Utils.checkNotNull(collection, "collection"); this.collection = Optional.ofNullable(collection); @@ -884,6 +922,7 @@ public Builder collection(Optional collection) { return this; } + public Builder answerBoard(AnswerBoard answerBoard) { Utils.checkNotNull(answerBoard, "answerBoard"); this.answerBoard = Optional.ofNullable(answerBoard); @@ -896,6 +935,7 @@ public Builder answerBoard(Optional answerBoard) { return this; } + public Builder code(Code code) { Utils.checkNotNull(code, "code"); this.code = Optional.ofNullable(code); @@ -908,6 +948,7 @@ public Builder code(Optional code) { return this; } + public Builder shortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = Optional.ofNullable(shortcut); @@ -920,6 +961,7 @@ public Builder shortcut(Optional shortcut) { return this; } + public Builder querySuggestions(QuerySuggestionList querySuggestions) { Utils.checkNotNull(querySuggestions, "querySuggestions"); this.querySuggestions = Optional.ofNullable(querySuggestions); @@ -932,6 +974,7 @@ public Builder querySuggestions(Optional querySug return this; } + /** * A list of documents related to this structured result. */ @@ -950,6 +993,7 @@ public Builder relatedDocuments(Optional> relat return this; } + public Builder relatedQuestion(RelatedQuestion relatedQuestion) { Utils.checkNotNull(relatedQuestion, "relatedQuestion"); this.relatedQuestion = Optional.ofNullable(relatedQuestion); @@ -962,6 +1006,7 @@ public Builder relatedQuestion(Optional relatedQuesti return this; } + /** * A disambiguation between multiple entities with the same name */ @@ -980,6 +1025,7 @@ public Builder disambiguation(Optional disambiguation) return this; } + /** * Any snippets associated to the populated object. */ @@ -998,6 +1044,7 @@ public Builder snippets(Optional> snippets) return this; } + /** * An opaque token that represents this particular result in this particular query. To be used for /feedback reporting. */ @@ -1016,6 +1063,7 @@ public Builder trackingToken(Optional trackingToken) { return this; } + /** * The level of visual distinction that should be given to a result. */ @@ -1034,6 +1082,7 @@ public Builder prominence(Optional prominence) { return this; } + /** * Source context for this result. Possible values depend on the result type. */ @@ -1051,30 +1100,18 @@ public Builder source(Optional source) { this.source = source; return this; } - + public StructuredResult build() { + return new StructuredResult( - document, - person, - customer, - team, - customEntity, - answer, - extractedQnA, - meeting, - app, - collection, - answerBoard, - code, - shortcut, - querySuggestions, - relatedDocuments, - relatedQuestion, - disambiguation, - snippets, - trackingToken, - prominence, - source); + document, person, customer, + team, customEntity, answer, + extractedQnA, meeting, app, + collection, answerBoard, code, + shortcut, querySuggestions, relatedDocuments, + relatedQuestion, disambiguation, snippets, + trackingToken, prominence, source); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredText.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredText.java index 6dcd7c33..78c9f961 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredText.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredText.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class StructuredText { @JsonProperty("text") @@ -56,9 +57,10 @@ public Optional> structuredList() { return (Optional>) structuredList; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public StructuredText withText(String text) { Utils.checkNotNull(text, "text"); @@ -75,6 +77,7 @@ public StructuredText withStructuredList(List structuredList return this; } + /** * An array of objects each of which contains either a string or a link which optionally corresponds to a document. */ @@ -84,7 +87,6 @@ public StructuredText withStructuredList(Optional> structuredList = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder text(String text) { Utils.checkNotNull(text, "text"); this.text = text; return this; } + /** * An array of objects each of which contains either a string or a link which optionally corresponds to a document. */ @@ -146,11 +150,12 @@ public Builder structuredList(Optional> struc this.structuredList = structuredList; return this; } - + public StructuredText build() { + return new StructuredText( - text, - structuredList); + text, structuredList); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredTextItem.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredTextItem.java index 8225f8dd..b8ad75e4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredTextItem.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredTextItem.java @@ -14,16 +14,19 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class StructuredTextItem { @JsonInclude(Include.NON_ABSENT) @JsonProperty("link") private Optional link; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("document") private Optional document; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("text") private Optional text; @@ -52,7 +55,8 @@ public StructuredTextItem( } public StructuredTextItem() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @JsonIgnore @@ -80,9 +84,10 @@ public Optional structuredResult() { return (Optional) structuredResult; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public StructuredTextItem withLink(String link) { Utils.checkNotNull(link, "link"); @@ -90,6 +95,7 @@ public StructuredTextItem withLink(String link) { return this; } + public StructuredTextItem withLink(Optional link) { Utils.checkNotNull(link, "link"); this.link = link; @@ -102,6 +108,7 @@ public StructuredTextItem withDocument(Document document) { return this; } + public StructuredTextItem withDocument(Optional document) { Utils.checkNotNull(document, "document"); this.document = document; @@ -114,6 +121,7 @@ public StructuredTextItem withText(String text) { return this; } + public StructuredTextItem withText(Optional text) { Utils.checkNotNull(text, "text"); this.text = text; @@ -129,6 +137,7 @@ public StructuredTextItem withStructuredResult(StructuredResult structuredResult return this; } + /** * A single object that can support any object in the work graph. Only a single object will be populated. */ @@ -138,7 +147,6 @@ public StructuredTextItem withStructuredResult(Optional link = Optional.empty(); - + private Optional document = Optional.empty(); - + private Optional text = Optional.empty(); - + private Optional structuredResult = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder link(String link) { Utils.checkNotNull(link, "link"); this.link = Optional.ofNullable(link); @@ -199,6 +207,7 @@ public Builder link(Optional link) { return this; } + public Builder document(Document document) { Utils.checkNotNull(document, "document"); this.document = Optional.ofNullable(document); @@ -211,6 +220,7 @@ public Builder document(Optional document) { return this; } + public Builder text(String text) { Utils.checkNotNull(text, "text"); this.text = Optional.ofNullable(text); @@ -223,6 +233,7 @@ public Builder text(Optional text) { return this; } + /** * A single object that can support any object in the work graph. Only a single object will be populated. */ @@ -240,13 +251,13 @@ public Builder structuredResult(Optional structuredR this.structuredResult = structuredResult; return this; } - + public StructuredTextItem build() { + return new StructuredTextItem( - link, - document, - text, + link, document, text, structuredResult); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredTextMutableProperties.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredTextMutableProperties.java index 36d40a2f..0b21bc88 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredTextMutableProperties.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/StructuredTextMutableProperties.java @@ -10,6 +10,7 @@ import java.lang.Override; import java.lang.String; + public class StructuredTextMutableProperties { @JsonProperty("text") @@ -27,9 +28,10 @@ public String text() { return text; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public StructuredTextMutableProperties withText(String text) { Utils.checkNotNull(text, "text"); @@ -37,7 +39,6 @@ public StructuredTextMutableProperties withText(String text) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -62,24 +63,28 @@ public String toString() { return Utils.toString(StructuredTextMutableProperties.class, "text", text); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String text; - + private Builder() { // force use of static builder() method } + public Builder text(String text) { Utils.checkNotNull(text, "text"); this.text = text; return this; } - + public StructuredTextMutableProperties build() { + return new StructuredTextMutableProperties( text); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SummarizeRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SummarizeRequest.java index 0f91d54b..c3deed69 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SummarizeRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SummarizeRequest.java @@ -22,7 +22,6 @@ *

Summary of the document */ public class SummarizeRequest { - /** * The ISO 8601 timestamp associated with the client request. */ @@ -78,7 +77,8 @@ public SummarizeRequest( public SummarizeRequest( List documentSpecs) { - this(Optional.empty(), Optional.empty(), Optional.empty(), documentSpecs, Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + documentSpecs, Optional.empty()); } /** @@ -121,9 +121,10 @@ public Optional trackingToken() { return trackingToken; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The ISO 8601 timestamp associated with the client request. @@ -134,6 +135,7 @@ public SummarizeRequest withTimestamp(OffsetDateTime timestamp) { return this; } + /** * The ISO 8601 timestamp associated with the client request. */ @@ -152,6 +154,7 @@ public SummarizeRequest withQuery(String query) { return this; } + /** * Optional query that the summary should be about */ @@ -170,6 +173,7 @@ public SummarizeRequest withPreferredSummaryLength(long preferredSummaryLength) return this; } + /** * Optional length of summary output. If not given, defaults to 500 chars. */ @@ -197,6 +201,7 @@ public SummarizeRequest withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this particular result. To be used for /feedback reporting. */ @@ -206,7 +211,6 @@ public SummarizeRequest withTrackingToken(Optional trackingToken) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -227,11 +231,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timestamp, - query, - preferredSummaryLength, - documentSpecs, - trackingToken); + timestamp, query, preferredSummaryLength, + documentSpecs, trackingToken); } @Override @@ -243,23 +244,25 @@ public String toString() { "documentSpecs", documentSpecs, "trackingToken", trackingToken); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timestamp = Optional.empty(); - + private Optional query = Optional.empty(); - + private Optional preferredSummaryLength = Optional.empty(); - + private List documentSpecs; - + private Optional trackingToken = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The ISO 8601 timestamp associated with the client request. */ @@ -278,6 +281,7 @@ public Builder timestamp(Optional timestamp) { return this; } + /** * Optional query that the summary should be about */ @@ -296,6 +300,7 @@ public Builder query(Optional query) { return this; } + /** * Optional length of summary output. If not given, defaults to 500 chars. */ @@ -314,6 +319,7 @@ public Builder preferredSummaryLength(Optional preferredSummaryLength) { return this; } + /** * Specifications of documents to summarize */ @@ -323,6 +329,7 @@ public Builder documentSpecs(List documentSpecs) { return this; } + /** * An opaque token that represents this particular result. To be used for /feedback reporting. */ @@ -340,14 +347,13 @@ public Builder trackingToken(Optional trackingToken) { this.trackingToken = trackingToken; return this; } - + public SummarizeRequest build() { + return new SummarizeRequest( - timestamp, - query, - preferredSummaryLength, - documentSpecs, - trackingToken); + timestamp, query, preferredSummaryLength, + documentSpecs, trackingToken); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/SummarizeResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/SummarizeResponse.java index 0c5fbea4..03ed43f2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/SummarizeResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/SummarizeResponse.java @@ -14,12 +14,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class SummarizeResponse { @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private Optional error; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("summary") private Optional summary; @@ -68,9 +70,10 @@ public Optional trackingToken() { return trackingToken; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public SummarizeResponse withError(Error error) { Utils.checkNotNull(error, "error"); @@ -78,6 +81,7 @@ public SummarizeResponse withError(Error error) { return this; } + public SummarizeResponse withError(Optional error) { Utils.checkNotNull(error, "error"); this.error = error; @@ -90,6 +94,7 @@ public SummarizeResponse withSummary(Summary summary) { return this; } + public SummarizeResponse withSummary(Optional summary) { Utils.checkNotNull(summary, "summary"); this.summary = summary; @@ -105,6 +110,7 @@ public SummarizeResponse withTrackingToken(String trackingToken) { return this; } + /** * An opaque token that represents this summary in this particular query. To be used for /feedback reporting. */ @@ -114,7 +120,6 @@ public SummarizeResponse withTrackingToken(Optional trackingToken) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -133,9 +138,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - error, - summary, - trackingToken); + error, summary, trackingToken); } @Override @@ -145,19 +148,21 @@ public String toString() { "summary", summary, "trackingToken", trackingToken); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional error = Optional.empty(); - + private Optional summary = Optional.empty(); - + private Optional trackingToken = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder error(Error error) { Utils.checkNotNull(error, "error"); this.error = Optional.ofNullable(error); @@ -170,6 +175,7 @@ public Builder error(Optional error) { return this; } + public Builder summary(Summary summary) { Utils.checkNotNull(summary, "summary"); this.summary = Optional.ofNullable(summary); @@ -182,6 +188,7 @@ public Builder summary(Optional summary) { return this; } + /** * An opaque token that represents this summary in this particular query. To be used for /feedback reporting. */ @@ -199,12 +206,12 @@ public Builder trackingToken(Optional trackingToken) { this.trackingToken = trackingToken; return this; } - + public SummarizeResponse build() { + return new SummarizeResponse( - error, - summary, - trackingToken); + error, summary, trackingToken); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Summary.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Summary.java index 6c1b08ee..7d0a87f3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Summary.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Summary.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class Summary { @JsonInclude(Include.NON_ABSENT) @@ -56,9 +57,10 @@ public Optional> followUpPrompts() { return (Optional>) followUpPrompts; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public Summary withText(String text) { Utils.checkNotNull(text, "text"); @@ -66,6 +68,7 @@ public Summary withText(String text) { return this; } + public Summary withText(Optional text) { Utils.checkNotNull(text, "text"); this.text = text; @@ -81,6 +84,7 @@ public Summary withFollowUpPrompts(List followUpPrompts) { return this; } + /** * Follow-up prompts based on the summarized doc */ @@ -90,7 +94,6 @@ public Summary withFollowUpPrompts(Optional> followUpProm return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -108,8 +111,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - text, - followUpPrompts); + text, followUpPrompts); } @Override @@ -118,17 +120,19 @@ public String toString() { "text", text, "followUpPrompts", followUpPrompts); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional text = Optional.empty(); - + private Optional> followUpPrompts = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder text(String text) { Utils.checkNotNull(text, "text"); this.text = Optional.ofNullable(text); @@ -141,6 +145,7 @@ public Builder text(Optional text) { return this; } + /** * Follow-up prompts based on the summarized doc */ @@ -158,11 +163,12 @@ public Builder followUpPrompts(Optional> followUpPrompts) this.followUpPrompts = followUpPrompts; return this; } - + public Summary build() { + return new Summary( - text, - followUpPrompts); + text, followUpPrompts); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Team.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Team.java index 0a8b8ebc..5a709105 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Team.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Team.java @@ -21,8 +21,8 @@ import java.util.Map; import java.util.Optional; -public class Team { +public class Team { /** * A list of objects related to a source object. */ @@ -30,6 +30,7 @@ public class Team { @JsonProperty("relatedObjects") private Optional> relatedObjects; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; @@ -235,7 +236,13 @@ public Team( public Team( String id, String name) { - this(Optional.empty(), Optional.empty(), id, name, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), id, + name, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -410,9 +417,10 @@ public Optional loggingId() { return loggingId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A list of objects related to a source object. @@ -423,6 +431,7 @@ public Team withRelatedObjects(Map relatedObjects) { return this; } + /** * A list of objects related to a source object. */ @@ -438,6 +447,7 @@ public Team withPermissions(ObjectPermissions permissions) { return this; } + public Team withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -471,6 +481,7 @@ public Team withDescription(String description) { return this; } + /** * A description of the team */ @@ -489,6 +500,7 @@ public Team withBusinessUnit(String businessUnit) { return this; } + /** * Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. */ @@ -507,6 +519,7 @@ public Team withDepartment(String department) { return this; } + /** * An organizational unit where everyone has a similar task, e.g. `Engineering`. */ @@ -525,6 +538,7 @@ public Team withPhotoUrl(String photoUrl) { return this; } + /** * A link to the team's photo. */ @@ -543,6 +557,7 @@ public Team withBannerUrl(String bannerUrl) { return this; } + /** * A link to the team's banner photo. */ @@ -561,6 +576,7 @@ public Team withExternalLink(String externalLink) { return this; } + /** * Link to a team page on the internet or your company's intranet */ @@ -579,6 +595,7 @@ public Team withMembers(List members) { return this; } + /** * The members on this team */ @@ -597,6 +614,7 @@ public Team withMemberCount(long memberCount) { return this; } + /** * Number of members on this team (recursive; includes all individuals that belong to this team, and all individuals that belong to a subteam within this team) */ @@ -615,6 +633,7 @@ public Team withEmails(List emails) { return this; } + /** * The emails for this team */ @@ -633,6 +652,7 @@ public Team withCustomFields(List customFields) { return this; } + /** * Customizable fields for additional team information. */ @@ -651,6 +671,7 @@ public Team withDatasourceProfiles(List datasourceProfiles) { return this; } + /** * The datasource profiles of the team */ @@ -669,6 +690,7 @@ public Team withDatasource(String datasource) { return this; } + /** * the data source of the team, e.g. GDRIVE */ @@ -687,6 +709,7 @@ public Team withCreatedFrom(String createdFrom) { return this; } + /** * For teams created from docs, the doc title. Otherwise empty. */ @@ -705,6 +728,7 @@ public Team withLastUpdatedAt(OffsetDateTime lastUpdatedAt) { return this; } + /** * when this team was last updated. */ @@ -723,6 +747,7 @@ public Team withStatus(TeamStatus status) { return this; } + /** * whether this team is fully processed or there are still unprocessed operations that'll affect it */ @@ -741,6 +766,7 @@ public Team withCanBeDeleted(boolean canBeDeleted) { return this; } + /** * can this team be deleted. Some manually ingested teams like GCS_CSV or PUSH_API cannot */ @@ -759,6 +785,7 @@ public Team withLoggingId(String loggingId) { return this; } + /** * The logging id of the team used in scrubbed logs, client analytics, and metrics. */ @@ -768,7 +795,6 @@ public Team withLoggingId(Optional loggingId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -805,27 +831,13 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - relatedObjects, - permissions, - id, - name, - description, - businessUnit, - department, - photoUrl, - bannerUrl, - externalLink, - members, - memberCount, - emails, - customFields, - datasourceProfiles, - datasource, - createdFrom, - lastUpdatedAt, - status, - canBeDeleted, - loggingId); + relatedObjects, permissions, id, + name, description, businessUnit, + department, photoUrl, bannerUrl, + externalLink, members, memberCount, + emails, customFields, datasourceProfiles, + datasource, createdFrom, lastUpdatedAt, + status, canBeDeleted, loggingId); } @Override @@ -853,55 +865,57 @@ public String toString() { "canBeDeleted", canBeDeleted, "loggingId", loggingId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> relatedObjects = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private String id; - + private String name; - + private Optional description = Optional.empty(); - + private Optional businessUnit = Optional.empty(); - + private Optional department = Optional.empty(); - + private Optional photoUrl = Optional.empty(); - + private Optional bannerUrl = Optional.empty(); - + private Optional externalLink = Optional.empty(); - + private Optional> members = Optional.empty(); - + private Optional memberCount = Optional.empty(); - + private Optional> emails = Optional.empty(); - + private Optional> customFields = Optional.empty(); - + private Optional> datasourceProfiles = Optional.empty(); - + private Optional datasource = Optional.empty(); - + private Optional createdFrom = Optional.empty(); - + private Optional lastUpdatedAt = Optional.empty(); - + private Optional status; - + private Optional canBeDeleted; - + private Optional loggingId = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A list of objects related to a source object. */ @@ -920,6 +934,7 @@ public Builder relatedObjects(Optional> return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -932,6 +947,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * Unique identifier */ @@ -941,6 +957,7 @@ public Builder id(String id) { return this; } + /** * Team name */ @@ -950,6 +967,7 @@ public Builder name(String name) { return this; } + /** * A description of the team */ @@ -968,6 +986,7 @@ public Builder description(Optional description) { return this; } + /** * Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. */ @@ -986,6 +1005,7 @@ public Builder businessUnit(Optional businessUnit) { return this; } + /** * An organizational unit where everyone has a similar task, e.g. `Engineering`. */ @@ -1004,6 +1024,7 @@ public Builder department(Optional department) { return this; } + /** * A link to the team's photo. */ @@ -1022,6 +1043,7 @@ public Builder photoUrl(Optional photoUrl) { return this; } + /** * A link to the team's banner photo. */ @@ -1040,6 +1062,7 @@ public Builder bannerUrl(Optional bannerUrl) { return this; } + /** * Link to a team page on the internet or your company's intranet */ @@ -1058,6 +1081,7 @@ public Builder externalLink(Optional externalLink) { return this; } + /** * The members on this team */ @@ -1076,6 +1100,7 @@ public Builder members(Optional> member return this; } + /** * Number of members on this team (recursive; includes all individuals that belong to this team, and all individuals that belong to a subteam within this team) */ @@ -1094,6 +1119,7 @@ public Builder memberCount(Optional memberCount) { return this; } + /** * The emails for this team */ @@ -1112,6 +1138,7 @@ public Builder emails(Optional> emails) { return this; } + /** * Customizable fields for additional team information. */ @@ -1130,6 +1157,7 @@ public Builder customFields(Optional> customFiel return this; } + /** * The datasource profiles of the team */ @@ -1148,6 +1176,7 @@ public Builder datasourceProfiles(Optional> da return this; } + /** * the data source of the team, e.g. GDRIVE */ @@ -1166,6 +1195,7 @@ public Builder datasource(Optional datasource) { return this; } + /** * For teams created from docs, the doc title. Otherwise empty. */ @@ -1184,6 +1214,7 @@ public Builder createdFrom(Optional createdFrom) { return this; } + /** * when this team was last updated. */ @@ -1202,6 +1233,7 @@ public Builder lastUpdatedAt(Optional lastUpdatedAt) { return this; } + /** * whether this team is fully processed or there are still unprocessed operations that'll affect it */ @@ -1220,6 +1252,7 @@ public Builder status(Optional status) { return this; } + /** * can this team be deleted. Some manually ingested teams like GCS_CSV or PUSH_API cannot */ @@ -1238,6 +1271,7 @@ public Builder canBeDeleted(Optional canBeDeleted) { return this; } + /** * The logging id of the team used in scrubbed logs, client analytics, and metrics. */ @@ -1255,7 +1289,7 @@ public Builder loggingId(Optional loggingId) { this.loggingId = loggingId; return this; } - + public Team build() { if (status == null) { status = _SINGLETON_VALUE_Status.value(); @@ -1263,30 +1297,18 @@ public Team build() { if (canBeDeleted == null) { canBeDeleted = _SINGLETON_VALUE_CanBeDeleted.value(); } + return new Team( - relatedObjects, - permissions, - id, - name, - description, - businessUnit, - department, - photoUrl, - bannerUrl, - externalLink, - members, - memberCount, - emails, - customFields, - datasourceProfiles, - datasource, - createdFrom, - lastUpdatedAt, - status, - canBeDeleted, - loggingId); + relatedObjects, permissions, id, + name, description, businessUnit, + department, photoUrl, bannerUrl, + externalLink, members, memberCount, + emails, customFields, datasourceProfiles, + datasource, createdFrom, lastUpdatedAt, + status, canBeDeleted, loggingId); } + private static final LazySingletonValue> _SINGLETON_VALUE_Status = new LazySingletonValue<>( "status", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/TeamEmail.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/TeamEmail.java index 71d1bb3c..c31bd9dc 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/TeamEmail.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/TeamEmail.java @@ -21,7 +21,6 @@ *

Information about a team's email */ public class TeamEmail { - /** * An email address */ @@ -66,9 +65,10 @@ public Optional type() { return type; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * An email address @@ -88,6 +88,7 @@ public TeamEmail withType(String type) { return this; } + /** * An enum of `PRIMARY`, `SECONDARY`, `ONCALL`, `OTHER` */ @@ -97,7 +98,6 @@ public TeamEmail withType(Optional type) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -115,8 +115,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - email, - type); + email, type); } @Override @@ -125,17 +124,19 @@ public String toString() { "email", email, "type", type); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String email; - + private Optional type; - + private Builder() { // force use of static builder() method } + /** * An email address */ @@ -145,6 +146,7 @@ public Builder email(String email) { return this; } + /** * An enum of `PRIMARY`, `SECONDARY`, `ONCALL`, `OTHER` */ @@ -162,16 +164,17 @@ public Builder type(Optional type) { this.type = type; return this; } - + public TeamEmail build() { if (type == null) { type = _SINGLETON_VALUE_Type.value(); } + return new TeamEmail( - email, - type); + email, type); } + private static final LazySingletonValue> _SINGLETON_VALUE_Type = new LazySingletonValue<>( "type", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/TeamInfoDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/TeamInfoDefinition.java index 38973761..1eb21a56 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/TeamInfoDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/TeamInfoDefinition.java @@ -21,7 +21,6 @@ *

Information about an employee's team */ public class TeamInfoDefinition { - /** * The unique ID of the team */ @@ -137,7 +136,10 @@ public TeamInfoDefinition( String id, String name, List members) { - this(id, name, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), members, Optional.empty()); + this(id, name, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + members, Optional.empty()); } /** @@ -231,9 +233,10 @@ public Optional> additionalFields() { return (Optional>) additionalFields; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The unique ID of the team @@ -262,6 +265,7 @@ public TeamInfoDefinition withDescription(String description) { return this; } + /** * The description of this team */ @@ -280,6 +284,7 @@ public TeamInfoDefinition withBusinessUnit(String businessUnit) { return this; } + /** * Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. */ @@ -298,6 +303,7 @@ public TeamInfoDefinition withDepartment(String department) { return this; } + /** * An organizational unit where everyone has a similar task, e.g. `Engineering`. */ @@ -316,6 +322,7 @@ public TeamInfoDefinition withPhotoUrl(String photoUrl) { return this; } + /** * A link to the team's photo */ @@ -334,6 +341,7 @@ public TeamInfoDefinition withExternalLink(String externalLink) { return this; } + /** * A link to an external team page. If set, team results will link to it. */ @@ -352,6 +360,7 @@ public TeamInfoDefinition withEmails(List emails) { return this; } + /** * The emails of the team */ @@ -370,6 +379,7 @@ public TeamInfoDefinition withDatasourceProfiles(List datasou return this; } + /** * The datasource profiles of the team, e.g. `Slack`,`Github`. */ @@ -397,6 +407,7 @@ public TeamInfoDefinition withAdditionalFields(List a return this; } + /** * List of additional fields with more information about the team. */ @@ -406,7 +417,6 @@ public TeamInfoDefinition withAdditionalFields(Optional description = Optional.empty(); - + private Optional businessUnit = Optional.empty(); - + private Optional department = Optional.empty(); - + private Optional photoUrl = Optional.empty(); - + private Optional externalLink = Optional.empty(); - + private Optional> emails = Optional.empty(); - + private Optional> datasourceProfiles = Optional.empty(); - + private List members; - + private Optional> additionalFields = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The unique ID of the team */ @@ -499,6 +504,7 @@ public Builder id(String id) { return this; } + /** * Human-readable team name */ @@ -508,6 +514,7 @@ public Builder name(String name) { return this; } + /** * The description of this team */ @@ -526,6 +533,7 @@ public Builder description(Optional description) { return this; } + /** * Typically the highest level organizational unit; generally applies to bigger companies with multiple distinct businesses. */ @@ -544,6 +552,7 @@ public Builder businessUnit(Optional businessUnit) { return this; } + /** * An organizational unit where everyone has a similar task, e.g. `Engineering`. */ @@ -562,6 +571,7 @@ public Builder department(Optional department) { return this; } + /** * A link to the team's photo */ @@ -580,6 +590,7 @@ public Builder photoUrl(Optional photoUrl) { return this; } + /** * A link to an external team page. If set, team results will link to it. */ @@ -598,6 +609,7 @@ public Builder externalLink(Optional externalLink) { return this; } + /** * The emails of the team */ @@ -616,6 +628,7 @@ public Builder emails(Optional> emails) { return this; } + /** * The datasource profiles of the team, e.g. `Slack`,`Github`. */ @@ -634,6 +647,7 @@ public Builder datasourceProfiles(Optional> da return this; } + /** * The members of the team */ @@ -643,6 +657,7 @@ public Builder members(List members) { return this; } + /** * List of additional fields with more information about the team. */ @@ -660,20 +675,15 @@ public Builder additionalFields(OptionalInformation about a team's member */ public class TeamMember { - /** * The member's email */ @@ -85,9 +84,10 @@ public Optional joinDate() { return joinDate; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The member's email @@ -107,6 +107,7 @@ public TeamMember withRelationship(String relationship) { return this; } + /** * The member's relationship to the team, an enum of `MEMBER`, `MANAGER`, `LEAD`, `POINT_OF_CONTACT`, `OTHER` */ @@ -125,6 +126,7 @@ public TeamMember withJoinDate(LocalDate joinDate) { return this; } + /** * The member's start date */ @@ -134,7 +136,6 @@ public TeamMember withJoinDate(Optional joinDate) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -153,9 +154,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - email, - relationship, - joinDate); + email, relationship, joinDate); } @Override @@ -165,19 +164,21 @@ public String toString() { "relationship", relationship, "joinDate", joinDate); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String email; - + private Optional relationship; - + private Optional joinDate = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The member's email */ @@ -187,6 +188,7 @@ public Builder email(String email) { return this; } + /** * The member's relationship to the team, an enum of `MEMBER`, `MANAGER`, `LEAD`, `POINT_OF_CONTACT`, `OTHER` */ @@ -205,6 +207,7 @@ public Builder relationship(Optional relationship) { return this; } + /** * The member's start date */ @@ -222,17 +225,17 @@ public Builder joinDate(Optional joinDate) { this.joinDate = joinDate; return this; } - + public TeamMember build() { if (relationship == null) { relationship = _SINGLETON_VALUE_Relationship.value(); } + return new TeamMember( - email, - relationship, - joinDate); + email, relationship, joinDate); } + private static final LazySingletonValue> _SINGLETON_VALUE_Relationship = new LazySingletonValue<>( "relationship", diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/TextRange.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/TextRange.java index a8ee2583..83d9f4bd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/TextRange.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/TextRange.java @@ -21,7 +21,6 @@ *

A subsection of a given string to which some special formatting should be applied. */ public class TextRange { - /** * The inclusive start index of the range. */ @@ -35,6 +34,7 @@ public class TextRange { @JsonProperty("endIndex") private Optional endIndex; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") private Optional type; @@ -46,6 +46,7 @@ public class TextRange { @JsonProperty("url") private Optional url; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("document") private Optional document; @@ -71,7 +72,8 @@ public TextRange( public TextRange( long startIndex) { - this(startIndex, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(startIndex, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -110,9 +112,10 @@ public Optional document() { return (Optional) document; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The inclusive start index of the range. @@ -132,6 +135,7 @@ public TextRange withEndIndex(long endIndex) { return this; } + /** * The exclusive end index of the range. */ @@ -147,6 +151,7 @@ public TextRange withType(TextRangeType type) { return this; } + public TextRange withType(Optional type) { Utils.checkNotNull(type, "type"); this.type = type; @@ -162,6 +167,7 @@ public TextRange withUrl(String url) { return this; } + /** * The URL associated with the range, if applicable. For example, the linked URL for a LINK range. */ @@ -177,13 +183,13 @@ public TextRange withDocument(Document document) { return this; } + public TextRange withDocument(Optional document) { Utils.checkNotNull(document, "document"); this.document = document; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -204,11 +210,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - startIndex, - endIndex, - type, - url, - document); + startIndex, endIndex, type, + url, document); } @Override @@ -220,23 +223,25 @@ public String toString() { "url", url, "document", document); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Long startIndex; - + private Optional endIndex = Optional.empty(); - + private Optional type = Optional.empty(); - + private Optional url = Optional.empty(); - + private Optional document = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The inclusive start index of the range. */ @@ -246,6 +251,7 @@ public Builder startIndex(long startIndex) { return this; } + /** * The exclusive end index of the range. */ @@ -264,6 +270,7 @@ public Builder endIndex(Optional endIndex) { return this; } + public Builder type(TextRangeType type) { Utils.checkNotNull(type, "type"); this.type = Optional.ofNullable(type); @@ -276,6 +283,7 @@ public Builder type(Optional type) { return this; } + /** * The URL associated with the range, if applicable. For example, the linked URL for a LINK range. */ @@ -294,6 +302,7 @@ public Builder url(Optional url) { return this; } + public Builder document(Document document) { Utils.checkNotNull(document, "document"); this.document = Optional.ofNullable(document); @@ -305,14 +314,13 @@ public Builder document(Optional document) { this.document = document; return this; } - + public TextRange build() { + return new TextRange( - startIndex, - endIndex, - type, - url, - document); + startIndex, endIndex, type, + url, document); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Thumbnail.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Thumbnail.java index d84662d7..5f304dae 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Thumbnail.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Thumbnail.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class Thumbnail { +public class Thumbnail { /** * Photo id if the thumbnail is from splash. */ @@ -59,9 +59,10 @@ public Optional url() { return url; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Photo id if the thumbnail is from splash. @@ -72,6 +73,7 @@ public Thumbnail withPhotoId(String photoId) { return this; } + /** * Photo id if the thumbnail is from splash. */ @@ -90,6 +92,7 @@ public Thumbnail withUrl(String url) { return this; } + /** * Thumbnail URL. This can be user provided image and/or from downloaded images hosted by Glean. */ @@ -99,7 +102,6 @@ public Thumbnail withUrl(Optional url) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,8 +119,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - photoId, - url); + photoId, url); } @Override @@ -127,17 +128,19 @@ public String toString() { "photoId", photoId, "url", url); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional photoId = Optional.empty(); - + private Optional url = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Photo id if the thumbnail is from splash. */ @@ -156,6 +159,7 @@ public Builder photoId(Optional photoId) { return this; } + /** * Thumbnail URL. This can be user provided image and/or from downloaded images hosted by Glean. */ @@ -173,11 +177,12 @@ public Builder url(Optional url) { this.url = url; return this; } - + public Thumbnail build() { + return new Thumbnail( - photoId, - url); + photoId, url); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/TimeInterval.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/TimeInterval.java index ca403291..99516d1f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/TimeInterval.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/TimeInterval.java @@ -10,8 +10,8 @@ import java.lang.Override; import java.lang.String; -public class TimeInterval { +public class TimeInterval { /** * The RFC3339 timestamp formatted start time of this event. */ @@ -50,9 +50,10 @@ public String end() { return end; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The RFC3339 timestamp formatted start time of this event. @@ -72,7 +73,6 @@ public TimeInterval withEnd(String end) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -90,8 +90,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - start, - end); + start, end); } @Override @@ -100,17 +99,19 @@ public String toString() { "start", start, "end", end); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String start; - + private String end; - + private Builder() { // force use of static builder() method } + /** * The RFC3339 timestamp formatted start time of this event. */ @@ -120,6 +121,7 @@ public Builder start(String start) { return this; } + /** * The RFC3339 timestamp formatted end time of this event. */ @@ -128,11 +130,12 @@ public Builder end(String end) { this.end = end; return this; } - + public TimeInterval build() { + return new TimeInterval( - start, - end); + start, end); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/TimePoint.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/TimePoint.java index ef26c932..8aa18fe0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/TimePoint.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/TimePoint.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class TimePoint { +public class TimePoint { /** * Epoch seconds. Has precedence over daysFromNow. */ @@ -60,9 +60,10 @@ public Optional daysFromNow() { return daysFromNow; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Epoch seconds. Has precedence over daysFromNow. @@ -73,6 +74,7 @@ public TimePoint withEpochSeconds(long epochSeconds) { return this; } + /** * Epoch seconds. Has precedence over daysFromNow. */ @@ -91,6 +93,7 @@ public TimePoint withDaysFromNow(long daysFromNow) { return this; } + /** * The number of days from now. Specification relative to current time. Can be negative. */ @@ -100,7 +103,6 @@ public TimePoint withDaysFromNow(Optional daysFromNow) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -118,8 +120,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - epochSeconds, - daysFromNow); + epochSeconds, daysFromNow); } @Override @@ -128,17 +129,19 @@ public String toString() { "epochSeconds", epochSeconds, "daysFromNow", daysFromNow); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional epochSeconds = Optional.empty(); - + private Optional daysFromNow = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Epoch seconds. Has precedence over daysFromNow. */ @@ -157,6 +160,7 @@ public Builder epochSeconds(Optional epochSeconds) { return this; } + /** * The number of days from now. Specification relative to current time. Can be negative. */ @@ -174,11 +178,12 @@ public Builder daysFromNow(Optional daysFromNow) { this.daysFromNow = daysFromNow; return this; } - + public TimePoint build() { + return new TimePoint( - epochSeconds, - daysFromNow); + epochSeconds, daysFromNow); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/TimeRange.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/TimeRange.java index c6cf19e1..b25ae089 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/TimeRange.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/TimeRange.java @@ -15,8 +15,8 @@ import java.time.OffsetDateTime; import java.util.Optional; -public class TimeRange { +public class TimeRange { /** * start time of the time range, applicable for the CUSTOM type. */ @@ -79,9 +79,10 @@ public Optional lastNDaysValue() { return lastNDaysValue; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * start time of the time range, applicable for the CUSTOM type. @@ -92,6 +93,7 @@ public TimeRange withStartTime(OffsetDateTime startTime) { return this; } + /** * start time of the time range, applicable for the CUSTOM type. */ @@ -110,6 +112,7 @@ public TimeRange withEndTime(OffsetDateTime endTime) { return this; } + /** * end time of the time range, applicable for the CUSTOM type. */ @@ -128,6 +131,7 @@ public TimeRange withLastNDaysValue(long lastNDaysValue) { return this; } + /** * The number of days to look back from the current time, applicable for the LAST_N_DAYS type. */ @@ -137,7 +141,6 @@ public TimeRange withLastNDaysValue(Optional lastNDaysValue) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -156,9 +159,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - startTime, - endTime, - lastNDaysValue); + startTime, endTime, lastNDaysValue); } @Override @@ -168,19 +169,21 @@ public String toString() { "endTime", endTime, "lastNDaysValue", lastNDaysValue); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional startTime = Optional.empty(); - + private Optional endTime = Optional.empty(); - + private Optional lastNDaysValue = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * start time of the time range, applicable for the CUSTOM type. */ @@ -199,6 +202,7 @@ public Builder startTime(Optional startTime) { return this; } + /** * end time of the time range, applicable for the CUSTOM type. */ @@ -217,6 +221,7 @@ public Builder endTime(Optional endTime) { return this; } + /** * The number of days to look back from the current time, applicable for the LAST_N_DAYS type. */ @@ -234,12 +239,12 @@ public Builder lastNDaysValue(Optional lastNDaysValue) { this.lastNDaysValue = lastNDaysValue; return this; } - + public TimeRange build() { + return new TimeRange( - startTime, - endTime, - lastNDaysValue); + startTime, endTime, lastNDaysValue); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Tool.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Tool.java index 7e01d399..2fe36fd0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Tool.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Tool.java @@ -15,8 +15,8 @@ import java.util.Map; import java.util.Optional; -public class Tool { +public class Tool { /** * Type of tool (READ, WRITE) */ @@ -72,7 +72,8 @@ public Tool( } public Tool() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -117,9 +118,10 @@ public Optional> parameters() { return (Optional>) parameters; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Type of tool (READ, WRITE) @@ -130,6 +132,7 @@ public Tool withType(ToolType type) { return this; } + /** * Type of tool (READ, WRITE) */ @@ -148,6 +151,7 @@ public Tool withName(String name) { return this; } + /** * Unique identifier for the tool */ @@ -166,6 +170,7 @@ public Tool withDisplayName(String displayName) { return this; } + /** * Human-readable name */ @@ -184,6 +189,7 @@ public Tool withDescription(String description) { return this; } + /** * LLM friendly description of the tool */ @@ -202,6 +208,7 @@ public Tool withParameters(Map parameters) { return this; } + /** * The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. */ @@ -211,7 +218,6 @@ public Tool withParameters(Optional> parame return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -232,11 +238,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - type, - name, - displayName, - description, - parameters); + type, name, displayName, + description, parameters); } @Override @@ -248,23 +251,25 @@ public String toString() { "description", description, "parameters", parameters); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional type = Optional.empty(); - + private Optional name = Optional.empty(); - + private Optional displayName = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional> parameters = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Type of tool (READ, WRITE) */ @@ -283,6 +288,7 @@ public Builder type(Optional type) { return this; } + /** * Unique identifier for the tool */ @@ -301,6 +307,7 @@ public Builder name(Optional name) { return this; } + /** * Human-readable name */ @@ -319,6 +326,7 @@ public Builder displayName(Optional displayName) { return this; } + /** * LLM friendly description of the tool */ @@ -337,6 +345,7 @@ public Builder description(Optional description) { return this; } + /** * The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. */ @@ -354,14 +363,13 @@ public Builder parameters(Optional> paramet this.parameters = parameters; return this; } - + public Tool build() { + return new Tool( - type, - name, - displayName, - description, - parameters); + type, name, displayName, + description, parameters); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolInfo.java index 0dadea06..0dbfd3b1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolInfo.java @@ -15,8 +15,8 @@ import java.util.Map; import java.util.Optional; -public class ToolInfo { +public class ToolInfo { /** * The manifest for a tool that can be used to augment Glean Assistant. */ @@ -63,9 +63,10 @@ public Optional> parameters() { return (Optional>) parameters; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The manifest for a tool that can be used to augment Glean Assistant. @@ -76,6 +77,7 @@ public ToolInfo withMetadata(ToolMetadata metadata) { return this; } + /** * The manifest for a tool that can be used to augment Glean Assistant. */ @@ -94,6 +96,7 @@ public ToolInfo withParameters(Map parameters) { return this; } + /** * Parameters supported by the tool. */ @@ -103,7 +106,6 @@ public ToolInfo withParameters(Optional metadata = Optional.empty(); - + private Optional> parameters = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The manifest for a tool that can be used to augment Glean Assistant. */ @@ -160,6 +163,7 @@ public Builder metadata(Optional metadata) { return this; } + /** * Parameters supported by the tool. */ @@ -177,11 +181,12 @@ public Builder parameters(Optional> this.parameters = parameters; return this; } - + public ToolInfo build() { + return new ToolInfo( - metadata, - parameters); + metadata, parameters); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java index b85e315e..99453511 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolMetadata.java @@ -22,7 +22,6 @@ *

The manifest for a tool that can be used to augment Glean Assistant. */ public class ToolMetadata { - /** * The type of tool. */ @@ -75,10 +74,12 @@ public class ToolMetadata { @JsonProperty("knowledgeType") private Optional knowledgeType; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("createdBy") private Optional createdBy; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("lastUpdatedBy") private Optional lastUpdatedBy; @@ -122,6 +123,7 @@ public class ToolMetadata { @JsonProperty("auth") private Optional auth; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; @@ -203,7 +205,12 @@ public ToolMetadata( String name, String displayName, String displayDescription) { - this(type, name, displayName, Optional.empty(), displayDescription, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(type, name, displayName, + Optional.empty(), displayDescription, Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -352,9 +359,10 @@ public Optional isSetupFinished() { return isSetupFinished; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The type of tool. @@ -392,6 +400,7 @@ public ToolMetadata withToolId(String toolId) { return this; } + /** * An opaque id which is unique identifier for the tool. */ @@ -419,6 +428,7 @@ public ToolMetadata withLogoUrl(String logoUrl) { return this; } + /** * URL used to fetch the logo. */ @@ -437,6 +447,7 @@ public ToolMetadata withObjectName(String objectName) { return this; } + /** * Name of the generated object. This will be used to indicate to the end user what the generated object contains. */ @@ -455,6 +466,7 @@ public ToolMetadata withKnowledgeType(KnowledgeType knowledgeType) { return this; } + /** * Indicates the kind of knowledge a tool would access or modify. */ @@ -470,6 +482,7 @@ public ToolMetadata withCreatedBy(PersonObject createdBy) { return this; } + public ToolMetadata withCreatedBy(Optional createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = createdBy; @@ -482,6 +495,7 @@ public ToolMetadata withLastUpdatedBy(PersonObject lastUpdatedBy) { return this; } + public ToolMetadata withLastUpdatedBy(Optional lastUpdatedBy) { Utils.checkNotNull(lastUpdatedBy, "lastUpdatedBy"); this.lastUpdatedBy = lastUpdatedBy; @@ -497,6 +511,7 @@ public ToolMetadata withCreatedAt(OffsetDateTime createdAt) { return this; } + /** * The time the tool was created in ISO format (ISO 8601) */ @@ -515,6 +530,7 @@ public ToolMetadata withLastUpdatedAt(OffsetDateTime lastUpdatedAt) { return this; } + /** * The time the tool was last updated in ISO format (ISO 8601) */ @@ -533,6 +549,7 @@ public ToolMetadata withWriteActionType(WriteActionType writeActionType) { return this; } + /** * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. */ @@ -555,6 +572,7 @@ public ToolMetadata withAuthType(AuthType authType) { return this; } + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. @@ -577,6 +595,7 @@ public ToolMetadata withAuth(AuthConfig auth) { return this; } + /** * Config for tool's authentication method. */ @@ -592,6 +611,7 @@ public ToolMetadata withPermissions(ObjectPermissions permissions) { return this; } + public ToolMetadata withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -607,6 +627,7 @@ public ToolMetadata withUsageInstructions(String usageInstructions) { return this; } + /** * Usage instructions for the LLM to use this action. */ @@ -625,6 +646,7 @@ public ToolMetadata withIsSetupFinished(boolean isSetupFinished) { return this; } + /** * Whether this action has been fully configured and validated. */ @@ -634,7 +656,6 @@ public ToolMetadata withIsSetupFinished(Optional isSetupFinished) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -668,24 +689,12 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - type, - name, - displayName, - toolId, - displayDescription, - logoUrl, - objectName, - knowledgeType, - createdBy, - lastUpdatedBy, - createdAt, - lastUpdatedAt, - writeActionType, - authType, - auth, - permissions, - usageInstructions, - isSetupFinished); + type, name, displayName, + toolId, displayDescription, logoUrl, + objectName, knowledgeType, createdBy, + lastUpdatedBy, createdAt, lastUpdatedAt, + writeActionType, authType, auth, + permissions, usageInstructions, isSetupFinished); } @Override @@ -710,49 +719,51 @@ public String toString() { "usageInstructions", usageInstructions, "isSetupFinished", isSetupFinished); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private ToolMetadataType type; - + private String name; - + private String displayName; - + private Optional toolId = Optional.empty(); - + private String displayDescription; - + private Optional logoUrl = Optional.empty(); - + private Optional objectName = Optional.empty(); - + private Optional knowledgeType = Optional.empty(); - + private Optional createdBy = Optional.empty(); - + private Optional lastUpdatedBy = Optional.empty(); - + private Optional createdAt = Optional.empty(); - + private Optional lastUpdatedAt = Optional.empty(); - + private Optional writeActionType = Optional.empty(); - + private Optional authType = Optional.empty(); - + private Optional auth = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Optional usageInstructions = Optional.empty(); - + private Optional isSetupFinished = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The type of tool. */ @@ -762,6 +773,7 @@ public Builder type(ToolMetadataType type) { return this; } + /** * Unique identifier for the tool. Name should be understandable by the LLM, and will be used to invoke a tool. */ @@ -771,6 +783,7 @@ public Builder name(String name) { return this; } + /** * Human understandable name of the tool. Max 50 characters. */ @@ -780,6 +793,7 @@ public Builder displayName(String displayName) { return this; } + /** * An opaque id which is unique identifier for the tool. */ @@ -798,6 +812,7 @@ public Builder toolId(Optional toolId) { return this; } + /** * Description of the tool meant for a human. */ @@ -807,6 +822,7 @@ public Builder displayDescription(String displayDescription) { return this; } + /** * URL used to fetch the logo. */ @@ -825,6 +841,7 @@ public Builder logoUrl(Optional logoUrl) { return this; } + /** * Name of the generated object. This will be used to indicate to the end user what the generated object contains. */ @@ -843,6 +860,7 @@ public Builder objectName(Optional objectName) { return this; } + /** * Indicates the kind of knowledge a tool would access or modify. */ @@ -861,6 +879,7 @@ public Builder knowledgeType(Optional knowledgeType) { return this; } + public Builder createdBy(PersonObject createdBy) { Utils.checkNotNull(createdBy, "createdBy"); this.createdBy = Optional.ofNullable(createdBy); @@ -873,6 +892,7 @@ public Builder createdBy(Optional createdBy) { return this; } + public Builder lastUpdatedBy(PersonObject lastUpdatedBy) { Utils.checkNotNull(lastUpdatedBy, "lastUpdatedBy"); this.lastUpdatedBy = Optional.ofNullable(lastUpdatedBy); @@ -885,6 +905,7 @@ public Builder lastUpdatedBy(Optional lastUpdatedBy) { return this; } + /** * The time the tool was created in ISO format (ISO 8601) */ @@ -903,6 +924,7 @@ public Builder createdAt(Optional createdAt) { return this; } + /** * The time the tool was last updated in ISO format (ISO 8601) */ @@ -921,6 +943,7 @@ public Builder lastUpdatedAt(Optional lastUpdatedAt) { return this; } + /** * Valid only for write actions. Represents the type of write action. REDIRECT - The client renders the URL which contains information for carrying out the action. EXECUTION - Send a request to an external server and execute the action. */ @@ -939,6 +962,7 @@ public Builder writeActionType(Optional writeActionTy return this; } + /** * The type of authentication being used. * Use 'OAUTH_*' when Glean calls an external API (e.g., Jira) on behalf of a user to obtain an OAuth token. @@ -965,6 +989,7 @@ public Builder authType(Optional authType) { return this; } + /** * Config for tool's authentication method. */ @@ -983,6 +1008,7 @@ public Builder auth(Optional auth) { return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -995,6 +1021,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * Usage instructions for the LLM to use this action. */ @@ -1013,6 +1040,7 @@ public Builder usageInstructions(Optional usageInstructions) { return this; } + /** * Whether this action has been fully configured and validated. */ @@ -1030,27 +1058,17 @@ public Builder isSetupFinished(Optional isSetupFinished) { this.isSetupFinished = isSetupFinished; return this; } - + public ToolMetadata build() { + return new ToolMetadata( - type, - name, - displayName, - toolId, - displayDescription, - logoUrl, - objectName, - knowledgeType, - createdBy, - lastUpdatedBy, - createdAt, - lastUpdatedAt, - writeActionType, - authType, - auth, - permissions, - usageInstructions, - isSetupFinished); + type, name, displayName, + toolId, displayDescription, logoUrl, + objectName, knowledgeType, createdBy, + lastUpdatedBy, createdAt, lastUpdatedAt, + writeActionType, authType, auth, + permissions, usageInstructions, isSetupFinished); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolParameter.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolParameter.java index 7d7dde7f..5f168924 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolParameter.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolParameter.java @@ -17,8 +17,8 @@ import java.util.Map; import java.util.Optional; -public class ToolParameter { +public class ToolParameter { /** * Parameter type (string, number, boolean, object, array) */ @@ -54,6 +54,7 @@ public class ToolParameter { @JsonProperty("possibleValues") private Optional> possibleValues; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("items") private Optional items; @@ -91,7 +92,9 @@ public ToolParameter( } public ToolParameter() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -151,9 +154,10 @@ public Optional> properties() { return (Optional>) properties; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Parameter type (string, number, boolean, object, array) @@ -164,6 +168,7 @@ public ToolParameter withType(ToolParameterType type) { return this; } + /** * Parameter type (string, number, boolean, object, array) */ @@ -182,6 +187,7 @@ public ToolParameter withName(String name) { return this; } + /** * The name of the parameter */ @@ -200,6 +206,7 @@ public ToolParameter withDescription(String description) { return this; } + /** * The description of the parameter */ @@ -218,6 +225,7 @@ public ToolParameter withIsRequired(boolean isRequired) { return this; } + /** * Whether the parameter is required */ @@ -236,6 +244,7 @@ public ToolParameter withPossibleValues(List possibleValues) { return this; } + /** * The possible values for the parameter. Can contain only primitive values or arrays of primitive values. */ @@ -251,6 +260,7 @@ public ToolParameter withItems(ToolParameter items) { return this; } + public ToolParameter withItems(Optional items) { Utils.checkNotNull(items, "items"); this.items = items; @@ -266,6 +276,7 @@ public ToolParameter withProperties(Map properties) { return this; } + /** * When type is 'object', this describes the structure of the object. */ @@ -275,7 +286,6 @@ public ToolParameter withProperties(Optional type = Optional.empty(); - + private Optional name = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional isRequired = Optional.empty(); - + private Optional> possibleValues = Optional.empty(); - + private Optional items = Optional.empty(); - + private Optional> properties = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Parameter type (string, number, boolean, object, array) */ @@ -357,6 +365,7 @@ public Builder type(Optional type) { return this; } + /** * The name of the parameter */ @@ -375,6 +384,7 @@ public Builder name(Optional name) { return this; } + /** * The description of the parameter */ @@ -393,6 +403,7 @@ public Builder description(Optional description) { return this; } + /** * Whether the parameter is required */ @@ -411,6 +422,7 @@ public Builder isRequired(Optional isRequired) { return this; } + /** * The possible values for the parameter. Can contain only primitive values or arrays of primitive values. */ @@ -429,6 +441,7 @@ public Builder possibleValues(Optional> possibleValues) { return this; } + public Builder items(ToolParameter items) { Utils.checkNotNull(items, "items"); this.items = Optional.ofNullable(items); @@ -441,6 +454,7 @@ public Builder items(Optional items) { return this; } + /** * When type is 'object', this describes the structure of the object. */ @@ -458,16 +472,14 @@ public Builder properties(Optional> propert this.properties = properties; return this; } - + public ToolParameter build() { + return new ToolParameter( - type, - name, - description, - isRequired, - possibleValues, - items, + type, name, description, + isRequired, possibleValues, items, properties); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallParameter.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallParameter.java index ece7ca2f..a0d0d7bf 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallParameter.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallParameter.java @@ -16,8 +16,8 @@ import java.util.Map; import java.util.Optional; -public class ToolsCallParameter { +public class ToolsCallParameter { /** * The name of the parameter */ @@ -63,7 +63,8 @@ public ToolsCallParameter( public ToolsCallParameter( String name, String value) { - this(name, value, Optional.empty(), Optional.empty()); + this(name, value, Optional.empty(), + Optional.empty()); } /** @@ -100,9 +101,10 @@ public Optional> properties() { return (Optional>) properties; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The name of the parameter @@ -131,6 +133,7 @@ public ToolsCallParameter withItems(List items) { return this; } + /** * The value of the parameter (for array types) */ @@ -149,6 +152,7 @@ public ToolsCallParameter withProperties(Map propert return this; } + /** * The value of the parameter (for object types) */ @@ -158,7 +162,6 @@ public ToolsCallParameter withProperties(Optional> items = Optional.empty(); - + private Optional> properties = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The name of the parameter */ @@ -216,6 +219,7 @@ public Builder name(String name) { return this; } + /** * The value of the parameter (for primitive types) */ @@ -225,6 +229,7 @@ public Builder value(String value) { return this; } + /** * The value of the parameter (for array types) */ @@ -243,6 +248,7 @@ public Builder items(Optional> items) { return this; } + /** * The value of the parameter (for object types) */ @@ -260,13 +266,13 @@ public Builder properties(Optional> pr this.properties = properties; return this; } - + public ToolsCallParameter build() { + return new ToolsCallParameter( - name, - value, - items, + name, value, items, properties); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallRequest.java index 80de38e5..ef687cd9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallRequest.java @@ -11,8 +11,8 @@ import java.lang.String; import java.util.Map; -public class ToolsCallRequest { +public class ToolsCallRequest { /** * Required name of the tool to execute */ @@ -31,6 +31,7 @@ public ToolsCallRequest( @JsonProperty("parameters") Map parameters) { Utils.checkNotNull(name, "name"); parameters = Utils.emptyMapIfNull(parameters); + Utils.checkNotNull(parameters, "parameters"); this.name = name; this.parameters = parameters; } @@ -51,9 +52,10 @@ public Map parameters() { return parameters; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Required name of the tool to execute @@ -73,7 +75,6 @@ public ToolsCallRequest withParameters(Map parameter return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -91,8 +92,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - parameters); + name, parameters); } @Override @@ -101,17 +101,19 @@ public String toString() { "name", name, "parameters", parameters); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String name; - + private Map parameters; - + private Builder() { // force use of static builder() method } + /** * Required name of the tool to execute */ @@ -121,6 +123,7 @@ public Builder name(String name) { return this; } + /** * The parameters for the tool. Each key is the name of the parameter and the value is the parameter object. */ @@ -129,11 +132,12 @@ public Builder parameters(Map parameters) { this.parameters = parameters; return this; } - + public ToolsCallRequest build() { + return new ToolsCallRequest( - name, - parameters); + name, parameters); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallResponse.java index fef9d009..d70b10b3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsCallResponse.java @@ -16,8 +16,8 @@ import java.util.Map; import java.util.Optional; -public class ToolsCallResponse { +public class ToolsCallResponse { /** * The raw response from the tool */ @@ -63,9 +63,10 @@ public Optional error() { return error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The raw response from the tool @@ -76,6 +77,7 @@ public ToolsCallResponse withRawResponse(Map rawResponse) { return this; } + /** * The raw response from the tool */ @@ -94,6 +96,7 @@ public ToolsCallResponse withError(String error) { return this; } + /** * The error message if applicable */ @@ -103,7 +106,6 @@ public ToolsCallResponse withError(Optional error) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -121,8 +123,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - rawResponse, - error); + rawResponse, error); } @Override @@ -131,17 +132,19 @@ public String toString() { "rawResponse", rawResponse, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> rawResponse = Optional.empty(); - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The raw response from the tool */ @@ -160,6 +163,7 @@ public Builder rawResponse(Optional> rawResponse) return this; } + /** * The error message if applicable */ @@ -177,11 +181,12 @@ public Builder error(Optional error) { this.error = error; return this; } - + public ToolsCallResponse build() { + return new ToolsCallResponse( - rawResponse, - error); + rawResponse, error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsListResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsListResponse.java index bc7fe8f2..28dd33fc 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsListResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ToolsListResponse.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class ToolsListResponse { @JsonInclude(Include.NON_ABSENT) @@ -38,9 +39,10 @@ public Optional> tools() { return (Optional>) tools; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public ToolsListResponse withTools(List tools) { Utils.checkNotNull(tools, "tools"); @@ -48,13 +50,13 @@ public ToolsListResponse withTools(List tools) { return this; } + public ToolsListResponse withTools(Optional> tools) { Utils.checkNotNull(tools, "tools"); this.tools = tools; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -79,15 +81,17 @@ public String toString() { return Utils.toString(ToolsListResponse.class, "tools", tools); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> tools = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder tools(List tools) { Utils.checkNotNull(tools, "tools"); this.tools = Optional.ofNullable(tools); @@ -99,10 +103,12 @@ public Builder tools(Optional> tools) { this.tools = tools; return this; } - + public ToolsListResponse build() { + return new ToolsListResponse( tools); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UiConfig.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UiConfig.java index ab80f361..19d90515 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UiConfig.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UiConfig.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class UiConfig { +public class UiConfig { /** * defines how to render this particular displayable list card */ @@ -62,9 +62,10 @@ public Optional additionalFlags() { return (Optional) additionalFlags; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * defines how to render this particular displayable list card @@ -75,6 +76,7 @@ public UiConfig withFormat(Format format) { return this; } + /** * defines how to render this particular displayable list card */ @@ -93,6 +95,7 @@ public UiConfig withAdditionalFlags(DisplayableListItemUIConfig additionalFlags) return this; } + /** * UI configurations for each item of the list */ @@ -102,7 +105,6 @@ public UiConfig withAdditionalFlags(Optional format = Optional.empty(); - + private Optional additionalFlags = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * defines how to render this particular displayable list card */ @@ -159,6 +162,7 @@ public Builder format(Optional format) { return this; } + /** * UI configurations for each item of the list */ @@ -176,11 +180,12 @@ public Builder additionalFlags(Optional a this.additionalFlags = additionalFlags; return this; } - + public UiConfig build() { + return new UiConfig( - format, - additionalFlags); + format, additionalFlags); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Unpin.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Unpin.java index 0cc6696f..f4e93130 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Unpin.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Unpin.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class Unpin { +public class Unpin { /** * The opaque id of the pin to be unpinned. */ @@ -41,9 +41,10 @@ public Optional id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque id of the pin to be unpinned. @@ -54,6 +55,7 @@ public Unpin withId(String id) { return this; } + /** * The opaque id of the pin to be unpinned. */ @@ -63,7 +65,6 @@ public Unpin withId(Optional id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(Unpin.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque id of the pin to be unpinned. */ @@ -114,10 +117,12 @@ public Builder id(Optional id) { this.id = id; return this; } - + public Unpin build() { + return new Unpin( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateAnnouncementRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateAnnouncementRequest.java index 2cc12066..f9515c9b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateAnnouncementRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateAnnouncementRequest.java @@ -18,8 +18,8 @@ import java.util.List; import java.util.Optional; -public class UpdateAnnouncementRequest { +public class UpdateAnnouncementRequest { /** * The date and time at which the announcement becomes active. */ @@ -38,6 +38,7 @@ public class UpdateAnnouncementRequest { @JsonProperty("title") private String title; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("body") private Optional body; @@ -49,10 +50,12 @@ public class UpdateAnnouncementRequest { @JsonProperty("emoji") private Optional emoji; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("thumbnail") private Optional thumbnail; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("banner") private Optional banner; @@ -166,7 +169,11 @@ public UpdateAnnouncementRequest( OffsetDateTime endTime, String title, long id) { - this(startTime, endTime, title, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), id); + this(startTime, endTime, title, + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), id); } /** @@ -286,9 +293,10 @@ public long id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The date and time at which the announcement becomes active. @@ -323,6 +331,7 @@ public UpdateAnnouncementRequest withBody(StructuredText body) { return this; } + public UpdateAnnouncementRequest withBody(Optional body) { Utils.checkNotNull(body, "body"); this.body = body; @@ -338,6 +347,7 @@ public UpdateAnnouncementRequest withEmoji(String emoji) { return this; } + /** * An emoji used to indicate the nature of the announcement. */ @@ -353,6 +363,7 @@ public UpdateAnnouncementRequest withThumbnail(Thumbnail thumbnail) { return this; } + public UpdateAnnouncementRequest withThumbnail(Optional thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = thumbnail; @@ -365,6 +376,7 @@ public UpdateAnnouncementRequest withBanner(Thumbnail banner) { return this; } + public UpdateAnnouncementRequest withBanner(Optional banner) { Utils.checkNotNull(banner, "banner"); this.banner = banner; @@ -380,6 +392,7 @@ public UpdateAnnouncementRequest withAudienceFilters(List audienceF return this; } + /** * Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. */ @@ -398,6 +411,7 @@ public UpdateAnnouncementRequest withSourceDocumentId(String sourceDocumentId) { return this; } + /** * The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). */ @@ -416,6 +430,7 @@ public UpdateAnnouncementRequest withHideAttribution(boolean hideAttribution) { return this; } + /** * Whether or not to hide an author attribution. */ @@ -434,6 +449,7 @@ public UpdateAnnouncementRequest withChannel(UpdateAnnouncementRequestChannel ch return this; } + /** * This determines whether this is a Social Feed post or a regular announcement. */ @@ -452,6 +468,7 @@ public UpdateAnnouncementRequest withPostType(UpdateAnnouncementRequestPostType return this; } + /** * This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site. */ @@ -470,6 +487,7 @@ public UpdateAnnouncementRequest withIsPrioritized(boolean isPrioritized) { return this; } + /** * Used by the Social Feed to pin posts to the front of the feed. */ @@ -488,6 +506,7 @@ public UpdateAnnouncementRequest withViewUrl(String viewUrl) { return this; } + /** * URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED". */ @@ -506,7 +525,6 @@ public UpdateAnnouncementRequest withId(long id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -537,21 +555,11 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - startTime, - endTime, - title, - body, - emoji, - thumbnail, - banner, - audienceFilters, - sourceDocumentId, - hideAttribution, - channel, - postType, - isPrioritized, - viewUrl, - id); + startTime, endTime, title, + body, emoji, thumbnail, + banner, audienceFilters, sourceDocumentId, + hideAttribution, channel, postType, + isPrioritized, viewUrl, id); } @Override @@ -573,43 +581,45 @@ public String toString() { "viewUrl", viewUrl, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private OffsetDateTime startTime; - + private OffsetDateTime endTime; - + private String title; - + private Optional body = Optional.empty(); - + private Optional emoji = Optional.empty(); - + private Optional thumbnail = Optional.empty(); - + private Optional banner = Optional.empty(); - + private Optional> audienceFilters = Optional.empty(); - + private Optional sourceDocumentId = Optional.empty(); - + private Optional hideAttribution = Optional.empty(); - + private Optional channel = Optional.empty(); - + private Optional postType = Optional.empty(); - + private Optional isPrioritized = Optional.empty(); - + private Optional viewUrl = Optional.empty(); - + private Long id; - + private Builder() { // force use of static builder() method } + /** * The date and time at which the announcement becomes active. */ @@ -619,6 +629,7 @@ public Builder startTime(OffsetDateTime startTime) { return this; } + /** * The date and time at which the announcement expires. */ @@ -628,6 +639,7 @@ public Builder endTime(OffsetDateTime endTime) { return this; } + /** * The headline of the announcement. */ @@ -637,6 +649,7 @@ public Builder title(String title) { return this; } + public Builder body(StructuredText body) { Utils.checkNotNull(body, "body"); this.body = Optional.ofNullable(body); @@ -649,6 +662,7 @@ public Builder body(Optional body) { return this; } + /** * An emoji used to indicate the nature of the announcement. */ @@ -667,6 +681,7 @@ public Builder emoji(Optional emoji) { return this; } + public Builder thumbnail(Thumbnail thumbnail) { Utils.checkNotNull(thumbnail, "thumbnail"); this.thumbnail = Optional.ofNullable(thumbnail); @@ -679,6 +694,7 @@ public Builder thumbnail(Optional thumbnail) { return this; } + public Builder banner(Thumbnail banner) { Utils.checkNotNull(banner, "banner"); this.banner = Optional.ofNullable(banner); @@ -691,6 +707,7 @@ public Builder banner(Optional banner) { return this; } + /** * Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search. */ @@ -709,6 +726,7 @@ public Builder audienceFilters(Optional> audienceFil return this; } + /** * The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread). */ @@ -727,6 +745,7 @@ public Builder sourceDocumentId(Optional sourceDocumentId) { return this; } + /** * Whether or not to hide an author attribution. */ @@ -745,6 +764,7 @@ public Builder hideAttribution(Optional hideAttribution) { return this; } + /** * This determines whether this is a Social Feed post or a regular announcement. */ @@ -763,6 +783,7 @@ public Builder channel(Optional chan return this; } + /** * This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site. */ @@ -781,6 +802,7 @@ public Builder postType(Optional po return this; } + /** * Used by the Social Feed to pin posts to the front of the feed. */ @@ -799,6 +821,7 @@ public Builder isPrioritized(Optional isPrioritized) { return this; } + /** * URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED". */ @@ -817,6 +840,7 @@ public Builder viewUrl(Optional viewUrl) { return this; } + /** * The opaque id of the announcement. */ @@ -825,24 +849,16 @@ public Builder id(long id) { this.id = id; return this; } - + public UpdateAnnouncementRequest build() { + return new UpdateAnnouncementRequest( - startTime, - endTime, - title, - body, - emoji, - thumbnail, - banner, - audienceFilters, - sourceDocumentId, - hideAttribution, - channel, - postType, - isPrioritized, - viewUrl, - id); + startTime, endTime, title, + body, emoji, thumbnail, + banner, audienceFilters, sourceDocumentId, + hideAttribution, channel, postType, + isPrioritized, viewUrl, id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpConfigRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpConfigRequest.java index cfbd4bfc..272551a8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpConfigRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpConfigRequest.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class UpdateDlpConfigRequest { +public class UpdateDlpConfigRequest { /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -61,9 +61,10 @@ public Optional frequency() { return frequency; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Detailed configuration of what documents and sensitive content will be scanned. @@ -74,6 +75,7 @@ public UpdateDlpConfigRequest withConfig(DlpConfig config) { return this; } + /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -92,6 +94,7 @@ public UpdateDlpConfigRequest withFrequency(String frequency) { return this; } + /** * Only "ONCE" is supported for reports. */ @@ -101,7 +104,6 @@ public UpdateDlpConfigRequest withFrequency(Optional frequency) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -119,8 +121,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - config, - frequency); + config, frequency); } @Override @@ -129,17 +130,19 @@ public String toString() { "config", config, "frequency", frequency); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional config = Optional.empty(); - + private Optional frequency = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -158,6 +161,7 @@ public Builder config(Optional config) { return this; } + /** * Only "ONCE" is supported for reports. */ @@ -175,11 +179,12 @@ public Builder frequency(Optional frequency) { this.frequency = frequency; return this; } - + public UpdateDlpConfigRequest build() { + return new UpdateDlpConfigRequest( - config, - frequency); + config, frequency); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpConfigResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpConfigResponse.java index b66de318..88a96ea5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpConfigResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpConfigResponse.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class UpdateDlpConfigResponse { @JsonInclude(Include.NON_ABSENT) @@ -55,9 +56,10 @@ public Optional reportId() { return reportId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public UpdateDlpConfigResponse withResult(DlpSimpleResult result) { Utils.checkNotNull(result, "result"); @@ -65,6 +67,7 @@ public UpdateDlpConfigResponse withResult(DlpSimpleResult result) { return this; } + public UpdateDlpConfigResponse withResult(Optional result) { Utils.checkNotNull(result, "result"); this.result = result; @@ -80,6 +83,7 @@ public UpdateDlpConfigResponse withReportId(String reportId) { return this; } + /** * The id of the report that was just created and run. */ @@ -89,7 +93,6 @@ public UpdateDlpConfigResponse withReportId(Optional reportId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -107,8 +110,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - result, - reportId); + result, reportId); } @Override @@ -117,17 +119,19 @@ public String toString() { "result", result, "reportId", reportId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional result = Optional.empty(); - + private Optional reportId = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder result(DlpSimpleResult result) { Utils.checkNotNull(result, "result"); this.result = Optional.ofNullable(result); @@ -140,6 +144,7 @@ public Builder result(Optional result) { return this; } + /** * The id of the report that was just created and run. */ @@ -157,11 +162,12 @@ public Builder reportId(Optional reportId) { this.reportId = reportId; return this; } - + public UpdateDlpConfigResponse build() { + return new UpdateDlpConfigResponse( - result, - reportId); + result, reportId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpReportRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpReportRequest.java index 42ab8376..39b01a50 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpReportRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpReportRequest.java @@ -15,8 +15,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class UpdateDlpReportRequest { +public class UpdateDlpReportRequest { /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -72,7 +72,8 @@ public UpdateDlpReportRequest( } public UpdateDlpReportRequest() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } /** @@ -118,9 +119,10 @@ public Optional reportName() { return reportName; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Detailed configuration of what documents and sensitive content will be scanned. @@ -131,6 +133,7 @@ public UpdateDlpReportRequest withConfig(DlpConfig config) { return this; } + /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -149,6 +152,7 @@ public UpdateDlpReportRequest withFrequency(DlpFrequency frequency) { return this; } + /** * Interval between scans. DAILY is deprecated. */ @@ -167,6 +171,7 @@ public UpdateDlpReportRequest withStatus(DlpReportStatus status) { return this; } + /** * The status of the policy/report. Only ACTIVE status will be picked for scans. */ @@ -185,6 +190,7 @@ public UpdateDlpReportRequest withAutoHideDocs(boolean autoHideDocs) { return this; } + /** * The new autoHideDoc boolean the policy will be updated to if provided. */ @@ -203,6 +209,7 @@ public UpdateDlpReportRequest withReportName(String reportName) { return this; } + /** * The new name of the policy if provided. */ @@ -212,7 +219,6 @@ public UpdateDlpReportRequest withReportName(Optional reportName) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -233,11 +239,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - config, - frequency, - status, - autoHideDocs, - reportName); + config, frequency, status, + autoHideDocs, reportName); } @Override @@ -249,23 +252,25 @@ public String toString() { "autoHideDocs", autoHideDocs, "reportName", reportName); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional config = Optional.empty(); - + private Optional frequency = Optional.empty(); - + private Optional status = Optional.empty(); - + private Optional autoHideDocs = Optional.empty(); - + private Optional reportName = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Detailed configuration of what documents and sensitive content will be scanned. */ @@ -284,6 +289,7 @@ public Builder config(Optional config) { return this; } + /** * Interval between scans. DAILY is deprecated. */ @@ -302,6 +308,7 @@ public Builder frequency(Optional frequency) { return this; } + /** * The status of the policy/report. Only ACTIVE status will be picked for scans. */ @@ -320,6 +327,7 @@ public Builder status(Optional status) { return this; } + /** * The new autoHideDoc boolean the policy will be updated to if provided. */ @@ -338,6 +346,7 @@ public Builder autoHideDocs(Optional autoHideDocs) { return this; } + /** * The new name of the policy if provided. */ @@ -355,14 +364,13 @@ public Builder reportName(Optional reportName) { this.reportName = reportName; return this; } - + public UpdateDlpReportRequest build() { + return new UpdateDlpReportRequest( - config, - frequency, - status, - autoHideDocs, - reportName); + config, frequency, status, + autoHideDocs, reportName); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpReportResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpReportResponse.java index 7a7d0470..b56d5035 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpReportResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDlpReportResponse.java @@ -14,6 +14,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class UpdateDlpReportResponse { @JsonInclude(Include.NON_ABSENT) @@ -37,9 +38,10 @@ public Optional result() { return (Optional) result; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public UpdateDlpReportResponse withResult(DlpSimpleResult result) { Utils.checkNotNull(result, "result"); @@ -47,13 +49,13 @@ public UpdateDlpReportResponse withResult(DlpSimpleResult result) { return this; } + public UpdateDlpReportResponse withResult(Optional result) { Utils.checkNotNull(result, "result"); this.result = result; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -78,15 +80,17 @@ public String toString() { return Utils.toString(UpdateDlpReportResponse.class, "result", result); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional result = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder result(DlpSimpleResult result) { Utils.checkNotNull(result, "result"); this.result = Optional.ofNullable(result); @@ -98,10 +102,12 @@ public Builder result(Optional result) { this.result = result; return this; } - + public UpdateDlpReportResponse build() { + return new UpdateDlpReportResponse( result); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDocumentVisibilityOverridesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDocumentVisibilityOverridesRequest.java index d1d2d402..b95633d3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDocumentVisibilityOverridesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateDocumentVisibilityOverridesRequest.java @@ -15,6 +15,7 @@ import java.util.List; import java.util.Optional; + public class UpdateDocumentVisibilityOverridesRequest { @JsonInclude(Include.NON_ABSENT) @@ -38,9 +39,10 @@ public Optional> visibilityOverrides() { return (Optional>) visibilityOverrides; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public UpdateDocumentVisibilityOverridesRequest withVisibilityOverrides(List visibilityOverrides) { Utils.checkNotNull(visibilityOverrides, "visibilityOverrides"); @@ -48,13 +50,13 @@ public UpdateDocumentVisibilityOverridesRequest withVisibilityOverrides(List> visibilityOverrides) { Utils.checkNotNull(visibilityOverrides, "visibilityOverrides"); this.visibilityOverrides = visibilityOverrides; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -79,15 +81,17 @@ public String toString() { return Utils.toString(UpdateDocumentVisibilityOverridesRequest.class, "visibilityOverrides", visibilityOverrides); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> visibilityOverrides = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder visibilityOverrides(List visibilityOverrides) { Utils.checkNotNull(visibilityOverrides, "visibilityOverrides"); this.visibilityOverrides = Optional.ofNullable(visibilityOverrides); @@ -99,10 +103,12 @@ public Builder visibilityOverrides(Optional> results() { return (Optional>) results; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The documents and whether their visibility was successfully updated. @@ -57,6 +58,7 @@ public UpdateDocumentVisibilityOverridesResponse withResults(List> results = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The documents and whether their visibility was successfully updated. */ @@ -117,10 +120,12 @@ public Builder results(Optional> this.results = results; return this; } - + public UpdateDocumentVisibilityOverridesResponse build() { + return new UpdateDocumentVisibilityOverridesResponse( results); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdatePermissionsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdatePermissionsRequest.java index 84bb13d0..3aa3e886 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdatePermissionsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdatePermissionsRequest.java @@ -72,7 +72,8 @@ public UpdatePermissionsRequest( public UpdatePermissionsRequest( String datasource, DocumentPermissionsDefinition permissions) { - this(datasource, Optional.empty(), Optional.empty(), Optional.empty(), permissions); + this(datasource, Optional.empty(), Optional.empty(), + Optional.empty(), permissions); } @JsonIgnore @@ -112,9 +113,10 @@ public DocumentPermissionsDefinition permissions() { return permissions; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public UpdatePermissionsRequest withDatasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); @@ -131,6 +133,7 @@ public UpdatePermissionsRequest withObjectType(String objectType) { return this; } + /** * The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ */ @@ -149,6 +152,7 @@ public UpdatePermissionsRequest withId(String id) { return this; } + /** * The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. */ @@ -167,6 +171,7 @@ public UpdatePermissionsRequest withViewURL(String viewURL) { return this; } + /** * The permalink for viewing the document. **Note: viewURL is a required field if id was not set when uploading the document.**' */ @@ -185,7 +190,6 @@ public UpdatePermissionsRequest withPermissions(DocumentPermissionsDefinition pe return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -206,11 +210,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasource, - objectType, - id, - viewURL, - permissions); + datasource, objectType, id, + viewURL, permissions); } @Override @@ -222,29 +223,32 @@ public String toString() { "viewURL", viewURL, "permissions", permissions); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private Optional objectType = Optional.empty(); - + private Optional id = Optional.empty(); - + private Optional viewURL = Optional.empty(); - + private DocumentPermissionsDefinition permissions; - + private Builder() { // force use of static builder() method } + public Builder datasource(String datasource) { Utils.checkNotNull(datasource, "datasource"); this.datasource = datasource; return this; } + /** * The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _ */ @@ -263,6 +267,7 @@ public Builder objectType(Optional objectType) { return this; } + /** * The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length. */ @@ -281,6 +286,7 @@ public Builder id(Optional id) { return this; } + /** * The permalink for viewing the document. **Note: viewURL is a required field if id was not set when uploading the document.**' */ @@ -299,6 +305,7 @@ public Builder viewURL(Optional viewURL) { return this; } + /** * describes the access control details of the document */ @@ -307,14 +314,13 @@ public Builder permissions(DocumentPermissionsDefinition permissions) { this.permissions = permissions; return this; } - + public UpdatePermissionsRequest build() { + return new UpdatePermissionsRequest( - datasource, - objectType, - id, - viewURL, - permissions); + datasource, objectType, id, + viewURL, permissions); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateShortcutRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateShortcutRequest.java index b5fd479a..e1dbc016 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateShortcutRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateShortcutRequest.java @@ -17,8 +17,8 @@ import java.util.List; import java.util.Optional; -public class UpdateShortcutRequest { +public class UpdateShortcutRequest { /** * The opaque id of the user generated content. */ @@ -114,7 +114,9 @@ public UpdateShortcutRequest( public UpdateShortcutRequest( long id) { - this(id, Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(id, Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -191,9 +193,10 @@ public Optional> removedRoles() { return (Optional>) removedRoles; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque id of the user generated content. @@ -213,6 +216,7 @@ public UpdateShortcutRequest withInputAlias(String inputAlias) { return this; } + /** * Link text following go/ prefix as entered by the user. */ @@ -231,6 +235,7 @@ public UpdateShortcutRequest withDestinationUrl(String destinationUrl) { return this; } + /** * Destination URL for the shortcut. */ @@ -249,6 +254,7 @@ public UpdateShortcutRequest withDestinationDocumentId(String destinationDocumen return this; } + /** * Glean Document ID for the URL, if known. */ @@ -267,6 +273,7 @@ public UpdateShortcutRequest withDescription(String description) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -285,6 +292,7 @@ public UpdateShortcutRequest withUnlisted(boolean unlisted) { return this; } + /** * Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. */ @@ -303,6 +311,7 @@ public UpdateShortcutRequest withUrlTemplate(String urlTemplate) { return this; } + /** * For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. */ @@ -321,6 +330,7 @@ public UpdateShortcutRequest withAddedRoles(List addedRol return this; } + /** * A list of user roles added for the Shortcut. */ @@ -339,6 +349,7 @@ public UpdateShortcutRequest withRemovedRoles(List remove return this; } + /** * A list of user roles removed for the Shortcut. */ @@ -348,7 +359,6 @@ public UpdateShortcutRequest withRemovedRoles(Optional inputAlias = Optional.empty(); - + private Optional destinationUrl = Optional.empty(); - + private Optional destinationDocumentId = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional unlisted = Optional.empty(); - + private Optional urlTemplate = Optional.empty(); - + private Optional> addedRoles = Optional.empty(); - + private Optional> removedRoles = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque id of the user generated content. */ @@ -431,6 +437,7 @@ public Builder id(long id) { return this; } + /** * Link text following go/ prefix as entered by the user. */ @@ -449,6 +456,7 @@ public Builder inputAlias(Optional inputAlias) { return this; } + /** * Destination URL for the shortcut. */ @@ -467,6 +475,7 @@ public Builder destinationUrl(Optional destinationUrl) { return this; } + /** * Glean Document ID for the URL, if known. */ @@ -485,6 +494,7 @@ public Builder destinationDocumentId(Optional destinationDocumentId) { return this; } + /** * A short, plain text blurb to help people understand the intent of the shortcut. */ @@ -503,6 +513,7 @@ public Builder description(Optional description) { return this; } + /** * Whether this shortcut is unlisted or not. Unlisted shortcuts are visible to author + admins only. */ @@ -521,6 +532,7 @@ public Builder unlisted(Optional unlisted) { return this; } + /** * For variable shortcuts, contains the URL template; note, `destinationUrl` contains default URL. */ @@ -539,6 +551,7 @@ public Builder urlTemplate(Optional urlTemplate) { return this; } + /** * A list of user roles added for the Shortcut. */ @@ -557,6 +570,7 @@ public Builder addedRoles(Optional> addedR return this; } + /** * A list of user roles removed for the Shortcut. */ @@ -574,18 +588,14 @@ public Builder removedRoles(Optional> remo this.removedRoles = removedRoles; return this; } - + public UpdateShortcutRequest build() { + return new UpdateShortcutRequest( - id, - inputAlias, - destinationUrl, - destinationDocumentId, - description, - unlisted, - urlTemplate, - addedRoles, - removedRoles); + id, inputAlias, destinationUrl, + destinationDocumentId, description, unlisted, + urlTemplate, addedRoles, removedRoles); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateShortcutResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateShortcutResponse.java index 695308c6..ebbbc71e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateShortcutResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UpdateShortcutResponse.java @@ -14,12 +14,14 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class UpdateShortcutResponse { @JsonInclude(Include.NON_ABSENT) @JsonProperty("shortcut") private Optional shortcut; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("error") private Optional error; @@ -50,9 +52,10 @@ public Optional error() { return (Optional) error; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public UpdateShortcutResponse withShortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); @@ -60,6 +63,7 @@ public UpdateShortcutResponse withShortcut(Shortcut shortcut) { return this; } + public UpdateShortcutResponse withShortcut(Optional shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = shortcut; @@ -72,13 +76,13 @@ public UpdateShortcutResponse withError(ShortcutError error) { return this; } + public UpdateShortcutResponse withError(Optional error) { Utils.checkNotNull(error, "error"); this.error = error; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -96,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - shortcut, - error); + shortcut, error); } @Override @@ -106,17 +109,19 @@ public String toString() { "shortcut", shortcut, "error", error); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional shortcut = Optional.empty(); - + private Optional error = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder shortcut(Shortcut shortcut) { Utils.checkNotNull(shortcut, "shortcut"); this.shortcut = Optional.ofNullable(shortcut); @@ -129,6 +134,7 @@ public Builder shortcut(Optional shortcut) { return this; } + public Builder error(ShortcutError error) { Utils.checkNotNull(error, "error"); this.error = Optional.ofNullable(error); @@ -140,11 +146,12 @@ public Builder error(Optional error) { this.error = error; return this; } - + public UpdateShortcutResponse build() { + return new UpdateShortcutResponse( - shortcut, - error); + shortcut, error); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequest.java index 7eff5016..ebd22caf 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesRequest.java @@ -11,8 +11,8 @@ import java.lang.String; import java.util.List; -public class UploadChatFilesRequest { +public class UploadChatFilesRequest { /** * Raw files to be uploaded for chat in binary format. */ @@ -34,9 +34,10 @@ public List files() { return files; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Raw files to be uploaded for chat in binary format. @@ -47,7 +48,6 @@ public UploadChatFilesRequest withFiles(List files) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -72,15 +72,17 @@ public String toString() { return Utils.toString(UploadChatFilesRequest.class, "files", files); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private List files; - + private Builder() { // force use of static builder() method } + /** * Raw files to be uploaded for chat in binary format. */ @@ -89,10 +91,12 @@ public Builder files(List files) { this.files = files; return this; } - + public UploadChatFilesRequest build() { + return new UploadChatFilesRequest( files); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesResponse.java index 3a749e5a..727e09fd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadChatFilesResponse.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class UploadChatFilesResponse { +public class UploadChatFilesResponse { /** * Files uploaded for chat. */ @@ -44,9 +44,10 @@ public Optional> files() { return (Optional>) files; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Files uploaded for chat. @@ -57,6 +58,7 @@ public UploadChatFilesResponse withFiles(List files) { return this; } + /** * Files uploaded for chat. */ @@ -66,7 +68,6 @@ public UploadChatFilesResponse withFiles(Optional> file return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -91,15 +92,17 @@ public String toString() { return Utils.toString(UploadChatFilesResponse.class, "files", files); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> files = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Files uploaded for chat. */ @@ -117,10 +120,12 @@ public Builder files(Optional> files) { this.files = files; return this; } - + public UploadChatFilesResponse build() { + return new UploadChatFilesResponse( files); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadShortcutsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadShortcutsRequest.java index 96b1866d..d583580b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadShortcutsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UploadShortcutsRequest.java @@ -21,7 +21,6 @@ *

Describes the request body of the /uploadshortcuts API call */ public class UploadShortcutsRequest { - /** * Unique id that must be used for this bulk upload instance */ @@ -77,7 +76,8 @@ public UploadShortcutsRequest( public UploadShortcutsRequest( String uploadId, List shortcuts) { - this(uploadId, Optional.empty(), Optional.empty(), Optional.empty(), shortcuts); + this(uploadId, Optional.empty(), Optional.empty(), + Optional.empty(), shortcuts); } /** @@ -120,9 +120,10 @@ public List shortcuts() { return shortcuts; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique id that must be used for this bulk upload instance @@ -142,6 +143,7 @@ public UploadShortcutsRequest withIsFirstPage(boolean isFirstPage) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -160,6 +162,7 @@ public UploadShortcutsRequest withIsLastPage(boolean isLastPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -178,6 +181,7 @@ public UploadShortcutsRequest withForceRestartUpload(boolean forceRestartUpload) return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -196,7 +200,6 @@ public UploadShortcutsRequest withShortcuts(List shortcuts) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -217,11 +220,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - shortcuts); + uploadId, isFirstPage, isLastPage, + forceRestartUpload, shortcuts); } @Override @@ -233,23 +233,25 @@ public String toString() { "forceRestartUpload", forceRestartUpload, "shortcuts", shortcuts); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String uploadId; - + private Optional isFirstPage = Optional.empty(); - + private Optional isLastPage = Optional.empty(); - + private Optional forceRestartUpload = Optional.empty(); - + private List shortcuts; - + private Builder() { // force use of static builder() method } + /** * Unique id that must be used for this bulk upload instance */ @@ -259,6 +261,7 @@ public Builder uploadId(String uploadId) { return this; } + /** * true if this is the first page of the upload. Defaults to false */ @@ -277,6 +280,7 @@ public Builder isFirstPage(Optional isFirstPage) { return this; } + /** * true if this is the last page of the upload. Defaults to false */ @@ -295,6 +299,7 @@ public Builder isLastPage(Optional isLastPage) { return this; } + /** * Flag to discard previous upload attempts and start from scratch. Must be specified with isFirstPage=true */ @@ -313,6 +318,7 @@ public Builder forceRestartUpload(Optional forceRestartUpload) { return this; } + /** * Batch of shortcuts information */ @@ -321,14 +327,13 @@ public Builder shortcuts(List shortcuts) { this.shortcuts = shortcuts; return this; } - + public UploadShortcutsRequest build() { + return new UploadShortcutsRequest( - uploadId, - isFirstPage, - isLastPage, - forceRestartUpload, - shortcuts); + uploadId, isFirstPage, isLastPage, + forceRestartUpload, shortcuts); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/User.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/User.java index e46be748..eeb602a4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/User.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/User.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class User { +public class User { /** * An opaque user ID for the claimed authority (i.e., the actas param, or the origid if actas is not specified). */ @@ -59,9 +59,10 @@ public Optional origID() { return origID; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * An opaque user ID for the claimed authority (i.e., the actas param, or the origid if actas is not specified). @@ -72,6 +73,7 @@ public User withUserID(String userID) { return this; } + /** * An opaque user ID for the claimed authority (i.e., the actas param, or the origid if actas is not specified). */ @@ -90,6 +92,7 @@ public User withOrigID(String origID) { return this; } + /** * An opaque user ID for the authenticated user (ignores actas). */ @@ -99,7 +102,6 @@ public User withOrigID(Optional origID) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,8 +119,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - userID, - origID); + userID, origID); } @Override @@ -127,17 +128,19 @@ public String toString() { "userID", userID, "origID", origID); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional userID = Optional.empty(); - + private Optional origID = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * An opaque user ID for the claimed authority (i.e., the actas param, or the origid if actas is not specified). */ @@ -156,6 +159,7 @@ public Builder userID(Optional userID) { return this; } + /** * An opaque user ID for the authenticated user (ignores actas). */ @@ -173,11 +177,12 @@ public Builder origID(Optional origID) { this.origID = origID; return this; } - + public User build() { + return new User( - userID, - origID); + userID, origID); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserActivity.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserActivity.java index eb20785f..20cd396d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserActivity.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserActivity.java @@ -15,6 +15,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class UserActivity { @JsonInclude(Include.NON_ABSENT) @@ -35,6 +36,7 @@ public class UserActivity { @JsonProperty("action") private Optional action; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("aggregateVisitCount") private Optional aggregateVisitCount; @@ -56,7 +58,8 @@ public UserActivity( } public UserActivity() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } @SuppressWarnings("unchecked") @@ -88,9 +91,10 @@ public Optional aggregateVisitCount() { return (Optional) aggregateVisitCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public UserActivity withActor(Person actor) { Utils.checkNotNull(actor, "actor"); @@ -98,6 +102,7 @@ public UserActivity withActor(Person actor) { return this; } + public UserActivity withActor(Optional actor) { Utils.checkNotNull(actor, "actor"); this.actor = actor; @@ -113,6 +118,7 @@ public UserActivity withTimestamp(long timestamp) { return this; } + /** * Unix timestamp of the activity (in seconds since epoch UTC). */ @@ -131,6 +137,7 @@ public UserActivity withAction(UserActivityAction action) { return this; } + /** * The action for the activity */ @@ -146,13 +153,13 @@ public UserActivity withAggregateVisitCount(CountInfo aggregateVisitCount) { return this; } + public UserActivity withAggregateVisitCount(Optional aggregateVisitCount) { Utils.checkNotNull(aggregateVisitCount, "aggregateVisitCount"); this.aggregateVisitCount = aggregateVisitCount; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -172,9 +179,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - actor, - timestamp, - action, + actor, timestamp, action, aggregateVisitCount); } @@ -186,21 +191,23 @@ public String toString() { "action", action, "aggregateVisitCount", aggregateVisitCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional actor = Optional.empty(); - + private Optional timestamp = Optional.empty(); - + private Optional action = Optional.empty(); - + private Optional aggregateVisitCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder actor(Person actor) { Utils.checkNotNull(actor, "actor"); this.actor = Optional.ofNullable(actor); @@ -213,6 +220,7 @@ public Builder actor(Optional actor) { return this; } + /** * Unix timestamp of the activity (in seconds since epoch UTC). */ @@ -231,6 +239,7 @@ public Builder timestamp(Optional timestamp) { return this; } + /** * The action for the activity */ @@ -249,6 +258,7 @@ public Builder action(Optional action) { return this; } + public Builder aggregateVisitCount(CountInfo aggregateVisitCount) { Utils.checkNotNull(aggregateVisitCount, "aggregateVisitCount"); this.aggregateVisitCount = Optional.ofNullable(aggregateVisitCount); @@ -260,13 +270,13 @@ public Builder aggregateVisitCount(Optional aggregateVisitC this.aggregateVisitCount = aggregateVisitCount; return this; } - + public UserActivity build() { + return new UserActivity( - actor, - timestamp, - action, + actor, timestamp, action, aggregateVisitCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserActivityInsight.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserActivityInsight.java index d0083c77..cd3432b2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserActivityInsight.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserActivityInsight.java @@ -15,6 +15,7 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class UserActivityInsight { @JsonProperty("user") @@ -33,10 +34,12 @@ public class UserActivityInsight { @JsonProperty("lastActivityTimestamp") private Optional lastActivityTimestamp; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("activityCount") private Optional activityCount; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("activeDayCount") private Optional activeDayCount; @@ -63,7 +66,8 @@ public UserActivityInsight( public UserActivityInsight( Person user, ActivityEnum activity) { - this(user, activity, Optional.empty(), Optional.empty(), Optional.empty()); + this(user, activity, Optional.empty(), + Optional.empty(), Optional.empty()); } @JsonIgnore @@ -99,9 +103,10 @@ public Optional activeDayCount() { return (Optional) activeDayCount; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public UserActivityInsight withUser(Person user) { Utils.checkNotNull(user, "user"); @@ -127,6 +132,7 @@ public UserActivityInsight withLastActivityTimestamp(long lastActivityTimestamp) return this; } + /** * Unix timestamp of the last activity (in seconds since epoch UTC). */ @@ -142,6 +148,7 @@ public UserActivityInsight withActivityCount(CountInfo activityCount) { return this; } + public UserActivityInsight withActivityCount(Optional activityCount) { Utils.checkNotNull(activityCount, "activityCount"); this.activityCount = activityCount; @@ -154,13 +161,13 @@ public UserActivityInsight withActiveDayCount(CountInfo activeDayCount) { return this; } + public UserActivityInsight withActiveDayCount(Optional activeDayCount) { Utils.checkNotNull(activeDayCount, "activeDayCount"); this.activeDayCount = activeDayCount; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -181,11 +188,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - user, - activity, - lastActivityTimestamp, - activityCount, - activeDayCount); + user, activity, lastActivityTimestamp, + activityCount, activeDayCount); } @Override @@ -197,29 +201,32 @@ public String toString() { "activityCount", activityCount, "activeDayCount", activeDayCount); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Person user; - + private ActivityEnum activity; - + private Optional lastActivityTimestamp = Optional.empty(); - + private Optional activityCount = Optional.empty(); - + private Optional activeDayCount = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder user(Person user) { Utils.checkNotNull(user, "user"); this.user = user; return this; } + /** * Activity e.g. search, home page visit or all. */ @@ -229,6 +236,7 @@ public Builder activity(ActivityEnum activity) { return this; } + /** * Unix timestamp of the last activity (in seconds since epoch UTC). */ @@ -247,6 +255,7 @@ public Builder lastActivityTimestamp(Optional lastActivityTimestamp) { return this; } + public Builder activityCount(CountInfo activityCount) { Utils.checkNotNull(activityCount, "activityCount"); this.activityCount = Optional.ofNullable(activityCount); @@ -259,6 +268,7 @@ public Builder activityCount(Optional activityCount) { return this; } + public Builder activeDayCount(CountInfo activeDayCount) { Utils.checkNotNull(activeDayCount, "activeDayCount"); this.activeDayCount = Optional.ofNullable(activeDayCount); @@ -270,14 +280,13 @@ public Builder activeDayCount(Optional activeDayCount) { this.activeDayCount = activeDayCount; return this; } - + public UserActivityInsight build() { + return new UserActivityInsight( - user, - activity, - lastActivityTimestamp, - activityCount, - activeDayCount); + user, activity, lastActivityTimestamp, + activityCount, activeDayCount); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserGeneratedContentId.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserGeneratedContentId.java index fd3a1d9a..0bbf3c7b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserGeneratedContentId.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserGeneratedContentId.java @@ -14,8 +14,8 @@ import java.lang.String; import java.util.Optional; -public class UserGeneratedContentId { +public class UserGeneratedContentId { /** * The opaque id of the user generated content. */ @@ -42,9 +42,10 @@ public Optional id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The opaque id of the user generated content. @@ -55,6 +56,7 @@ public UserGeneratedContentId withId(long id) { return this; } + /** * The opaque id of the user generated content. */ @@ -64,7 +66,6 @@ public UserGeneratedContentId withId(Optional id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -89,15 +90,17 @@ public String toString() { return Utils.toString(UserGeneratedContentId.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional id = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The opaque id of the user generated content. */ @@ -115,10 +118,12 @@ public Builder id(Optional id) { this.id = id; return this; } - + public UserGeneratedContentId build() { + return new UserGeneratedContentId( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserInsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserInsightsResponse.java index afa109e4..45aa6d28 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserInsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserInsightsResponse.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class UserInsightsResponse { +public class UserInsightsResponse { /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -83,7 +83,8 @@ public UserInsightsResponse( } public UserInsightsResponse() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -137,9 +138,10 @@ public Optional> departments() { return (Optional>) departments; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). @@ -150,6 +152,7 @@ public UserInsightsResponse withLastLogTimestamp(long lastLogTimestamp) { return this; } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -168,6 +171,7 @@ public UserInsightsResponse withActivityInsights(List activ return this; } + /** * Insights for all active users with respect to set of actions. */ @@ -186,6 +190,7 @@ public UserInsightsResponse withInactiveInsights(List inact return this; } + /** * Insights for all in inactive users with respect to set of actions and time period. Activity count will be set to 0. */ @@ -204,6 +209,7 @@ public UserInsightsResponse withTotalTeammates(long totalTeammates) { return this; } + /** * Total number of teammates that have logged in to the product, that are still valid teammates. */ @@ -222,6 +228,7 @@ public UserInsightsResponse withTotalActiveUsers(long totalActiveUsers) { return this; } + /** * Total number of active users in the requested period. */ @@ -240,6 +247,7 @@ public UserInsightsResponse withDepartments(List departments) { return this; } + /** * list of departments applicable for users tab. */ @@ -249,7 +257,6 @@ public UserInsightsResponse withDepartments(Optional> dep return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -271,12 +278,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - lastLogTimestamp, - activityInsights, - inactiveInsights, - totalTeammates, - totalActiveUsers, - departments); + lastLogTimestamp, activityInsights, inactiveInsights, + totalTeammates, totalActiveUsers, departments); } @Override @@ -289,25 +292,27 @@ public String toString() { "totalActiveUsers", totalActiveUsers, "departments", departments); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional lastLogTimestamp = Optional.empty(); - + private Optional> activityInsights = Optional.empty(); - + private Optional> inactiveInsights = Optional.empty(); - + private Optional totalTeammates = Optional.empty(); - + private Optional totalActiveUsers = Optional.empty(); - + private Optional> departments = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unix timestamp of the last activity processed to make the response (in seconds since epoch UTC). */ @@ -326,6 +331,7 @@ public Builder lastLogTimestamp(Optional lastLogTimestamp) { return this; } + /** * Insights for all active users with respect to set of actions. */ @@ -344,6 +350,7 @@ public Builder activityInsights(Optional> ac return this; } + /** * Insights for all in inactive users with respect to set of actions and time period. Activity count will be set to 0. */ @@ -362,6 +369,7 @@ public Builder inactiveInsights(Optional> in return this; } + /** * Total number of teammates that have logged in to the product, that are still valid teammates. */ @@ -380,6 +388,7 @@ public Builder totalTeammates(Optional totalTeammates) { return this; } + /** * Total number of active users in the requested period. */ @@ -398,6 +407,7 @@ public Builder totalActiveUsers(Optional totalActiveUsers) { return this; } + /** * list of departments applicable for users tab. */ @@ -415,15 +425,13 @@ public Builder departments(Optional> departments) { this.departments = departments; return this; } - + public UserInsightsResponse build() { + return new UserInsightsResponse( - lastLogTimestamp, - activityInsights, - inactiveInsights, - totalTeammates, - totalActiveUsers, - departments); + lastLogTimestamp, activityInsights, inactiveInsights, + totalTeammates, totalActiveUsers, departments); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserReferenceDefinition.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserReferenceDefinition.java index 8eb70655..62e223f7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserReferenceDefinition.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserReferenceDefinition.java @@ -31,6 +31,7 @@ public class UserReferenceDefinition { @JsonProperty("datasourceUserId") private Optional datasourceUserId; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("name") private Optional name; @@ -70,9 +71,10 @@ public Optional name() { return name; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public UserReferenceDefinition withEmail(String email) { Utils.checkNotNull(email, "email"); @@ -80,6 +82,7 @@ public UserReferenceDefinition withEmail(String email) { return this; } + public UserReferenceDefinition withEmail(Optional email) { Utils.checkNotNull(email, "email"); this.email = email; @@ -95,6 +98,7 @@ public UserReferenceDefinition withDatasourceUserId(String datasourceUserId) { return this; } + /** * some datasources refer to the user by the datasource user id in the document */ @@ -110,13 +114,13 @@ public UserReferenceDefinition withName(String name) { return this; } + public UserReferenceDefinition withName(Optional name) { Utils.checkNotNull(name, "name"); this.name = name; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -135,9 +139,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - email, - datasourceUserId, - name); + email, datasourceUserId, name); } @Override @@ -147,19 +149,21 @@ public String toString() { "datasourceUserId", datasourceUserId, "name", name); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional email = Optional.empty(); - + private Optional datasourceUserId = Optional.empty(); - + private Optional name = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder email(String email) { Utils.checkNotNull(email, "email"); this.email = Optional.ofNullable(email); @@ -172,6 +176,7 @@ public Builder email(Optional email) { return this; } + /** * some datasources refer to the user by the datasource user id in the document */ @@ -190,6 +195,7 @@ public Builder datasourceUserId(Optional datasourceUserId) { return this; } + public Builder name(String name) { Utils.checkNotNull(name, "name"); this.name = Optional.ofNullable(name); @@ -201,12 +207,12 @@ public Builder name(Optional name) { this.name = name; return this; } - + public UserReferenceDefinition build() { + return new UserReferenceDefinition( - email, - datasourceUserId, - name); + email, datasourceUserId, name); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserRoleSpecification.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserRoleSpecification.java index 0796aa30..729b522e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserRoleSpecification.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserRoleSpecification.java @@ -14,16 +14,19 @@ import java.lang.SuppressWarnings; import java.util.Optional; + public class UserRoleSpecification { @JsonInclude(Include.NON_ABSENT) @JsonProperty("sourceDocumentSpec") private Optional sourceDocumentSpec; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("person") private Optional person; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("group") private Optional group; @@ -52,7 +55,8 @@ public UserRoleSpecification( public UserRoleSpecification( UserRole role) { - this(Optional.empty(), Optional.empty(), Optional.empty(), role); + this(Optional.empty(), Optional.empty(), Optional.empty(), + role); } @SuppressWarnings("unchecked") @@ -81,9 +85,10 @@ public UserRole role() { return role; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public UserRoleSpecification withSourceDocumentSpec(DocumentSpecUnion sourceDocumentSpec) { Utils.checkNotNull(sourceDocumentSpec, "sourceDocumentSpec"); @@ -91,6 +96,7 @@ public UserRoleSpecification withSourceDocumentSpec(DocumentSpecUnion sourceDocu return this; } + public UserRoleSpecification withSourceDocumentSpec(Optional sourceDocumentSpec) { Utils.checkNotNull(sourceDocumentSpec, "sourceDocumentSpec"); this.sourceDocumentSpec = sourceDocumentSpec; @@ -103,6 +109,7 @@ public UserRoleSpecification withPerson(Person person) { return this; } + public UserRoleSpecification withPerson(Optional person) { Utils.checkNotNull(person, "person"); this.person = person; @@ -115,6 +122,7 @@ public UserRoleSpecification withGroup(Group group) { return this; } + public UserRoleSpecification withGroup(Optional group) { Utils.checkNotNull(group, "group"); this.group = group; @@ -130,7 +138,6 @@ public UserRoleSpecification withRole(UserRole role) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -150,9 +157,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - sourceDocumentSpec, - person, - group, + sourceDocumentSpec, person, group, role); } @@ -164,21 +169,23 @@ public String toString() { "group", group, "role", role); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional sourceDocumentSpec = Optional.empty(); - + private Optional person = Optional.empty(); - + private Optional group = Optional.empty(); - + private UserRole role; - + private Builder() { // force use of static builder() method } + public Builder sourceDocumentSpec(DocumentSpecUnion sourceDocumentSpec) { Utils.checkNotNull(sourceDocumentSpec, "sourceDocumentSpec"); this.sourceDocumentSpec = Optional.ofNullable(sourceDocumentSpec); @@ -191,6 +198,7 @@ public Builder sourceDocumentSpec(Optional sourceDo return this; } + public Builder person(Person person) { Utils.checkNotNull(person, "person"); this.person = Optional.ofNullable(person); @@ -203,6 +211,7 @@ public Builder person(Optional person) { return this; } + public Builder group(Group group) { Utils.checkNotNull(group, "group"); this.group = Optional.ofNullable(group); @@ -215,6 +224,7 @@ public Builder group(Optional group) { return this; } + /** * A user's role with respect to a specific document. */ @@ -223,13 +233,13 @@ public Builder role(UserRole role) { this.role = role; return this; } - + public UserRoleSpecification build() { + return new UserRoleSpecification( - sourceDocumentSpec, - person, - group, + sourceDocumentSpec, person, group, role); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserStatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserStatusResponse.java index dee9bbcd..a03c7f8d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserStatusResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserStatusResponse.java @@ -21,7 +21,6 @@ *

Describes the user status response body */ public class UserStatusResponse { - /** * Whether the user is active or not */ @@ -85,9 +84,10 @@ public Optional lastUploadedAt() { return lastUploadedAt; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Whether the user is active or not @@ -98,6 +98,7 @@ public UserStatusResponse withIsActiveUser(boolean isActiveUser) { return this; } + /** * Whether the user is active or not */ @@ -116,6 +117,7 @@ public UserStatusResponse withUploadStatus(UploadStatusEnum uploadStatus) { return this; } + /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN */ @@ -134,6 +136,7 @@ public UserStatusResponse withLastUploadedAt(String lastUploadedAt) { return this; } + /** * Time of last successful upload for the user, in ISO 8601 format */ @@ -143,7 +146,6 @@ public UserStatusResponse withLastUploadedAt(Optional lastUploadedAt) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -162,9 +164,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - isActiveUser, - uploadStatus, - lastUploadedAt); + isActiveUser, uploadStatus, lastUploadedAt); } @Override @@ -174,19 +174,21 @@ public String toString() { "uploadStatus", uploadStatus, "lastUploadedAt", lastUploadedAt); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional isActiveUser = Optional.empty(); - + private Optional uploadStatus = Optional.empty(); - + private Optional lastUploadedAt = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Whether the user is active or not */ @@ -205,6 +207,7 @@ public Builder isActiveUser(Optional isActiveUser) { return this; } + /** * Upload status, enum of NOT_UPLOADED, UPLOADED, STATUS_UNKNOWN */ @@ -223,6 +226,7 @@ public Builder uploadStatus(Optional uploadStatus) { return this; } + /** * Time of last successful upload for the user, in ISO 8601 format */ @@ -240,12 +244,12 @@ public Builder lastUploadedAt(Optional lastUploadedAt) { this.lastUploadedAt = lastUploadedAt; return this; } - + public UserStatusResponse build() { + return new UserStatusResponse( - isActiveUser, - uploadStatus, - lastUploadedAt); + isActiveUser, uploadStatus, lastUploadedAt); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserViewInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserViewInfo.java index fb9b4392..fd1170a1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/UserViewInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/UserViewInfo.java @@ -13,8 +13,8 @@ import java.lang.String; import java.util.Optional; -public class UserViewInfo { +public class UserViewInfo { /** * Unique Glean Document ID of the associated document. */ @@ -77,9 +77,10 @@ public Optional docUrl() { return docUrl; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Unique Glean Document ID of the associated document. @@ -90,6 +91,7 @@ public UserViewInfo withDocId(String docId) { return this; } + /** * Unique Glean Document ID of the associated document. */ @@ -108,6 +110,7 @@ public UserViewInfo withDocTitle(String docTitle) { return this; } + /** * Title of associated document. */ @@ -126,6 +129,7 @@ public UserViewInfo withDocUrl(String docUrl) { return this; } + /** * URL of associated document. */ @@ -135,7 +139,6 @@ public UserViewInfo withDocUrl(Optional docUrl) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -154,9 +157,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - docId, - docTitle, - docUrl); + docId, docTitle, docUrl); } @Override @@ -166,19 +167,21 @@ public String toString() { "docTitle", docTitle, "docUrl", docUrl); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional docId = Optional.empty(); - + private Optional docTitle = Optional.empty(); - + private Optional docUrl = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Unique Glean Document ID of the associated document. */ @@ -197,6 +200,7 @@ public Builder docId(Optional docId) { return this; } + /** * Title of associated document. */ @@ -215,6 +219,7 @@ public Builder docTitle(Optional docTitle) { return this; } + /** * URL of associated document. */ @@ -232,12 +237,12 @@ public Builder docUrl(Optional docUrl) { this.docUrl = docUrl; return this; } - + public UserViewInfo build() { + return new UserViewInfo( - docId, - docTitle, - docUrl); + docId, docTitle, docUrl); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Value.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Value.java index 0c7ada55..d9ff2e31 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Value.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Value.java @@ -14,18 +14,15 @@ *

Either a string or HypertextField. When OpenAPI Generator supports oneOf, we can semantically enforce this in the docs. */ public class Value { - @JsonCreator public Value() { - - } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -47,16 +44,19 @@ public int hashCode() { public String toString() { return Utils.toString(Value.class); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Builder() { // force use of static builder() method } - + public Value build() { + return new Value( ); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Verification.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Verification.java index fd024824..c586f69d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Verification.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Verification.java @@ -14,14 +14,15 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class Verification { +public class Verification { /** * The verification state for the document. */ @JsonProperty("state") private State state; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("metadata") private Optional metadata; @@ -55,9 +56,10 @@ public Optional metadata() { return (Optional) metadata; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The verification state for the document. @@ -74,13 +76,13 @@ public Verification withMetadata(VerificationMetadata metadata) { return this; } + public Verification withMetadata(Optional metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = metadata; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -98,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - state, - metadata); + state, metadata); } @Override @@ -108,17 +109,19 @@ public String toString() { "state", state, "metadata", metadata); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private State state; - + private Optional metadata = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The verification state for the document. */ @@ -128,6 +131,7 @@ public Builder state(State state) { return this; } + public Builder metadata(VerificationMetadata metadata) { Utils.checkNotNull(metadata, "metadata"); this.metadata = Optional.ofNullable(metadata); @@ -139,11 +143,12 @@ public Builder metadata(Optional metadata) { this.metadata = metadata; return this; } - + public Verification build() { + return new Verification( - state, - metadata); + state, metadata); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/VerificationFeed.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/VerificationFeed.java index d1c16423..5d21ba42 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/VerificationFeed.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/VerificationFeed.java @@ -15,8 +15,8 @@ import java.util.List; import java.util.Optional; -public class VerificationFeed { +public class VerificationFeed { /** * List of document infos that include verification related information for them. */ @@ -44,9 +44,10 @@ public Optional> documents() { return (Optional>) documents; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of document infos that include verification related information for them. @@ -57,6 +58,7 @@ public VerificationFeed withDocuments(List documents) { return this; } + /** * List of document infos that include verification related information for them. */ @@ -66,7 +68,6 @@ public VerificationFeed withDocuments(Optional> doc return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -91,15 +92,17 @@ public String toString() { return Utils.toString(VerificationFeed.class, "documents", documents); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> documents = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * List of document infos that include verification related information for them. */ @@ -117,10 +120,12 @@ public Builder documents(Optional> documents) { this.documents = documents; return this; } - + public VerificationFeed build() { + return new VerificationFeed( documents); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/VerificationMetadata.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/VerificationMetadata.java index bd8f9eef..9893e8ee 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/VerificationMetadata.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/VerificationMetadata.java @@ -16,6 +16,7 @@ import java.util.List; import java.util.Optional; + public class VerificationMetadata { @JsonInclude(Include.NON_ABSENT) @@ -36,6 +37,7 @@ public class VerificationMetadata { @JsonProperty("expirationTs") private Optional expirationTs; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("document") private Optional document; @@ -47,6 +49,7 @@ public class VerificationMetadata { @JsonProperty("reminders") private Optional> reminders; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("lastReminder") private Optional lastReminder; @@ -94,7 +97,9 @@ public VerificationMetadata( } public VerificationMetadata() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty()); } @SuppressWarnings("unchecked") @@ -158,9 +163,10 @@ public Optional> candidateVerifiers() { return (Optional>) candidateVerifiers; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public VerificationMetadata withLastVerifier(Person lastVerifier) { Utils.checkNotNull(lastVerifier, "lastVerifier"); @@ -168,6 +174,7 @@ public VerificationMetadata withLastVerifier(Person lastVerifier) { return this; } + public VerificationMetadata withLastVerifier(Optional lastVerifier) { Utils.checkNotNull(lastVerifier, "lastVerifier"); this.lastVerifier = lastVerifier; @@ -183,6 +190,7 @@ public VerificationMetadata withLastVerificationTs(long lastVerificationTs) { return this; } + /** * The unix timestamp of the verification (in seconds since epoch UTC). */ @@ -201,6 +209,7 @@ public VerificationMetadata withExpirationTs(long expirationTs) { return this; } + /** * The unix timestamp of the verification expiration if applicable (in seconds since epoch UTC). */ @@ -216,6 +225,7 @@ public VerificationMetadata withDocument(Document document) { return this; } + public VerificationMetadata withDocument(Optional document) { Utils.checkNotNull(document, "document"); this.document = document; @@ -231,6 +241,7 @@ public VerificationMetadata withReminders(List reminders) { return this; } + /** * Info about all outstanding verification reminders for the document if exists. */ @@ -246,6 +257,7 @@ public VerificationMetadata withLastReminder(Reminder lastReminder) { return this; } + public VerificationMetadata withLastReminder(Optional lastReminder) { Utils.checkNotNull(lastReminder, "lastReminder"); this.lastReminder = lastReminder; @@ -261,6 +273,7 @@ public VerificationMetadata withVisitorCount(List visitorCount) { return this; } + /** * Number of visitors to the document during included time periods. */ @@ -279,6 +292,7 @@ public VerificationMetadata withCandidateVerifiers(List candidateVerifie return this; } + /** * List of potential verifiers for the document e.g. old verifiers and/or users with view/edit permissions. */ @@ -288,7 +302,6 @@ public VerificationMetadata withCandidateVerifiers(Optional lastVerifier = Optional.empty(); - + private Optional lastVerificationTs = Optional.empty(); - + private Optional expirationTs = Optional.empty(); - + private Optional document = Optional.empty(); - + private Optional> reminders = Optional.empty(); - + private Optional lastReminder = Optional.empty(); - + private Optional> visitorCount = Optional.empty(); - + private Optional> candidateVerifiers = Optional.empty(); - + private Builder() { // force use of static builder() method } + public Builder lastVerifier(Person lastVerifier) { Utils.checkNotNull(lastVerifier, "lastVerifier"); this.lastVerifier = Optional.ofNullable(lastVerifier); @@ -369,6 +379,7 @@ public Builder lastVerifier(Optional lastVerifier) { return this; } + /** * The unix timestamp of the verification (in seconds since epoch UTC). */ @@ -387,6 +398,7 @@ public Builder lastVerificationTs(Optional lastVerificationTs) { return this; } + /** * The unix timestamp of the verification expiration if applicable (in seconds since epoch UTC). */ @@ -405,6 +417,7 @@ public Builder expirationTs(Optional expirationTs) { return this; } + public Builder document(Document document) { Utils.checkNotNull(document, "document"); this.document = Optional.ofNullable(document); @@ -417,6 +430,7 @@ public Builder document(Optional document) { return this; } + /** * Info about all outstanding verification reminders for the document if exists. */ @@ -435,6 +449,7 @@ public Builder reminders(Optional> reminders) { return this; } + public Builder lastReminder(Reminder lastReminder) { Utils.checkNotNull(lastReminder, "lastReminder"); this.lastReminder = Optional.ofNullable(lastReminder); @@ -447,6 +462,7 @@ public Builder lastReminder(Optional lastReminder) { return this; } + /** * Number of visitors to the document during included time periods. */ @@ -465,6 +481,7 @@ public Builder visitorCount(Optional> visitorCount) { return this; } + /** * List of potential verifiers for the document e.g. old verifiers and/or users with view/edit permissions. */ @@ -482,17 +499,14 @@ public Builder candidateVerifiers(Optional> candidateVeri this.candidateVerifiers = candidateVerifiers; return this; } - + public VerificationMetadata build() { + return new VerificationMetadata( - lastVerifier, - lastVerificationTs, - expirationTs, - document, - reminders, - lastReminder, - visitorCount, - candidateVerifiers); + lastVerifier, lastVerificationTs, expirationTs, + document, reminders, lastReminder, + visitorCount, candidateVerifiers); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/VerifyRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/VerifyRequest.java index d93af940..1784aad9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/VerifyRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/VerifyRequest.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class VerifyRequest { +public class VerifyRequest { /** * The document which is verified. */ @@ -61,9 +61,10 @@ public Optional action() { return (Optional) action; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The document which is verified. @@ -83,6 +84,7 @@ public VerifyRequest withAction(VerifyRequestAction action) { return this; } + /** * The verification action requested. */ @@ -92,7 +94,6 @@ public VerifyRequest withAction(Optional action) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -110,8 +111,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - documentId, - action); + documentId, action); } @Override @@ -120,17 +120,19 @@ public String toString() { "documentId", documentId, "action", action); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String documentId; - + private Optional action = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The document which is verified. */ @@ -140,6 +142,7 @@ public Builder documentId(String documentId) { return this; } + /** * The verification action requested. */ @@ -157,11 +160,12 @@ public Builder action(Optional action) { this.action = action; return this; } - + public VerifyRequest build() { + return new VerifyRequest( - documentId, - action); + documentId, action); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/ViewerInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/ViewerInfo.java index fc74f956..e6e1e21d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/ViewerInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/ViewerInfo.java @@ -16,8 +16,8 @@ import java.time.OffsetDateTime; import java.util.Optional; -public class ViewerInfo { +public class ViewerInfo { /** * DEPRECATED - use permissions instead. Viewer's role on the specific document. * @@ -28,6 +28,7 @@ public class ViewerInfo { @Deprecated private Optional role; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("lastViewedTime") private Optional lastViewedTime; @@ -63,9 +64,10 @@ public Optional lastViewedTime() { return lastViewedTime; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * DEPRECATED - use permissions instead. Viewer's role on the specific document. @@ -79,6 +81,7 @@ public ViewerInfo withRole(Role role) { return this; } + /** * DEPRECATED - use permissions instead. Viewer's role on the specific document. * @@ -97,13 +100,13 @@ public ViewerInfo withLastViewedTime(OffsetDateTime lastViewedTime) { return this; } + public ViewerInfo withLastViewedTime(Optional lastViewedTime) { Utils.checkNotNull(lastViewedTime, "lastViewedTime"); this.lastViewedTime = lastViewedTime; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -121,8 +124,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - role, - lastViewedTime); + role, lastViewedTime); } @Override @@ -131,18 +133,20 @@ public String toString() { "role", role, "lastViewedTime", lastViewedTime); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + @Deprecated private Optional role = Optional.empty(); - + private Optional lastViewedTime = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * DEPRECATED - use permissions instead. Viewer's role on the specific document. * @@ -167,6 +171,7 @@ public Builder role(Optional role) { return this; } + public Builder lastViewedTime(OffsetDateTime lastViewedTime) { Utils.checkNotNull(lastViewedTime, "lastViewedTime"); this.lastViewedTime = Optional.ofNullable(lastViewedTime); @@ -178,11 +183,12 @@ public Builder lastViewedTime(Optional lastViewedTime) { this.lastViewedTime = lastViewedTime; return this; } - + public ViewerInfo build() { + return new ViewerInfo( - role, - lastViewedTime); + role, lastViewedTime); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java index bc7f6fce..e5385320 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/Workflow.java @@ -15,8 +15,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class Workflow { +public class Workflow { /** * The name of the workflow. */ @@ -24,6 +24,7 @@ public class Workflow { @JsonProperty("name") private Optional name; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("author") private Optional author; @@ -42,10 +43,12 @@ public class Workflow { @JsonProperty("lastUpdateTimestamp") private Optional lastUpdateTimestamp; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("lastUpdatedBy") private Optional lastUpdatedBy; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("permissions") private Optional permissions; @@ -83,7 +86,9 @@ public Workflow( } public Workflow() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -136,9 +141,10 @@ public Optional id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The name of the workflow. @@ -149,6 +155,7 @@ public Workflow withName(String name) { return this; } + /** * The name of the workflow. */ @@ -164,6 +171,7 @@ public Workflow withAuthor(Person author) { return this; } + public Workflow withAuthor(Optional author) { Utils.checkNotNull(author, "author"); this.author = author; @@ -179,6 +187,7 @@ public Workflow withCreateTimestamp(long createTimestamp) { return this; } + /** * Server Unix timestamp of the creation time. */ @@ -197,6 +206,7 @@ public Workflow withLastUpdateTimestamp(long lastUpdateTimestamp) { return this; } + /** * Server Unix timestamp of the last update time. */ @@ -212,6 +222,7 @@ public Workflow withLastUpdatedBy(Person lastUpdatedBy) { return this; } + public Workflow withLastUpdatedBy(Optional lastUpdatedBy) { Utils.checkNotNull(lastUpdatedBy, "lastUpdatedBy"); this.lastUpdatedBy = lastUpdatedBy; @@ -224,6 +235,7 @@ public Workflow withPermissions(ObjectPermissions permissions) { return this; } + public Workflow withPermissions(Optional permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = permissions; @@ -239,6 +251,7 @@ public Workflow withId(String id) { return this; } + /** * The ID of the workflow. */ @@ -248,7 +261,6 @@ public Workflow withId(Optional id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -271,12 +283,8 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - name, - author, - createTimestamp, - lastUpdateTimestamp, - lastUpdatedBy, - permissions, + name, author, createTimestamp, + lastUpdateTimestamp, lastUpdatedBy, permissions, id); } @@ -291,27 +299,29 @@ public String toString() { "permissions", permissions, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional name = Optional.empty(); - + private Optional author = Optional.empty(); - + private Optional createTimestamp = Optional.empty(); - + private Optional lastUpdateTimestamp = Optional.empty(); - + private Optional lastUpdatedBy = Optional.empty(); - + private Optional permissions = Optional.empty(); - + private Optional id = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The name of the workflow. */ @@ -330,6 +340,7 @@ public Builder name(Optional name) { return this; } + public Builder author(Person author) { Utils.checkNotNull(author, "author"); this.author = Optional.ofNullable(author); @@ -342,6 +353,7 @@ public Builder author(Optional author) { return this; } + /** * Server Unix timestamp of the creation time. */ @@ -360,6 +372,7 @@ public Builder createTimestamp(Optional createTimestamp) { return this; } + /** * Server Unix timestamp of the last update time. */ @@ -378,6 +391,7 @@ public Builder lastUpdateTimestamp(Optional lastUpdateTimestamp) { return this; } + public Builder lastUpdatedBy(Person lastUpdatedBy) { Utils.checkNotNull(lastUpdatedBy, "lastUpdatedBy"); this.lastUpdatedBy = Optional.ofNullable(lastUpdatedBy); @@ -390,6 +404,7 @@ public Builder lastUpdatedBy(Optional lastUpdatedBy) { return this; } + public Builder permissions(ObjectPermissions permissions) { Utils.checkNotNull(permissions, "permissions"); this.permissions = Optional.ofNullable(permissions); @@ -402,6 +417,7 @@ public Builder permissions(Optional permissions) { return this; } + /** * The ID of the workflow. */ @@ -419,16 +435,14 @@ public Builder id(Optional id) { this.id = id; return this; } - + public Workflow build() { + return new Workflow( - name, - author, - createTimestamp, - lastUpdateTimestamp, - lastUpdatedBy, - permissions, + name, author, createTimestamp, + lastUpdateTimestamp, lastUpdatedBy, permissions, id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowFeedbackInfo.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowFeedbackInfo.java index de3ad8cb..9c37b5ce 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowFeedbackInfo.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowFeedbackInfo.java @@ -14,8 +14,8 @@ import java.lang.SuppressWarnings; import java.util.Optional; -public class WorkflowFeedbackInfo { +public class WorkflowFeedbackInfo { /** * Where the feedback of the workflow originated from */ @@ -43,9 +43,10 @@ public Optional source() { return (Optional) source; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Where the feedback of the workflow originated from @@ -56,6 +57,7 @@ public WorkflowFeedbackInfo withSource(WorkflowFeedbackInfoSource source) { return this; } + /** * Where the feedback of the workflow originated from */ @@ -65,7 +67,6 @@ public WorkflowFeedbackInfo withSource(Optional source = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Where the feedback of the workflow originated from */ @@ -116,10 +119,12 @@ public Builder source(Optional source) { this.source = source; return this; } - + public WorkflowFeedbackInfo build() { + return new WorkflowFeedbackInfo( source); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowResult.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowResult.java index 462c9723..81d6ee5d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowResult.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/WorkflowResult.java @@ -10,6 +10,7 @@ import java.lang.Override; import java.lang.String; + public class WorkflowResult { @JsonProperty("workflow") @@ -27,9 +28,10 @@ public Workflow workflow() { return workflow; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public WorkflowResult withWorkflow(Workflow workflow) { Utils.checkNotNull(workflow, "workflow"); @@ -37,7 +39,6 @@ public WorkflowResult withWorkflow(Workflow workflow) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -62,24 +63,28 @@ public String toString() { return Utils.toString(WorkflowResult.class, "workflow", workflow); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Workflow workflow; - + private Builder() { // force use of static builder() method } + public Builder workflow(Workflow workflow) { Utils.checkNotNull(workflow, "workflow"); this.workflow = workflow; return this; } - + public WorkflowResult build() { + return new WorkflowResult( workflow); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/WriteActionParameter.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/WriteActionParameter.java index eaddd8bc..6b5f7e46 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/WriteActionParameter.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/WriteActionParameter.java @@ -16,8 +16,8 @@ import java.util.List; import java.util.Optional; -public class WriteActionParameter { +public class WriteActionParameter { /** * The type of the value (e.g., integer, string, boolean, etc.) */ @@ -83,7 +83,8 @@ public WriteActionParameter( } public WriteActionParameter() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -136,9 +137,10 @@ public Optional> possibleValues() { return (Optional>) possibleValues; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The type of the value (e.g., integer, string, boolean, etc.) @@ -149,6 +151,7 @@ public WriteActionParameter withType(WriteActionParameterType type) { return this; } + /** * The type of the value (e.g., integer, string, boolean, etc.) */ @@ -167,6 +170,7 @@ public WriteActionParameter withDisplayName(String displayName) { return this; } + /** * Human readable display name for the key. */ @@ -185,6 +189,7 @@ public WriteActionParameter withValue(String value) { return this; } + /** * The value of the field. */ @@ -203,6 +208,7 @@ public WriteActionParameter withIsRequired(boolean isRequired) { return this; } + /** * Is the parameter a required field. */ @@ -221,6 +227,7 @@ public WriteActionParameter withDescription(String description) { return this; } + /** * Description of the parameter. */ @@ -239,6 +246,7 @@ public WriteActionParameter withPossibleValues(List possibleValue return this; } + /** * Possible values that the parameter can take. */ @@ -248,7 +256,6 @@ public WriteActionParameter withPossibleValues(Optional type = Optional.empty(); - + private Optional displayName = Optional.empty(); - + private Optional value = Optional.empty(); - + private Optional isRequired = Optional.empty(); - + private Optional description = Optional.empty(); - + private Optional> possibleValues = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The type of the value (e.g., integer, string, boolean, etc.) */ @@ -325,6 +330,7 @@ public Builder type(Optional type) { return this; } + /** * Human readable display name for the key. */ @@ -343,6 +349,7 @@ public Builder displayName(Optional displayName) { return this; } + /** * The value of the field. */ @@ -361,6 +368,7 @@ public Builder value(Optional value) { return this; } + /** * Is the parameter a required field. */ @@ -379,6 +387,7 @@ public Builder isRequired(Optional isRequired) { return this; } + /** * Description of the parameter. */ @@ -397,6 +406,7 @@ public Builder description(Optional description) { return this; } + /** * Possible values that the parameter can take. */ @@ -414,15 +424,13 @@ public Builder possibleValues(Optional> possibleVa this.possibleValues = possibleValues; return this; } - + public WriteActionParameter build() { + return new WriteActionParameter( - type, - displayName, - value, - isRequired, - description, - possibleValues); + type, displayName, value, + isRequired, description, possibleValues); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/components/WritePermission.java b/src/main/java/com/glean/api_client/glean_api_client/models/components/WritePermission.java index 75e50570..0aeb50ac 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/components/WritePermission.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/components/WritePermission.java @@ -21,7 +21,6 @@ *

Describes the write permissions levels that a user has for a specific feature */ public class WritePermission { - /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object */ @@ -67,7 +66,8 @@ public WritePermission( } public WritePermission() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -103,9 +103,10 @@ public Optional delete() { return delete; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object @@ -116,6 +117,7 @@ public WritePermission withScopeType(ScopeType scopeType) { return this; } + /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object */ @@ -134,6 +136,7 @@ public WritePermission withCreate(boolean create) { return this; } + /** * True if user has create permission for this feature and scope */ @@ -152,6 +155,7 @@ public WritePermission withUpdate(boolean update) { return this; } + /** * True if user has update permission for this feature and scope */ @@ -170,6 +174,7 @@ public WritePermission withDelete(boolean delete) { return this; } + /** * True if user has delete permission for this feature and scope */ @@ -179,7 +184,6 @@ public WritePermission withDelete(Optional delete) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -199,9 +203,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - scopeType, - create, - update, + scopeType, create, update, delete); } @@ -213,21 +215,23 @@ public String toString() { "update", update, "delete", delete); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional scopeType = Optional.empty(); - + private Optional create = Optional.empty(); - + private Optional update = Optional.empty(); - + private Optional delete = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Describes the scope for a ReadPermission, WritePermission, or GrantPermission object */ @@ -246,6 +250,7 @@ public Builder scopeType(Optional scopeType) { return this; } + /** * True if user has create permission for this feature and scope */ @@ -264,6 +269,7 @@ public Builder create(Optional create) { return this; } + /** * True if user has update permission for this feature and scope */ @@ -282,6 +288,7 @@ public Builder update(Optional update) { return this; } + /** * True if user has delete permission for this feature and scope */ @@ -299,13 +306,13 @@ public Builder delete(Optional delete) { this.delete = delete; return this; } - + public WritePermission build() { + return new WritePermission( - scopeType, - create, - update, + scopeType, create, update, delete); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/errors/CollectionError.java b/src/main/java/com/glean/api_client/glean_api_client/models/errors/CollectionError.java index 94b87032..749b1d6c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/errors/CollectionError.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/errors/CollectionError.java @@ -12,6 +12,7 @@ import java.lang.String; import java.lang.SuppressWarnings; + @SuppressWarnings("serial") public class CollectionError extends RuntimeException { @@ -31,9 +32,10 @@ public ErrorCode errorCode() { return errorCode; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + public CollectionError withErrorCode(ErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); @@ -41,7 +43,6 @@ public CollectionError withErrorCode(ErrorCode errorCode) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -66,25 +67,29 @@ public String toString() { return Utils.toString(CollectionError.class, "errorCode", errorCode); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private ErrorCode errorCode; - + private Builder() { // force use of static builder() method } + public Builder errorCode(ErrorCode errorCode) { Utils.checkNotNull(errorCode, "errorCode"); this.errorCode = errorCode; return this; } - + public CollectionError build() { + return new CollectionError( errorCode); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/errors/GleanDataError.java b/src/main/java/com/glean/api_client/glean_api_client/models/errors/GleanDataError.java index dadadc69..2f0aaab9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/errors/GleanDataError.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/errors/GleanDataError.java @@ -19,9 +19,9 @@ import java.util.List; import java.util.Optional; + @SuppressWarnings("serial") public class GleanDataError extends RuntimeException { - /** * Indicates the gmail results could not be fetched due to bad token. */ @@ -43,6 +43,7 @@ public class GleanDataError extends RuntimeException { @JsonProperty("invalidOperators") private Optional> invalidOperators; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("errorMessages") private Optional> errorMessages; @@ -65,7 +66,8 @@ public GleanDataError( } public GleanDataError() { - this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + this(Optional.empty(), Optional.empty(), Optional.empty(), + Optional.empty()); } /** @@ -99,9 +101,10 @@ public Optional> errorMessages() { return (Optional>) errorMessages; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Indicates the gmail results could not be fetched due to bad token. @@ -112,6 +115,7 @@ public GleanDataError withBadGmailToken(boolean badGmailToken) { return this; } + /** * Indicates the gmail results could not be fetched due to bad token. */ @@ -130,6 +134,7 @@ public GleanDataError withBadOutlookToken(boolean badOutlookToken) { return this; } + /** * Indicates the outlook results could not be fetched due to bad token. */ @@ -148,6 +153,7 @@ public GleanDataError withInvalidOperators(List inval return this; } + /** * Indicates results could not be fetched due to invalid operators in the query. */ @@ -163,13 +169,13 @@ public GleanDataError withErrorMessages(List errorMessages) { return this; } + public GleanDataError withErrorMessages(Optional> errorMessages) { Utils.checkNotNull(errorMessages, "errorMessages"); this.errorMessages = errorMessages; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -189,9 +195,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - badGmailToken, - badOutlookToken, - invalidOperators, + badGmailToken, badOutlookToken, invalidOperators, errorMessages); } @@ -203,21 +207,23 @@ public String toString() { "invalidOperators", invalidOperators, "errorMessages", errorMessages); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional badGmailToken = Optional.empty(); - + private Optional badOutlookToken = Optional.empty(); - + private Optional> invalidOperators = Optional.empty(); - + private Optional> errorMessages = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Indicates the gmail results could not be fetched due to bad token. */ @@ -236,6 +242,7 @@ public Builder badGmailToken(Optional badGmailToken) { return this; } + /** * Indicates the outlook results could not be fetched due to bad token. */ @@ -254,6 +261,7 @@ public Builder badOutlookToken(Optional badOutlookToken) { return this; } + /** * Indicates results could not be fetched due to invalid operators in the query. */ @@ -272,6 +280,7 @@ public Builder invalidOperators(Optional errorMessages) { Utils.checkNotNull(errorMessages, "errorMessages"); this.errorMessages = Optional.ofNullable(errorMessages); @@ -283,14 +292,14 @@ public Builder errorMessages(Optional> errorMessage this.errorMessages = errorMessages; return this; } - + public GleanDataError build() { + return new GleanDataError( - badGmailToken, - badOutlookToken, - invalidOperators, + badGmailToken, badOutlookToken, invalidOperators, errorMessages); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ActivityRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ActivityRequestBuilder.java index edf6964c..a60f9817 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ActivityRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ActivityRequestBuilder.java @@ -29,7 +29,7 @@ public ActivityRequestBuilder request(Activity request) { public ActivityResponse call() throws Exception { RequestOperation operation - = new ActivityOperation( sdkConfiguration); + = new ActivityOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ActivityResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ActivityResponse.java index c157e47e..4615f3bb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ActivityResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ActivityResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class ActivityResponse implements Response { +public class ActivityResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public ActivityResponse withRawResponse(HttpResponse rawResponse) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public ActivityResponse build() { + return new ActivityResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddcollectionitemsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddcollectionitemsRequestBuilder.java index 5c10ccb0..786e289e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddcollectionitemsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddcollectionitemsRequestBuilder.java @@ -29,7 +29,7 @@ public AddcollectionitemsRequestBuilder request(AddCollectionItemsRequest reques public AddcollectionitemsResponse call() throws Exception { RequestOperation operation - = new AddcollectionitemsOperation( sdkConfiguration); + = new AddcollectionitemsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddcollectionitemsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddcollectionitemsResponse.java index 6e0efb6d..b0cc4aef 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddcollectionitemsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddcollectionitemsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class AddcollectionitemsResponse implements Response { +public class AddcollectionitemsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public AddcollectionitemsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional addCollectionItemsResponse() { return (Optional) addCollectionItemsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public AddcollectionitemsResponse withAddCollectionItemsResponse(AddCollectionIt return this; } + /** * OK */ @@ -143,7 +146,6 @@ public AddcollectionitemsResponse withAddCollectionItemsResponse(Optional rawResponse; - + private Optional addCollectionItemsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder addCollectionItemsResponse(Optional operation - = new AddverificationreminderOperation( sdkConfiguration); + = new AddverificationreminderOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddverificationreminderResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddverificationreminderResponse.java index 9d2f9f2a..e6bdf35b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddverificationreminderResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AddverificationreminderResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class AddverificationreminderResponse implements Response { +public class AddverificationreminderResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public AddverificationreminderResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional verification() { return (Optional) verification; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public AddverificationreminderResponse withVerification(Verification verificatio return this; } + /** * OK */ @@ -143,7 +146,6 @@ public AddverificationreminderResponse withVerification(Optional rawResponse; - + private Optional verification = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder verification(Optional verification) { this.verification = verification; return this; } - + public AddverificationreminderResponse build() { + return new AddverificationreminderResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, verification); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AdminsearchRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AdminsearchRequestBuilder.java index 5d3208b0..8054cb0b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AdminsearchRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AdminsearchRequestBuilder.java @@ -29,7 +29,7 @@ public AdminsearchRequestBuilder request(SearchRequest request) { public AdminsearchResponse call() throws Exception { RequestOperation operation - = new AdminsearchOperation( sdkConfiguration); + = new AdminsearchOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AdminsearchResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AdminsearchResponse.java index 21fe8729..934e3fb1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AdminsearchResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AdminsearchResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class AdminsearchResponse implements Response { +public class AdminsearchResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public AdminsearchResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional searchResponse() { return (Optional) searchResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public AdminsearchResponse withSearchResponse(SearchResponse searchResponse) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public AdminsearchResponse withSearchResponse(Optional return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, searchResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "searchResponse", searchResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional searchResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder searchResponse(Optional searchResponse) this.searchResponse = searchResponse; return this; } - + public AdminsearchResponse build() { + return new AdminsearchResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, searchResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AutocompleteRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AutocompleteRequestBuilder.java index e8d6219d..f2892291 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AutocompleteRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AutocompleteRequestBuilder.java @@ -29,7 +29,7 @@ public AutocompleteRequestBuilder request(AutocompleteRequest request) { public AutocompleteResponse call() throws Exception { RequestOperation operation - = new AutocompleteOperation( sdkConfiguration); + = new AutocompleteOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AutocompleteResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AutocompleteResponse.java index ca7747f4..df3a4935 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/AutocompleteResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/AutocompleteResponse.java @@ -15,8 +15,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class AutocompleteResponse implements Response { +public class AutocompleteResponse implements Response { /** * HTTP response content type for this operation */ @@ -57,7 +57,8 @@ public AutocompleteResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -93,9 +94,10 @@ public Optional) autocompleteResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -133,6 +135,7 @@ public AutocompleteResponse withAutocompleteResponse(com.glean.api_client.glean_ return this; } + /** * OK */ @@ -142,7 +145,6 @@ public AutocompleteResponse withAutocompleteResponse(Optional rawResponse; - + private Optional autocompleteResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -200,6 +202,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -209,6 +212,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -218,6 +222,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -235,13 +240,13 @@ public Builder autocompleteResponse(Optional timezoneOffset = Optional.empty(); - + private com.glean.api_client.glean_api_client.models.components.ChatRequest chatRequest; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -145,6 +147,7 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + /** * Includes chat history for Glean AI to respond to. */ @@ -153,11 +156,12 @@ public Builder chatRequest(com.glean.api_client.glean_api_client.models.componen this.chatRequest = chatRequest; return this; } - + public ChatRequest build() { + return new ChatRequest( - timezoneOffset, - chatRequest); + timezoneOffset, chatRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatRequestBuilder.java index bd8f71b2..c8d271a1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatRequestBuilder.java @@ -53,7 +53,7 @@ private com.glean.api_client.glean_api_client.models.operations.ChatRequest buil public ChatResponse call() throws Exception { RequestOperation operation - = new ChatOperation( sdkConfiguration); + = new ChatOperation(sdkConfiguration); com.glean.api_client.glean_api_client.models.operations.ChatRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatResponse.java index 3c32c8bb..ce1844f7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatResponse.java @@ -15,8 +15,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ChatResponse implements Response { +public class ChatResponse implements Response { /** * HTTP response content type for this operation */ @@ -57,7 +57,8 @@ public ChatResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -93,9 +94,10 @@ public Optional) chatResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -133,6 +135,7 @@ public ChatResponse withChatResponse(com.glean.api_client.glean_api_client.model return this; } + /** * OK */ @@ -142,7 +145,6 @@ public ChatResponse withChatResponse(Optional rawResponse; - + private Optional chatResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -200,6 +202,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -209,6 +212,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -218,6 +222,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -235,13 +240,13 @@ public Builder chatResponse(Optional timezoneOffset = Optional.empty(); - + private ChatRequest chatRequest; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -146,6 +148,7 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + /** * Includes chat history for Glean AI to respond to. */ @@ -154,11 +157,12 @@ public Builder chatRequest(ChatRequest chatRequest) { this.chatRequest = chatRequest; return this; } - + public ChatStreamRequest build() { + return new ChatStreamRequest( - timezoneOffset, - chatRequest); + timezoneOffset, chatRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatStreamRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatStreamRequestBuilder.java index 94ef2391..27e7d084 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatStreamRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatStreamRequestBuilder.java @@ -53,7 +53,7 @@ private ChatStreamRequest buildRequest() { public ChatStreamResponse call() throws Exception { RequestOperation operation - = new ChatStreamOperation( sdkConfiguration); + = new ChatStreamOperation(sdkConfiguration); ChatStreamRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatStreamResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatStreamResponse.java index 97b10a28..52d76a00 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatStreamResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ChatStreamResponse.java @@ -14,8 +14,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ChatStreamResponse implements Response { +public class ChatStreamResponse implements Response { /** * HTTP response content type for this operation */ @@ -56,7 +56,8 @@ public ChatStreamResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -91,9 +92,10 @@ public Optional chatRequestStream() { return chatRequestStream; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -131,6 +133,7 @@ public ChatStreamResponse withChatRequestStream(String chatRequestStream) { return this; } + /** * OK */ @@ -140,7 +143,6 @@ public ChatStreamResponse withChatRequestStream(Optional chatRequestStre return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -160,9 +162,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, chatRequestStream); } @@ -174,21 +174,23 @@ public String toString() { "rawResponse", rawResponse, "chatRequestStream", chatRequestStream); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional chatRequestStream = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -198,6 +200,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -207,6 +210,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -216,6 +220,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -233,13 +238,13 @@ public Builder chatRequestStream(Optional chatRequestStream) { this.chatRequestStream = chatRequestStream; return this; } - + public ChatStreamResponse build() { + return new ChatStreamResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, chatRequestStream); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndStreamRunRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndStreamRunRequestBuilder.java index d3a80568..a9275378 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndStreamRunRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndStreamRunRequestBuilder.java @@ -29,7 +29,7 @@ public CreateAndStreamRunRequestBuilder request(AgentRunCreate request) { public CreateAndStreamRunResponse call() throws Exception { RequestOperation operation - = new CreateAndStreamRunOperation( sdkConfiguration); + = new CreateAndStreamRunOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndStreamRunResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndStreamRunResponse.java index cf43392c..29ecca32 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndStreamRunResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndStreamRunResponse.java @@ -14,8 +14,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class CreateAndStreamRunResponse implements Response { +public class CreateAndStreamRunResponse implements Response { /** * HTTP response content type for this operation */ @@ -56,7 +56,8 @@ public CreateAndStreamRunResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -91,9 +92,10 @@ public Optional res() { return res; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -131,6 +133,7 @@ public CreateAndStreamRunResponse withRes(String res) { return this; } + /** * Success */ @@ -140,7 +143,6 @@ public CreateAndStreamRunResponse withRes(Optional res) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -160,9 +162,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, res); } @@ -174,21 +174,23 @@ public String toString() { "rawResponse", rawResponse, "res", res); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional res = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -198,6 +200,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -207,6 +210,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -216,6 +220,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Success */ @@ -233,13 +238,13 @@ public Builder res(Optional res) { this.res = res; return this; } - + public CreateAndStreamRunResponse build() { + return new CreateAndStreamRunResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, res); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndWaitRunRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndWaitRunRequestBuilder.java index d2f1fdbb..57081937 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndWaitRunRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndWaitRunRequestBuilder.java @@ -29,7 +29,7 @@ public CreateAndWaitRunRequestBuilder request(AgentRunCreate request) { public CreateAndWaitRunResponse call() throws Exception { RequestOperation operation - = new CreateAndWaitRunOperation( sdkConfiguration); + = new CreateAndWaitRunOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndWaitRunResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndWaitRunResponse.java index 2cc47ab8..abe27657 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndWaitRunResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateAndWaitRunResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class CreateAndWaitRunResponse implements Response { +public class CreateAndWaitRunResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public CreateAndWaitRunResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional agentRunWaitResponse() { return (Optional) agentRunWaitResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public CreateAndWaitRunResponse withAgentRunWaitResponse(AgentRunWaitResponse ag return this; } + /** * Success */ @@ -143,7 +146,6 @@ public CreateAndWaitRunResponse withAgentRunWaitResponse(Optional rawResponse; - + private Optional agentRunWaitResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Success */ @@ -236,13 +241,13 @@ public Builder agentRunWaitResponse(Optional age this.agentRunWaitResponse = agentRunWaitResponse; return this; } - + public CreateAndWaitRunResponse build() { + return new CreateAndWaitRunResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, agentRunWaitResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateannouncementRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateannouncementRequestBuilder.java index 9bdcbde6..705ac301 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateannouncementRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateannouncementRequestBuilder.java @@ -29,7 +29,7 @@ public CreateannouncementRequestBuilder request(CreateAnnouncementRequest reques public CreateannouncementResponse call() throws Exception { RequestOperation operation - = new CreateannouncementOperation( sdkConfiguration); + = new CreateannouncementOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateannouncementResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateannouncementResponse.java index ff458545..2d31d078 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateannouncementResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateannouncementResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class CreateannouncementResponse implements Response { +public class CreateannouncementResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public CreateannouncementResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional announcement() { return (Optional) announcement; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public CreateannouncementResponse withAnnouncement(Announcement announcement) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public CreateannouncementResponse withAnnouncement(Optional rawResponse; - + private Optional announcement = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder announcement(Optional announcement) { this.announcement = announcement; return this; } - + public CreateannouncementResponse build() { + return new CreateannouncementResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, announcement); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateanswerRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateanswerRequestBuilder.java index 33c33177..750ab2c5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateanswerRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateanswerRequestBuilder.java @@ -29,7 +29,7 @@ public CreateanswerRequestBuilder request(CreateAnswerRequest request) { public CreateanswerResponse call() throws Exception { RequestOperation operation - = new CreateanswerOperation( sdkConfiguration); + = new CreateanswerOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateanswerResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateanswerResponse.java index c890d288..39ceb1b9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateanswerResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateanswerResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class CreateanswerResponse implements Response { +public class CreateanswerResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public CreateanswerResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional answer() { return (Optional) answer; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public CreateanswerResponse withAnswer(Answer answer) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public CreateanswerResponse withAnswer(Optional answer) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, answer); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "answer", answer); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional answer = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder answer(Optional answer) { this.answer = answer; return this; } - + public CreateanswerResponse build() { + return new CreateanswerResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, answer); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateauthtokenRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateauthtokenRequestBuilder.java index 0d3c248d..63da26e2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateauthtokenRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateauthtokenRequestBuilder.java @@ -20,7 +20,7 @@ public CreateauthtokenRequestBuilder(SDKConfiguration sdkConfiguration) { public CreateauthtokenResponse call() throws Exception { RequestlessOperation operation - = new CreateauthtokenOperation( sdkConfiguration); + = new CreateauthtokenOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest()); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateauthtokenResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateauthtokenResponse.java index 848ff600..2032c809 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateauthtokenResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateauthtokenResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class CreateauthtokenResponse implements Response { +public class CreateauthtokenResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public CreateauthtokenResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional createAuthTokenResponse() { return (Optional) createAuthTokenResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public CreateauthtokenResponse withCreateAuthTokenResponse(CreateAuthTokenRespon return this; } + /** * OK */ @@ -143,7 +146,6 @@ public CreateauthtokenResponse withCreateAuthTokenResponse(Optional rawResponse; - + private Optional createAuthTokenResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder createAuthTokenResponse(Optional operation - = new CreatecollectionOperation( sdkConfiguration); + = new CreatecollectionOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatecollectionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatecollectionResponse.java index 30398bf5..64af8834 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatecollectionResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatecollectionResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class CreatecollectionResponse implements Response { +public class CreatecollectionResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public CreatecollectionResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional createCollectionResponse() { return (Optional) createCollectionResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public CreatecollectionResponse withCreateCollectionResponse(CreateCollectionRes return this; } + /** * OK */ @@ -143,7 +146,6 @@ public CreatecollectionResponse withCreateCollectionResponse(Optional rawResponse; - + private Optional createCollectionResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder createCollectionResponse(Optional operation - = new CreatepolicyOperation( sdkConfiguration); + = new CreatepolicyOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatepolicyResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatepolicyResponse.java index 152bc86e..6123a8d6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatepolicyResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatepolicyResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class CreatepolicyResponse implements Response { +public class CreatepolicyResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public CreatepolicyResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional createDlpReportResponse() { return (Optional) createDlpReportResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public CreatepolicyResponse withCreateDlpReportResponse(CreateDlpReportResponse return this; } + /** * OK */ @@ -143,7 +146,6 @@ public CreatepolicyResponse withCreateDlpReportResponse(Optional rawResponse; - + private Optional createDlpReportResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder createDlpReportResponse(Optional operation - = new CreatereportOperation( sdkConfiguration); + = new CreatereportOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatereportResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatereportResponse.java index 85b7eb36..04bcb069 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatereportResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreatereportResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class CreatereportResponse implements Response { +public class CreatereportResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public CreatereportResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional updateDlpConfigResponse() { return (Optional) updateDlpConfigResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public CreatereportResponse withUpdateDlpConfigResponse(UpdateDlpConfigResponse return this; } + /** * OK */ @@ -143,7 +146,6 @@ public CreatereportResponse withUpdateDlpConfigResponse(Optional rawResponse; - + private Optional updateDlpConfigResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder updateDlpConfigResponse(Optional operation - = new CreateshortcutOperation( sdkConfiguration); + = new CreateshortcutOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateshortcutResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateshortcutResponse.java index c2672a30..79302656 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateshortcutResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/CreateshortcutResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class CreateshortcutResponse implements Response { +public class CreateshortcutResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public CreateshortcutResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional createShortcutResponse() { return (Optional) createShortcutResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public CreateshortcutResponse withCreateShortcutResponse(CreateShortcutResponse return this; } + /** * OK */ @@ -143,7 +146,6 @@ public CreateshortcutResponse withCreateShortcutResponse(Optional rawResponse; - + private Optional createShortcutResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder createShortcutResponse(Optional this.createShortcutResponse = createShortcutResponse; return this; } - + public CreateshortcutResponse build() { + return new CreateshortcutResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, createShortcutResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsRequest.java index 058dd7df..a0c3111c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsRequest.java @@ -12,8 +12,8 @@ import java.lang.String; import java.util.Optional; -public class DeleteallchatsRequest { +public class DeleteallchatsRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -39,9 +39,10 @@ public Optional timezoneOffset() { return timezoneOffset; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -52,6 +53,7 @@ public DeleteallchatsRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -61,7 +63,6 @@ public DeleteallchatsRequest withTimezoneOffset(Optional timezoneOffset) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -86,15 +87,17 @@ public String toString() { return Utils.toString(DeleteallchatsRequest.class, "timezoneOffset", timezoneOffset); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -112,10 +115,12 @@ public Builder timezoneOffset(Optional timezoneOffset) { this.timezoneOffset = timezoneOffset; return this; } - + public DeleteallchatsRequest build() { + return new DeleteallchatsRequest( timezoneOffset); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsRequestBuilder.java index 67b8da63..81bac662 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsRequestBuilder.java @@ -44,7 +44,7 @@ private DeleteallchatsRequest buildRequest() { public DeleteallchatsResponse call() throws Exception { RequestOperation operation - = new DeleteallchatsOperation( sdkConfiguration); + = new DeleteallchatsOperation(sdkConfiguration); DeleteallchatsRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsResponse.java index 1a6d7f79..628c8253 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteallchatsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class DeleteallchatsResponse implements Response { +public class DeleteallchatsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public DeleteallchatsResponse withRawResponse(HttpResponse rawRespo return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public DeleteallchatsResponse build() { + return new DeleteallchatsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteannouncementRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteannouncementRequestBuilder.java index 9b7c3ede..f694e3db 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteannouncementRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteannouncementRequestBuilder.java @@ -29,7 +29,7 @@ public DeleteannouncementRequestBuilder request(DeleteAnnouncementRequest reques public DeleteannouncementResponse call() throws Exception { RequestOperation operation - = new DeleteannouncementOperation( sdkConfiguration); + = new DeleteannouncementOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteannouncementResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteannouncementResponse.java index 8af2034b..11c8a1e6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteannouncementResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteannouncementResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class DeleteannouncementResponse implements Response { +public class DeleteannouncementResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public DeleteannouncementResponse withRawResponse(HttpResponse rawR return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public DeleteannouncementResponse build() { + return new DeleteannouncementResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteanswerRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteanswerRequestBuilder.java index 8fd95958..5c51679a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteanswerRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteanswerRequestBuilder.java @@ -29,7 +29,7 @@ public DeleteanswerRequestBuilder request(DeleteAnswerRequest request) { public DeleteanswerResponse call() throws Exception { RequestOperation operation - = new DeleteanswerOperation( sdkConfiguration); + = new DeleteanswerOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteanswerResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteanswerResponse.java index e8be7a1b..eb955356 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteanswerResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteanswerResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class DeleteanswerResponse implements Response { +public class DeleteanswerResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public DeleteanswerResponse withRawResponse(HttpResponse rawRespons return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public DeleteanswerResponse build() { + return new DeleteanswerResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesRequest.java index 8c6953d1..d0e4ec9c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesRequest.java @@ -13,14 +13,15 @@ import java.lang.String; import java.util.Optional; -public class DeletechatfilesRequest { +public class DeletechatfilesRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timezoneOffset") private Optional timezoneOffset; + @SpeakeasyMetadata("request:mediaType=application/json") private DeleteChatFilesRequest deleteChatFilesRequest; @@ -52,9 +53,10 @@ public DeleteChatFilesRequest deleteChatFilesRequest() { return deleteChatFilesRequest; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -65,6 +67,7 @@ public DeletechatfilesRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -80,7 +83,6 @@ public DeletechatfilesRequest withDeleteChatFilesRequest(DeleteChatFilesRequest return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -98,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timezoneOffset, - deleteChatFilesRequest); + timezoneOffset, deleteChatFilesRequest); } @Override @@ -108,17 +109,19 @@ public String toString() { "timezoneOffset", timezoneOffset, "deleteChatFilesRequest", deleteChatFilesRequest); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private DeleteChatFilesRequest deleteChatFilesRequest; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -137,16 +140,18 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + public Builder deleteChatFilesRequest(DeleteChatFilesRequest deleteChatFilesRequest) { Utils.checkNotNull(deleteChatFilesRequest, "deleteChatFilesRequest"); this.deleteChatFilesRequest = deleteChatFilesRequest; return this; } - + public DeletechatfilesRequest build() { + return new DeletechatfilesRequest( - timezoneOffset, - deleteChatFilesRequest); + timezoneOffset, deleteChatFilesRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesRequestBuilder.java index 78290520..81a3c9d6 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesRequestBuilder.java @@ -53,7 +53,7 @@ private DeletechatfilesRequest buildRequest() { public DeletechatfilesResponse call() throws Exception { RequestOperation operation - = new DeletechatfilesOperation( sdkConfiguration); + = new DeletechatfilesOperation(sdkConfiguration); DeletechatfilesRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesResponse.java index 60b123c4..26d787fc 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatfilesResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class DeletechatfilesResponse implements Response { +public class DeletechatfilesResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public DeletechatfilesResponse withRawResponse(HttpResponse rawResp return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public DeletechatfilesResponse build() { + return new DeletechatfilesResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsRequest.java index b76109a3..d6e1beeb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsRequest.java @@ -13,14 +13,15 @@ import java.lang.String; import java.util.Optional; -public class DeletechatsRequest { +public class DeletechatsRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timezoneOffset") private Optional timezoneOffset; + @SpeakeasyMetadata("request:mediaType=application/json") private DeleteChatsRequest deleteChatsRequest; @@ -52,9 +53,10 @@ public DeleteChatsRequest deleteChatsRequest() { return deleteChatsRequest; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -65,6 +67,7 @@ public DeletechatsRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -80,7 +83,6 @@ public DeletechatsRequest withDeleteChatsRequest(DeleteChatsRequest deleteChatsR return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -98,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timezoneOffset, - deleteChatsRequest); + timezoneOffset, deleteChatsRequest); } @Override @@ -108,17 +109,19 @@ public String toString() { "timezoneOffset", timezoneOffset, "deleteChatsRequest", deleteChatsRequest); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private DeleteChatsRequest deleteChatsRequest; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -137,16 +140,18 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + public Builder deleteChatsRequest(DeleteChatsRequest deleteChatsRequest) { Utils.checkNotNull(deleteChatsRequest, "deleteChatsRequest"); this.deleteChatsRequest = deleteChatsRequest; return this; } - + public DeletechatsRequest build() { + return new DeletechatsRequest( - timezoneOffset, - deleteChatsRequest); + timezoneOffset, deleteChatsRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsRequestBuilder.java index 6ab8365e..de01aeea 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsRequestBuilder.java @@ -53,7 +53,7 @@ private DeletechatsRequest buildRequest() { public DeletechatsResponse call() throws Exception { RequestOperation operation - = new DeletechatsOperation( sdkConfiguration); + = new DeletechatsOperation(sdkConfiguration); DeletechatsRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsResponse.java index 33bc810d..8c4a672b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletechatsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class DeletechatsResponse implements Response { +public class DeletechatsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public DeletechatsResponse withRawResponse(HttpResponse rawResponse return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public DeletechatsResponse build() { + return new DeletechatsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionRequestBuilder.java index 5a0ad08f..e2d918af 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionRequestBuilder.java @@ -29,7 +29,7 @@ public DeletecollectionRequestBuilder request(DeleteCollectionRequest request) { public DeletecollectionResponse call() throws Exception { RequestOperation operation - = new DeletecollectionOperation( sdkConfiguration); + = new DeletecollectionOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionResponse.java index d3a87a76..c9703da1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class DeletecollectionResponse implements Response { +public class DeletecollectionResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public DeletecollectionResponse withRawResponse(HttpResponse rawRes return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public DeletecollectionResponse build() { + return new DeletecollectionResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionitemRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionitemRequestBuilder.java index fd167723..60a35073 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionitemRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionitemRequestBuilder.java @@ -29,7 +29,7 @@ public DeletecollectionitemRequestBuilder request(DeleteCollectionItemRequest re public DeletecollectionitemResponse call() throws Exception { RequestOperation operation - = new DeletecollectionitemOperation( sdkConfiguration); + = new DeletecollectionitemOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionitemResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionitemResponse.java index c65b4880..d9da2fa4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionitemResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeletecollectionitemResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class DeletecollectionitemResponse implements Response { +public class DeletecollectionitemResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public DeletecollectionitemResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional deleteCollectionItemResponse() { return (Optional) deleteCollectionItemResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public DeletecollectionitemResponse withDeleteCollectionItemResponse(DeleteColle return this; } + /** * OK */ @@ -143,7 +146,6 @@ public DeletecollectionitemResponse withDeleteCollectionItemResponse(Optional rawResponse; - + private Optional deleteCollectionItemResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder deleteCollectionItemResponse(Optional operation - = new DeleteshortcutOperation( sdkConfiguration); + = new DeleteshortcutOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteshortcutResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteshortcutResponse.java index cd463b4d..b4bf0073 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteshortcutResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DeleteshortcutResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class DeleteshortcutResponse implements Response { +public class DeleteshortcutResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public DeleteshortcutResponse withRawResponse(HttpResponse rawRespo return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public DeleteshortcutResponse build() { + return new DeleteshortcutResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvRequest.java index ac1401ff..84742bad 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvRequest.java @@ -10,8 +10,8 @@ import java.lang.Override; import java.lang.String; -public class DownloadpolicycsvRequest { +public class DownloadpolicycsvRequest { /** * The id of the policy to download violations for. */ @@ -33,9 +33,10 @@ public String id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The id of the policy to download violations for. @@ -46,7 +47,6 @@ public DownloadpolicycsvRequest withId(String id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -71,15 +71,17 @@ public String toString() { return Utils.toString(DownloadpolicycsvRequest.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private Builder() { // force use of static builder() method } + /** * The id of the policy to download violations for. */ @@ -88,10 +90,12 @@ public Builder id(String id) { this.id = id; return this; } - + public DownloadpolicycsvRequest build() { + return new DownloadpolicycsvRequest( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvRequestBuilder.java index 67c2aedc..85508a2a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvRequestBuilder.java @@ -37,7 +37,7 @@ private DownloadpolicycsvRequest buildRequest() { public DownloadpolicycsvResponse call() throws Exception { RequestOperation operation - = new DownloadpolicycsvOperation( sdkConfiguration); + = new DownloadpolicycsvOperation(sdkConfiguration); DownloadpolicycsvRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvResponse.java index fb750005..42e5e324 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadpolicycsvResponse.java @@ -14,8 +14,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class DownloadpolicycsvResponse implements Response { +public class DownloadpolicycsvResponse implements Response { /** * HTTP response content type for this operation */ @@ -56,7 +56,8 @@ public DownloadpolicycsvResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -91,9 +92,10 @@ public Optional res() { return res; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -131,6 +133,7 @@ public DownloadpolicycsvResponse withRes(String res) { return this; } + /** * Downloads csv of batch policy violations. */ @@ -140,7 +143,6 @@ public DownloadpolicycsvResponse withRes(Optional res) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -160,9 +162,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, res); } @@ -174,21 +174,23 @@ public String toString() { "rawResponse", rawResponse, "res", res); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional res = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -198,6 +200,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -207,6 +210,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -216,6 +220,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Downloads csv of batch policy violations. */ @@ -233,13 +238,13 @@ public Builder res(Optional res) { this.res = res; return this; } - + public DownloadpolicycsvResponse build() { + return new DownloadpolicycsvResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, res); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvRequest.java index 26e8a4c8..766a25bd 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvRequest.java @@ -10,8 +10,8 @@ import java.lang.Override; import java.lang.String; -public class DownloadreportcsvRequest { +public class DownloadreportcsvRequest { /** * The id of the report to download violations for. */ @@ -33,9 +33,10 @@ public String id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The id of the report to download violations for. @@ -46,7 +47,6 @@ public DownloadreportcsvRequest withId(String id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -71,15 +71,17 @@ public String toString() { return Utils.toString(DownloadreportcsvRequest.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private Builder() { // force use of static builder() method } + /** * The id of the report to download violations for. */ @@ -88,10 +90,12 @@ public Builder id(String id) { this.id = id; return this; } - + public DownloadreportcsvRequest build() { + return new DownloadreportcsvRequest( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvRequestBuilder.java index 5f0738c9..9ca690c8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvRequestBuilder.java @@ -37,7 +37,7 @@ private DownloadreportcsvRequest buildRequest() { public DownloadreportcsvResponse call() throws Exception { RequestOperation operation - = new DownloadreportcsvOperation( sdkConfiguration); + = new DownloadreportcsvOperation(sdkConfiguration); DownloadreportcsvRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvResponse.java index 66ebd9fd..bbeaba60 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/DownloadreportcsvResponse.java @@ -14,8 +14,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class DownloadreportcsvResponse implements Response { +public class DownloadreportcsvResponse implements Response { /** * HTTP response content type for this operation */ @@ -56,7 +56,8 @@ public DownloadreportcsvResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -91,9 +92,10 @@ public Optional res() { return res; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -131,6 +133,7 @@ public DownloadreportcsvResponse withRes(String res) { return this; } + /** * Downloads csv of one-time report violations. */ @@ -140,7 +143,6 @@ public DownloadreportcsvResponse withRes(Optional res) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -160,9 +162,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, res); } @@ -174,21 +174,23 @@ public String toString() { "rawResponse", rawResponse, "res", res); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional res = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -198,6 +200,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -207,6 +210,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -216,6 +220,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Downloads csv of one-time report violations. */ @@ -233,13 +238,13 @@ public Builder res(Optional res) { this.res = res; return this; } - + public DownloadreportcsvResponse build() { + return new DownloadreportcsvResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, res); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditanswerRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditanswerRequestBuilder.java index 76a58ff9..5c8622ce 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditanswerRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditanswerRequestBuilder.java @@ -29,7 +29,7 @@ public EditanswerRequestBuilder request(EditAnswerRequest request) { public EditanswerResponse call() throws Exception { RequestOperation operation - = new EditanswerOperation( sdkConfiguration); + = new EditanswerOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditanswerResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditanswerResponse.java index 4c2a958d..54d27f4c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditanswerResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditanswerResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class EditanswerResponse implements Response { +public class EditanswerResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public EditanswerResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional answer() { return (Optional) answer; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public EditanswerResponse withAnswer(Answer answer) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public EditanswerResponse withAnswer(Optional answer) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, answer); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "answer", answer); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional answer = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder answer(Optional answer) { this.answer = answer; return this; } - + public EditanswerResponse build() { + return new EditanswerResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, answer); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionRequestBuilder.java index c1b43f64..65c84996 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionRequestBuilder.java @@ -29,7 +29,7 @@ public EditcollectionRequestBuilder request(EditCollectionRequest request) { public EditcollectionResponse call() throws Exception { RequestOperation operation - = new EditcollectionOperation( sdkConfiguration); + = new EditcollectionOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionResponse.java index 43a8bf4c..f8d3c70e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class EditcollectionResponse implements Response { +public class EditcollectionResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public EditcollectionResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional editCollectionResponse() { return (Optional) editCollectionResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public EditcollectionResponse withEditCollectionResponse(EditCollectionResponse return this; } + /** * OK */ @@ -143,7 +146,6 @@ public EditcollectionResponse withEditCollectionResponse(Optional rawResponse; - + private Optional editCollectionResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder editCollectionResponse(Optional this.editCollectionResponse = editCollectionResponse; return this; } - + public EditcollectionResponse build() { + return new EditcollectionResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, editCollectionResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionitemRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionitemRequestBuilder.java index 0c979164..dee9eb38 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionitemRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionitemRequestBuilder.java @@ -29,7 +29,7 @@ public EditcollectionitemRequestBuilder request(EditCollectionItemRequest reques public EditcollectionitemResponse call() throws Exception { RequestOperation operation - = new EditcollectionitemOperation( sdkConfiguration); + = new EditcollectionitemOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionitemResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionitemResponse.java index 1669e40c..8ce4b973 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionitemResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditcollectionitemResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class EditcollectionitemResponse implements Response { +public class EditcollectionitemResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public EditcollectionitemResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional editCollectionItemResponse() { return (Optional) editCollectionItemResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public EditcollectionitemResponse withEditCollectionItemResponse(EditCollectionI return this; } + /** * OK */ @@ -143,7 +146,6 @@ public EditcollectionitemResponse withEditCollectionItemResponse(Optional rawResponse; - + private Optional editCollectionItemResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder editCollectionItemResponse(Optional operation - = new EditpinOperation( sdkConfiguration); + = new EditpinOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditpinResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditpinResponse.java index e2d29c2c..1a7e470e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditpinResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/EditpinResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class EditpinResponse implements Response { +public class EditpinResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public EditpinResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional pinDocument() { return (Optional) pinDocument; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public EditpinResponse withPinDocument(PinDocument pinDocument) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public EditpinResponse withPinDocument(Optional pinDocume return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, pinDocument); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "pinDocument", pinDocument); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional pinDocument = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder pinDocument(Optional pinDocument) { this.pinDocument = pinDocument; return this; } - + public EditpinResponse build() { + return new EditpinResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, pinDocument); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedRequestBuilder.java index 34750aa3..a9184b74 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedRequestBuilder.java @@ -29,7 +29,7 @@ public FeedRequestBuilder request(FeedRequest request) { public FeedResponse call() throws Exception { RequestOperation operation - = new FeedOperation( sdkConfiguration); + = new FeedOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedResponse.java index 088468a2..2f7bd323 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedResponse.java @@ -15,8 +15,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class FeedResponse implements Response { +public class FeedResponse implements Response { /** * HTTP response content type for this operation */ @@ -57,7 +57,8 @@ public FeedResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -93,9 +94,10 @@ public Optional) feedResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -133,6 +135,7 @@ public FeedResponse withFeedResponse(com.glean.api_client.glean_api_client.model return this; } + /** * OK */ @@ -142,7 +145,6 @@ public FeedResponse withFeedResponse(Optional rawResponse; - + private Optional feedResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -200,6 +202,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -209,6 +212,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -218,6 +222,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -235,13 +240,13 @@ public Builder feedResponse(Optional feedbackQueryParameter; + @SpeakeasyMetadata("request:mediaType=application/json") private Optional feedback1; @@ -52,9 +53,10 @@ public Optional feedback1() { return (Optional) feedback1; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * A URL encoded versions of Feedback. This is useful for requests. @@ -65,6 +67,7 @@ public FeedbackRequest withFeedbackQueryParameter(String feedbackQueryParameter) return this; } + /** * A URL encoded versions of Feedback. This is useful for requests. */ @@ -80,13 +83,13 @@ public FeedbackRequest withFeedback1(Feedback feedback1) { return this; } + public FeedbackRequest withFeedback1(Optional feedback1) { Utils.checkNotNull(feedback1, "feedback1"); this.feedback1 = feedback1; return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -104,8 +107,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - feedbackQueryParameter, - feedback1); + feedbackQueryParameter, feedback1); } @Override @@ -114,17 +116,19 @@ public String toString() { "feedbackQueryParameter", feedbackQueryParameter, "feedback1", feedback1); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional feedbackQueryParameter = Optional.empty(); - + private Optional feedback1 = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * A URL encoded versions of Feedback. This is useful for requests. */ @@ -143,6 +147,7 @@ public Builder feedbackQueryParameter(Optional feedbackQueryParameter) { return this; } + public Builder feedback1(Feedback feedback1) { Utils.checkNotNull(feedback1, "feedback1"); this.feedback1 = Optional.ofNullable(feedback1); @@ -154,11 +159,12 @@ public Builder feedback1(Optional feedback1) { this.feedback1 = feedback1; return this; } - + public FeedbackRequest build() { + return new FeedbackRequest( - feedbackQueryParameter, - feedback1); + feedbackQueryParameter, feedback1); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedbackRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedbackRequestBuilder.java index 359d6882..48af5c7c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedbackRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedbackRequestBuilder.java @@ -59,7 +59,7 @@ private FeedbackRequest buildRequest() { public FeedbackResponse call() throws Exception { RequestOperation operation - = new FeedbackOperation( sdkConfiguration); + = new FeedbackOperation(sdkConfiguration); FeedbackRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedbackResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedbackResponse.java index ce2fd5f9..fc5c16c9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedbackResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/FeedbackResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class FeedbackResponse implements Response { +public class FeedbackResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public FeedbackResponse withRawResponse(HttpResponse rawResponse) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public FeedbackResponse build() { + return new FeedbackResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentRequest.java index 55c197f6..038653eb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentRequest.java @@ -12,8 +12,8 @@ import java.lang.String; import java.util.Optional; -public class GetAgentRequest { +public class GetAgentRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -57,9 +57,10 @@ public String agentId() { return agentId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -70,6 +71,7 @@ public GetAgentRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -88,7 +90,6 @@ public GetAgentRequest withAgentId(String agentId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -106,8 +107,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timezoneOffset, - agentId); + timezoneOffset, agentId); } @Override @@ -116,17 +116,19 @@ public String toString() { "timezoneOffset", timezoneOffset, "agentId", agentId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private String agentId; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -145,6 +147,7 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + /** * The ID of the agent. */ @@ -153,11 +156,12 @@ public Builder agentId(String agentId) { this.agentId = agentId; return this; } - + public GetAgentRequest build() { + return new GetAgentRequest( - timezoneOffset, - agentId); + timezoneOffset, agentId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentRequestBuilder.java index 5f4b101b..44305f4d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentRequestBuilder.java @@ -53,7 +53,7 @@ private GetAgentRequest buildRequest() { public GetAgentResponse call() throws Exception { RequestOperation operation - = new GetAgentOperation( sdkConfiguration); + = new GetAgentOperation(sdkConfiguration); GetAgentRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentResponse.java index 89133550..6082db5c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetAgentResponse implements Response { +public class GetAgentResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetAgentResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional agent() { return (Optional) agent; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetAgentResponse withAgent(Agent agent) { return this; } + /** * Success */ @@ -143,7 +146,6 @@ public GetAgentResponse withAgent(Optional agent) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, agent); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "agent", agent); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional agent = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Success */ @@ -236,13 +241,13 @@ public Builder agent(Optional agent) { this.agent = agent; return this; } - + public GetAgentResponse build() { + return new GetAgentResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, agent); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasRequest.java index 62938043..661b35ec 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasRequest.java @@ -12,8 +12,8 @@ import java.lang.String; import java.util.Optional; -public class GetAgentSchemasRequest { +public class GetAgentSchemasRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -57,9 +57,10 @@ public String agentId() { return agentId; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -70,6 +71,7 @@ public GetAgentSchemasRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -88,7 +90,6 @@ public GetAgentSchemasRequest withAgentId(String agentId) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -106,8 +107,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timezoneOffset, - agentId); + timezoneOffset, agentId); } @Override @@ -116,17 +116,19 @@ public String toString() { "timezoneOffset", timezoneOffset, "agentId", agentId); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private String agentId; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -145,6 +147,7 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + /** * The ID of the agent. */ @@ -153,11 +156,12 @@ public Builder agentId(String agentId) { this.agentId = agentId; return this; } - + public GetAgentSchemasRequest build() { + return new GetAgentSchemasRequest( - timezoneOffset, - agentId); + timezoneOffset, agentId); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasRequestBuilder.java index afd78ab7..82afbcd0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasRequestBuilder.java @@ -53,7 +53,7 @@ private GetAgentSchemasRequest buildRequest() { public GetAgentSchemasResponse call() throws Exception { RequestOperation operation - = new GetAgentSchemasOperation( sdkConfiguration); + = new GetAgentSchemasOperation(sdkConfiguration); GetAgentSchemasRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasResponse.java index 545e4c31..cef6bf06 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetAgentSchemasResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetAgentSchemasResponse implements Response { +public class GetAgentSchemasResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetAgentSchemasResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional agentSchemas() { return (Optional) agentSchemas; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetAgentSchemasResponse withAgentSchemas(AgentSchemas agentSchemas) { return this; } + /** * Success */ @@ -143,7 +146,6 @@ public GetAgentSchemasResponse withAgentSchemas(Optional return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, agentSchemas); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "agentSchemas", agentSchemas); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional agentSchemas = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Success */ @@ -236,13 +241,13 @@ public Builder agentSchemas(Optional agentSchemas) { this.agentSchemas = agentSchemas; return this; } - + public GetAgentSchemasResponse build() { + return new GetAgentSchemasResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, agentSchemas); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListRequest.java index 602e265b..b6525e89 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListRequest.java @@ -13,8 +13,8 @@ import java.util.List; import java.util.Optional; -public class GetRestApiV1ToolsListRequest { +public class GetRestApiV1ToolsListRequest { /** * Optional array of tool names to filter by */ @@ -41,9 +41,10 @@ public Optional> toolNames() { return (Optional>) toolNames; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Optional array of tool names to filter by @@ -54,6 +55,7 @@ public GetRestApiV1ToolsListRequest withToolNames(List toolNames) { return this; } + /** * Optional array of tool names to filter by */ @@ -63,7 +65,6 @@ public GetRestApiV1ToolsListRequest withToolNames(Optional> toolNames = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Optional array of tool names to filter by */ @@ -114,10 +117,12 @@ public Builder toolNames(Optional> toolNames) { this.toolNames = toolNames; return this; } - + public GetRestApiV1ToolsListRequest build() { + return new GetRestApiV1ToolsListRequest( toolNames); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListRequestBuilder.java index a1af3b5a..00e8252b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListRequestBuilder.java @@ -45,7 +45,7 @@ private GetRestApiV1ToolsListRequest buildRequest() { public GetRestApiV1ToolsListResponse call() throws Exception { RequestOperation operation - = new GetRestApiV1ToolsListOperation( sdkConfiguration); + = new GetRestApiV1ToolsListOperation(sdkConfiguration); GetRestApiV1ToolsListRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListResponse.java index 1a7c0666..bcb7e537 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetRestApiV1ToolsListResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetRestApiV1ToolsListResponse implements Response { +public class GetRestApiV1ToolsListResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetRestApiV1ToolsListResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional toolsListResponse() { return (Optional) toolsListResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetRestApiV1ToolsListResponse withToolsListResponse(ToolsListResponse too return this; } + /** * Successful operation */ @@ -143,7 +146,6 @@ public GetRestApiV1ToolsListResponse withToolsListResponse(Optional rawResponse; - + private Optional toolsListResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Successful operation */ @@ -236,13 +241,13 @@ public Builder toolsListResponse(Optional toolsList this.toolsListResponse = toolsListResponse; return this; } - + public GetRestApiV1ToolsListResponse build() { + return new GetRestApiV1ToolsListResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, toolsListResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetanswerRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetanswerRequestBuilder.java index 17ae7a08..326f702d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetanswerRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetanswerRequestBuilder.java @@ -29,7 +29,7 @@ public GetanswerRequestBuilder request(GetAnswerRequest request) { public GetanswerResponse call() throws Exception { RequestOperation operation - = new GetanswerOperation( sdkConfiguration); + = new GetanswerOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetanswerResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetanswerResponse.java index 28f480de..8d5b8be5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetanswerResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetanswerResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetanswerResponse implements Response { +public class GetanswerResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetanswerResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getAnswerResponse() { return (Optional) getAnswerResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetanswerResponse withGetAnswerResponse(GetAnswerResponse getAnswerRespon return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetanswerResponse withGetAnswerResponse(Optional rawResponse; - + private Optional getAnswerResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getAnswerResponse(Optional getAnswer this.getAnswerResponse = getAnswerResponse; return this; } - + public GetanswerResponse build() { + return new GetanswerResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getAnswerResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatRequest.java index d86fd951..40f9df61 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatRequest.java @@ -13,14 +13,15 @@ import java.lang.String; import java.util.Optional; -public class GetchatRequest { +public class GetchatRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timezoneOffset") private Optional timezoneOffset; + @SpeakeasyMetadata("request:mediaType=application/json") private GetChatRequest getChatRequest; @@ -52,9 +53,10 @@ public GetChatRequest getChatRequest() { return getChatRequest; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -65,6 +67,7 @@ public GetchatRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -80,7 +83,6 @@ public GetchatRequest withGetChatRequest(GetChatRequest getChatRequest) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -98,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timezoneOffset, - getChatRequest); + timezoneOffset, getChatRequest); } @Override @@ -108,17 +109,19 @@ public String toString() { "timezoneOffset", timezoneOffset, "getChatRequest", getChatRequest); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private GetChatRequest getChatRequest; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -137,16 +140,18 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + public Builder getChatRequest(GetChatRequest getChatRequest) { Utils.checkNotNull(getChatRequest, "getChatRequest"); this.getChatRequest = getChatRequest; return this; } - + public GetchatRequest build() { + return new GetchatRequest( - timezoneOffset, - getChatRequest); + timezoneOffset, getChatRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatRequestBuilder.java index 9ff71e35..e4f29a62 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatRequestBuilder.java @@ -53,7 +53,7 @@ private GetchatRequest buildRequest() { public GetchatResponse call() throws Exception { RequestOperation operation - = new GetchatOperation( sdkConfiguration); + = new GetchatOperation(sdkConfiguration); GetchatRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatResponse.java index eef6f5d7..10eadae9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetchatResponse implements Response { +public class GetchatResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetchatResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getChatResponse() { return (Optional) getChatResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetchatResponse withGetChatResponse(GetChatResponse getChatResponse) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetchatResponse withGetChatResponse(Optional g return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getChatResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "getChatResponse", getChatResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional getChatResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getChatResponse(Optional getChatRespon this.getChatResponse = getChatResponse; return this; } - + public GetchatResponse build() { + return new GetchatResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getChatResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationRequest.java index 527aef58..7643ba71 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationRequest.java @@ -13,14 +13,15 @@ import java.lang.String; import java.util.Optional; -public class GetchatapplicationRequest { +public class GetchatapplicationRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timezoneOffset") private Optional timezoneOffset; + @SpeakeasyMetadata("request:mediaType=application/json") private GetChatApplicationRequest getChatApplicationRequest; @@ -52,9 +53,10 @@ public GetChatApplicationRequest getChatApplicationRequest() { return getChatApplicationRequest; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -65,6 +67,7 @@ public GetchatapplicationRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -80,7 +83,6 @@ public GetchatapplicationRequest withGetChatApplicationRequest(GetChatApplicatio return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -98,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timezoneOffset, - getChatApplicationRequest); + timezoneOffset, getChatApplicationRequest); } @Override @@ -108,17 +109,19 @@ public String toString() { "timezoneOffset", timezoneOffset, "getChatApplicationRequest", getChatApplicationRequest); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private GetChatApplicationRequest getChatApplicationRequest; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -137,16 +140,18 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + public Builder getChatApplicationRequest(GetChatApplicationRequest getChatApplicationRequest) { Utils.checkNotNull(getChatApplicationRequest, "getChatApplicationRequest"); this.getChatApplicationRequest = getChatApplicationRequest; return this; } - + public GetchatapplicationRequest build() { + return new GetchatapplicationRequest( - timezoneOffset, - getChatApplicationRequest); + timezoneOffset, getChatApplicationRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationRequestBuilder.java index 822fbd17..de0b470f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationRequestBuilder.java @@ -53,7 +53,7 @@ private GetchatapplicationRequest buildRequest() { public GetchatapplicationResponse call() throws Exception { RequestOperation operation - = new GetchatapplicationOperation( sdkConfiguration); + = new GetchatapplicationOperation(sdkConfiguration); GetchatapplicationRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationResponse.java index 95650bff..8d45e5ad 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatapplicationResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetchatapplicationResponse implements Response { +public class GetchatapplicationResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetchatapplicationResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getChatApplicationResponse() { return (Optional) getChatApplicationResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetchatapplicationResponse withGetChatApplicationResponse(GetChatApplicat return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetchatapplicationResponse withGetChatApplicationResponse(Optional rawResponse; - + private Optional getChatApplicationResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getChatApplicationResponse(Optional timezoneOffset; + @SpeakeasyMetadata("request:mediaType=application/json") private GetChatFilesRequest getChatFilesRequest; @@ -52,9 +53,10 @@ public GetChatFilesRequest getChatFilesRequest() { return getChatFilesRequest; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -65,6 +67,7 @@ public GetchatfilesRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -80,7 +83,6 @@ public GetchatfilesRequest withGetChatFilesRequest(GetChatFilesRequest getChatFi return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -98,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timezoneOffset, - getChatFilesRequest); + timezoneOffset, getChatFilesRequest); } @Override @@ -108,17 +109,19 @@ public String toString() { "timezoneOffset", timezoneOffset, "getChatFilesRequest", getChatFilesRequest); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private GetChatFilesRequest getChatFilesRequest; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -137,16 +140,18 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + public Builder getChatFilesRequest(GetChatFilesRequest getChatFilesRequest) { Utils.checkNotNull(getChatFilesRequest, "getChatFilesRequest"); this.getChatFilesRequest = getChatFilesRequest; return this; } - + public GetchatfilesRequest build() { + return new GetchatfilesRequest( - timezoneOffset, - getChatFilesRequest); + timezoneOffset, getChatFilesRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatfilesRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatfilesRequestBuilder.java index e251b645..356a6692 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatfilesRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatfilesRequestBuilder.java @@ -53,7 +53,7 @@ private GetchatfilesRequest buildRequest() { public GetchatfilesResponse call() throws Exception { RequestOperation operation - = new GetchatfilesOperation( sdkConfiguration); + = new GetchatfilesOperation(sdkConfiguration); GetchatfilesRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatfilesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatfilesResponse.java index 8966b459..70b65336 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatfilesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetchatfilesResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetchatfilesResponse implements Response { +public class GetchatfilesResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetchatfilesResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getChatFilesResponse() { return (Optional) getChatFilesResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetchatfilesResponse withGetChatFilesResponse(GetChatFilesResponse getCha return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetchatfilesResponse withGetChatFilesResponse(Optional rawResponse; - + private Optional getChatFilesResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getChatFilesResponse(Optional get this.getChatFilesResponse = getChatFilesResponse; return this; } - + public GetchatfilesResponse build() { + return new GetchatfilesResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getChatFilesResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetcollectionRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetcollectionRequestBuilder.java index c7f07ec5..cbaeeb85 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetcollectionRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetcollectionRequestBuilder.java @@ -29,7 +29,7 @@ public GetcollectionRequestBuilder request(GetCollectionRequest request) { public GetcollectionResponse call() throws Exception { RequestOperation operation - = new GetcollectionOperation( sdkConfiguration); + = new GetcollectionOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetcollectionResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetcollectionResponse.java index 8f63a2be..1746d6ec 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetcollectionResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetcollectionResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetcollectionResponse implements Response { +public class GetcollectionResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetcollectionResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getCollectionResponse() { return (Optional) getCollectionResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetcollectionResponse withGetCollectionResponse(GetCollectionResponse get return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetcollectionResponse withGetCollectionResponse(Optional rawResponse; - + private Optional getCollectionResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getCollectionResponse(Optional g this.getCollectionResponse = getCollectionResponse; return this; } - + public GetcollectionResponse build() { + return new GetcollectionResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getCollectionResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocpermissionsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocpermissionsRequestBuilder.java index 1b402d6f..b9189060 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocpermissionsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocpermissionsRequestBuilder.java @@ -29,7 +29,7 @@ public GetdocpermissionsRequestBuilder request(GetDocPermissionsRequest request) public GetdocpermissionsResponse call() throws Exception { RequestOperation operation - = new GetdocpermissionsOperation( sdkConfiguration); + = new GetdocpermissionsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocpermissionsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocpermissionsResponse.java index a4c816c7..9c64fcae 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocpermissionsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocpermissionsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetdocpermissionsResponse implements Response { +public class GetdocpermissionsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetdocpermissionsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getDocPermissionsResponse() { return (Optional) getDocPermissionsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetdocpermissionsResponse withGetDocPermissionsResponse(GetDocPermissions return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetdocpermissionsResponse withGetDocPermissionsResponse(Optional rawResponse; - + private Optional getDocPermissionsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getDocPermissionsResponse(Optional, GetdocumentsResponse> operation - = new GetdocumentsOperation( sdkConfiguration); + = new GetdocumentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsResponse.java index b50c4a8c..b7eb155c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetdocumentsResponse implements Response { +public class GetdocumentsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetdocumentsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getDocumentsResponse() { return (Optional) getDocumentsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetdocumentsResponse withGetDocumentsResponse(GetDocumentsResponse getDoc return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetdocumentsResponse withGetDocumentsResponse(Optional rawResponse; - + private Optional getDocumentsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getDocumentsResponse(Optional get this.getDocumentsResponse = getDocumentsResponse; return this; } - + public GetdocumentsResponse build() { + return new GetdocumentsResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getDocumentsResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsbyfacetsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsbyfacetsRequestBuilder.java index eb89ea87..e297bbff 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsbyfacetsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsbyfacetsRequestBuilder.java @@ -36,7 +36,7 @@ public GetdocumentsbyfacetsRequestBuilder request(Optional, GetdocumentsbyfacetsResponse> operation - = new GetdocumentsbyfacetsOperation( sdkConfiguration); + = new GetdocumentsbyfacetsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsbyfacetsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsbyfacetsResponse.java index 34f2f2f5..22a0afb4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsbyfacetsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocumentsbyfacetsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetdocumentsbyfacetsResponse implements Response { +public class GetdocumentsbyfacetsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetdocumentsbyfacetsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getDocumentsByFacetsResponse() { return (Optional) getDocumentsByFacetsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetdocumentsbyfacetsResponse withGetDocumentsByFacetsResponse(GetDocument return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetdocumentsbyfacetsResponse withGetDocumentsByFacetsResponse(Optional rawResponse; - + private Optional getDocumentsByFacetsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getDocumentsByFacetsResponse(Optional> docIds() { return (Optional>) docIds; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * List of doc-ids which will have their hide status fetched. @@ -54,6 +55,7 @@ public GetdocvisibilityRequest withDocIds(List docIds) { return this; } + /** * List of doc-ids which will have their hide status fetched. */ @@ -63,7 +65,6 @@ public GetdocvisibilityRequest withDocIds(Optional> docId return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -88,15 +89,17 @@ public String toString() { return Utils.toString(GetdocvisibilityRequest.class, "docIds", docIds); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional> docIds = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * List of doc-ids which will have their hide status fetched. */ @@ -114,10 +117,12 @@ public Builder docIds(Optional> docIds) { this.docIds = docIds; return this; } - + public GetdocvisibilityRequest build() { + return new GetdocvisibilityRequest( docIds); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocvisibilityRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocvisibilityRequestBuilder.java index e3bf0ce8..3d989fa2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocvisibilityRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocvisibilityRequestBuilder.java @@ -45,7 +45,7 @@ private GetdocvisibilityRequest buildRequest() { public GetdocvisibilityResponse call() throws Exception { RequestOperation operation - = new GetdocvisibilityOperation( sdkConfiguration); + = new GetdocvisibilityOperation(sdkConfiguration); GetdocvisibilityRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocvisibilityResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocvisibilityResponse.java index 35847af3..05d85d6b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocvisibilityResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetdocvisibilityResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetdocvisibilityResponse implements Response { +public class GetdocvisibilityResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetdocvisibilityResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getDocumentVisibilityOve return (Optional) getDocumentVisibilityOverridesResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetdocvisibilityResponse withGetDocumentVisibilityOverridesResponse(GetDo return this; } + /** * The visibility status of documents */ @@ -143,7 +146,6 @@ public GetdocvisibilityResponse withGetDocumentVisibilityOverridesResponse(Optio return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getDocumentVisibilityOverridesResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "getDocumentVisibilityOverridesResponse", getDocumentVisibilityOverridesResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional getDocumentVisibilityOverridesResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * The visibility status of documents */ @@ -236,13 +241,13 @@ public Builder getDocumentVisibilityOverridesResponse(Optional operation - = new GetpinOperation( sdkConfiguration); + = new GetpinOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpinResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpinResponse.java index 0fcbeedd..caf2d777 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpinResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpinResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetpinResponse implements Response { +public class GetpinResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetpinResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getPinResponse() { return (Optional) getPinResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetpinResponse withGetPinResponse(GetPinResponse getPinResponse) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetpinResponse withGetPinResponse(Optional getP return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getPinResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "getPinResponse", getPinResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional getPinResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getPinResponse(Optional getPinResponse) this.getPinResponse = getPinResponse; return this; } - + public GetpinResponse build() { + return new GetpinResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getPinResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyRequest.java index 76f48e75..505530d2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyRequest.java @@ -12,8 +12,8 @@ import java.lang.String; import java.util.Optional; -public class GetpolicyRequest { +public class GetpolicyRequest { /** * The id of the policy to fetch. */ @@ -57,9 +57,10 @@ public Optional version() { return version; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The id of the policy to fetch. @@ -79,6 +80,7 @@ public GetpolicyRequest withVersion(long version) { return this; } + /** * The version of the policy to fetch. Each time a policy is updated, the older version is still stored. If this is left empty, the latest policy is fetched. */ @@ -88,7 +90,6 @@ public GetpolicyRequest withVersion(Optional version) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -106,8 +107,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - version); + id, version); } @Override @@ -116,17 +116,19 @@ public String toString() { "id", id, "version", version); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private Optional version = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The id of the policy to fetch. */ @@ -136,6 +138,7 @@ public Builder id(String id) { return this; } + /** * The version of the policy to fetch. Each time a policy is updated, the older version is still stored. If this is left empty, the latest policy is fetched. */ @@ -153,11 +156,12 @@ public Builder version(Optional version) { this.version = version; return this; } - + public GetpolicyRequest build() { + return new GetpolicyRequest( - id, - version); + id, version); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyRequestBuilder.java index 57c76bc9..4ec70036 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyRequestBuilder.java @@ -53,7 +53,7 @@ private GetpolicyRequest buildRequest() { public GetpolicyResponse call() throws Exception { RequestOperation operation - = new GetpolicyOperation( sdkConfiguration); + = new GetpolicyOperation(sdkConfiguration); GetpolicyRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyResponse.java index 0c033799..23c5515e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetpolicyResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetpolicyResponse implements Response { +public class GetpolicyResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetpolicyResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getDlpReportResponse() { return (Optional) getDlpReportResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetpolicyResponse withGetDlpReportResponse(GetDlpReportResponse getDlpRep return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetpolicyResponse withGetDlpReportResponse(Optional rawResponse; - + private Optional getDlpReportResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getDlpReportResponse(Optional get this.getDlpReportResponse = getDlpReportResponse; return this; } - + public GetpolicyResponse build() { + return new GetpolicyResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getDlpReportResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusRequest.java index 659a133f..db6f8666 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusRequest.java @@ -10,8 +10,8 @@ import java.lang.Override; import java.lang.String; -public class GetreportstatusRequest { +public class GetreportstatusRequest { /** * The id of the report to get run status for. */ @@ -33,9 +33,10 @@ public String id() { return id; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The id of the report to get run status for. @@ -46,7 +47,6 @@ public GetreportstatusRequest withId(String id) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -71,15 +71,17 @@ public String toString() { return Utils.toString(GetreportstatusRequest.class, "id", id); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private Builder() { // force use of static builder() method } + /** * The id of the report to get run status for. */ @@ -88,10 +90,12 @@ public Builder id(String id) { this.id = id; return this; } - + public GetreportstatusRequest build() { + return new GetreportstatusRequest( id); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusRequestBuilder.java index 7cc5c034..0a006677 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusRequestBuilder.java @@ -37,7 +37,7 @@ private GetreportstatusRequest buildRequest() { public GetreportstatusResponse call() throws Exception { RequestOperation operation - = new GetreportstatusOperation( sdkConfiguration); + = new GetreportstatusOperation(sdkConfiguration); GetreportstatusRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusResponse.java index f7063cb8..b306c265 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetreportstatusResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetreportstatusResponse implements Response { +public class GetreportstatusResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetreportstatusResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional reportStatusResponse() { return (Optional) reportStatusResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetreportstatusResponse withReportStatusResponse(ReportStatusResponse rep return this; } + /** * Fetches status of report run. */ @@ -143,7 +146,6 @@ public GetreportstatusResponse withReportStatusResponse(Optional rawResponse; - + private Optional reportStatusResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Fetches status of report run. */ @@ -236,13 +241,13 @@ public Builder reportStatusResponse(Optional rep this.reportStatusResponse = reportStatusResponse; return this; } - + public GetreportstatusResponse build() { + return new GetreportstatusResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, reportStatusResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetshortcutRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetshortcutRequestBuilder.java index 82392839..917cdd1a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetshortcutRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetshortcutRequestBuilder.java @@ -29,7 +29,7 @@ public GetshortcutRequestBuilder request(GetShortcutRequestUnion request) { public GetshortcutResponse call() throws Exception { RequestOperation operation - = new GetshortcutOperation( sdkConfiguration); + = new GetshortcutOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetshortcutResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetshortcutResponse.java index fc735a5d..47986a91 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetshortcutResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/GetshortcutResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class GetshortcutResponse implements Response { +public class GetshortcutResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public GetshortcutResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getShortcutResponse() { return (Optional) getShortcutResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public GetshortcutResponse withGetShortcutResponse(GetShortcutResponse getShortc return this; } + /** * OK */ @@ -143,7 +146,6 @@ public GetshortcutResponse withGetShortcutResponse(Optional rawResponse; - + private Optional getShortcutResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getShortcutResponse(Optional getSh this.getShortcutResponse = getShortcutResponse; return this; } - + public GetshortcutResponse build() { + return new GetshortcutResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getShortcutResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/InsightsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/InsightsRequestBuilder.java index 255832a1..7e2e5d32 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/InsightsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/InsightsRequestBuilder.java @@ -29,7 +29,7 @@ public InsightsRequestBuilder request(InsightsRequest request) { public InsightsResponse call() throws Exception { RequestOperation operation - = new InsightsOperation( sdkConfiguration); + = new InsightsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/InsightsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/InsightsResponse.java index aea21155..f33e091a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/InsightsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/InsightsResponse.java @@ -15,8 +15,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class InsightsResponse implements Response { +public class InsightsResponse implements Response { /** * HTTP response content type for this operation */ @@ -57,7 +57,8 @@ public InsightsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -93,9 +94,10 @@ public Optional) insightsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -133,6 +135,7 @@ public InsightsResponse withInsightsResponse(com.glean.api_client.glean_api_clie return this; } + /** * OK */ @@ -142,7 +145,6 @@ public InsightsResponse withInsightsResponse(Optional rawResponse; - + private Optional insightsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -200,6 +202,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -209,6 +212,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -218,6 +222,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -235,13 +240,13 @@ public Builder insightsResponse(Optional operation - = new ListanswersOperation( sdkConfiguration); + = new ListanswersOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListanswersResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListanswersResponse.java index bae1fd50..1d374554 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListanswersResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListanswersResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ListanswersResponse implements Response { +public class ListanswersResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public ListanswersResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional listAnswersResponse() { return (Optional) listAnswersResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public ListanswersResponse withListAnswersResponse(ListAnswersResponse listAnswe return this; } + /** * OK */ @@ -143,7 +146,6 @@ public ListanswersResponse withListAnswersResponse(Optional rawResponse; - + private Optional listAnswersResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder listAnswersResponse(Optional listA this.listAnswersResponse = listAnswersResponse; return this; } - + public ListanswersResponse build() { + return new ListanswersResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, listAnswersResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsRequest.java index 1d253736..119cdc59 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsRequest.java @@ -12,8 +12,8 @@ import java.lang.String; import java.util.Optional; -public class ListchatsRequest { +public class ListchatsRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -39,9 +39,10 @@ public Optional timezoneOffset() { return timezoneOffset; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -52,6 +53,7 @@ public ListchatsRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -61,7 +63,6 @@ public ListchatsRequest withTimezoneOffset(Optional timezoneOffset) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -86,15 +87,17 @@ public String toString() { return Utils.toString(ListchatsRequest.class, "timezoneOffset", timezoneOffset); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -112,10 +115,12 @@ public Builder timezoneOffset(Optional timezoneOffset) { this.timezoneOffset = timezoneOffset; return this; } - + public ListchatsRequest build() { + return new ListchatsRequest( timezoneOffset); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsRequestBuilder.java index 28269918..9f423306 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsRequestBuilder.java @@ -44,7 +44,7 @@ private ListchatsRequest buildRequest() { public ListchatsResponse call() throws Exception { RequestOperation operation - = new ListchatsOperation( sdkConfiguration); + = new ListchatsOperation(sdkConfiguration); ListchatsRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsResponse.java index 1f3a6907..bc24105a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListchatsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ListchatsResponse implements Response { +public class ListchatsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public ListchatsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional listChatsResponse() { return (Optional) listChatsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public ListchatsResponse withListChatsResponse(ListChatsResponse listChatsRespon return this; } + /** * OK */ @@ -143,7 +146,6 @@ public ListchatsResponse withListChatsResponse(Optional rawResponse; - + private Optional listChatsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder listChatsResponse(Optional listChats this.listChatsResponse = listChatsResponse; return this; } - + public ListchatsResponse build() { + return new ListchatsResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, listChatsResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListcollectionsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListcollectionsRequestBuilder.java index 7a0ee6ca..eb998788 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListcollectionsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListcollectionsRequestBuilder.java @@ -29,7 +29,7 @@ public ListcollectionsRequestBuilder request(ListCollectionsRequest request) { public ListcollectionsResponse call() throws Exception { RequestOperation operation - = new ListcollectionsOperation( sdkConfiguration); + = new ListcollectionsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListcollectionsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListcollectionsResponse.java index b592eb01..e570378c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListcollectionsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListcollectionsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ListcollectionsResponse implements Response { +public class ListcollectionsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public ListcollectionsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional listCollectionsResponse() { return (Optional) listCollectionsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public ListcollectionsResponse withListCollectionsResponse(ListCollectionsRespon return this; } + /** * OK */ @@ -143,7 +146,6 @@ public ListcollectionsResponse withListCollectionsResponse(Optional rawResponse; - + private Optional listCollectionsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder listCollectionsResponse(Optional operation - = new ListentitiesOperation( sdkConfiguration); + = new ListentitiesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListentitiesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListentitiesResponse.java index 6f6f08a5..a7c0fdf9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListentitiesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListentitiesResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ListentitiesResponse implements Response { +public class ListentitiesResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public ListentitiesResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional listEntitiesResponse() { return (Optional) listEntitiesResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public ListentitiesResponse withListEntitiesResponse(ListEntitiesResponse listEn return this; } + /** * OK */ @@ -143,7 +146,6 @@ public ListentitiesResponse withListEntitiesResponse(Optional rawResponse; - + private Optional listEntitiesResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder listEntitiesResponse(Optional lis this.listEntitiesResponse = listEntitiesResponse; return this; } - + public ListentitiesResponse build() { + return new ListentitiesResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, listEntitiesResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsRequest.java index de0c1eb3..4a93a79d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsRequest.java @@ -14,18 +14,15 @@ *

List pins request */ public class ListpinsRequest { - @JsonCreator public ListpinsRequest() { - - } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -47,16 +44,19 @@ public int hashCode() { public String toString() { return Utils.toString(ListpinsRequest.class); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Builder() { // force use of static builder() method } - + public ListpinsRequest build() { + return new ListpinsRequest( ); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsRequestBuilder.java index 6cb239f5..bfd46ae5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsRequestBuilder.java @@ -28,7 +28,7 @@ public ListpinsRequestBuilder request(ListpinsRequest request) { public ListpinsResponse call() throws Exception { RequestOperation operation - = new ListpinsOperation( sdkConfiguration); + = new ListpinsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsResponse.java index ccef2b92..f3563b03 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpinsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ListpinsResponse implements Response { +public class ListpinsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public ListpinsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional listPinsResponse() { return (Optional) listPinsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public ListpinsResponse withListPinsResponse(ListPinsResponse listPinsResponse) return this; } + /** * OK */ @@ -143,7 +146,6 @@ public ListpinsResponse withListPinsResponse(Optional rawResponse; - + private Optional listPinsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder listPinsResponse(Optional listPinsRes this.listPinsResponse = listPinsResponse; return this; } - + public ListpinsResponse build() { + return new ListpinsResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, listPinsResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesRequest.java index 0000a323..aa14de27 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesRequest.java @@ -12,8 +12,8 @@ import java.lang.String; import java.util.Optional; -public class ListpoliciesRequest { +public class ListpoliciesRequest { /** * Filter to return reports with a given value of auto-hide. */ @@ -56,9 +56,10 @@ public Optional frequency() { return frequency; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Filter to return reports with a given value of auto-hide. @@ -69,6 +70,7 @@ public ListpoliciesRequest withAutoHide(boolean autoHide) { return this; } + /** * Filter to return reports with a given value of auto-hide. */ @@ -87,6 +89,7 @@ public ListpoliciesRequest withFrequency(String frequency) { return this; } + /** * Filter to return reports with a given frequency. */ @@ -96,7 +99,6 @@ public ListpoliciesRequest withFrequency(Optional frequency) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -114,8 +116,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - autoHide, - frequency); + autoHide, frequency); } @Override @@ -124,17 +125,19 @@ public String toString() { "autoHide", autoHide, "frequency", frequency); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional autoHide = Optional.empty(); - + private Optional frequency = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Filter to return reports with a given value of auto-hide. */ @@ -153,6 +156,7 @@ public Builder autoHide(Optional autoHide) { return this; } + /** * Filter to return reports with a given frequency. */ @@ -170,11 +174,12 @@ public Builder frequency(Optional frequency) { this.frequency = frequency; return this; } - + public ListpoliciesRequest build() { + return new ListpoliciesRequest( - autoHide, - frequency); + autoHide, frequency); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesRequestBuilder.java index cfe7fb48..4c1505a9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesRequestBuilder.java @@ -59,7 +59,7 @@ private ListpoliciesRequest buildRequest() { public ListpoliciesResponse call() throws Exception { RequestOperation operation - = new ListpoliciesOperation( sdkConfiguration); + = new ListpoliciesOperation(sdkConfiguration); ListpoliciesRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesResponse.java index 1e244708..67c67d9b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListpoliciesResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ListpoliciesResponse implements Response { +public class ListpoliciesResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public ListpoliciesResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional listDlpReportsResponse() { return (Optional) listDlpReportsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public ListpoliciesResponse withListDlpReportsResponse(ListDlpReportsResponse li return this; } + /** * OK */ @@ -143,7 +146,6 @@ public ListpoliciesResponse withListDlpReportsResponse(Optional rawResponse; - + private Optional listDlpReportsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder listDlpReportsResponse(Optional this.listDlpReportsResponse = listDlpReportsResponse; return this; } - + public ListpoliciesResponse build() { + return new ListpoliciesResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, listDlpReportsResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListshortcutsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListshortcutsRequestBuilder.java index a4b8cc5b..f8a9fe92 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListshortcutsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListshortcutsRequestBuilder.java @@ -29,7 +29,7 @@ public ListshortcutsRequestBuilder request(ListShortcutsPaginatedRequest request public ListshortcutsResponse call() throws Exception { RequestOperation operation - = new ListshortcutsOperation( sdkConfiguration); + = new ListshortcutsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListshortcutsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListshortcutsResponse.java index 462f9743..dafd1947 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListshortcutsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListshortcutsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ListshortcutsResponse implements Response { +public class ListshortcutsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public ListshortcutsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional listShortcutsPaginatedResponse() return (Optional) listShortcutsPaginatedResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public ListshortcutsResponse withListShortcutsPaginatedResponse(ListShortcutsPag return this; } + /** * OK */ @@ -143,7 +146,6 @@ public ListshortcutsResponse withListShortcutsPaginatedResponse(Optional rawResponse; - + private Optional listShortcutsPaginatedResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder listShortcutsPaginatedResponse(Optional count() { return count; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * Maximum number of documents to return @@ -52,6 +53,7 @@ public ListverificationsRequest withCount(long count) { return this; } + /** * Maximum number of documents to return */ @@ -61,7 +63,6 @@ public ListverificationsRequest withCount(Optional count) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -86,15 +87,17 @@ public String toString() { return Utils.toString(ListverificationsRequest.class, "count", count); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional count = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * Maximum number of documents to return */ @@ -112,10 +115,12 @@ public Builder count(Optional count) { this.count = count; return this; } - + public ListverificationsRequest build() { + return new ListverificationsRequest( count); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListverificationsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListverificationsRequestBuilder.java index 62a492e3..03d1b972 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListverificationsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListverificationsRequestBuilder.java @@ -44,7 +44,7 @@ private ListverificationsRequest buildRequest() { public ListverificationsResponse call() throws Exception { RequestOperation operation - = new ListverificationsOperation( sdkConfiguration); + = new ListverificationsOperation(sdkConfiguration); ListverificationsRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListverificationsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListverificationsResponse.java index 41a8f288..8c3d45b1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListverificationsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/ListverificationsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class ListverificationsResponse implements Response { +public class ListverificationsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public ListverificationsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional verificationFeed() { return (Optional) verificationFeed; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public ListverificationsResponse withVerificationFeed(VerificationFeed verificat return this; } + /** * OK */ @@ -143,7 +146,6 @@ public ListverificationsResponse withVerificationFeed(Optional rawResponse; - + private Optional verificationFeed = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder verificationFeed(Optional verificatio this.verificationFeed = verificationFeed; return this; } - + public ListverificationsResponse build() { + return new ListverificationsResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, verificationFeed); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/MessagesRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/MessagesRequestBuilder.java index 14960ecf..44f75047 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/MessagesRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/MessagesRequestBuilder.java @@ -29,7 +29,7 @@ public MessagesRequestBuilder request(MessagesRequest request) { public MessagesResponse call() throws Exception { RequestOperation operation - = new MessagesOperation( sdkConfiguration); + = new MessagesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/MessagesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/MessagesResponse.java index c8ae3e5e..53ada8e2 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/MessagesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/MessagesResponse.java @@ -15,8 +15,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class MessagesResponse implements Response { +public class MessagesResponse implements Response { /** * HTTP response content type for this operation */ @@ -57,7 +57,8 @@ public MessagesResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -93,9 +94,10 @@ public Optional) messagesResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -133,6 +135,7 @@ public MessagesResponse withMessagesResponse(com.glean.api_client.glean_api_clie return this; } + /** * OK */ @@ -142,7 +145,6 @@ public MessagesResponse withMessagesResponse(Optional rawResponse; - + private Optional messagesResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -200,6 +202,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -209,6 +212,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -218,6 +222,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -235,13 +240,13 @@ public Builder messagesResponse(Optional operation - = new PeopleOperation( sdkConfiguration); + = new PeopleOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PeopleResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PeopleResponse.java index d3656fad..a8342c7f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PeopleResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PeopleResponse.java @@ -15,8 +15,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PeopleResponse implements Response { +public class PeopleResponse implements Response { /** * HTTP response content type for this operation */ @@ -57,7 +57,8 @@ public PeopleResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -93,9 +94,10 @@ public Optional) peopleResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -133,6 +135,7 @@ public PeopleResponse withPeopleResponse(com.glean.api_client.glean_api_client.m return this; } + /** * OK */ @@ -142,7 +145,6 @@ public PeopleResponse withPeopleResponse(Optional rawResponse; - + private Optional peopleResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -200,6 +202,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -209,6 +212,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -218,6 +222,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -235,13 +240,13 @@ public Builder peopleResponse(Optional operation - = new PinOperation( sdkConfiguration); + = new PinOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PinResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PinResponse.java index f339ff31..20dc49d8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PinResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PinResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PinResponse implements Response { +public class PinResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PinResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional pinDocument() { return (Optional) pinDocument; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PinResponse withPinDocument(PinDocument pinDocument) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PinResponse withPinDocument(Optional pinDocument) return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, pinDocument); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "pinDocument", pinDocument); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional pinDocument = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder pinDocument(Optional pinDocument) { this.pinDocument = pinDocument; return this; } - + public PinResponse build() { + return new PinResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, pinDocument); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceRequestBuilder.java index f55e42e3..8be861a4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1AdddatasourceRequestBuilder request(CustomDatasourceConfig public PostApiIndexV1AdddatasourceResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1AdddatasourceOperation( sdkConfiguration); + = new PostApiIndexV1AdddatasourceOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceResponse.java index 71714abc..1bbe5b40 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1AdddatasourceResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1AdddatasourceResponse implements Response { +public class PostApiIndexV1AdddatasourceResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1AdddatasourceResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1AdddatasourceResponse build() { + return new PostApiIndexV1AdddatasourceResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BetausersRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BetausersRequestBuilder.java index 2a24c263..08bfbc8d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BetausersRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BetausersRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1BetausersRequestBuilder request(GreenlistUsersRequest reque public PostApiIndexV1BetausersResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1BetausersOperation( sdkConfiguration); + = new PostApiIndexV1BetausersOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BetausersResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BetausersResponse.java index 6f5d6fe9..e29536f1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BetausersResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BetausersResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1BetausersResponse implements Response { +public class PostApiIndexV1BetausersResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1BetausersResponse withRawResponse(HttpResponse return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1BetausersResponse build() { + return new PostApiIndexV1BetausersResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexdocumentsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexdocumentsRequestBuilder.java index f532fef3..8942cb6e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexdocumentsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexdocumentsRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1BulkindexdocumentsRequestBuilder request(BulkIndexDocuments public PostApiIndexV1BulkindexdocumentsResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexdocumentsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexdocumentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexdocumentsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexdocumentsResponse.java index fb49a36a..3e50fffc 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexdocumentsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexdocumentsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1BulkindexdocumentsResponse implements Response { +public class PostApiIndexV1BulkindexdocumentsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1BulkindexdocumentsResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1BulkindexdocumentsResponse build() { + return new PostApiIndexV1BulkindexdocumentsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexemployeesRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexemployeesRequestBuilder.java index d333d76b..aec65c67 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexemployeesRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexemployeesRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1BulkindexemployeesRequestBuilder request(BulkIndexEmployees public PostApiIndexV1BulkindexemployeesResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexemployeesOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexemployeesOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexemployeesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexemployeesResponse.java index 82794c0c..7d6e8ef5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexemployeesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexemployeesResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1BulkindexemployeesResponse implements Response { +public class PostApiIndexV1BulkindexemployeesResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1BulkindexemployeesResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1BulkindexemployeesResponse build() { + return new PostApiIndexV1BulkindexemployeesResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexgroupsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexgroupsRequestBuilder.java index 750ac87f..5126a273 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexgroupsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexgroupsRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1BulkindexgroupsRequestBuilder request(BulkIndexGroupsReques public PostApiIndexV1BulkindexgroupsResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexgroupsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexgroupsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexgroupsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexgroupsResponse.java index e1017373..5294e5d3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexgroupsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexgroupsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1BulkindexgroupsResponse implements Response { +public class PostApiIndexV1BulkindexgroupsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1BulkindexgroupsResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1BulkindexgroupsResponse build() { + return new PostApiIndexV1BulkindexgroupsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexmembershipsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexmembershipsRequestBuilder.java index 0728b4e6..80a2d79e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexmembershipsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexmembershipsRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1BulkindexmembershipsRequestBuilder request(BulkIndexMembers public PostApiIndexV1BulkindexmembershipsResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexmembershipsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexmembershipsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexmembershipsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexmembershipsResponse.java index 1323f069..73681117 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexmembershipsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexmembershipsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1BulkindexmembershipsResponse implements Response { +public class PostApiIndexV1BulkindexmembershipsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1BulkindexmembershipsResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1BulkindexmembershipsResponse build() { + return new PostApiIndexV1BulkindexmembershipsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexshortcutsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexshortcutsRequestBuilder.java index f0133689..98f2c142 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexshortcutsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexshortcutsRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1BulkindexshortcutsRequestBuilder request(BulkIndexShortcuts public PostApiIndexV1BulkindexshortcutsResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexshortcutsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexshortcutsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexshortcutsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexshortcutsResponse.java index eb376e2c..45898d2e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexshortcutsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexshortcutsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1BulkindexshortcutsResponse implements Response { +public class PostApiIndexV1BulkindexshortcutsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1BulkindexshortcutsResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1BulkindexshortcutsResponse build() { + return new PostApiIndexV1BulkindexshortcutsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexteamsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexteamsRequestBuilder.java index d94b6f17..045b2121 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexteamsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexteamsRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1BulkindexteamsRequestBuilder request(BulkIndexTeamsRequest public PostApiIndexV1BulkindexteamsResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexteamsOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexteamsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexteamsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexteamsResponse.java index df448b09..6f8efdeb 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexteamsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexteamsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1BulkindexteamsResponse implements Response { +public class PostApiIndexV1BulkindexteamsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1BulkindexteamsResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1BulkindexteamsResponse build() { + return new PostApiIndexV1BulkindexteamsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexusersRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexusersRequestBuilder.java index de7d3311..a5eaea6b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexusersRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexusersRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1BulkindexusersRequestBuilder request(BulkIndexUsersRequest public PostApiIndexV1BulkindexusersResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1BulkindexusersOperation( sdkConfiguration); + = new PostApiIndexV1BulkindexusersOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexusersResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexusersResponse.java index 2c322d6c..167c3ce7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexusersResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1BulkindexusersResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1BulkindexusersResponse implements Response { +public class PostApiIndexV1BulkindexusersResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1BulkindexusersResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1BulkindexusersResponse build() { + return new PostApiIndexV1BulkindexusersResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1CheckdocumentaccessRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1CheckdocumentaccessRequestBuilder.java index 23a90698..86ed20bc 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1CheckdocumentaccessRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1CheckdocumentaccessRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1CheckdocumentaccessRequestBuilder request(CheckDocumentAcce public PostApiIndexV1CheckdocumentaccessResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1CheckdocumentaccessOperation( sdkConfiguration); + = new PostApiIndexV1CheckdocumentaccessOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1CheckdocumentaccessResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1CheckdocumentaccessResponse.java index abe3aa0f..074d6797 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1CheckdocumentaccessResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1CheckdocumentaccessResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1CheckdocumentaccessResponse implements Response { +public class PostApiIndexV1CheckdocumentaccessResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1CheckdocumentaccessResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional checkDocumentAccessResponse() { return (Optional) checkDocumentAccessResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1CheckdocumentaccessResponse withCheckDocumentAccessResponse return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1CheckdocumentaccessResponse withCheckDocumentAccessResponse return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, checkDocumentAccessResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "checkDocumentAccessResponse", checkDocumentAccessResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional checkDocumentAccessResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder checkDocumentAccessResponse(Optional operation - = new PostApiIndexV1DebugDatasourceDocumentOperation( sdkConfiguration); + = new PostApiIndexV1DebugDatasourceDocumentOperation(sdkConfiguration); PostApiIndexV1DebugDatasourceDocumentRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentResponse.java index 3c0c6c74..2df992a1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1DebugDatasourceDocumentResponse implements Response { +public class PostApiIndexV1DebugDatasourceDocumentResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1DebugDatasourceDocumentResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional debugDocumentResponse() { return (Optional) debugDocumentResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1DebugDatasourceDocumentResponse withDebugDocumentResponse(D return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1DebugDatasourceDocumentResponse withDebugDocumentResponse(O return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, debugDocumentResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "debugDocumentResponse", debugDocumentResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional debugDocumentResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder debugDocumentResponse(Optional d this.debugDocumentResponse = debugDocumentResponse; return this; } - + public PostApiIndexV1DebugDatasourceDocumentResponse build() { + return new PostApiIndexV1DebugDatasourceDocumentResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, debugDocumentResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsRequest.java index 0fedd0f0..fe806348 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsRequest.java @@ -11,14 +11,15 @@ import java.lang.Override; import java.lang.String; -public class PostApiIndexV1DebugDatasourceDocumentsRequest { +public class PostApiIndexV1DebugDatasourceDocumentsRequest { /** * The datasource to which the document belongs */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=datasource") private String datasource; + @SpeakeasyMetadata("request:mediaType=application/json") private DebugDocumentsRequest debugDocumentsRequest; @@ -45,9 +46,10 @@ public DebugDocumentsRequest debugDocumentsRequest() { return debugDocumentsRequest; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The datasource to which the document belongs @@ -64,7 +66,6 @@ public PostApiIndexV1DebugDatasourceDocumentsRequest withDebugDocumentsRequest(D return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -82,8 +83,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - datasource, - debugDocumentsRequest); + datasource, debugDocumentsRequest); } @Override @@ -92,17 +92,19 @@ public String toString() { "datasource", datasource, "debugDocumentsRequest", debugDocumentsRequest); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private DebugDocumentsRequest debugDocumentsRequest; - + private Builder() { // force use of static builder() method } + /** * The datasource to which the document belongs */ @@ -112,16 +114,18 @@ public Builder datasource(String datasource) { return this; } + public Builder debugDocumentsRequest(DebugDocumentsRequest debugDocumentsRequest) { Utils.checkNotNull(debugDocumentsRequest, "debugDocumentsRequest"); this.debugDocumentsRequest = debugDocumentsRequest; return this; } - + public PostApiIndexV1DebugDatasourceDocumentsRequest build() { + return new PostApiIndexV1DebugDatasourceDocumentsRequest( - datasource, - debugDocumentsRequest); + datasource, debugDocumentsRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsRequestBuilder.java index f25a935c..c8f84757 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsRequestBuilder.java @@ -46,7 +46,7 @@ private PostApiIndexV1DebugDatasourceDocumentsRequest buildRequest() { public PostApiIndexV1DebugDatasourceDocumentsResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1DebugDatasourceDocumentsOperation( sdkConfiguration); + = new PostApiIndexV1DebugDatasourceDocumentsOperation(sdkConfiguration); PostApiIndexV1DebugDatasourceDocumentsRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsResponse.java index d2566685..7cc6dcf0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceDocumentsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1DebugDatasourceDocumentsResponse implements Response { +public class PostApiIndexV1DebugDatasourceDocumentsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1DebugDatasourceDocumentsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional debugDocumentsResponse() { return (Optional) debugDocumentsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1DebugDatasourceDocumentsResponse withDebugDocumentsResponse return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1DebugDatasourceDocumentsResponse withDebugDocumentsResponse return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, debugDocumentsResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "debugDocumentsResponse", debugDocumentsResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional debugDocumentsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder debugDocumentsResponse(Optional this.debugDocumentsResponse = debugDocumentsResponse; return this; } - + public PostApiIndexV1DebugDatasourceDocumentsResponse build() { + return new PostApiIndexV1DebugDatasourceDocumentsResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, debugDocumentsResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusRequest.java index c599c95b..d46f651d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusRequest.java @@ -10,8 +10,8 @@ import java.lang.Override; import java.lang.String; -public class PostApiIndexV1DebugDatasourceStatusRequest { +public class PostApiIndexV1DebugDatasourceStatusRequest { /** * The datasource to get debug status for. */ @@ -33,9 +33,10 @@ public String datasource() { return datasource; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The datasource to get debug status for. @@ -46,7 +47,6 @@ public PostApiIndexV1DebugDatasourceStatusRequest withDatasource(String datasour return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -71,15 +71,17 @@ public String toString() { return Utils.toString(PostApiIndexV1DebugDatasourceStatusRequest.class, "datasource", datasource); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String datasource; - + private Builder() { // force use of static builder() method } + /** * The datasource to get debug status for. */ @@ -88,10 +90,12 @@ public Builder datasource(String datasource) { this.datasource = datasource; return this; } - + public PostApiIndexV1DebugDatasourceStatusRequest build() { + return new PostApiIndexV1DebugDatasourceStatusRequest( datasource); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusRequestBuilder.java index 233a197e..0c4d98b7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusRequestBuilder.java @@ -37,7 +37,7 @@ private PostApiIndexV1DebugDatasourceStatusRequest buildRequest() { public PostApiIndexV1DebugDatasourceStatusResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1DebugDatasourceStatusOperation( sdkConfiguration); + = new PostApiIndexV1DebugDatasourceStatusOperation(sdkConfiguration); PostApiIndexV1DebugDatasourceStatusRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusResponse.java index fe68a01a..cf474590 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceStatusResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1DebugDatasourceStatusResponse implements Response { +public class PostApiIndexV1DebugDatasourceStatusResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1DebugDatasourceStatusResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional debugDatasourceStatusResponse() { return (Optional) debugDatasourceStatusResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1DebugDatasourceStatusResponse withDebugDatasourceStatusResp return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1DebugDatasourceStatusResponse withDebugDatasourceStatusResp return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, debugDatasourceStatusResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "debugDatasourceStatusResponse", debugDatasourceStatusResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional debugDatasourceStatusResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder debugDatasourceStatusResponse(Optional operation - = new PostApiIndexV1DebugDatasourceUserOperation( sdkConfiguration); + = new PostApiIndexV1DebugDatasourceUserOperation(sdkConfiguration); PostApiIndexV1DebugDatasourceUserRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceUserResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceUserResponse.java index d3a819ae..4eee2e05 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceUserResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DebugDatasourceUserResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1DebugDatasourceUserResponse implements Response { +public class PostApiIndexV1DebugDatasourceUserResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1DebugDatasourceUserResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional debugUserResponse() { return (Optional) debugUserResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1DebugDatasourceUserResponse withDebugUserResponse(DebugUser return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1DebugDatasourceUserResponse withDebugUserResponse(Optional< return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, debugUserResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "debugUserResponse", debugUserResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional debugUserResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder debugUserResponse(Optional debugUser this.debugUserResponse = debugUserResponse; return this; } - + public PostApiIndexV1DebugDatasourceUserResponse build() { + return new PostApiIndexV1DebugDatasourceUserResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, debugUserResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletedocumentRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletedocumentRequestBuilder.java index 2a18caaa..a359261b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletedocumentRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletedocumentRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1DeletedocumentRequestBuilder request(DeleteDocumentRequest public PostApiIndexV1DeletedocumentResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1DeletedocumentOperation( sdkConfiguration); + = new PostApiIndexV1DeletedocumentOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletedocumentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletedocumentResponse.java index 26627e73..3995b5a5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletedocumentResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletedocumentResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1DeletedocumentResponse implements Response { +public class PostApiIndexV1DeletedocumentResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1DeletedocumentResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1DeletedocumentResponse build() { + return new PostApiIndexV1DeletedocumentResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteemployeeRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteemployeeRequestBuilder.java index 1f0cdf48..863d0190 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteemployeeRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteemployeeRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1DeleteemployeeRequestBuilder request(DeleteEmployeeRequest public PostApiIndexV1DeleteemployeeResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1DeleteemployeeOperation( sdkConfiguration); + = new PostApiIndexV1DeleteemployeeOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteemployeeResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteemployeeResponse.java index 5635fc73..d224566a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteemployeeResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteemployeeResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1DeleteemployeeResponse implements Response { +public class PostApiIndexV1DeleteemployeeResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1DeleteemployeeResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1DeleteemployeeResponse build() { + return new PostApiIndexV1DeleteemployeeResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletegroupRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletegroupRequestBuilder.java index 3e8f92ee..b2e6575b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletegroupRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletegroupRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1DeletegroupRequestBuilder request(DeleteGroupRequest reques public PostApiIndexV1DeletegroupResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1DeletegroupOperation( sdkConfiguration); + = new PostApiIndexV1DeletegroupOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletegroupResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletegroupResponse.java index df70640b..05af807f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletegroupResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletegroupResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1DeletegroupResponse implements Response { +public class PostApiIndexV1DeletegroupResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1DeletegroupResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1DeletegroupResponse build() { + return new PostApiIndexV1DeletegroupResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletemembershipRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletemembershipRequestBuilder.java index d580867b..d47311a7 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletemembershipRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletemembershipRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1DeletemembershipRequestBuilder request(DeleteMembershipRequ public PostApiIndexV1DeletemembershipResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1DeletemembershipOperation( sdkConfiguration); + = new PostApiIndexV1DeletemembershipOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletemembershipResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletemembershipResponse.java index d9a83c92..1f2b6fc3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletemembershipResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeletemembershipResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1DeletemembershipResponse implements Response { +public class PostApiIndexV1DeletemembershipResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1DeletemembershipResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1DeletemembershipResponse build() { + return new PostApiIndexV1DeletemembershipResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteteamRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteteamRequestBuilder.java index f341638d..0351db0c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteteamRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteteamRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1DeleteteamRequestBuilder request(DeleteTeamRequest request) public PostApiIndexV1DeleteteamResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1DeleteteamOperation( sdkConfiguration); + = new PostApiIndexV1DeleteteamOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteteamResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteteamResponse.java index 338e21fd..c1701cda 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteteamResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteteamResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1DeleteteamResponse implements Response { +public class PostApiIndexV1DeleteteamResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1DeleteteamResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1DeleteteamResponse build() { + return new PostApiIndexV1DeleteteamResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteuserRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteuserRequestBuilder.java index bab2ef1d..5e720585 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteuserRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteuserRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1DeleteuserRequestBuilder request(DeleteUserRequest request) public PostApiIndexV1DeleteuserResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1DeleteuserOperation( sdkConfiguration); + = new PostApiIndexV1DeleteuserOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteuserResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteuserResponse.java index 2b6cc1ab..1ce3eb57 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteuserResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1DeleteuserResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1DeleteuserResponse implements Response { +public class PostApiIndexV1DeleteuserResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1DeleteuserResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1DeleteuserResponse build() { + return new PostApiIndexV1DeleteuserResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdatasourceconfigRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdatasourceconfigRequestBuilder.java index 358b4fa9..6e12ff98 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdatasourceconfigRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdatasourceconfigRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1GetdatasourceconfigRequestBuilder request(GetDatasourceConf public PostApiIndexV1GetdatasourceconfigResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1GetdatasourceconfigOperation( sdkConfiguration); + = new PostApiIndexV1GetdatasourceconfigOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdatasourceconfigResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdatasourceconfigResponse.java index 8fffc64c..57fdd2b4 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdatasourceconfigResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdatasourceconfigResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1GetdatasourceconfigResponse implements Response { +public class PostApiIndexV1GetdatasourceconfigResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1GetdatasourceconfigResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional customDatasourceConfig() { return (Optional) customDatasourceConfig; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1GetdatasourceconfigResponse withCustomDatasourceConfig(Cust return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1GetdatasourceconfigResponse withCustomDatasourceConfig(Opti return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, customDatasourceConfig); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "customDatasourceConfig", customDatasourceConfig); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional customDatasourceConfig = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder customDatasourceConfig(Optional this.customDatasourceConfig = customDatasourceConfig; return this; } - + public PostApiIndexV1GetdatasourceconfigResponse build() { + return new PostApiIndexV1GetdatasourceconfigResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, customDatasourceConfig); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentcountRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentcountRequestBuilder.java index a72af5ab..785be290 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentcountRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentcountRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1GetdocumentcountRequestBuilder request(GetDocumentCountRequ public PostApiIndexV1GetdocumentcountResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1GetdocumentcountOperation( sdkConfiguration); + = new PostApiIndexV1GetdocumentcountOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentcountResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentcountResponse.java index e3b77422..0fa051e9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentcountResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentcountResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1GetdocumentcountResponse implements Response { +public class PostApiIndexV1GetdocumentcountResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1GetdocumentcountResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getDocumentCountResponse() { return (Optional) getDocumentCountResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1GetdocumentcountResponse withGetDocumentCountResponse(GetDo return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1GetdocumentcountResponse withGetDocumentCountResponse(Optio return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getDocumentCountResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "getDocumentCountResponse", getDocumentCountResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional getDocumentCountResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getDocumentCountResponse(Optional operation - = new PostApiIndexV1GetdocumentstatusOperation( sdkConfiguration); + = new PostApiIndexV1GetdocumentstatusOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentstatusResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentstatusResponse.java index c7ac623f..bb4ed62d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentstatusResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetdocumentstatusResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1GetdocumentstatusResponse implements Response { +public class PostApiIndexV1GetdocumentstatusResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1GetdocumentstatusResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getDocumentStatusResponse() { return (Optional) getDocumentStatusResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1GetdocumentstatusResponse withGetDocumentStatusResponse(Get return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1GetdocumentstatusResponse withGetDocumentStatusResponse(Opt return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getDocumentStatusResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "getDocumentStatusResponse", getDocumentStatusResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional getDocumentStatusResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getDocumentStatusResponse(Optional operation - = new PostApiIndexV1GetusercountOperation( sdkConfiguration); + = new PostApiIndexV1GetusercountOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetusercountResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetusercountResponse.java index a3692e98..f7f9fd67 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetusercountResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1GetusercountResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1GetusercountResponse implements Response { +public class PostApiIndexV1GetusercountResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1GetusercountResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional getUserCountResponse() { return (Optional) getUserCountResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1GetusercountResponse withGetUserCountResponse(GetUserCountR return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1GetusercountResponse withGetUserCountResponse(Optional rawResponse; - + private Optional getUserCountResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder getUserCountResponse(Optional get this.getUserCountResponse = getUserCountResponse; return this; } - + public PostApiIndexV1GetusercountResponse build() { + return new PostApiIndexV1GetusercountResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, getUserCountResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentRequestBuilder.java index 0de41bb5..23f93a78 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1IndexdocumentRequestBuilder request(IndexDocumentRequest re public PostApiIndexV1IndexdocumentResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1IndexdocumentOperation( sdkConfiguration); + = new PostApiIndexV1IndexdocumentOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentResponse.java index 8d9a991f..4940342f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1IndexdocumentResponse implements Response { +public class PostApiIndexV1IndexdocumentResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1IndexdocumentResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1IndexdocumentResponse build() { + return new PostApiIndexV1IndexdocumentResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentsRequestBuilder.java index c663c1cf..5359c742 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentsRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1IndexdocumentsRequestBuilder request(IndexDocumentsRequest public PostApiIndexV1IndexdocumentsResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1IndexdocumentsOperation( sdkConfiguration); + = new PostApiIndexV1IndexdocumentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentsResponse.java index b87316b1..b90a5e05 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexdocumentsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1IndexdocumentsResponse implements Response { +public class PostApiIndexV1IndexdocumentsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1IndexdocumentsResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1IndexdocumentsResponse build() { + return new PostApiIndexV1IndexdocumentsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexemployeeRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexemployeeRequestBuilder.java index 8d37fe19..c4b93e2d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexemployeeRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexemployeeRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1IndexemployeeRequestBuilder request(IndexEmployeeRequest re public PostApiIndexV1IndexemployeeResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1IndexemployeeOperation( sdkConfiguration); + = new PostApiIndexV1IndexemployeeOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexemployeeResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexemployeeResponse.java index dde0bc01..015f1c1f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexemployeeResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexemployeeResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1IndexemployeeResponse implements Response { +public class PostApiIndexV1IndexemployeeResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1IndexemployeeResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1IndexemployeeResponse build() { + return new PostApiIndexV1IndexemployeeResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexgroupRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexgroupRequestBuilder.java index a900b5ec..f920b7de 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexgroupRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexgroupRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1IndexgroupRequestBuilder request(IndexGroupRequest request) public PostApiIndexV1IndexgroupResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1IndexgroupOperation( sdkConfiguration); + = new PostApiIndexV1IndexgroupOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexgroupResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexgroupResponse.java index 5c309005..19c5b072 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexgroupResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexgroupResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1IndexgroupResponse implements Response { +public class PostApiIndexV1IndexgroupResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1IndexgroupResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1IndexgroupResponse build() { + return new PostApiIndexV1IndexgroupResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexmembershipRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexmembershipRequestBuilder.java index a2c7eeb8..37cbeb0f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexmembershipRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexmembershipRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1IndexmembershipRequestBuilder request(IndexMembershipReques public PostApiIndexV1IndexmembershipResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1IndexmembershipOperation( sdkConfiguration); + = new PostApiIndexV1IndexmembershipOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexmembershipResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexmembershipResponse.java index e5b08135..ced8da31 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexmembershipResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexmembershipResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1IndexmembershipResponse implements Response { +public class PostApiIndexV1IndexmembershipResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1IndexmembershipResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1IndexmembershipResponse build() { + return new PostApiIndexV1IndexmembershipResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexteamRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexteamRequestBuilder.java index bd6dd7ff..736f671a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexteamRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexteamRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1IndexteamRequestBuilder request(IndexTeamRequest request) { public PostApiIndexV1IndexteamResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1IndexteamOperation( sdkConfiguration); + = new PostApiIndexV1IndexteamOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexteamResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexteamResponse.java index 326ee0bd..55d40a1b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexteamResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexteamResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1IndexteamResponse implements Response { +public class PostApiIndexV1IndexteamResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1IndexteamResponse withRawResponse(HttpResponse return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1IndexteamResponse build() { + return new PostApiIndexV1IndexteamResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexuserRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexuserRequestBuilder.java index 5ed97479..1cc614e0 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexuserRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexuserRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1IndexuserRequestBuilder request(IndexUserRequest request) { public PostApiIndexV1IndexuserResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1IndexuserOperation( sdkConfiguration); + = new PostApiIndexV1IndexuserOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexuserResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexuserResponse.java index 23d5dd41..f185e4c8 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexuserResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1IndexuserResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1IndexuserResponse implements Response { +public class PostApiIndexV1IndexuserResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1IndexuserResponse withRawResponse(HttpResponse return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1IndexuserResponse build() { + return new PostApiIndexV1IndexuserResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessalldocumentsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessalldocumentsRequestBuilder.java index ba33ef6a..381ddbd3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessalldocumentsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessalldocumentsRequestBuilder.java @@ -36,7 +36,7 @@ public PostApiIndexV1ProcessalldocumentsRequestBuilder request(Optional, PostApiIndexV1ProcessalldocumentsResponse> operation - = new PostApiIndexV1ProcessalldocumentsOperation( sdkConfiguration); + = new PostApiIndexV1ProcessalldocumentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessalldocumentsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessalldocumentsResponse.java index dd1154e2..40cd3f4f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessalldocumentsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessalldocumentsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1ProcessalldocumentsResponse implements Response { +public class PostApiIndexV1ProcessalldocumentsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1ProcessalldocumentsResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1ProcessalldocumentsResponse build() { + return new PostApiIndexV1ProcessalldocumentsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallemployeesandteamsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallemployeesandteamsRequestBuilder.java index 020e7d0c..1f601215 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallemployeesandteamsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallemployeesandteamsRequestBuilder.java @@ -20,7 +20,7 @@ public PostApiIndexV1ProcessallemployeesandteamsRequestBuilder(SDKConfiguration public PostApiIndexV1ProcessallemployeesandteamsResponse call() throws Exception { RequestlessOperation operation - = new PostApiIndexV1ProcessallemployeesandteamsOperation( sdkConfiguration); + = new PostApiIndexV1ProcessallemployeesandteamsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest()); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallemployeesandteamsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallemployeesandteamsResponse.java index 516bf838..a94cb18a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallemployeesandteamsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallemployeesandteamsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1ProcessallemployeesandteamsResponse implements Response { +public class PostApiIndexV1ProcessallemployeesandteamsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1ProcessallemployeesandteamsResponse withRawResponse(HttpRes return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1ProcessallemployeesandteamsResponse build() { + return new PostApiIndexV1ProcessallemployeesandteamsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallmembershipsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallmembershipsRequestBuilder.java index 83f31773..fb51e0c3 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallmembershipsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallmembershipsRequestBuilder.java @@ -36,7 +36,7 @@ public PostApiIndexV1ProcessallmembershipsRequestBuilder request(Optional, PostApiIndexV1ProcessallmembershipsResponse> operation - = new PostApiIndexV1ProcessallmembershipsOperation( sdkConfiguration); + = new PostApiIndexV1ProcessallmembershipsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallmembershipsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallmembershipsResponse.java index 42283323..f1fd07a5 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallmembershipsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1ProcessallmembershipsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1ProcessallmembershipsResponse implements Response { +public class PostApiIndexV1ProcessallmembershipsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1ProcessallmembershipsResponse withRawResponse(HttpResponse< return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1ProcessallmembershipsResponse build() { + return new PostApiIndexV1ProcessallmembershipsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1RotatetokenRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1RotatetokenRequestBuilder.java index f70d0a40..7443de2a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1RotatetokenRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1RotatetokenRequestBuilder.java @@ -20,7 +20,7 @@ public PostApiIndexV1RotatetokenRequestBuilder(SDKConfiguration sdkConfiguration public PostApiIndexV1RotatetokenResponse call() throws Exception { RequestlessOperation operation - = new PostApiIndexV1RotatetokenOperation( sdkConfiguration); + = new PostApiIndexV1RotatetokenOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest()); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1RotatetokenResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1RotatetokenResponse.java index e0543e19..8ede30e1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1RotatetokenResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1RotatetokenResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostApiIndexV1RotatetokenResponse implements Response { +public class PostApiIndexV1RotatetokenResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostApiIndexV1RotatetokenResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional rotateTokenResponse() { return (Optional) rotateTokenResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostApiIndexV1RotatetokenResponse withRotateTokenResponse(RotateTokenResp return this; } + /** * OK */ @@ -143,7 +146,6 @@ public PostApiIndexV1RotatetokenResponse withRotateTokenResponse(Optional rawResponse; - + private Optional rotateTokenResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder rotateTokenResponse(Optional rotat this.rotateTokenResponse = rotateTokenResponse; return this; } - + public PostApiIndexV1RotatetokenResponse build() { + return new PostApiIndexV1RotatetokenResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, rotateTokenResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UpdatepermissionsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UpdatepermissionsRequestBuilder.java index 8934a9ca..ee9a13ab 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UpdatepermissionsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UpdatepermissionsRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1UpdatepermissionsRequestBuilder request(UpdatePermissionsRe public PostApiIndexV1UpdatepermissionsResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1UpdatepermissionsOperation( sdkConfiguration); + = new PostApiIndexV1UpdatepermissionsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UpdatepermissionsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UpdatepermissionsResponse.java index 8595ff7e..8e0c0968 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UpdatepermissionsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UpdatepermissionsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1UpdatepermissionsResponse implements Response { +public class PostApiIndexV1UpdatepermissionsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1UpdatepermissionsResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1UpdatepermissionsResponse build() { + return new PostApiIndexV1UpdatepermissionsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UploadshortcutsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UploadshortcutsRequestBuilder.java index 32f275a1..6f4b73cf 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UploadshortcutsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UploadshortcutsRequestBuilder.java @@ -29,7 +29,7 @@ public PostApiIndexV1UploadshortcutsRequestBuilder request(UploadShortcutsReques public PostApiIndexV1UploadshortcutsResponse call() throws Exception { RequestOperation operation - = new PostApiIndexV1UploadshortcutsOperation( sdkConfiguration); + = new PostApiIndexV1UploadshortcutsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UploadshortcutsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UploadshortcutsResponse.java index 89fd0175..7c2a6531 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UploadshortcutsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostApiIndexV1UploadshortcutsResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class PostApiIndexV1UploadshortcutsResponse implements Response { +public class PostApiIndexV1UploadshortcutsResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public PostApiIndexV1UploadshortcutsResponse withRawResponse(HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public PostApiIndexV1UploadshortcutsResponse build() { + return new PostApiIndexV1UploadshortcutsResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallRequestBuilder.java index e35b39e0..68815141 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallRequestBuilder.java @@ -29,7 +29,7 @@ public PostRestApiV1ToolsCallRequestBuilder request(ToolsCallRequest request) { public PostRestApiV1ToolsCallResponse call() throws Exception { RequestOperation operation - = new PostRestApiV1ToolsCallOperation( sdkConfiguration); + = new PostRestApiV1ToolsCallOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallResponse.java index 0f58bf9a..0fddcc27 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/PostRestApiV1ToolsCallResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class PostRestApiV1ToolsCallResponse implements Response { +public class PostRestApiV1ToolsCallResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public PostRestApiV1ToolsCallResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional toolsCallResponse() { return (Optional) toolsCallResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public PostRestApiV1ToolsCallResponse withToolsCallResponse(ToolsCallResponse to return this; } + /** * Successful operation */ @@ -143,7 +146,6 @@ public PostRestApiV1ToolsCallResponse withToolsCallResponse(Optional rawResponse; - + private Optional toolsCallResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Successful operation */ @@ -236,13 +241,13 @@ public Builder toolsCallResponse(Optional toolsCall this.toolsCallResponse = toolsCallResponse; return this; } - + public PostRestApiV1ToolsCallResponse build() { + return new PostRestApiV1ToolsCallResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, toolsCallResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/RecommendationsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RecommendationsRequestBuilder.java index 2531a2cf..fc42a1c1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/RecommendationsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RecommendationsRequestBuilder.java @@ -29,7 +29,7 @@ public RecommendationsRequestBuilder request(RecommendationsRequest request) { public RecommendationsResponse call() throws Exception { RequestOperation operation - = new RecommendationsOperation( sdkConfiguration); + = new RecommendationsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/RecommendationsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RecommendationsResponse.java index 7b3b0363..ad926c8f 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/RecommendationsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/RecommendationsResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class RecommendationsResponse implements Response { +public class RecommendationsResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public RecommendationsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional resultsResponse() { return (Optional) resultsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public RecommendationsResponse withResultsResponse(ResultsResponse resultsRespon return this; } + /** * OK */ @@ -143,7 +146,6 @@ public RecommendationsResponse withResultsResponse(Optional rawResponse; - + private Optional resultsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder resultsResponse(Optional resultsRespon this.resultsResponse = resultsResponse; return this; } - + public RecommendationsResponse build() { + return new RecommendationsResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, resultsResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchAgentsRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchAgentsRequestBuilder.java index 8e3f0b33..889697ba 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchAgentsRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchAgentsRequestBuilder.java @@ -29,7 +29,7 @@ public SearchAgentsRequestBuilder request(SearchAgentsRequest request) { public SearchAgentsResponse call() throws Exception { RequestOperation operation - = new SearchAgentsOperation( sdkConfiguration); + = new SearchAgentsOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchAgentsResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchAgentsResponse.java index 0cca3f64..945f9aa9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchAgentsResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchAgentsResponse.java @@ -15,8 +15,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class SearchAgentsResponse implements Response { +public class SearchAgentsResponse implements Response { /** * HTTP response content type for this operation */ @@ -57,7 +57,8 @@ public SearchAgentsResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -93,9 +94,10 @@ public Optional) searchAgentsResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -133,6 +135,7 @@ public SearchAgentsResponse withSearchAgentsResponse(com.glean.api_client.glean_ return this; } + /** * Success */ @@ -142,7 +145,6 @@ public SearchAgentsResponse withSearchAgentsResponse(Optional rawResponse; - + private Optional searchAgentsResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -200,6 +202,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -209,6 +212,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -218,6 +222,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * Success */ @@ -235,13 +240,13 @@ public Builder searchAgentsResponse(Optional operation - = new SearchOperation( sdkConfiguration); + = new SearchOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchResponse.java index 2f243724..a29d9aa9 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SearchResponse.java @@ -15,8 +15,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class SearchResponse implements Response { +public class SearchResponse implements Response { /** * HTTP response content type for this operation */ @@ -57,7 +57,8 @@ public SearchResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -93,9 +94,10 @@ public Optional) searchResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -133,6 +135,7 @@ public SearchResponse withSearchResponse(com.glean.api_client.glean_api_client.m return this; } + /** * OK */ @@ -142,7 +145,6 @@ public SearchResponse withSearchResponse(Optional rawResponse; - + private Optional searchResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -200,6 +202,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -209,6 +212,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -218,6 +222,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -235,13 +240,13 @@ public Builder searchResponse(Optional operation - = new SetdocvisibilityOperation( sdkConfiguration); + = new SetdocvisibilityOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SetdocvisibilityResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SetdocvisibilityResponse.java index 7599a7cc..55b6696b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SetdocvisibilityResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SetdocvisibilityResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class SetdocvisibilityResponse implements Response { +public class SetdocvisibilityResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public SetdocvisibilityResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional updateDocumentVisibil return (Optional) updateDocumentVisibilityOverridesResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public SetdocvisibilityResponse withUpdateDocumentVisibilityOverridesResponse(Up return this; } + /** * OK */ @@ -143,7 +146,6 @@ public SetdocvisibilityResponse withUpdateDocumentVisibilityOverridesResponse(Op return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, updateDocumentVisibilityOverridesResponse); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "updateDocumentVisibilityOverridesResponse", updateDocumentVisibilityOverridesResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional updateDocumentVisibilityOverridesResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder updateDocumentVisibilityOverridesResponse(Optional operation - = new SummarizeOperation( sdkConfiguration); + = new SummarizeOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SummarizeResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SummarizeResponse.java index 9263a4a2..a4b524f1 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/SummarizeResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/SummarizeResponse.java @@ -15,8 +15,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class SummarizeResponse implements Response { +public class SummarizeResponse implements Response { /** * HTTP response content type for this operation */ @@ -57,7 +57,8 @@ public SummarizeResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -93,9 +94,10 @@ public Optional) summarizeResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -133,6 +135,7 @@ public SummarizeResponse withSummarizeResponse(com.glean.api_client.glean_api_cl return this; } + /** * OK */ @@ -142,7 +145,6 @@ public SummarizeResponse withSummarizeResponse(Optional rawResponse; - + private Optional summarizeResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -200,6 +202,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -209,6 +212,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -218,6 +222,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -235,13 +240,13 @@ public Builder summarizeResponse(Optional operation - = new UnpinOperation( sdkConfiguration); + = new UnpinOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UnpinResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UnpinResponse.java index 622efdbe..8989de1e 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UnpinResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UnpinResponse.java @@ -13,8 +13,8 @@ import java.lang.String; import java.net.http.HttpResponse; -public class UnpinResponse implements Response { +public class UnpinResponse implements Response { /** * HTTP response content type for this operation */ @@ -67,9 +67,10 @@ public HttpResponse rawResponse() { return rawResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -98,7 +99,6 @@ public UnpinResponse withRawResponse(HttpResponse rawResponse) { return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -117,9 +117,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } @Override @@ -129,19 +127,21 @@ public String toString() { "statusCode", statusCode, "rawResponse", rawResponse); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -151,6 +151,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -160,6 +161,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -168,12 +170,12 @@ public Builder rawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - + public UnpinResponse build() { + return new UnpinResponse( - contentType, - statusCode, - rawResponse); + contentType, statusCode, rawResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateannouncementRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateannouncementRequestBuilder.java index 140ba880..a0bb1f35 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateannouncementRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateannouncementRequestBuilder.java @@ -29,7 +29,7 @@ public UpdateannouncementRequestBuilder request(UpdateAnnouncementRequest reques public UpdateannouncementResponse call() throws Exception { RequestOperation operation - = new UpdateannouncementOperation( sdkConfiguration); + = new UpdateannouncementOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateannouncementResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateannouncementResponse.java index fe581dd8..f7506c87 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateannouncementResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateannouncementResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class UpdateannouncementResponse implements Response { +public class UpdateannouncementResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public UpdateannouncementResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional announcement() { return (Optional) announcement; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public UpdateannouncementResponse withAnnouncement(Announcement announcement) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public UpdateannouncementResponse withAnnouncement(Optional rawResponse; - + private Optional announcement = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder announcement(Optional announcement) { this.announcement = announcement; return this; } - + public UpdateannouncementResponse build() { + return new UpdateannouncementResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, announcement); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyRequest.java index 3aa6ecec..7747ad04 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyRequest.java @@ -11,14 +11,15 @@ import java.lang.Override; import java.lang.String; -public class UpdatepolicyRequest { +public class UpdatepolicyRequest { /** * The id of the policy to fetch. */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=id") private String id; + @SpeakeasyMetadata("request:mediaType=application/json") private UpdateDlpReportRequest updateDlpReportRequest; @@ -45,9 +46,10 @@ public UpdateDlpReportRequest updateDlpReportRequest() { return updateDlpReportRequest; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The id of the policy to fetch. @@ -64,7 +66,6 @@ public UpdatepolicyRequest withUpdateDlpReportRequest(UpdateDlpReportRequest upd return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -82,8 +83,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - id, - updateDlpReportRequest); + id, updateDlpReportRequest); } @Override @@ -92,17 +92,19 @@ public String toString() { "id", id, "updateDlpReportRequest", updateDlpReportRequest); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String id; - + private UpdateDlpReportRequest updateDlpReportRequest; - + private Builder() { // force use of static builder() method } + /** * The id of the policy to fetch. */ @@ -112,16 +114,18 @@ public Builder id(String id) { return this; } + public Builder updateDlpReportRequest(UpdateDlpReportRequest updateDlpReportRequest) { Utils.checkNotNull(updateDlpReportRequest, "updateDlpReportRequest"); this.updateDlpReportRequest = updateDlpReportRequest; return this; } - + public UpdatepolicyRequest build() { + return new UpdatepolicyRequest( - id, - updateDlpReportRequest); + id, updateDlpReportRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyRequestBuilder.java index 10eb5baf..7461334a 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyRequestBuilder.java @@ -46,7 +46,7 @@ private UpdatepolicyRequest buildRequest() { public UpdatepolicyResponse call() throws Exception { RequestOperation operation - = new UpdatepolicyOperation( sdkConfiguration); + = new UpdatepolicyOperation(sdkConfiguration); UpdatepolicyRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyResponse.java index d62f6939..2647e53c 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdatepolicyResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class UpdatepolicyResponse implements Response { +public class UpdatepolicyResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public UpdatepolicyResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional updateDlpReportResponse() { return (Optional) updateDlpReportResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public UpdatepolicyResponse withUpdateDlpReportResponse(UpdateDlpReportResponse return this; } + /** * OK */ @@ -143,7 +146,6 @@ public UpdatepolicyResponse withUpdateDlpReportResponse(Optional rawResponse; - + private Optional updateDlpReportResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder updateDlpReportResponse(Optional operation - = new UpdateshortcutOperation( sdkConfiguration); + = new UpdateshortcutOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateshortcutResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateshortcutResponse.java index b15b6628..fd2f4a98 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateshortcutResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UpdateshortcutResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class UpdateshortcutResponse implements Response { +public class UpdateshortcutResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public UpdateshortcutResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional updateShortcutResponse() { return (Optional) updateShortcutResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public UpdateshortcutResponse withUpdateShortcutResponse(UpdateShortcutResponse return this; } + /** * OK */ @@ -143,7 +146,6 @@ public UpdateshortcutResponse withUpdateShortcutResponse(Optional rawResponse; - + private Optional updateShortcutResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder updateShortcutResponse(Optional this.updateShortcutResponse = updateShortcutResponse; return this; } - + public UpdateshortcutResponse build() { + return new UpdateshortcutResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, updateShortcutResponse); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesRequest.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesRequest.java index 66326551..c3196cbf 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesRequest.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesRequest.java @@ -13,14 +13,15 @@ import java.lang.String; import java.util.Optional; -public class UploadchatfilesRequest { +public class UploadchatfilesRequest { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @SpeakeasyMetadata("queryParam:style=form,explode=true,name=timezoneOffset") private Optional timezoneOffset; + @SpeakeasyMetadata("request:mediaType=multipart/form-data") private UploadChatFilesRequest uploadChatFilesRequest; @@ -52,9 +53,10 @@ public UploadChatFilesRequest uploadChatFilesRequest() { return uploadChatFilesRequest; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. @@ -65,6 +67,7 @@ public UploadchatfilesRequest withTimezoneOffset(long timezoneOffset) { return this; } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -80,7 +83,6 @@ public UploadchatfilesRequest withUploadChatFilesRequest(UploadChatFilesRequest return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -98,8 +100,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - timezoneOffset, - uploadChatFilesRequest); + timezoneOffset, uploadChatFilesRequest); } @Override @@ -108,17 +109,19 @@ public String toString() { "timezoneOffset", timezoneOffset, "uploadChatFilesRequest", uploadChatFilesRequest); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private Optional timezoneOffset = Optional.empty(); - + private UploadChatFilesRequest uploadChatFilesRequest; - + private Builder() { // force use of static builder() method } + /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ @@ -137,16 +140,18 @@ public Builder timezoneOffset(Optional timezoneOffset) { return this; } + public Builder uploadChatFilesRequest(UploadChatFilesRequest uploadChatFilesRequest) { Utils.checkNotNull(uploadChatFilesRequest, "uploadChatFilesRequest"); this.uploadChatFilesRequest = uploadChatFilesRequest; return this; } - + public UploadchatfilesRequest build() { + return new UploadchatfilesRequest( - timezoneOffset, - uploadChatFilesRequest); + timezoneOffset, uploadChatFilesRequest); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesRequestBuilder.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesRequestBuilder.java index 95c3518e..38ab899b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesRequestBuilder.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesRequestBuilder.java @@ -53,7 +53,7 @@ private UploadchatfilesRequest buildRequest() { public UploadchatfilesResponse call() throws Exception { RequestOperation operation - = new UploadchatfilesOperation( sdkConfiguration); + = new UploadchatfilesOperation(sdkConfiguration); UploadchatfilesRequest request = buildRequest(); return operation.handleResponse(operation.doRequest(request)); diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesResponse.java index 457d7c58..c1aced43 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/UploadchatfilesResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class UploadchatfilesResponse implements Response { +public class UploadchatfilesResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public UploadchatfilesResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional uploadChatFilesResponse() { return (Optional) uploadChatFilesResponse; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public UploadchatfilesResponse withUploadChatFilesResponse(UploadChatFilesRespon return this; } + /** * OK */ @@ -143,7 +146,6 @@ public UploadchatfilesResponse withUploadChatFilesResponse(Optional rawResponse; - + private Optional uploadChatFilesResponse = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder uploadChatFilesResponse(Optional operation - = new VerifyOperation( sdkConfiguration); + = new VerifyOperation(sdkConfiguration); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/com/glean/api_client/glean_api_client/models/operations/VerifyResponse.java b/src/main/java/com/glean/api_client/glean_api_client/models/operations/VerifyResponse.java index 9a9ecb62..419c3c8d 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/models/operations/VerifyResponse.java +++ b/src/main/java/com/glean/api_client/glean_api_client/models/operations/VerifyResponse.java @@ -16,8 +16,8 @@ import java.net.http.HttpResponse; import java.util.Optional; -public class VerifyResponse implements Response { +public class VerifyResponse implements Response { /** * HTTP response content type for this operation */ @@ -58,7 +58,8 @@ public VerifyResponse( String contentType, int statusCode, HttpResponse rawResponse) { - this(contentType, statusCode, rawResponse, Optional.empty()); + this(contentType, statusCode, rawResponse, + Optional.empty()); } /** @@ -94,9 +95,10 @@ public Optional verification() { return (Optional) verification; } - public final static Builder builder() { + public static Builder builder() { return new Builder(); - } + } + /** * HTTP response content type for this operation @@ -134,6 +136,7 @@ public VerifyResponse withVerification(Verification verification) { return this; } + /** * OK */ @@ -143,7 +146,6 @@ public VerifyResponse withVerification(Optional verifica return this; } - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -163,9 +165,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Utils.enhancedHash( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, verification); } @@ -177,21 +177,23 @@ public String toString() { "rawResponse", rawResponse, "verification", verification); } - + + @SuppressWarnings("UnusedReturnValue") public final static class Builder { - + private String contentType; - + private Integer statusCode; - + private HttpResponse rawResponse; - + private Optional verification = Optional.empty(); - + private Builder() { // force use of static builder() method } + /** * HTTP response content type for this operation */ @@ -201,6 +203,7 @@ public Builder contentType(String contentType) { return this; } + /** * HTTP response status code for this operation */ @@ -210,6 +213,7 @@ public Builder statusCode(int statusCode) { return this; } + /** * Raw HTTP response; suitable for custom response parsing */ @@ -219,6 +223,7 @@ public Builder rawResponse(HttpResponse rawResponse) { return this; } + /** * OK */ @@ -236,13 +241,13 @@ public Builder verification(Optional verification) { this.verification = verification; return this; } - + public VerifyResponse build() { + return new VerifyResponse( - contentType, - statusCode, - rawResponse, + contentType, statusCode, rawResponse, verification); } + } } diff --git a/src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java b/src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java index 2bb4c46f..4a56783b 100644 --- a/src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java +++ b/src/main/java/com/glean/api_client/glean_api_client/utils/Utils.java @@ -326,11 +326,13 @@ public static String templateUrl(String url, Map params) { } public static Map> getHeadersFromMetadata(Object headers, Globals globals) throws Exception { + Map> result = new HashMap<>(); if (headers == null) { - return Collections.emptyMap(); - } + // include all global headers in result if not already present + mergeGlobalHeaders(result, globals); - Map> result = new HashMap<>(); + return result; + } Field[] fields = headers.getClass().getDeclaredFields(); @@ -452,16 +454,21 @@ public static Map> getHeadersFromMetadata(Object headers, G } // include all global headers in result if not already present - if (globals != null) { - globals.headerParamsAsStream() - .filter(entry -> !result.containsKey(entry.getKey())) - .forEach(entry -> result.put(entry.getKey(), // - Arrays.asList(entry.getValue()))); - } + mergeGlobalHeaders(result, globals); return result; } + private static void mergeGlobalHeaders(Map> headers, Globals globals) { + if (globals == null) { + return; + } + globals.headerParamsAsStream() + .filter(entry -> !headers.containsKey(entry.getKey())) + .forEach(entry -> headers.put(entry.getKey(), + Collections.singletonList(entry.getValue()))); + } + public static String valToString(Object value) { if (value.getClass().isEnum()) { try { @@ -762,6 +769,10 @@ public JsonShape shape() { } static Object resolveStringShape(Class type, String fieldName, Object value) throws IllegalAccessException { + if (value == null) { + return value; + } + try { // the presence of this TypeReference field indicates that the parameter // has a JsonShape of String and that we should convert BigInteger to diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1addcollectionitems.go b/tests/mockserver/internal/handler/pathpostrestapiv1addcollectionitems.go index dab5c26e..e62da16d 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1addcollectionitems.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1addcollectionitems.go @@ -200,9 +200,17 @@ func testAddcollectionitemsAddcollectionitems0(w http.ResponseWriter, req *http. Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 489899, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 168446, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createanswer.go b/tests/mockserver/internal/handler/pathpostrestapiv1createanswer.go index 43a60a18..6ce4d8e1 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1createanswer.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createanswer.go @@ -262,10 +262,18 @@ func testCreateanswerCreateanswer0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 749299, }, }, LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 150565, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go index 4f0b0df3..f1995629 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1createcollection.go @@ -265,9 +265,17 @@ func testCreatecollectionCreatecollection0(w http.ResponseWriter, req *http.Requ Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 493315, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 778851, }, components.Reminder{ diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1deletecollectionitem.go b/tests/mockserver/internal/handler/pathpostrestapiv1deletecollectionitem.go index d97e781c..759b4f17 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1deletecollectionitem.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1deletecollectionitem.go @@ -251,10 +251,18 @@ func testDeletecollectionitemDeletecollectionitem0(w http.ResponseWriter, req *h Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 835281, }, }, LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 239964, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1editanswer.go b/tests/mockserver/internal/handler/pathpostrestapiv1editanswer.go index d84b2456..45ae180f 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1editanswer.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1editanswer.go @@ -296,10 +296,18 @@ func testEditanswerEditanswer0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 103434, }, }, LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 57214, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1editcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1editcollection.go index c5dfa62d..47cb6c30 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1editcollection.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1editcollection.go @@ -243,10 +243,18 @@ func testEditcollectionEditcollection0(w http.ResponseWriter, req *http.Request) Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 318637, }, }, LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 219050, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1editcollectionitem.go b/tests/mockserver/internal/handler/pathpostrestapiv1editcollectionitem.go index 186281db..e8267aff 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1editcollectionitem.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1editcollectionitem.go @@ -231,9 +231,17 @@ func testEditcollectionitemEditcollectionitem0(w http.ResponseWriter, req *http. Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 841463, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 402252, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1editpin.go b/tests/mockserver/internal/handler/pathpostrestapiv1editpin.go index e08ef257..e82599c5 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1editpin.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1editpin.go @@ -264,9 +264,17 @@ func testEditpinEditpin0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 448916, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 494003, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getanswer.go b/tests/mockserver/internal/handler/pathpostrestapiv1getanswer.go index a7e0758e..530876b0 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1getanswer.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getanswer.go @@ -264,9 +264,17 @@ func testGetanswerGetanswer0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 656841, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 570980, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go index 6e47d93c..e93faedf 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getchat.go @@ -1058,10 +1058,16 @@ func testGetchatGetchat0(w http.ResponseWriter, req *http.Request) { Description: types.String("however generally ew ha sonar usually slow guacamole"), Unlisted: types.Bool(false), URLTemplate: types.String(""), - CreatedBy: &components.Person{}, - CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), - UpdatedBy: &components.Person{}, - UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + CreatedBy: &components.Person{ + Name: "", + ObfuscatedID: "", + }, + CreateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), + UpdatedBy: &components.Person{ + Name: "", + ObfuscatedID: "", + }, + UpdateTime: types.MustNewTimeFromString("2000-01-23T04:56:07.000Z"), }, QuerySuggestions: &components.QuerySuggestionList{ Suggestions: []components.QuerySuggestion{}, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getcollection.go b/tests/mockserver/internal/handler/pathpostrestapiv1getcollection.go index d0aa8100..cbf1b0e6 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1getcollection.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getcollection.go @@ -233,9 +233,17 @@ func testGetcollectionGetcollection0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 149108, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 741131, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1getpin.go b/tests/mockserver/internal/handler/pathpostrestapiv1getpin.go index d99e95ec..00d01237 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1getpin.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1getpin.go @@ -273,9 +273,17 @@ func testGetpinGetpin0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 845806, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 350813, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1insights.go b/tests/mockserver/internal/handler/pathpostrestapiv1insights.go index 6f0e3cea..db802511 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1insights.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1insights.go @@ -315,9 +315,17 @@ func testInsightsInsights0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 856562, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 328633, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listanswers.go b/tests/mockserver/internal/handler/pathpostrestapiv1listanswers.go index 6380017d..86c16485 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1listanswers.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listanswers.go @@ -243,10 +243,18 @@ func testListanswersListanswers0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 810770, }, }, LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 956959, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listchats.go b/tests/mockserver/internal/handler/pathpostrestapiv1listchats.go index 2b3865dc..12675a76 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1listchats.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listchats.go @@ -303,9 +303,17 @@ func testListchatsListchats0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 505778, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 948614, }, components.Reminder{ diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listcollections.go b/tests/mockserver/internal/handler/pathpostrestapiv1listcollections.go index 04b48fcf..3bb946af 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1listcollections.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listcollections.go @@ -213,9 +213,17 @@ func testListcollectionsListcollections0(w http.ResponseWriter, req *http.Reques Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 777245, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 141764, }, components.Reminder{ diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listentities.go b/tests/mockserver/internal/handler/pathpostrestapiv1listentities.go index 37ad6f80..327753f0 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1listentities.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listentities.go @@ -267,9 +267,17 @@ func testListentitiesListentities0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 406555, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 29267, }, components.Reminder{ diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listpins.go b/tests/mockserver/internal/handler/pathpostrestapiv1listpins.go index 7bb86559..04de1ad7 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1listpins.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listpins.go @@ -278,9 +278,17 @@ func testListpinsListpins0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 838038, }, components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 517221, }, }, diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1listshortcuts.go b/tests/mockserver/internal/handler/pathpostrestapiv1listshortcuts.go index 29fd4d6a..6591d82a 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1listshortcuts.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1listshortcuts.go @@ -56,17 +56,26 @@ func testListshortcutsListshortcuts0(w http.ResponseWriter, req *http.Request) { components.Shortcut{ InputAlias: "", DestinationURL: types.String("https://remorseful-concentration.biz"), - CreatedBy: &components.Person{}, + CreatedBy: &components.Person{ + Name: "", + ObfuscatedID: "", + }, }, components.Shortcut{ InputAlias: "", DestinationURL: types.String("https://primary-paintwork.com/"), - CreatedBy: &components.Person{}, + CreatedBy: &components.Person{ + Name: "", + ObfuscatedID: "", + }, }, components.Shortcut{ InputAlias: "", DestinationURL: types.String("https://breakable-bathrobe.net"), - CreatedBy: &components.Person{}, + CreatedBy: &components.Person{ + Name: "", + ObfuscatedID: "", + }, }, }, FacetResults: []components.FacetResult{ diff --git a/tests/mockserver/internal/handler/pathpostrestapiv1pin.go b/tests/mockserver/internal/handler/pathpostrestapiv1pin.go index 6d279e1e..89fd54cc 100644 --- a/tests/mockserver/internal/handler/pathpostrestapiv1pin.go +++ b/tests/mockserver/internal/handler/pathpostrestapiv1pin.go @@ -293,10 +293,18 @@ func testPinPin0(w http.ResponseWriter, req *http.Request) { Metadata: &components.VerificationMetadata{ Reminders: []components.Reminder{ components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 982866, }, }, LastReminder: &components.Reminder{ + Assignee: components.Person{ + Name: "George Clooney", + ObfuscatedID: "abc123", + }, RemindAt: 482357, }, }, From f1e6a2c58756f833847bcc4d1b97a37e4756f154 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 02:16:13 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow